Thread Tools Display Modes
12-15-06, 07:19 PM   #1
thoughtlover
A Defias Bandit
Join Date: Dec 2006
Posts: 2
Detecting a FRIENDLYPLAYER_BUFF: Party Bug?

I am using event "CHAT_MSG_SPELL_FRIENDLYPLAYER_BUFF" to detect the friendly Buff spells cast (such as a heal or a rez). It works great at detecting independent friendly casting units. It detects buffs cast by those in my raid, however it does NOT detect those casting in my raid_party or regular party.

Example:
Code:
local function onEvent()
	DEFAULT_CHAT_FRAME:AddMessage("EVENT: "..arg1)
end

this = CreateFrame("Frame")
this:RegisterEvent("CHAT_MSG_SPELL_FRIENDLYPLAYER_BUFF")
this:RegisterEvent("CHAT_MSG_SPELL_PARTY_BUFF")
this:SetScript("OnEvent", onEvent)
This code will not fire if the person is in my party or raid_party. Is this a bug, or is there an event for Spell Party Buffs? (CHAT_MSG_SPELL_PARTY_BUFF doesn't seem to work)

I could use UNIT_SPELLCAST_START to detect spell starts, however, I want to detect Buff spells only... and I'm unaware of any way to do so within my party.

Please help =)

Last edited by thoughtlover : 12-15-06 at 07:38 PM.
  Reply With Quote
12-28-06, 03:20 PM   #2
SonicUK
A Deviate Faerie Dragon
 
SonicUK's Avatar
Join Date: Dec 2006
Posts: 12
try detecting hostile buffs. theres a bug in blizzards codes causin this. do a quick check first, look at the buffs in the combat log, and change the color of the hostile buffs, does your buff text change color?
  Reply With Quote
04-26-07, 03:02 PM   #3
sirspikey
A Deviate Faerie Dragon
 
sirspikey's Avatar
Join Date: Feb 2007
Posts: 19
Try

UNIT_AURA or
UNIT_AURASTATE
  Reply With Quote
04-27-07, 11:57 AM   #4
Shirik
Blasphemer!
Premium Member
WoWInterface Super Mod
AddOn Author - Click to view addons
Join Date: Mar 2007
Posts: 818
PLEASE change:
Code:
local function onEvent()
to

Code:
local function onEvent(event, arg1, arg2, arg3) -- etc, however many you need
The syntax you're using is deprecated and will be removed in a future patch. Either way, the method I pointed out is actually more efficient, too.

As for your buffs problem, the above is correct. My personal belief is it's the bug where it will be showing as a hostile buff. Also note, sirspikey, that it will not be an aura for a ressurection or heal, those are for gameplay buffs such as fortitude, etc. (I hate how they confused buffs, auras, and friendly spells all together... makes explaining this impossible)
__________________
たしかにひとつのじだいがおわるのお
ぼくはこのめでみたよ
だけどつぎがじぶんおばんだってことわ
しりたくなかったんだ
It's my turn next.

Shakespeare liked regexes too!
/(bb|[^b]{2})/
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » Detecting a FRIENDLYPLAYER_BUFF: Party Bug?


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off