Thread Tools Display Modes
09-19-11, 01:52 PM   #1
barbol12
A Cyclonian
 
barbol12's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2010
Posts: 42
combat text, custom

hello guys, working on a clean custom floating combat text. and heres what i am doing with it...
1 side, will be all damage/healing that I do, the other will be all incoming dmg/healing from all others, like bosses/mobs/ party/raid members... heres my trouble

i cant seem to get the incoming dmg/healing to show properly... i want it to be able to show all dmg/healing taken from all units without me having to target them... and without showing my dmg/healing that i do(thats just for the 1 side, got that working perfectly).
__________________
  Reply With Quote
09-19-11, 04:08 PM   #2
Seerah
Fishing Trainer
 
Seerah's Avatar
WoWInterface Super Mod
Featured
Join Date: Oct 2006
Posts: 10,860
Why would you need to target them to see this info? How are you currently getting this information?
__________________
"You'd be surprised how many people violate this simple principle every day of their lives and try to fit square pegs into round holes, ignoring the clear reality that Things Are As They Are." -Benjamin Hoff, The Tao of Pooh

  Reply With Quote
09-19-11, 04:23 PM   #3
barbol12
A Cyclonian
 
barbol12's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2010
Posts: 42
i have an incoming combat data dmg/healing already setup... but it shows all dmg(including dmg/healing i do) i do not want it to show dmg/healing i do... just incoming

lua Code:
  1. local function incomingOnEvent(self, event, ...)
  2.     local _, eventType, _, sourceGUID, _, sourceFlags = ...
  3.    
  4. --player dmg/healing taken, dodge/parries/misses
  5.  
  6.  
  7.     --- ouch!! they hitting me
  8.         if eventType == "SWING_DAMAGE" then
  9.             local _, _, _, amount, _, _, _, _, critical = select(9, ...)
  10.             self:AddMessage(amount, 1, 0, 0)
  11.         elseif eventType == "SPELL_DAMAGE" or eventType == "SPELL_PERIODIC_DAMAGE" then
  12.             local _, _, _, spellId, _, spellSchool, amount, _, _, _, _, _, critical = select(9, ...)
  13.                 self:AddMessage(amount, 1, 0, 0)
  14.         end
  15.    
  16.  
  17.     --- dodge/parries/misses
  18.         if eventType == "SWING_MISSED" then
  19.             local _, _, _, missType, _ = select(9, ...)
  20.             self:AddMessage(missType, 0.5, 0.9, 1)
  21.         end
  22.         if eventType == "SPELL_MISSED" or eventType == "RANGE_MISSED" then
  23.             local _, _, _, spellId, _, _, missType, _ = select(9,...)
  24.             self:AddMessage(missType, 0.5, 0.9, 1)
  25.         end
  26.    
  27.    
  28.     --- getting healed(by others)
  29.         if eventType == "SPELL_HEAL" or eventType== "SPELL_PERIODIC_HEAL" then
  30.             local _, _, _, _, _, _, amount, _, _, _ = select(9,...)
  31.             self:AddMessage(amount, 0, 1, 0)           
  32.         end
  33.     end
this is the function i use to get my incoming dmg/healing
i have tried few different filters... but cant get it to work 100%

lua Code:
  1. local gflags = bit.bor(COMBATLOG_OBJECT_AFFILIATION_MINE, COMBATLOG_OBJECT_REACTION_FRIENDLY, COMBATLOG_OBJECT_CONTROL_PLAYER, COMBATLOG_OBJECT_TYPE_GUARDIAN)
  2.  
  3. local function OnEvent(self, event, ...)
  4.     local _, eventType, _, sourceGUID, _, sourceFlags = ...
  5.  
  6.     if sourceGUID == UnitGUID("player") or sourceGUID == UnitGUID("pet") or sourceFlags == gflags then
  7.    
  8.         -- lets show how bad we beat up stuff
  9.             if eventType == "SWING_DAMAGE" then
  10.                 local _, _, _, amount, _, _, _, _, critical = select(9, ...)
  11.                 self:AddMessage(amount, 1, 1, 1)
  12.             elseif eventType == "SPELL_DAMAGE" or eventType == "SPELL_PERIODIC_DAMAGE" then
  13.                 local _, _, _, spellId, _, spellSchool, amount, _, _, _, _, _, critical = select(9, ...)
  14.                 if eventType == "SPELL_PERIODIC_DAMAGE" then
  15.                      self:AddMessage(amount, 151/255, 70/255, 194/255)
  16.                 else
  17.                     if critical then
  18.                         self:AddMessage(amount, 1, .49, .04)
  19.                     else
  20.                         self:AddMessage(amount, 1, 1, 0)
  21.                     end
  22.                 end
  23.             elseif eventType == "RANGE_DAMAGE" then
  24.                 local _, _, _, spellId, _, _, amount, _, _, _, _, _, critical = select(9, ...)
  25.                 self:AddMessage(amount, 1, 1, 1)
  26.             elseif eventType == "SWING_MISSED" then
  27.                 local _, _, _, missType, _ = select(9, ...)
  28.                 self:AddMessage(missType, 1, 1, 1)
  29.             elseif eventType == "SPELL_MISSED" or eventType == "RANGE_MISSED" then
  30.                 local _, _, _, spellId, _, _, missType, _ = select(9,...)
  31.                 self:AddMessage(missType, 1, 1, 1)
  32.             end
  33.        
  34.        
  35.         --- healing people     
  36.             if eventType == "SPELL_HEAL" or eventType== "SPELL_PERIODIC_HEAL" then
  37.                 local _, _, _, _, _, _, amount, _, _, _ = select(9,...)
  38.                 self:AddMessage(amount, 0, 1, 0)           
  39.             end
  40.        
  41.     end
  42. end
this here is the functioning for the dmg/healing that i do.. this part works 100%

without the filter on the first 1.. it shows alll dmg, including dmg being done to party... and dmg party does
__________________

Last edited by barbol12 : 09-19-11 at 04:57 PM.
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » combat text, custom

Thread Tools
Display Modes

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