[-]
1. Use coordinates instead of locations.
2. Uses some BJ's, but all are good BJ's except for:
JASS:
call GroupRemoveUnitSimple( u[i], g )
Replace it with:
JASS:
call GroupRemoveUnit(g, u[i])
Simple, as you see, is like the keyword
Swap.
3. I think it's about time you learn to avoid this specially since it leaks 16 times at map intialization:
JASS:
call TriggerRegisterAnyUnitEventBJ(gg_trg_Frozen_Blast, EVENT_PLAYER_UNIT_SPELL_CAST)
Instead:
JASS:
function AntiLeaker takes nothing returns boolean
return true
endfunction
//===========================================================================
function InitTrig_Frozen_Blast takes nothing returns nothing
local filterfunc f = Filter(function AntiLeaker)
local integer i = 0
set gg_trg_Frozen_Blast = CreateTrigger( )
loop
call TriggerRegisterPlayerUnitEvent(gg_trg_Frozen_Blast, Player(i), EVENT_PLAYER_UNIT_SPELL_CAST, f)
set i = i + 1
exitwhen i == 16 // or you can insert bj_MAX_PLAYER_SLOTS instead
endloop
call TriggerAddCondition( gg_trg_Frozen_Blast, Condition( function Trig_Blast_Conditions ) )
call TriggerAddAction( gg_trg_Frozen_Blast, function Trig_Blast_Actions )
set f = null
endfunction
4. Use a local trigger instead of:
Thus making our Init code with the filter I mentioned:
JASS:
function AntiLeaker takes nothing returns boolean
return true
endfunction
//===========================================================================
function InitTrig_Frozen_Blast takes nothing returns nothing
local trigger t = CreateTrigger( )
local filterfunc f = Filter(function AntiLeaker)
local integer i = 0
loop
call TriggerRegisterPlayerUnitEvent(t, Player(i), EVENT_PLAYER_UNIT_SPELL_CAST, f)
set i = i + 1
exitwhen i == 16
endloop
call TriggerAddCondition(t, Condition( function Trig_Blast_Conditions ) )
call TriggerAddAction(t, function Trig_Blast_Actions )
set f = null
set t = null
5. There's a point leak:
JASS:
PolarProjectionBJ(p, 300.00, r)
This function returns a location, thus you got to set it into a variable, use the variable and then destroy it.
6. Use a slow dummy spell and avoid the:
JASS:
call TriggerSleepAction(8.00)
7. You forget to set
z = 0 before the loop:
JASS:
exitwhen z == 12
set z = ( z + 1 )
set d[z] = null
8. Add more in-script documentation so that whoever is reading your script know what each set of actions are supposed to be doing.
9. Set things that need to be adjusted into variables (although I'd prefer using globals) at the beginning of the script.
[+]
10. Fully MUI.
11. Looks nice and function properly.
12. Scripting is efficient enough.
13. Documentation provided, and must be easy to import.
[*]
This spell is a simple, yet well-done Jass spell which function properly. The only issue would be that point leak and it's a job well-done!
Dark Nite, I always like your spells since they're simple, nice and useful. Just do some fixing considering the things I mentioned and removing that leak, and you've got a great script. Good job!