View Single Post
Old 10-08-2008, 06:06 PM   #18
Anitarf
Procrastination Incarnate


Development Director
 
Join Date: Feb 2004
Posts: 8,190

Submissions (19)

Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)

2008 Spell olympics - Fire - SilverApproved Map: Old School Alliance TacticsHero Contest #2 - 3rd PlaceSpell making session 2 winner

Default

CSSafety is deprecated as TimerUtils has replaced it, so you should delete the link to it.

Likewise, you really shouldn't be endorsing something as outdated as HandleVars anymore. You should use one of the more modern attachment systems you list (you should also list Table). However, since you're using TimerUtils anyway, you don't need an extra attachment system in the first place since TimerUtils comes with Set/GetTimerData. Also, since timers get recycled anyway there's no need to set the local variables pointing to them to null.

You don't need to set .hasbuff to false in the onDestroy method because calling allocate gives it it's default value anyway.

Instead of adding to the counter and checking if it has exceeded duration every time, it would be simpler to set it to duration at the beginning of the spell and then subtract from it, checking if it has gone below 0.0

The highlighting seems a bit odd in "Rabid Bite with non stacktable effect", you're highlighting some old functions but not the new code.

I don't really approve of the way you loop through your structs, since you're likely to come across indexes that are no longer active. In your example with one timer, this could directly lead to buggy behaviour of units still taking damage even after they are no longer affected by the spell. Instead, you should maintain a separate array of active struct instances like this spell does.

Last, but not least, you're missing an important chapter:
Approach N 3: using the ABuff a buff system. ;)
__________________
Anitarf is offline   Reply With Quote