Cohadar
master of fugue
- Reaction score
- 209
A few remarks if I may.
System looks good from general point of view.
Big plus is that it is easy to use.
You should fix UnitEntersWorld to NOT register dummy casters.
In fact you should probably make a function like this:
And then use it to check if unit should be registered with the engine.
This does not work
People can still call AD.destroy() you made onDestroy private, not destroy.
Do this:
System looks good from general point of view.
Big plus is that it is easy to use.
You should fix UnitEntersWorld to NOT register dummy casters.
In fact you should probably make a function like this:
JASS:
private function ExcludeUnit takes unit whichUnit returns boolean
if GetUnitTypeId(whichUnit) == UID_DUMMY_CASTER then
return true
endif
if GetUnitTypeId(whichUnit) == UID_SPECIAL_UNITA then
return true
endif
//....
// add your own units here
endfunction
And then use it to check if unit should be registered with the engine.
This does not work
JASS:
People can still call AD.destroy() you made onDestroy private, not destroy.
Do this:
JASS:
private method onDestroy takes nothing returns nothing
call BJDebugMsg("FATAL ERROR: AD struct destroyed")
endmethod