PDA

View Full Version : 2.4 Event help


elidion
22-03-2008, 12:41 AM
I was wondering if anyone has had much luck on the PTRs new combat log system. My mod registers events such as

this:RegisterEvent("CHAT_MSG_SPELL_FRIENDLYPLAYER_BUFF")
this:RegisterEvent("CHAT_MSG_SPELL_HOSTILEPLAYER_BUFF");

and then looks for text such as "Prayer of Mending heals xxx for 2140".

After reading things, I saw that the UNFILTERED was meant to make old mods work ect, so I tried simply adding

this:RegisterEvent("COMBAT_LOG_EVENT_UNFILTERED");

but of course it still doesn't do anything, so I am really confused as to how to handle events now and what not. Does anyone else have any experience?

Tunga
22-03-2008, 11:31 AM
The old events have all been removed.

Guide is here:
http://www.wowwiki.com/Patch_2.4.0/Consolidated_API_changes/Guide_to_the_New_Combat_Log

Jumpy
23-03-2008, 01:41 AM
Here is an example:
if event == "COMBAT_LOG_EVENT_UNFILTERED" then
local timestamp, eventType, sourceGUID, sourceName, sourceFlags, destGUID, destName, destFlags = ...
local spellId, spellName, spellSchool, missType = select(9, ...)
if eventType == "SPELL_CAST_SUCCESS" and sourceName == UnitName("player") and spellName == "Totemic Call" then
-go do something with it-
end
end

elidion
23-03-2008, 05:53 AM
Tunga that is just the copy and paste of the UI & Macro thread that really didn't help me understand. Thanks for the example Jumpy, I learn much better by examples lol.

Tunga
23-03-2008, 10:07 AM
Yeah sorry I was in a rush and didn't know what you'd read so thought we'd start there :) .