Moderator
M
Moderator
12th Dec 2015
IcemanBo: Too long as NeedsFix. Rejected.
20:57, 2nd Mar 2014
Magtheridon96:
Review:
IcemanBo: Too long as NeedsFix. Rejected.
20:57, 2nd Mar 2014
Magtheridon96:
Review:
- Since you're storing (Key(Triggering unit)), you might as well use the variable FISH_Key instead of repeating the computation within the code blocks directly after. It saves computation time. 2 function calls become 1 variable lookup.
- Don't use magic numbers. 100.00 should probably be configurable in there. The same applies to the other magic numbers. 8 and 45.00 should probably be configurable as well. Make 8 configurable, and instead of having 45.00, you would just have use 360.00/8 where 8 is not present as a constant literal, but as a variable the user can change in your setup trigger. Do the same for the other magic numbers like 50.00. Remember: magic numbers are evil.
- Apply what I said about (Key(Triggering unit)) to (Key(Picked unit)) in the loop trigger.
- You're not removing the FISH_Caster_Location correctly in the loop trigger. It's being leaked. You need to remove it regardless of whether FISH_UnitGroup_Count is 0 or not. You need to remove it in the same scope as its allocation. That's how you ensure 0 leaks.