View Single Post
03-17-13, 01:05 AM   #9
Clamsoda
A Frostmaul Preserver
Join Date: Nov 2011
Posts: 269
My code needs to be able to handle SWING_DAMAGE, SPELL_DAMAGE, and SPELL_PERIODIC_DAMAGE. Only SWING_DAMAGE has "amount" seated at the 12th spot of ..., SPELL_DAMAGE and SPELL_PERIODIC_DAMAGE have "amount" seated at the 15th spot of ..., so I think I need to keep it the way it is. Let me know what you think.

Also, I'll definitely substitute strsub in!

Edit: I guess I could pass it as:

(self, event, _, eventType, _, sourceGUID, _, _, _, destGUID, _, _, _, swingAmount, _, _, spellAmount)

The first 11 never change, and swingAmount or spellAmount would be correct so long as they are called for the right eventType. I don't know how much of an impact this would have, just an idea.

This is what I've got now. I've had to make some changes to the way information is stored. Events are stored into the table with an index that increments for each time the event fires, and a nested table that holds the time and amount, that way if two events happen at the EXACT same time, one isn't written in, then overwritten.

Commenting has sort of gone to hell...=/

http://pastebin.com/ccbqiL4A

Last edited by Clamsoda : 03-17-13 at 01:31 AM.
  Reply With Quote