Quests/Fixup

* fix missing objective quantity if required entity is unknwon
 * don't display go/npc objective if go/npc id is 0
This commit is contained in:
Sarjuuk 2025-12-28 19:38:31 +01:00
parent 69b8fdcc27
commit 4e848e29a7
2 changed files with 7 additions and 5 deletions

View file

@ -338,13 +338,15 @@ class QuestList extends DBTypeList
$rng = $this->curTpl['reqNpcOrGo'.$i];
$rngQty = $this->curTpl['reqNpcOrGoCount'.$i];
if ($rngQty < 1 && (!$rng || $ot))
if (!$ot && ($rngQty < 1 || !$rng))
continue;
if ($ot)
$name = $ot;
else
$name = $rng > 0 ? CreatureList::getName($rng) : Lang::unescapeUISequences(GameObjectList::getName(-$rng), Lang::FMT_HTML);
else if ($rng > 0)
$name = CreatureList::getName($rng);
else if ($rng < 0)
$name = Lang::unescapeUISequences(GameObjectList::getName(-$rng), Lang::FMT_HTML);
if (!$name)
$name = Util::ucFirst(Lang::game($rng > 0 ? 'npc' : 'object')).' #'.abs($rng);