- Joined
- Nov 3, 2004
- Messages
- 79
This Spell is corrupted it doesnt Work that means when i cast the Spell nothing happens
the Corrupted Ability:
Know anyone whats false with this Spell
the Corrupted Ability:
JASS:
function Trig_Scorching_Force_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A03Z' ) ) then
return false
endif
return true
endfunction
function FireballHurt takes nothing returns nothing
local timer FireballFly = GetExpiredTimer()
local unit caster = GetHandleUnit( FireballFly, "caster" )
local integer Damage = GetHandleInt( FireballFly, "Damage" )
local group FireBalls = CreateGroup()
local integer Count = 0
local group FireBallsNoRepeting = CreateGroup()
local unit FireBallGetUnit
local location Order
set FireBalls = GetHandleGroup( FireballFly, "FireBalls" )
set FireBallsNoRepeting = FireBalls
loop
set FireBallGetUnit = FirstOfGroup(FireBallsNoRepeting)
exitwhen Count == 0
set Order = PolarProjectionBJ(GetUnitLoc(FireBallGetUnit), 4.00, ( GetUnitFacing(FireBallGetUnit) ))
call SetUnitPositionLoc( FireBallGetUnit, Order)
call RemoveLocation(Order)
call GroupRemoveUnitSimple( FireBallGetUnit, FireBallsNoRepeting )
set FireBallGetUnit = null
set Count = Count - 1
endloop
call GroupClear(FireBallsNoRepeting)
set caster = null
endfunction
function Trig_Scorching_Force_Actions takes nothing returns nothing
local unit caster = GetSpellAbilityUnit()
local real casterfacing
local timer FireballFly = CreateTimer()
local integer Damage = ( GetUnitAbilityLevelSwapped('A03Z', caster) * 25 + 75 )
local group FireBalls = CreateGroup()
local location CasterLoc = GetUnitLoc(caster)
local integer I
local unit FireBall
call TriggerSleepAction(0.10)
set casterfacing = GetUnitFacing(caster)
loop
exitwhen I == 6
set FireBall = CreateUnitAtLoc( GetOwningPlayer(caster), 'n016', PolarProjectionBJ(CasterLoc, 100.00, casterfacing + GetRandomReal(90.00, -90.00)), casterfacing + GetRandomReal(90.00, -90.00) )
call UnitApplyTimedLifeBJ( 4.00, 'BTLF', FireBall )
call GroupAddUnitSimple( FireBall, FireBalls )
set FireBall = null
set I = I + 1
endloop
call SetHandleHandle(FireballFly , "caster", caster)
call SetHandleHandle(FireballFly , "FireBalls", FireBalls)
call SetHandleInt(FireballFly , "Damage", Damage)
call RemoveLocation(CasterLoc)
call TimerStart(FireballFly,0.01,true,function FireballHurt)
call TriggerSleepAction(4.00)
call DestroyTimer(FireballFly)
call FlushHandleLocals(FireballFly)
call GroupClear(FireBalls)
set caster = null
set casterfacing = 0.00
set Damage = 0
endfunction
//===========================================================================
function InitTrig_Scorching_Force takes nothing returns nothing
set gg_trg_Scorching_Force = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Scorching_Force, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Scorching_Force, Condition( function Trig_Scorching_Force_Conditions ) )
call TriggerAddAction( gg_trg_Scorching_Force, function Trig_Scorching_Force_Actions )
endfunction
Know anyone whats false with this Spell