scope SpellPower initializer Init
private function Conditions takes nothing returns boolean
return udg_PDD_damageType == udg_PDD_SPELL
endfunction
private function Actions takes nothing returns nothing
set udg_PDD_amount = (udg_PDD_amount + udg_SpellPowerFlat[GetUnitUserData(udg_PDD_source)]) * udg_SpellPowerPercent[GetUnitUserData(udg_PDD_source)]
endfunction
//===========================================================================
private function Init takes nothing returns nothing
set gg_trg_SpellPower = CreateTrigger()
call TriggerRegisterVariableEvent(gg_trg_SpellPower, "udg_PDD_damageEventTrigger", EQUAL, 1.00)
call TriggerAddCondition(gg_trg_SpellPower, Condition( function Conditions ))
call TriggerAddAction(gg_trg_SpellPower, function Actions)
endfunction
endscope