mirror of
https://github.com/Sarjuuk/aowow.git
synced 2025-11-29 15:58:16 +08:00
Setup/ItemStats
* fixed array structure when converting equal amounts of SPELL_DAMAGE and SPELL_HEALING to SPELL_POWER
This commit is contained in:
@@ -418,12 +418,12 @@ class StatsContainer
|
|||||||
$this->fromEnchantment($relE);
|
$this->fromEnchantment($relE);
|
||||||
else
|
else
|
||||||
foreach ($this->convertSpellEffect($aura, $mVal, $amt) as $idx)
|
foreach ($this->convertSpellEffect($aura, $mVal, $amt) as $idx)
|
||||||
$tmpStore[] = [$idx => $amt];
|
Util::arraySumByKey($tmpStore, [$idx => $amt]);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!empty($tmpStore[Stat::HEALING_SPELL_POWER]) && !empty($tmpStore[Stat::DAMAGE_SPELL_POWER]) && $tmpStore[Stat::HEALING_SPELL_POWER] == $tmpStore[Stat::DAMAGE_SPELL_POWER])
|
if (!empty($tmpStore[Stat::HEALING_SPELL_POWER]) && !empty($tmpStore[Stat::DAMAGE_SPELL_POWER]) && $tmpStore[Stat::HEALING_SPELL_POWER] == $tmpStore[Stat::DAMAGE_SPELL_POWER])
|
||||||
{
|
{
|
||||||
$tmpStore[] = [Stat::SPELL_POWER => $tmpStore[Stat::HEALING_SPELL_POWER]];
|
Util::arraySumByKey($tmpStore, [Stat::SPELL_POWER => $tmpStore[Stat::HEALING_SPELL_POWER]]);
|
||||||
unset($tmpStore[Stat::HEALING_SPELL_POWER]);
|
unset($tmpStore[Stat::HEALING_SPELL_POWER]);
|
||||||
unset($tmpStore[Stat::DAMAGE_SPELL_POWER]);
|
unset($tmpStore[Stat::DAMAGE_SPELL_POWER]);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user