Quests/Fixup
* show related quests on detail page for events without associated holiday * closes #480
This commit is contained in:
parent
6077c39055
commit
e96fafaf8b
1 changed files with 19 additions and 19 deletions
|
|
@ -225,33 +225,33 @@ class EventBaseResponse extends TemplateResponse implements ICache
|
|||
}
|
||||
|
||||
$itemCnd[] = ['eventId', $this->typeId]; // direct requirement on item
|
||||
}
|
||||
|
||||
// tab: quests (by table, go & creature)
|
||||
$quests = new QuestList(array(['eventId', $this->typeId]));
|
||||
if (!$quests->error)
|
||||
{
|
||||
$this->extendGlobalData($quests->getJSGlobals(GLOBALINFO_SELF | GLOBALINFO_REWARDS));
|
||||
// tab: quests (by table, go & creature)
|
||||
$quests = new QuestList(array(['eventId', $this->typeId]));
|
||||
if (!$quests->error)
|
||||
{
|
||||
$this->extendGlobalData($quests->getJSGlobals(GLOBALINFO_SELF | GLOBALINFO_REWARDS));
|
||||
|
||||
$tabData = ['data'=> $quests->getListviewData()];
|
||||
$tabData = ['data'=> $quests->getListviewData()];
|
||||
|
||||
if (QuestListFilter::getCriteriaIndex(33, $_holidayId))
|
||||
$tabData['note'] = sprintf(Util::$filterResultString, '?quests&filter=cr=33;crs='.$_holidayId.';crv=0');
|
||||
if (QuestListFilter::getCriteriaIndex(33, $_holidayId))
|
||||
$tabData['note'] = sprintf(Util::$filterResultString, '?quests&filter=cr=33;crs='.$_holidayId.';crv=0');
|
||||
|
||||
$this->lvTabs->addListviewTab(new Listview($tabData, QuestList::$brickFile));
|
||||
$this->lvTabs->addListviewTab(new Listview($tabData, QuestList::$brickFile));
|
||||
|
||||
$questItems = [];
|
||||
foreach (array_column($quests->rewards, Type::ITEM) as $arr)
|
||||
$questItems = array_merge($questItems, array_keys($arr));
|
||||
$questItems = [];
|
||||
foreach (array_column($quests->rewards, Type::ITEM) as $arr)
|
||||
$questItems = array_merge($questItems, array_keys($arr));
|
||||
|
||||
foreach (array_column($quests->choices, Type::ITEM) as $arr)
|
||||
$questItems = array_merge($questItems, array_keys($arr));
|
||||
foreach (array_column($quests->choices, Type::ITEM) as $arr)
|
||||
$questItems = array_merge($questItems, array_keys($arr));
|
||||
|
||||
foreach (array_column($quests->requires, Type::ITEM) as $arr)
|
||||
$questItems = array_merge($questItems, $arr);
|
||||
foreach (array_column($quests->requires, Type::ITEM) as $arr)
|
||||
$questItems = array_merge($questItems, $arr);
|
||||
|
||||
if ($questItems)
|
||||
$itemCnd[] = ['id', $questItems];
|
||||
}
|
||||
if ($questItems)
|
||||
$itemCnd[] = ['id', $questItems];
|
||||
}
|
||||
|
||||
// items from creature
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue