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:
parent
69b8fdcc27
commit
4e848e29a7
2 changed files with 7 additions and 5 deletions
|
|
@ -335,7 +335,7 @@ class QuestBaseResponse extends TemplateResponse implements ICache
|
|||
|
||||
if (!$olItemData->getEntry($itemId))
|
||||
{
|
||||
$this->objectiveList[] = [0, new IconElement(0, 0, Util::ucFirst(Lang::game('item')).' #'.$itemId, $qty > 1 ? $qty : '', extraText: $provided ? Lang::quest('provided') : null)];
|
||||
$this->objectiveList[] = [0, new IconElement(0, 0, Util::ucFirst(Lang::game('item')).' #'.$itemId, $qty > 1 ? $qty : '', size: IconElement::SIZE_SMALL, extraText: $provided ? Lang::quest('provided') : null)];
|
||||
continue;
|
||||
}
|
||||
|
||||
|
|
@ -448,7 +448,7 @@ class QuestBaseResponse extends TemplateResponse implements ICache
|
|||
continue;
|
||||
|
||||
if (!$olGOData->getEntry($i))
|
||||
$this->objectiveList[] = [0, new IconElement(0, 0, Util::ucFirst(Lang::game('object')).' #'.$i, $qty > 1 ? $qty : '')];
|
||||
$this->objectiveList[] = [0, new IconElement(0, 0, Util::ucFirst(Lang::game('object')).' #'.$i, $qty > 1 ? $qty : '', size: IconElement::SIZE_SMALL)];
|
||||
else
|
||||
$this->objectiveList[] = [0, new IconElement(
|
||||
Type::OBJECT,
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue