- Joined
- Dec 16, 2007
- Messages
- 252
Are theese triggers MUI and Leakless?
JASS:
function Trig_Ion_Cannon_Channel_Conditions takes nothing returns boolean
return GetSpellAbilityId() == 'A005'
endfunction
function Trig_Ion_Cannon_Channel_Actions takes nothing returns nothing
local location p = GetUnitLoc(GetTriggerUnit())
local location r = GetSpellTargetLoc()
local unit u = GetTriggerUnit()
local integer pui = GetUnitIndex(u)
local location q = PolarProjectionBJ(p, 105.00, AngleBetweenPoints(p, r) )
local unit dummy
local integer i
set dummy = CreateUnitAtLoc(GetOwningPlayer(u) , 'u000', q, AngleBetweenPoints(p, r) )
call SetUnitLifeBJ( dummy, I2R(GetUnitAbilityLevelSwapped('A005', u) ))
call SetUnitUserData( dummy, GetUnitUserData(u) )
set udg_s_BlazeDummy[GetUnitUserData(dummy)] = dummy
set i = 1
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 5
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
set i = i + 1
call SetUnitScalePercent( dummy, ( 100.00 + ( 20.00 * I2R(GetForLoopIndexA()) ) ), ( 100.00 + ( 20.00 * I2R(GetForLoopIndexA()) ) ), ( 100.00 + ( 20.00 + I2R(GetForLoopIndexA()) ) ) )
call TriggerSleepAction( 1 )
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
call RemoveLocation(p)
call RemoveLocation(r)
call RemoveLocation(q)
set dummy = null
set u = null
set i = 0
endfunction
//===========================================================================
function InitTrig_Ion_Cannon_Channel takes nothing returns nothing
set gg_trg_Ion_Cannon_Channel = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Ion_Cannon_Channel, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Ion_Cannon_Channel, Condition( function Trig_Ion_Cannon_Channel_Conditions ) )
call TriggerAddAction( gg_trg_Ion_Cannon_Channel, function Trig_Ion_Cannon_Channel_Actions )
endfunction
-
Ion Cannon Cast
-
Events
- Unit - A unit Stops casting an ability
-
Conditions
- (Ability being cast) Equal to Blaze
-
Actions
- Set s_BlazeLoc[1] = (Position of s_BlazeDummy[(Custom value of (Triggering unit))])
- Set s_BlazeLoc[2] = (s_BlazeLoc[1] offset by 100.00 towards (Facing of s_BlazeDummy[(Custom value of (Triggering unit))]) degrees)
- Unit - Add Blaze Damage to s_BlazeDummy[(Custom value of (Triggering unit))]
- Unit - Set level of Blaze Damage for s_BlazeDummy[(Custom value of (Triggering unit))] to (Integer((Life of s_BlazeDummy[(Custom value of (Triggering unit))])))
- Unit - Order s_BlazeDummy[(Custom value of (Triggering unit))] to Orc Tauren Chieftain - Shockwave s_BlazeLoc[2]
- Unit - Add a 0.10 second Generic expiration timer to s_BlazeDummy[(Custom value of (Triggering unit))]
- Custom script: call RemoveLocation(udg_s_BlazeLoc[1])
- Custom script: call RemoveLocation(udg_s_BlazeLoc[2])
-
Events