Spell/Effects

* do not rely displayInfo for spell effects, that can occur multiple times per spell
Items/CurrencyFor
 * always send all currency-info to javascript (an item may require more then one to be bought)
This commit is contained in:
Sarjuuk
2017-03-13 16:02:12 +01:00
parent e1fd2db64d
commit 103251a537
2 changed files with 9 additions and 9 deletions

View File

@@ -875,7 +875,7 @@ class ItemPage extends genericPage
$this->lvTabs[] = ['item', $tabData]; $this->lvTabs[] = ['item', $tabData];
$this->extendGlobalData($boughtBy->getJSGlobals(GLOBALINFO_SELF)); $this->extendGlobalData($boughtBy->getJSGlobals(GLOBALINFO_SELF | GLOBALINFO_RELATED));
} }
} }

View File

@@ -1636,12 +1636,12 @@ class SpellPage extends GenericPage
case 28: // Summon case 28: // Summon
case 90: // Kill Credit case 90: // Kill Credit
case 134: // Kill Credit2 case 134: // Kill Credit2
$_ = Lang::game('npc').' #'.$effMV;
if ($summon = $this->subject->getModelInfo($this->typeId, $i)) if ($summon = $this->subject->getModelInfo($this->typeId, $i))
{
$_ = $summon['typeId'] ? ' (<a href="?npc='.$summon['typeId'].'">'.$summon['displayName'].'</a>)' : ' (#0)';
$redButtons[BUTTON_VIEW3D] = ['type' => TYPE_NPC, 'displayId' => $summon['displayId']]; $redButtons[BUTTON_VIEW3D] = ['type' => TYPE_NPC, 'displayId' => $summon['displayId']];
}
$_ = Lang::game('npc').' #'.$effMV;
if ($n = CreatureList::getName($effMV))
$_ = ' (<a href="?npc='.$effMV.'">'.$n.'</a>)';
$foo['name'] .= $_; $foo['name'] .= $_;
break; break;
@@ -1689,12 +1689,12 @@ class SpellPage extends GenericPage
case 105: // Summon Object (slot 2) case 105: // Summon Object (slot 2)
case 106: // Summon Object (slot 3) case 106: // Summon Object (slot 3)
case 107: // Summon Object (slot 4) case 107: // Summon Object (slot 4)
$_ = Util::ucFirst(Lang::game('object')).' #'.$effMV;
if ($summon = $this->subject->getModelInfo($this->typeId, $i)) if ($summon = $this->subject->getModelInfo($this->typeId, $i))
{
$_ = $summon['typeId'] ? ' (<a href="?object='.$summon['typeId'].'">'.$summon['displayName'].'</a>)' : ' (#0)';
$redButtons[BUTTON_VIEW3D] = ['type' => TYPE_OBJECT, 'displayId' => $summon['displayId']]; $redButtons[BUTTON_VIEW3D] = ['type' => TYPE_OBJECT, 'displayId' => $summon['displayId']];
}
$_ = Util::ucFirst(Lang::game('object')).' #'.$effMV;
if ($n = GameobjectList::getName($effMV))
$_ = ' (<a href="?object='.$effMV.'">'.$n.'</a>)';
$foo['name'] .= $_; $foo['name'] .= $_;
break; break;