Moderator
M
Moderator
12.12
IcemanBo: For long time as NeedsFix. Rejected.
Bribe:
You don't need this: call SetUnitOwner( dk, GetOwningPlayer(t), true )
There are of course the things I've listed in my reply.
I also suggest writing local variables with camelCasing (first letter is lowercase). This helps to identify those variables as local. If you notice, every non-constant variable in Blizzard.j and Common.j begins with a lowercase. It's JASS convention and convention is a good thing to have in a crazy language like JASS.
Instead of GetOwningPlayer(GetTriggerUnit()) it's faster to write GetTriggerPlayer() and also executes faster in game.
You also don't need the "true" comparison except for with IsUnitType, and that's only from within boolexpr returns, so you can gain some more efficiency this way.
This can be done more efficiently:
Instead of splitting the filters from the "FirstOfGroup" loop that you do, just use one filter and do all actions from within the filter. And use bj_lastCreatedGroup as your static enum group so you never have to create/destroy your groups.
IcemanBo: For long time as NeedsFix. Rejected.
Bribe:
You don't need this: call SetUnitOwner( dk, GetOwningPlayer(t), true )
There are of course the things I've listed in my reply.
I also suggest writing local variables with camelCasing (first letter is lowercase). This helps to identify those variables as local. If you notice, every non-constant variable in Blizzard.j and Common.j begins with a lowercase. It's JASS convention and convention is a good thing to have in a crazy language like JASS.
Instead of GetOwningPlayer(GetTriggerUnit()) it's faster to write GetTriggerPlayer() and also executes faster in game.
You also don't need the "true" comparison except for with IsUnitType, and that's only from within boolexpr returns, so you can gain some more efficiency this way.
This can be done more efficiently:
JASS:
call GroupEnumUnitsInRange(g, x, y, 900.00, Condition(function Holy_Filter_A))
call GroupEnumUnitsInRange(h, x, y, 900.00, Condition(function Holy_Filter_B))
Instead of splitting the filters from the "FirstOfGroup" loop that you do, just use one filter and do all actions from within the filter. And use bj_lastCreatedGroup as your static enum group so you never have to create/destroy your groups.