JASS:
function CheckSpell takes nothing returns boolean
return GetSpellAbilityId()=='A04E'
endfunction
function Heal_BonusA takes nothing returns nothing
local integer loopcounter = 0
local integer currentitem
local unit x
call DisplayTextToPlayer(Player(0),0,0,"HIT")
//========================================================
//Whatever Dagger
//========================================================
if UnitHasItemOfTypeBJ(GetTriggerUnit(),'I02A') == true then
set x = GetTriggerUnit()
set currentitem = 'I02A'
call CountNumberOfItemOnUnit(currentitem,GetTriggerUnit())
call TriggerSleepAction(.15)
loop
set loopcounter = GetHandleInt(x, "sum")
exitwhen loopcounter == 0
call Deal_Healing_Bonus(25)
set loopcounter = loopcounter - 1
endloop
endif
set x = null
//========================================================
endfunction
function InitTrig_HealBonus takes nothing returns nothing
set gg_trg_HealBonus = CreateTrigger()
call TriggerRegisterUnitEvent(gg_trg_HealBonus, EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(gg_trg_HealBonus, Condition(function CheckSpell))
call TriggerAddAction(gg_trg_HealBonus, function Heal_BonusA)
endfunction
Of all the errors in the world I get 'Invalid # Of Arguments' on call
JASS:
TriggerAddCondition(gg_trg_HealBonus, Condition(function CheckSpell))
JASS:
TriggerAddAction(gg_trg_HealBonus, function Heal_BonusA)
Wtf?
EDIT: Nevermind, fixed it. Changed TriggerRegisterUnitEvent to the BJ version of it. For some reason it was telling me the lines below & above were wrong (Thanks blizzard).