mirror of
https://github.com/Sarjuuk/aowow.git
synced 2025-11-29 15:58:16 +08:00
Spell/Sources
* always display quest source from RewardSpellCast * fix inherited quest sources via learn spells * closes #353
This commit is contained in:
@@ -1066,6 +1066,7 @@ class SpellBaseResponse extends TemplateResponse implements ICache
|
|||||||
$tbsData = [];
|
$tbsData = [];
|
||||||
if (!$tbSpell->error)
|
if (!$tbSpell->error)
|
||||||
{
|
{
|
||||||
|
$tbsData = $tbSpell->getFoundIDs();
|
||||||
$this->lvTabs->addListviewTab(new Listview(array(
|
$this->lvTabs->addListviewTab(new Listview(array(
|
||||||
'data' => $tbSpell->getListviewData(),
|
'data' => $tbSpell->getListviewData(),
|
||||||
'id' => 'taught-by-spell',
|
'id' => 'taught-by-spell',
|
||||||
@@ -1076,15 +1077,14 @@ class SpellBaseResponse extends TemplateResponse implements ICache
|
|||||||
}
|
}
|
||||||
|
|
||||||
// tab: taught by quest
|
// tab: taught by quest
|
||||||
$conditions = ['OR', ['sourceSpellId', $this->typeId], ['rewardSpell', $this->typeId]];
|
$conditions = array(
|
||||||
|
'OR',
|
||||||
|
['sourceSpellId', $this->typeId],
|
||||||
|
['rewardSpell', $this->typeId],
|
||||||
|
['rewardSpellCast', $this->typeId]
|
||||||
|
);
|
||||||
if ($tbsData)
|
if ($tbsData)
|
||||||
{
|
array_push($conditions, ['rewardSpell', $tbsData], ['rewardSpellCast', $tbsData]);
|
||||||
$conditions[] = ['rewardSpell', array_keys($tbsData)];
|
|
||||||
if (User::isInGroup(U_GROUP_EMPLOYEE))
|
|
||||||
$conditions[] = ['rewardSpellCast', array_keys($tbsData)];
|
|
||||||
}
|
|
||||||
if (User::isInGroup(U_GROUP_EMPLOYEE))
|
|
||||||
$conditions[] = ['rewardSpellCast', $this->typeId];
|
|
||||||
|
|
||||||
$tbQuest = new QuestList($conditions);
|
$tbQuest = new QuestList($conditions);
|
||||||
if (!$tbQuest->error)
|
if (!$tbQuest->error)
|
||||||
|
|||||||
Reference in New Issue
Block a user