Print out the arguments in the event using DEFAULT_CHAT_FRAME:AddMessage:
Code:
function MyMod_OnEvent()
if event=="CHAT_MSG_SPELL_CREATURE_VS_CREATURE_BUFF" then
DEFAULT_CHAT_FRAME:AddMessage("__ event __")
DEFAULT_CHAT_FRAME:AddMessage("arg1 = "..tostring(arg1))
DEFAULT_CHAT_FRAME:AddMessage("arg2 = "..tostring(arg3))
DEFAULT_CHAT_FRAME:AddMessage("arg3 = "..tostring(arg3))
end
end
You hit A Mob for 100.
A Mob gains Renew.
__ CHAT_MSG_SPELL_CREATURE_VS_CREATURE_BUFF __
arg1 = A Mob gains Renew.
arg2 = nil (probably, untested)
arg3 = nil
You hit A Mob for 150.
etc
Small aside, but everyone learning (and most of those who feel they have already learned) should be in the practice of tossing in a debug print in the OnEvent handler in its formative stages to see how often events fire.
I see a lot of mods blindly registering for events and registering for redundant events (ie, ITEM_LOCK_CHANGED and BAG_UPDATE) or missing an event (ie, CHAT_MSG_EMOTE and CHAT_MSG_TEXT_EMOTE) that a debug print should make clear. (and in the case of ITEM_LOCK_CHANGED and BAG_UPDATE it will hopefully terrorize them from having the two always registered)