Skip to content
Permalink
Browse files

Quest/Mails

 * apply table quest_mail_sender to display correct mail source
  • Loading branch information...
Sarjuuk committed Dec 14, 2018
1 parent 34fe4c2 commit c1b3e60cb5494c58ca51488b5cd7fc855dd801d9
Showing with 10 additions and 11 deletions.
  1. +10 −11 pages/quest.php
@@ -1236,17 +1236,16 @@ private function createMail($startEnd)
'subject' => Util::parseHtmlText(Util::localizedString($letter, 'subject'))
);
foreach ($startEnd as $se)
{
if (!($se['method'] & 0x2) || $se['type'] != TYPE_NPC)
continue;
if ($ti = CreatureList::getName($se['typeId']))
{
$mail['sender'] = sprintf(Lang::quest('mailBy'), $se['typeId'], $ti);
break;
}
}
$senderTypeId = 0;
if ($_= DB::World()->selectCell('SELECT RewardMailSenderEntry FROM quest_mail_sender WHERE QuestId = ?d', $this->typeId))
$senderTypeId = $_;
else
foreach ($startEnd as $se)
if (($se['method'] & 0x2) && $se['type'] == TYPE_NPC)
$senderTypeId = $se['typeId'];
if ($ti = CreatureList::getName($senderTypeId))
$mail['sender'] = sprintf(Lang::quest('mailBy'), $senderTypeId, $ti);
// while mail attachemnts are handled as loot, it has no variance. Always 100% chance, always one item.
$mailLoot = new Loot();

0 comments on commit c1b3e60

Please sign in to comment.
You can’t perform that action at this time.