From fb3209a4d9046ea0a994547c5761b5a57b180188 Mon Sep 17 00:00:00 2001 From: "NeatElves@gmail.com" Date: Sun, 22 Feb 2015 11:26:00 +0000 Subject: [PATCH] =?utf8?q?=D0=94=D0=BB=D1=8F=20cmangos=2012843+,=20=D0=BF?= =?utf8?q?=D0=B5=D1=80=D0=B5=D0=BD=D0=BE=D1=81=20=D0=BF=D0=BE=D1=87=D1=82?= =?utf8?q?=D1=8B=20=D0=B4=D0=BB=D1=8F=20=D0=B7=D0=B0=D0=B4=D0=B0=D0=BD?= =?utf8?q?=D0=B8=D0=B9.?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit git-svn-id: http://cswowd-fork.googlecode.com/svn/trunk@194 e451fad0-63ce-11de-bed1-e3a98b22654c --- include/functions.php | 16 ++++++++++++++++ module/show/show_quest.php | 6 +++--- 2 files changed, 19 insertions(+), 3 deletions(-) diff --git a/include/functions.php b/include/functions.php index 2715bbb..57f1a00 100644 --- a/include/functions.php +++ b/include/functions.php @@ -1117,6 +1117,22 @@ function getItemFlags2($item_id) return $item; } +function getMail($quest_id) +{ + global $dDB, $config; + $getMailId = $dDB->selectCell("-- CACHE: 1h + SELECT `datalong` FROM `dbscripts_on_quest_end` WHERE `command` = 38 AND `id` = ?d", $quest_id); + return $getMailId; +} + +function getMailTime($quest_id) +{ + global $dDB, $config; + $getMailTime = $dDB->selectCell("-- CACHE: 1h + SELECT `dataint` FROM `dbscripts_on_quest_end` WHERE `command` = 38 AND `id` = ?d", $quest_id); + return $getMailTime; +} + function getItemMail($item_id) { global $dDB, $config; diff --git a/module/show/show_quest.php b/module/show/show_quest.php index 12afcb2..d6631ad 100644 --- a/module/show/show_quest.php +++ b/module/show/show_quest.php @@ -278,10 +278,10 @@ if ($quest['RewChoiceItemId1'] OR $quest['RewChoiceItemId2'] OR $quest['RewChoic if ($quest['RewChoiceItemId6']) {echo $lang['item_sel_or'];show_item($quest['RewChoiceItemId6']);} echo ""; } -if ($quest['RewMailTemplateId']) +if (getMail($entry)) { - $MailTime=$quest['RewMailDelaySecs']/60/60; - $ItemMail=getItemMail($quest['RewMailTemplateId']); + $MailTime=getMailTime($entry)/60/60; + $ItemMail=getItemMail(getMail($entry)); echo "$lang[Rew_mail] $lang[Mail_item_time]".$MailTime."$lang[Mail_time]"; if ($ItemMail) { -- 2.11.4.GIT