- Joined
- Feb 25, 2013
- Messages
- 16
Hi,
So I might just be daft but I'm trying to compare spell IDs in a AbilityCast function, and the ID's I'm getting are not matching.
I have a spell with ID 'a002' (if I print this I get 1630548018), however, when I cast the spell and print "GetSpellAbilityId()" it prints 1093677106
Can anyone shine some light on what I'm doing wrong?
So I might just be daft but I'm trying to compare spell IDs in a AbilityCast function, and the ID's I'm getting are not matching.
I have a spell with ID 'a002' (if I print this I get 1630548018), however, when I cast the spell and print "GetSpellAbilityId()" it prints 1093677106
Can anyone shine some light on what I'm doing wrong?
JASS:
globals
trigger gg_trg_CopterSpellcast
integer SPL_AC_CAST_ID = 'a002'
endglobals
function StartSpellAutocannon takes player p returns nothing
//Logic for autocannon spell
endfunction
function CheckSpellCast takes nothing returns nothing
call BJDebugMsg(I2S(GetSpellAbilityId())) //Prints 1093677106
call BJDebugMsg(I2S(SPL_AC_CAST_ID)) //Prints 1630548018
if(GetSpellAbilityId() == SPL_AC_CAST_ID) then
call StartSpellAutocannon(GetOwningPlayer(GetTriggerUnit()))
endif
endfunction
function Init_SpellAutocannon takes nothing returns nothing
set gg_trg_CopterSpellcast = CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(gg_trg_CopterSpellcast, EVENT_PLAYER_UNIT_SPELL_CAST)
call TriggerAddAction(gg_trg_CopterSpellcast, function CheckSpellCast)
endfunction