Pages/Quest

* fixed display of spell rewards, if rewardSpellCast was negative
This commit is contained in:
Sarjuuk
2016-03-20 18:33:56 +01:00
parent a8d686104e
commit 44c90b71fa

View File

@@ -781,13 +781,13 @@ class QuestPage extends GenericPage
// spellRewards
$displ = $this->subject->getField('rewardSpell');
$cast = $this->subject->getField('rewardSpellCast');
if (!$cast && $displ)
if ($cast <= 0 && $displ > 0)
{
$cast = $displ;
$displ = 0;
}
if ($cast || $displ)
if ($cast > 0 || $displ > 0)
{
$rewSpells = new SpellList(array(['id', [$displ, $cast]]));
$this->extendGlobalData($rewSpells->getJSGlobals());