- Joined
- Jun 13, 2008
- Messages
- 353
I have an old spell which uses very old and obsolete libraries. I wanted to upgrade them with their better and up-to-date counterparts.
Converting this part;
to this part;
This causes weird event firing behaviors and the worst is all spells now trigger this custom spell as well.
I'm just started learning this stuff, helps are appreciated.
Converting this part;
Code:
private static method onInit takes nothing returns nothing
call GT_AddStartsEffectAction(function thistype.Action,RAWCODE)
call GT_AddBeginsCastingAction(function thistype.Action2,RAWCODE)
set thistype.cf = Condition(function thistype.DoDamage)
endmethod
to this part;
Code:
private static method onInit takes nothing returns nothing
call RegisterPlayerUnitEvent(EVENT_PLAYER_UNIT_SPELL_EFFECT, function thistype.Action)
call RegisterPlayerUnitEvent(EVENT_PLAYER_UNIT_SPELL_CAST, function thistype.Action2)
set thistype.cf = Condition(function thistype.DoDamage)
endmethod
This causes weird event firing behaviors and the worst is all spells now trigger this custom spell as well.
I'm just started learning this stuff, helps are appreciated.