+ Reply to Thread
Results 1 to 14 of 14
Like Tree2Likes
  • 1 Post By Redius
  • 1 Post By chuckySTAR

Thread: Realtime Buff/Debuff monitoring. Is there an Addon available?

  1. #1
    Rift Disciple windspin's Avatar
    Join Date
    Sep 2011
    Posts
    124

    Default Realtime Buff/Debuff monitoring. Is there an Addon available?

    Greetings!

    I am in search of an addon that may or may not exist. Basically I am looking for a tool to help easily monitor which buffs are missing from players, or which debuffs are missing from active targets.


    Any tips appreciated, tyvm

  2. #2
    Ascendant Redius's Avatar
    Join Date
    Dec 2010
    Location
    St. Louis, MO
    Posts
    1,338

    Default

    Try Karuul Alert; believe that'll do what you want.
    Lemming (formerly Mrhyde@Belmont), Guild Leader of Black Company on Greybriar
    We are Black Company ~~~ See our recruitment thread!

    THIS IS HOW I ROLL
    Raids Mon/Tue/Thur 5:30 server time, 9/9, 2/4, 1/3, 1/3

  3. #3
    Plane Touched Aethys's Avatar
    Join Date
    Jan 2012
    Posts
    203

    Default

    Kalert.

    My set as a cleric :

    Code:
    PHY DMG TKN 1 - Thorns of Ire;1;T;player.target;1;T;F;F;Thorns of Ire;AFED19A547B41A384;20;1;F;F;0;0;Rift;Data/\UI\ability_icons\venomoustrap1a.dds;440;725;52.8;52.8;1.1;1;;CENTER;1;;1;0;0;30;T;F;CENTER;60;T;4;F;0|MAG DMG TKN 1 - Tenebrious Distortion;1;T;player.target;1;T;F;F;Tenebrious Distortion;A1A40AF10288207BA;30;1;F;F;0;0;Rift;Data/\UI\ability_icons\dark_containment_01.dds;500;785;52.8;52.8;1.1;1;;CENTER;1;;1;0;0;30;T;F;CENTER;60;T;4;F;0|MAG DMG TKN 2 - Spiritual Deficiency;1;T;player.target;1;T;F;F;Spiritual Deficiency;A5F1A72ACC7048763;60;1;F;F;0;0;Rift;Data/\UI\ability_icons\menacingroar4b.dds;500;725;52.8;52.8;1.1;1;;CENTER;1;;1;0;0;30;T;F;CENTER;60;T;4;F;0|MAG DMG TKN 1 - Clinging Spirit;1;T;player.target;1;T;F;F;Clinging Spirit;A47CCD4F400D4FD09;30;1;F;F;0;0;Rift;Data/\UI\ability_icons\shroud_of_agony.dds;500;785;52.8;52.8;1.1;1;;CENTER;1;;1;0;0;30;T;F;CENTER;60;T;4;F;0|CRIT DMG TKN - Lethal Poison;1;T;player.target;1;T;F;F;Lethal Poison;A06A7885E85F5AAE7;15;1;F;F;0;0;Rift;Data/\UI\ability_icons\poisonone2a.dds;440;785;52.8;52.8;1.1;1;;CENTER;1;;1;0;0;30;T;F;CENTER;60;T;4;F;0|RAID BURST - Command to Attack;1;T;player;1;T;F;F;Command to Attack;AFAEE513B677B63D2;0;1;F;F;0;0;Rift;Data/\UI\ability_icons\blazeofglory1a.dds;460;645;72;72;1.5;1;;CENTER;1;;1;0;0;30;T;F;CENTER;30;T;4;F;0|MAG DMG TKN 2 - Coda of Distress;1;T;player.target;1;T;F;F;Coda of Distress;A3C8DC37A72AF7186;60;1;F;F;0;0;Rift;Data/\UI\ability_icons\coda_of_distress.dds;500;725;52.8;52.8;1.1;1;;CENTER;1;;1;0;0;30;T;F;CENTER;60;T;4;F;0|MAG DMG TKN 1 - Sigil of Spirits;1;T;player.target;1;T;F;F;Sigil of Spirits;AFC45BCB52418985F;30;1;F;F;0;0;Rift;Data/\UI\ability_icons\shroud_of_agony_a.dds;500;785;52.8;52.8;1.1;1;;CENTER;1;;1;0;0;30;T;F;CENTER;60;T;4;F;0|CRIT DMG TKN - Mark of Extermination;1;T;player.target;1;T;F;F;Mark of Extermination;A6434BF77763F638B;60;1;F;F;0;0;Rift;Data/\UI\ability_icons\finalstrike2.dds;440;785;52.8;52.8;1.1;1;;CENTER;1;;1;0;0;30;T;F;CENTER;60;T;4;F;0|PHY DMG TKN 1 - Coda of Jeopardy;1;T;player.target;1;T;F;F;Coda of Jeopardy;A3BAE6D89842ED939;60;1;F;F;0;0;Rift;Data/\UI\ability_icons\coda_of_distress_a.dds;440;725;52.8;52.8;1.1;1;;CENTER;1;;1;0;0;30;T;F;CENTER;60;T;4;F;0|MAG DMG TKN 2 - Crumbling Resistance;1;T;player.target;1;T;F;F;Crumbling Resistance;A2F769BD425579B26;300;1;F;F;0;0;Rift;Data/\UI\ability_icons\archon_crumbling_resistance_01.dds;500;725;52.8;52.8;1.1;1;;CENTER;1;;1;0;0;30;T;F;CENTER;60;T;4;F;0|PHY DMG TKN 1 - Wild Growth;1;T;player.target;1;T;F;F;Wild Growth;A142762AB702751FA;0;1;F;F;0;0;Rift;Data/\UI\ability_icons\spiritoftree1a.dds;440;725;52.8;52.8;1.1;1;;CENTER;1;;1;0;0;30;T;F;CENTER;60;T;4;F;0|PHY DMG TKN 1 - Spotter's Call;1;T;player.target;1;T;F;F;Spotter's Call;AFF5EF2B44A0A9291;30;1;F;F;0;0;Rift;Data/\UI\ability_icons\awareness_01.dds;440;725;52.8;52.8;1.1;1;;CENTER;1;;1;0;0;30;T;F;CENTER;60;T;4;F;0|RAID BURST - Flaring Power;1;T;player;1;T;F;F;Flaring Power;A67D9C8E34456AC35;0;1;F;F;0;0;Rift;Data/\UI\ability_icons\humbling_blow_01.dds;460;645;72;72;1.5;1;;CENTER;1;;1;0;0;30;T;F;CENTER;30;T;4;F;0|PHY DMG TKN 1 - Illuminate;1;T;player.target;1;T;F;F;Illuminate;A2C3A10C94D5648CA;20;1;F;F;0;0;Rift;Data/\UI\ability_icons\riftblade-surging_energy.dds;440;725;52.8;52.8;1.1;1;;CENTER;1;;1;0;0;30;T;F;CENTER;60;T;4;F;0
    World Progress Ranking Website
    (Don't forget to MouseOver Dates or Points to see details !)

    Experts W#1 | Crucia W#1 | Regulos W#2
    www.aethys.eu

  4. #4
    Ascendant Techie Will's Avatar
    Join Date
    Mar 2011
    Posts
    6,122

    Default

    I am not certain this has been updated, but there was always Buff Watch from the creator of RiftMeter. Can be downloaded on Curse here: http://www.curse.com/addons/rift/buff-watch


  5. #5
    Ascendant Pixel Monkey's Avatar
    Join Date
    Feb 2011
    Posts
    3,231

    Default

    i use gadgets, theres a buff mod
    im a raid archon and it suits my needs well
    who took my names!

  6. #6
    Rift Master sculti's Avatar
    Join Date
    Jun 2011
    Posts
    652

    Default

    Quote Originally Posted by Techie Will View Post
    I am not certain this has been updated, but there was always Buff Watch from the creator of RiftMeter. Can be downloaded on Curse here: http://www.curse.com/addons/rift/buff-watch
    were gonna update that one, it should be excactly what you want
    havent had the time so far, so its still the old abilitiy IDs; it shouldnt work right now

    upgrades gonna come soon
    sculzilla - cleric - 4/4 3/3 5/5 BoB: Greenscale/Akylios
    You Listening? You Hear That?
    Do Something. Do Something.

  7. #7
    Ascendant Techie Will's Avatar
    Join Date
    Mar 2011
    Posts
    6,122

    Default

    Quote Originally Posted by sculti View Post
    were gonna update that one, it should be excactly what you want
    havent had the time so far, so its still the old abilitiy IDs; it shouldnt work right now

    upgrades gonna come soon
    Excellent. It was always my favorite for keeping track of them.


  8. #8
    Rift Disciple windspin's Avatar
    Join Date
    Sep 2011
    Posts
    124

    Default

    Quote Originally Posted by Techie Will View Post
    Excellent. It was always my favorite for keeping track of them.
    This does sound pretty nice. I'm gonna try it anyway to see if it does anything real quick, if not I'll get Karuul for now. Thanks you guys

  9. #9
    Rift Disciple
    Join Date
    Apr 2011
    Posts
    177

    Default

    Quote Originally Posted by sculti View Post
    were gonna update that one, it should be excactly what you want
    havent had the time so far, so its still the old abilitiy IDs; it shouldnt work right now

    upgrades gonna come soon
    I tried to debug it but since I don't have any practice with I'm still understanding what the code does. Anyway I noticed a strange behavior with it.
    Any buff used by me worked (the buff alert disappeared) like the 5% warrior crit debuff (on the target) and archon buffs (self buff) but it didn't work with any buff from other players. I guess there is a check to see if the buff was added by the player in the addBuff function but I really don't see why it would behave like this now and not before SL.
    Last edited by SirDavik; 01-07-2013 at 07:21 PM.

  10. #10
    Plane Touched Aethys's Avatar
    Join Date
    Jan 2012
    Posts
    203

    Default

    It's just about Ability ID Davik.
    World Progress Ranking Website
    (Don't forget to MouseOver Dates or Points to see details !)

    Experts W#1 | Crucia W#1 | Regulos W#2
    www.aethys.eu

  11. #11
    Rift Disciple
    Join Date
    Sep 2011
    Posts
    160

    Default

    I updated buffwatch for my guild to use the new IDs (you can get them from trion's ftp in the .xml files of Rift_souls_*.zip)

    Code:
    math.randomseed(os.time())
    
    local Info, Data = ...
    
    local pairs = pairs
    local ipairs = ipairs
    local tinsert = table.insert
    local tremove = table.remove
    local floor = math.floor
    local max = math.max
    
    local UI = UI
    local Inspect = Inspect
    local UIParent = UIParent
    
    BuffWatch_x = floor(UIParent:GetWidth() / 2)
    BuffWatch_y = floor(UIParent:GetHeight() / 2)
    BuffWatch_anchorX = 0
    BuffWatch_anchorY = 0
    BuffWatch_iconSize = 40
    BuffWatch_spacing = 4
    BuffWatch_direction = 0
    BuffWatch_trackSpecifier = "player.target"
    
    local Enabled = false
    local PlayerID = ""
    local TargetID = ""
    local TrackingSpecifierChangeEvent
    local Dummy = function() end
    local Context = UI.CreateContext(Info.identifier)
    local Frames = {}
    local HasTarget = false
    local TargetFriendly = false
    local VisibleIcons = 0
    local AsyncFix = 0
    local CurrentBuffs = {}
    local Buffs = {
    	A6EA318992F56E5E7 = {
    		name = "Anthem of Competence",
    		texture = [[Data\UI\ability_icons\anthem_of_competence.dds]],
    	},
    	A260518FEC560E9FD = {
    		name = "Bond of Alacrity",
    		texture = [[Data\UI\ability_icons\swiftstrike2.dds]],
    	},
    
    	A17845981A0B9E755 = {
    		name = "Living Energy",
    		texture = [[Data\UI\ability_icons\opportunity_01_a.dds]],
    	},
    	A64169C56C4DF44A6 = {
    		name = "Anthem of Fervor",
    		texture = [[Data\UI\ability_icons\anthem_of_fervor.dds]],
    	},
    
    	AFD53283783F9CF3D = {
    		name = "Vitality of Stone",
    		texture = [[Data\UI\ability_icons\mend1f.dds]],
    	},
    	AFE530E5662BBD8EE = {
    		name = "Fanfare of Power",
    		texture = [[Data\UI\ability_icons\fanfare_of_power.dds]],
    	},
    	AFECAB6C052CD9EEF = {
    		name = "Bond of Power",
    		texture = [[Data\UI\ability_icons\beastmaster_bond_of_might_a.dds]],
    	},
    	AFB78450A294D4B9B = {
    		name = "Flaring Intellect",
    		texture = [[Data\UI\ability_icons\discombobulate2a.dds]],
    	},
    	AFB2ACDF62BF6509C = {
    		name = "Wisdom of the Ages",
    		texture = [[Data\UI\ability_icons\inspiration1.dds]],
    	},
    	AFDA084E95260C3DF = {
    		name = "Focus of Body",
    		texture = [[Data\UI\ability_icons\strong_constitution_01_a.dds]],
    	},
    	AFBCF47C1591BFF1D = {
    		name = "Combat Preparation",
    		texture = [[Data\UI\ability_icons\combat_pose1_a.dds]],
    	},
    
    	AFF293BB95F692860 = {
    		name = "Shared Vigor",
    		texture = [[Data\UI\ability_icons\rally1x.dds]],
    	},
    	AFB0FB9C47C080D22 = {
    		name = "Fanfare of Vigor",
    		texture = [[Data\UI\ability_icons\fanfare_of_vigor.dds]],
    	},
    	AFD0FCFB4C2E98A22 = {
    		name = "Heroic Resolve",
    		texture = [[Data\UI\ability_icons\holystrength3c.dds]],
    	},
    	AFAF37A71D92B114E = {
    		name = "Neddra's Might",
    		texture = [[Data\UI\ability_icons\channelhealth3.dds]],
    	},
    
    	A28DD4D5485143545 = {
    		name = "Arcane Aegis",
    		texture = [[Data\UI\ability_icons\invigoration2a.dds]],
    	},
    	A6FB31C30C16947B2 = {
    		name = "Anthem of Glory",
    		texture = [[Data\UI\ability_icons\anthem_of_glory.dds]],
    	},
    	AFBA03ADBC887AE25 = {
    		name = "Bond of Shelter",
    		texture = [[Data\UI\ability_icons\beastmaster_comp_intervention.dds]],
    	},
    
    	AFCFC4BB3EEB2366F = {
    		name = "Burning Purpose",
    		texture = [[Data\UI\ability_icons\ardent_doctrine_01.dds]],
    	},
    
    
    	A70FC1A3552119792 = {
    		name = "Resonance",
    		texture = [[Data\UI\ability_icons\resonance.dds]],
    	},
    
    	A2F769BD425579B26 = {
    		name = "Crumbling Resistance",
    		texture = [[Data\UI\ability_icons\archon_crumbling_resistance_01.dds]],
    	},
    	A3C8DC37A72AF7186 = {
    		name = "Coda of Distress",
    		texture = [[Data\UI\ability_icons\coda_of_distress.dds]],
    	},
    	A5F1A72ACC7048763 = {
    		name = "Spiritual Deficiency",
    		texture = [[Data\UI\ability_icons\menacingroar4b.dds]],
    	},
    
    	AFC9B3959E0A4904F = {
    		name = "Ashen Defense",
    		texture = [[Data\UI\ability_icons\castigation1a.dds]],
    	},
    	A105A9FE8C4C8803A = {
    		name = "Coda of Cowardice",
    		texture = [[Data\UI\ability_icons\coda_of_cowardice.dds]],
    	},
    
    	AFC6EC0F7A71C99A1 = {
    		name = "Lethal Poison",
    		texture = [[Data\UI\ability_icons\poisonone2a.dds]],
    	},
    	A6434BF77763F638B = {
    		name = "Mark of Extermination",
    		texture = [[Data\UI\ability_icons\finalstrike2.dds]],
    	},
    
    	AFAF95F46B56FD253 = {
    		name = "Piercing Shot",
    		texture = [[Data\UI\ability_icons\piercing_shot_01_a.dds]],
    	},
    	AFAEBDDE99E1A7CFD = {
    		name = "Splinter Bomb",
    		texture = [[Data\UI\ability_icons\charge_splinter.dds]],
    	},
    	AFCE9F9C04723DF48 = {
    		name = "Lightning Fury",
    		texture = [[Data\UI\ability_icons\lighting_fury.dds]],
    	},
    	--A488B67C82D81CB29 = {
    	--	name = "Ravaging Strike",
    	--	texture = [[Data\UI\ability_icons\charge1.dds]],
    	--},
    	AFEA3EC45313265B2 = {
    		name = "Mark of Inevitability",
    		texture = [[Data\UI\ability_icons\exposeweakness1.dds]],
    	},
    	
    
    	-- A47CCD4F400D4FD09
    	A2557D8D167379BE4 = {
    		name = "Clinging Spirit",
    		texture = [[Data\UI\ability_icons\shroud_of_agony.dds]],
    	},
    	AFD65B7304BB52CBC = {
    		name = "Sigil of Spirits",
    		texture = [[Data\UI\ability_icons\shroud_of_agony_a.dds]],
    	},
    	AFAE88D35886DF3CB = {
    		name = "Embers Bomb",
    		texture = [[Data\UI\ability_icons\charge_ember.dds]],
    	},
    
    	A4C836FA6712DE212 = {
    		name = "Radiant Spores",
    		texture = [[Data\UI\ability_icons\devout_conviction_01.dds]],
    	},
    
    	AFEE6803486E21765 = {
    		name = "Coda of Jeopardy",
    		texture = [[Data\UI\ability_icons\coda_of_distress_a.dds]],
    	},
    	AFAF2AF184D5648CA = {
    		name = "Illuminate",
    		texture = [[Data\UI\ability_icons\riftblade-surging_energy.dds]],
    	},
    	AFFF1B7D74783A4FF = {
    		name = "Spotter's Call",
    		texture = [[Data\UI\ability_icons\awareness_01.dds]],
    	},
    	AFC5ECD86291B482A = {
    		name = "Thorns of Ire",
    		texture = [[Data\UI\ability_icons\venomoustrap1a.dds]],
    	},
    }
    
    local ShownIcons = {
    	runSpeed = {internal = true, texture = Buffs.A6EA318992F56E5E7.texture, tooltip = "15% Movement Speed:\nAnthem of Competence (Bard)\nBond of Alacrity (Beastmaster)"},
    	runSpeedBeastmaster = {internal = true, texture = Buffs.A260518FEC560E9FD.texture, tooltip = "15% Movement Speed:\nBond of Alacrity (Beastmaster)"},
    	costReduceChloro = {internal = true, texture = Buffs.A17845981A0B9E755.texture, tooltip = "5% Resourcecost Reduce:\nLiving Energy (Chloromancer)\nAnthem of Fervor (Bard)"},
    	statBuffs = {internal = false, texture = [[textures\stat_buffs.dds]], tooltip = "Offensive Statbuffs:\nFanfare of Power (Bard) or\nFlaring Intellect (Intellect, Pyromancer) &\nWisdom of the Ages (Wisdom, Purifier) &\nFocus of Body (Strength, Paragon) &\nCombat Preparation(Dexterity, Bladedancer)\nAND\nVitality of Stone (Archon) or\nBond of Power (Beastmaster)"},
    	endu = {internal = false, texture = [[textures\endu_buff.dds]], tooltip = "Endurance:\nFanfare of Vigor (Bard)\nAND\nShared Vigor (Archon) or\nHeroic Resolve (Sentinel) or\nNeddra's Might (Warlock)"},
    	resiArmor = {internal = false, texture = [[textures\resi_armor.dds]], tooltip = "Resistances/Armor:\nArcane Aegis (Archon)\nAnthem of Glory (Bard)\nBond of Shelter (Beastmaster)"},
    	burningPurpose = {internal = true, texture = Buffs.AFCFC4BB3EEB2366F.texture, tooltip = "10% Increased Castspeed/Attackspeed:\nBurning Purpose (Archon)"},
    	resonance = {internal = true, texture = Buffs.A70FC1A3552119792.texture, tooltip = "5% Increased Stats:\nResonance (Bard)"},
    
    	magicDmg = {internal = false, texture = [[textures\magic_damage_debuff.dds]], tooltip = "7% Increased Magical Damage Taken:\nCrumbling Resistance (Archon)\nCoda of Distress (Bard)\nSpiritual Deficiency (Inquisitor)"},
    	physDmg = {internal = false, texture = [[textures\phys_damage_debuff.dds]], tooltip = "5% Increased Physical Damage Taken:\nAshen Defense (Archon)\nCoda of Cowardice (Bard)"},
    	critChance = {internal = false, texture = [[textures\crit_chance.dds]], tooltip = "5% Critical Hit Chance:\nLethal Poison (Assassin)\nMark of Extermination (Champion)"},
    	armorDebuff = {internal = false, texture = [[textures\armor_debuff.dds]], tooltip = "Armor Debuff Static:\nPiercing Shot (Ranger)\nSplinter Bomb (Saboteur)\nLightning Fury (Marksman)\nMark of Inevitability (Champion)"},
    	magicDmg2 = {internal = true, texture = Buffs.AFAE88D35886DF3CB.texture, tooltip = "5% Increased Magical Damage Taken 2:\nClinging Spirit (Inquisitor)\nEmbers Bomb (Saboteur)\nSigil of Spirits (Cabbalist)"},
    	radiantSpores = {internal = true, texture = Buffs.A4C836FA6712DE212.texture, tooltip = "26% hit chance to restore hp up to 5% of mage's max hp:\nRadiant Spores (Chloromancer)"},
    	dmg = {internal = true, texture = Buffs.AFEE6803486E21765.texture, tooltip = "Physical Damage on Damage Taken:\nCoda of Jeopardy (Bard)\nIlluminate (Archon)\nSpotter's Call (Beastmaster)\nThorns of Ire (Druid)"}
    }
    
    local NameToAbilityId = {}
    for id, data in pairs(Buffs) do
    	NameToAbilityId[data.name] = id
    end
    
    
    local Tooltip = {
    	padding = 5,
    
    	init = function (self)
    		self.tooltip = UI.CreateFrame("Frame", "RM_tooltip", Context)
    		self.tooltip:SetVisible(false)
    		self.tooltip:SetBackgroundColor(0, 0, 0, 0.70)
    		self.tooltip:SetLayer(1)
    
    		local borderTop = UI.CreateFrame("Frame", "RM_tooltipBorderTop", self.tooltip)
    		borderTop:SetBackgroundColor(0.47, 0.47, 0.42)
    		borderTop:SetPoint("TOPLEFT", self.tooltip, "TOPLEFT")
    		borderTop:SetPoint("BOTTOMRIGHT", self.tooltip, "TOPRIGHT", 0, 1)
    
    		local borderLeft = UI.CreateFrame("Frame", "RM_tooltipBorderLeft", self.tooltip)
    		borderLeft:SetBackgroundColor(0.47, 0.47, 0.42)
    		borderLeft:SetPoint("TOPLEFT", self.tooltip, "TOPRIGHT", -1, 0)
    		borderLeft:SetPoint("BOTTOMRIGHT", self.tooltip, "BOTTOMRIGHT")
    
    		local borderRight = UI.CreateFrame("Frame", "RM_tooltipBorderRight", self.tooltip)
    		borderRight:SetBackgroundColor(0.47, 0.47, 0.42)
    		borderRight:SetPoint("TOPLEFT", self.tooltip, "TOPLEFT")
    		borderRight:SetPoint("BOTTOMRIGHT", self.tooltip, "BOTTOMLEFT", 1, 0)
    
    		local borderBottom = UI.CreateFrame("Frame", "RM_tooltipBorderBottom", self.tooltip)
    		borderBottom:SetBackgroundColor(0.47, 0.47, 0.42)
    		borderBottom:SetPoint("TOPLEFT", self.tooltip, "BOTTOMLEFT", 0, -1)
    		borderBottom:SetPoint("BOTTOMRIGHT", self.tooltip, "BOTTOMRIGHT")
    
    		self.tooltipText = UI.CreateFrame("Text", "RM_tooltipText", self.tooltip)
    		self.tooltipText:SetWordwrap(false)
    		self.tooltipText:SetFontSize(13)
    	end,
    
    	show = function (self, text, anchor, center)
    		if not self.tooltip then
    			self:init()
    		end
    
    		self.tooltip:ClearAll()
    		self.tooltipText:ClearAll()
    
    		if center then
    			self.tooltipText:SetPoint("TOPCENTER", self.tooltip, "TOPCENTER", 0, self.padding)
    		else
    			self.tooltipText:SetPoint("TOPLEFT", self.tooltip, "TOPLEFT", self.padding, self.padding)
    		end
    
    		self.tooltipText:SetText(text)
    
    		self.tooltipText:SetWidth(self.tooltipText:GetWidth() + 1) -- dafuq?
    		self.tooltip:SetWidth(self.tooltipText:GetWidth() + 2 * self.padding)
    		self.tooltip:SetHeight(self.tooltipText:GetHeight() + 2 * self.padding)
    
    		if anchor then
    			self.tooltip:SetPoint("BOTTOMCENTER", anchor, "TOPCENTER", 0, -10)
    		else
    			self.tooltip:SetPoint("BOTTOMLEFT", UI.Native.TooltipAnchor, "BOTTOMLEFT")
    		end
    
    		self.tooltip:SetVisible(true)
    	end,
    
    	hide = function (self)
    		if not self.tooltip then
    			return
    		end
    		self.tooltip:SetVisible(false)
    	end
    }
    
    
    local function UpdateBaseFrameSize()
    	local base = Frames.base
    	local left = base:GetLeft()
    	local top = base:GetTop()
    	base:ClearAll()
    
    	if BuffWatch_direction == 0 then
    		if BuffWatch_anchorX == 1 and BuffWatch_anchorY == 1 then
    			BuffWatch_x = left
    			BuffWatch_y = top + max(BuffWatch_iconSize * VisibleIcons + VisibleIcons * BuffWatch_spacing - BuffWatch_spacing, 0) - BuffWatch_iconSize
    		end
    
    		BuffWatch_anchorX = 0
    		BuffWatch_anchorY = 0
    
    		base:SetWidth(max(BuffWatch_iconSize * VisibleIcons + VisibleIcons * BuffWatch_spacing - BuffWatch_spacing, 0))
    		base:SetHeight(BuffWatch_iconSize)
    	elseif BuffWatch_direction == 1 then
    		BuffWatch_anchorX = 0
    		BuffWatch_anchorY = 0
    
    		base:SetWidth(BuffWatch_iconSize)
    		base:SetHeight(max(BuffWatch_iconSize * VisibleIcons + VisibleIcons * BuffWatch_spacing - BuffWatch_spacing, 0))
    	elseif BuffWatch_direction == 2 then
    		if BuffWatch_anchorX == 0 and BuffWatch_anchorY == 0 then
    			BuffWatch_x = left - UIParent:GetWidth() + base:GetWidth()
    			BuffWatch_y = top - UIParent:GetHeight() + BuffWatch_iconSize
    		end
    
    		BuffWatch_anchorX = 1
    		BuffWatch_anchorY = 1
    
    		base:SetWidth(max(BuffWatch_iconSize * VisibleIcons + VisibleIcons * BuffWatch_spacing - BuffWatch_spacing, 0))
    		base:SetHeight(BuffWatch_iconSize)
    	elseif BuffWatch_direction == 3 then
    		BuffWatch_anchorX = 1
    		BuffWatch_anchorY = 1
    
    		base:SetWidth(BuffWatch_iconSize)
    		base:SetHeight(max(BuffWatch_iconSize * VisibleIcons + VisibleIcons * BuffWatch_spacing - BuffWatch_spacing, 0))
    	end
    	base:SetPoint(BuffWatch_anchorX, BuffWatch_anchorY, UIParent, BuffWatch_anchorX, BuffWatch_anchorY, BuffWatch_x, BuffWatch_y)
    end
    
    local function HideBuffs()
    	VisibleIcons = 0
    	for i, texture in ipairs(Frames.buffs) do
    		texture:SetVisible(false)
    	end
    	UpdateBaseFrameSize()
    end
    
    local function UpdateIconSize(size)
    	BuffWatch_iconSize = max(size, 12)
    	for i, frame in ipairs(Frames.buffs) do
    		frame:SetWidth(BuffWatch_iconSize)
    		frame:SetHeight(BuffWatch_iconSize)
    	end
    	UpdateBaseFrameSize()
    end
    
    local function UpdateAlign(direction)
    	BuffWatch_direction = direction % 4
    
    	for i = 1, #Frames.buffs do
    		local buff = Frames.buffs[i]
    		buff:ClearPoint("TOPLEFT")
    		buff:ClearPoint("TOPRIGHT")
    		buff:ClearPoint("BOTTOMLEFT")
    
    		if i == 1 then
    			if BuffWatch_direction == 0 then
    				buff:SetPoint("TOPLEFT", Frames.base, "TOPLEFT")
    			elseif BuffWatch_direction == 1 then
    				buff:SetPoint("TOPLEFT", Frames.base, "TOPLEFT")
    			elseif BuffWatch_direction == 2 then
    				buff:SetPoint("TOPRIGHT", Frames.base, "TOPRIGHT")
    			elseif BuffWatch_direction == 3 then
    				buff:SetPoint("BOTTOMLEFT", Frames.base, "BOTTOMLEFT")
    			end
    		else
    			if BuffWatch_direction == 0 then
    				buff:SetPoint("TOPLEFT", Frames.buffs[i - 1], "TOPRIGHT", BuffWatch_spacing, 0)
    			elseif BuffWatch_direction == 1 then
    				buff:SetPoint("TOPLEFT", Frames.buffs[i - 1], "BOTTOMLEFT", 0, BuffWatch_spacing)
    			elseif BuffWatch_direction == 2 then
    				buff:SetPoint("TOPRIGHT", Frames.buffs[i - 1], "TOPLEFT", -BuffWatch_spacing, 0)
    			elseif BuffWatch_direction == 3 then
    				buff:SetPoint("BOTTOMLEFT", Frames.buffs[i - 1], "TOPLEFT", 0, -BuffWatch_spacing)
    			end
    		end
    	end
    	UpdateBaseFrameSize()
    end
    
    local function Update()
    	HideBuffs()
    	
    	Frames.base:SetVisible(true)
    	
    --	local show = {}
    --	if Alive then
    --		show.runSpeed = true
    --		show.runSpeedBeastmaster = false
    --		show.costReduceChloro = true
    --		show.statBuffs = true
    --		show.endu = true
    --		show.resiArmor = true
    --		show.burningPurpose = true
    --		show.resonance = true
    --	end
    	local show = {
    		runSpeed = true,
    		runSpeedBeastmaster = false,
    		costReduceChloro = true,
    		statBuffs = true,
    		endu = true,
    		resiArmor = true,
    		burningPurpose = true,
    		resonance = true
    	}
    	if HasTarget and not TargetFriendly then
    		show.magicDmg = true
    		show.physDmg = true
    		show.critChance = true
    		show.armorDebuff = true
    		show.magicDmg2 = true
    		show.radiantSpores = true
    		show.dmg = true
    	end
    	
    	local statBuffs = {
    		["Flaring Intellect"] = false,
    		["Wisdom of the Ages"] = false,
    		["Focus of Body"] = false,
    		["Combat Preparation"] = false
    	}
    
    	local endu = 0
    	local stat = 0
    	
    	for _, detail in pairs(CurrentBuffs) do
    		local id = detail.abilityNew
    
    		-- buffs
    		if detail.isPlayer then
    			if id == NameToAbilityId["Anthem of Competence"] then
    				show.runSpeed = false
    			elseif id == NameToAbilityId["Living Energy"] then
    				show.costReduceChloro = false
    			elseif id == NameToAbilityId["Anthem of Fervor"] then
    				show.runSpeed = false
    				show.costReduceChloro = false
    				show.runSpeedBeastmaster = true
    			elseif id == NameToAbilityId["Bond of Alacrity"] then
    				show.runSpeed = false
    				show.runSpeedBeastmaster = false
    
    			elseif id == NameToAbilityId["Vitality of Stone"] or id == NameToAbilityId["Fanfare of Power"] or id == NameToAbilityId["Bond of Power"] then
    				stat = stat + 1
    			elseif id == NameToAbilityId["Flaring Intellect"] then
    				statBuffs["Flaring Intellect"] = true
    			elseif id == NameToAbilityId["Wisdom of the Ages"] then
    				statBuffs["Wisdom of the Ages"] = true
    			elseif id == NameToAbilityId["Focus of Body"] then
    				statBuffs["Focus of Body"] = true
    			elseif id == NameToAbilityId["Combat Preparation"] then
    				statBuffs["Combat Preparation"] = true
    
    			elseif id == NameToAbilityId["Shared Vigor"] or id == NameToAbilityId["Fanfare of Vigor"] or id == NameToAbilityId["Heroic Resolve"] or id == NameToAbilityId["Neddra's Might"] then
    				endu = endu + 1
    
    			elseif id == NameToAbilityId["Arcane Aegis"] or id == NameToAbilityId["Anthem of Glory"] or id == NameToAbilityId["Bond of Shelter"] then
    				show.resiArmor = false
    
    			elseif id == NameToAbilityId["Burning Purpose"] then
    				show.burningPurpose = false
    
    			elseif id == NameToAbilityId["Resonance"] then
    				show.resonance = false
    			end
    		end
    
    		-- debuffs
    		if id == NameToAbilityId["Crumbling Resistance"] or id == NameToAbilityId["Coda of Distress"] or id == NameToAbilityId["Spiritual Deficiency"] then
    			show.magicDmg = false
    
    		elseif id == NameToAbilityId["Ashen Defense"] or id == NameToAbilityId["Coda of Cowardice"] then
    			show.physDmg = false
    
    		elseif id == NameToAbilityId["Lethal Poison"] or id == NameToAbilityId["Mark of Extermination"] then
    			show.critChance = false
    
    		elseif id == NameToAbilityId["Piercing Shot"] or id == NameToAbilityId["Splinter Bomb"] or id == NameToAbilityId["Lightning Fury"] or id == NameToAbilityId["Mark of Inevitability"] then
    			show.armorDebuff = false
    
    		elseif id == NameToAbilityId["Clinging Spirit"] or id == NameToAbilityId["Sigil of Spirits"] or id == NameToAbilityId["Embers Bomb"] then
    			show.magicDmg2 = false
    
    		elseif id == NameToAbilityId["Radiant Spores"] then
    			show.radiantSpores = false
    
    		elseif id == NameToAbilityId["Coda of Jeopardy"] or id == NameToAbilityId["Illuminate"] or id == NameToAbilityId["Spotter's Call"] or id == NameToAbilityId["Thorns of Ire"] then
    			show.dmg = false
    		end
    	end
    
    	if endu == 2 then
    		show.endu = false
    	end
    
    	if stat == 2 then
    		show.statBuffs = false
    	end
    
    	if show.statBuffs then
    		local complete = true
    		for _, state in pairs(statBuffs) do
    			if not state then
    				complete = false
    				break
    			end
    		end
    		if complete and stat > 0 then
    			show.statBuffs = false
    		end
    	end
    	
    	-- sort
    	local finalTable = {}
    	local indexes = {"runSpeed", "runSpeedBeastmaster", "costReduceChloro", "statBuffs", "endu", "resiArmor", "burningPurpose", "resonance", "magicDmg", "physDmg", "critChance", "armorDebuff", "magicDmg2", "radiantSpores", "dmg"}
    	for _, key in ipairs(indexes) do
    		if show[key] then
    			tinsert(finalTable, ShownIcons[key])
    		end
    	end
    	
    	VisibleIcons = #finalTable
    	
    	UpdateBaseFrameSize()
    	
    	for i, data in ipairs(finalTable) do
    		if not Frames.buffs[i] then
    			local buff = UI.CreateFrame("Texture", "BuffTexture" .. i, Frames.base)
    			buff:SetWidth(BuffWatch_iconSize)
    			buff:SetHeight(BuffWatch_iconSize)
    			buff:SetMouseMasking("limited")
    
    			function buff.Event:MouseIn()
    				AsyncFix = i -- mousein, mousein, mouseout -.-
    				Tooltip:show(buff.data.tooltip, buff, true)
    			end
    			function buff.Event:MouseOut()
    				if i == AsyncFix then
    					Tooltip:hide()
    				end
    			end
    			
    			if i == 1 then
    				if BuffWatch_direction == 0 then
    					buff:SetPoint("TOPLEFT", Frames.base, "TOPLEFT")
    				elseif BuffWatch_direction == 1 then
    					buff:SetPoint("TOPLEFT", Frames.base, "TOPLEFT")
    				elseif BuffWatch_direction == 2 then
    					buff:SetPoint("TOPRIGHT", Frames.base, "TOPRIGHT")
    				elseif BuffWatch_direction == 3 then
    					buff:SetPoint("BOTTOMLEFT", Frames.base, "BOTTOMLEFT")
    				end
    			else
    				if BuffWatch_direction == 0 then
    					buff:SetPoint("TOPLEFT", Frames.buffs[i - 1], "TOPRIGHT", BuffWatch_spacing, 0)
    				elseif BuffWatch_direction == 1 then
    					buff:SetPoint("TOPLEFT", Frames.buffs[i - 1], "BOTTOMLEFT", 0, BuffWatch_spacing)
    				elseif BuffWatch_direction == 2 then
    					buff:SetPoint("TOPRIGHT", Frames.buffs[i - 1], "TOPLEFT", -BuffWatch_spacing, 0)
    				elseif BuffWatch_direction == 3 then
    					buff:SetPoint("BOTTOMLEFT", Frames.buffs[i - 1], "TOPLEFT", 0, -BuffWatch_spacing)
    				end
    			end
    
    			Frames.buffs[i] = buff
    		end
    		
    		local source = "Rift"
    		if not data.internal then
    			source = Info.identifier
    		end
    		Frames.buffs[i]:SetTexture(source, data.texture)
    		Frames.buffs[i]:SetVisible(true)
    		Frames.buffs[i].data = data
    	end
    end
    
    local function BuffAdd(unit, buffs, noUpdate)
    	if unit ~= TargetID and unit ~= PlayerID then
    		return
    	end
    	
    	local added = false
    	for id, _ in pairs(buffs) do
    		local detail = Inspect.Buff.Detail(unit, id)
    		if Buffs[detail.abilityNew] then
    			if unit == PlayerID then
    				detail.isPlayer = true
    			end
    			CurrentBuffs[id] = detail
    			added = true
    			
    		--else
    		--	if ( detail.abilityNew ~= nil ) then
    		--		print("Untracked: " .. detail.name .. " " .. detail.abilityNew .. " " .. detail.icon );
    		--	end
    		
    		end
    	end
    	
    	if added and not noUpdate then
    		Update()
    	end
    end
    
    local function BuffRemove(unit, buffs, noUpdate)
    	if unit ~= TargetID and unit ~= PlayerID then
    		return
    	end
    	
    	local removed = false
    	for id, _ in pairs(buffs) do
    		if CurrentBuffs[id] then
    			removed = true
    			CurrentBuffs[id] = nil
    		end
    	end
    	if removed and not noUpdate then
    		Update()
    	end
    end
    
    local function PlayerTargetChange(unit)
    	if unit ~= TargetID then
    		CurrentBuffs = {}
    	end
    
    	HasTarget = not not unit -- super duper bool cast
    
    	if HasTarget then
    		TargetID = unit
    
    		local detail = Inspect.Unit.Detail(unit)
    		if detail and detail.relation == "friendly" then
    			local detailTarget = Inspect.Unit.Detail(unit .. ".target")
    			if detailTarget and detailTarget.relation ~= "friendly" then
    				TargetID = detailTarget.id
    				TargetFriendly = false
    			else
    				TargetFriendly = true
    			end
    		else
    			TargetFriendly = false
    		end
    
    		local buffs = Inspect.Buff.List(TargetID)
    		if buffs then
    			BuffAdd(TargetID, buffs, true)
    		end
    	else
    		TargetID = ""
    	end
    
    	local buffs = Inspect.Buff.List(PlayerID)
    	if buffs then
    		BuffAdd(PlayerID, buffs, true)
    	end
    
    	Update()
    end
    
    
    
    local function RegisterEvent(eventTable, newEvent)
    	for key, value in pairs(eventTable) do
    		if type(value) == "table" and value[1] and value[1] == Dummy then
    			eventTable[key][1] = newEvent[1]
    			return
    		end
    	end
    	tinsert(eventTable, newEvent)
    end
    
    local function UnregisterEvent(event, func)
    	for key, value in pairs(event) do
    		if type(value) == "table" and value[1] and value[1] == func then
    			event[key][1] = Dummy
    			return
    		end
    	end
    end
    
    local function Init()
    	Frames.base = UI.CreateFrame("Frame", "BW base", Context)
    	Frames.base:SetLayer(0)
    	Frames.base:SetWidth(BuffWatch_iconSize)
    	Frames.base:SetHeight(BuffWatch_iconSize)
    	Frames.base:SetVisible(false)
    	--Frames.base:SetBackgroundColor(0, 0, 1)
    	Frames.base.Event.LeftDown = function (self)
    		local mouse = Inspect.Mouse()
    		self.pressed = true
    
    		if BuffWatch_anchorX == 1 and BuffWatch_anchorY == 1 then
    			self.mouseStartX = mouse.x
    			self.mouseStartY = mouse.y
    			self.attrStartX = Frames.base:GetLeft() + Frames.base:GetWidth()
    			self.attrStartY = Frames.base:GetTop() + Frames.base:GetHeight()
    		else
    			self.mouseStartX = mouse.x
    			self.mouseStartY = mouse.y
    			self.attrStartX = Frames.base:GetLeft()
    			self.attrStartY = Frames.base:GetTop()
    		end
    	end
    	Frames.base.Event.MouseMove = function (self)
    		if self.pressed then
    			local mouse = Inspect.Mouse()
    
    			if BuffWatch_anchorX == 1 and BuffWatch_anchorY == 1 then
    				BuffWatch_x = mouse.x - self.mouseStartX + self.attrStartX - UIParent:GetWidth()
    				BuffWatch_y = mouse.y - self.mouseStartY + self.attrStartY - UIParent:GetHeight()
    			else
    				BuffWatch_x = mouse.x - self.mouseStartX + self.attrStartX
    				BuffWatch_y = mouse.y - self.mouseStartY + self.attrStartY
    			end
    
    			Frames.base:SetPoint(BuffWatch_anchorX, BuffWatch_anchorY, UIParent, BuffWatch_anchorX, BuffWatch_anchorY, BuffWatch_x, BuffWatch_y)
    		end
    	end
    	Frames.base.Event.LeftUpoutside = function (self)
    		self.pressed = false
    	end
    	Frames.base.Event.LeftUp = function (self)
    		self.pressed = false
    	end
    	
    	
    	Frames.base.Event.RightClick = function (self)
    		UpdateAlign(BuffWatch_direction + 1)
    	end
    	
    	Frames.base.Event.WheelForward = function (self)
    		UpdateIconSize(BuffWatch_iconSize + 1)
    	end
    	Frames.base.Event.WheelBack = function (self)
    		UpdateIconSize(BuffWatch_iconSize - 1)
    	end
    	
    	Frames.buffs = {}
    end
    
    local function ChangeTrackingSpecifier(specifier, hide)
    	if not specifier then
    		print("Valid specifiers are /bw track player.target, focus, group01.target, player.target.target, ...")
    		return
    	end
    
    	BuffWatch_trackSpecifier = specifier
    
    	UnregisterEvent(TrackingSpecifierChangeEvent, PlayerTargetChange)
    	TrackingSpecifierChangeEvent = Library.LibUnitChange.Register(BuffWatch_trackSpecifier)
    	RegisterEvent(TrackingSpecifierChangeEvent, {PlayerTargetChange, Info.identifier, "Player target change"})
    
    	local unit = Inspect.Unit.Lookup(BuffWatch_trackSpecifier)
    	if unit then
    		PlayerTargetChange(unit)
    	end
    
    	if not hide then
    		print("Tracking " .. specifier)
    	end
    end
    
    local function On()
    	if Enabled then
    		return
    	end
    	
    	Enabled = true
    	
    	RegisterEvent(TrackingSpecifierChangeEvent, {PlayerTargetChange, Info.identifier, "Player target change"})
    	RegisterEvent(Event.Buff.Add, {BuffAdd, Info.identifier, "Buff add tracker"})
    	RegisterEvent(Event.Buff.Remove, {BuffRemove, Info.identifier, "Buff remove tracker"})
    	
    	local unit = Inspect.Unit.Lookup(BuffWatch_trackSpecifier)
    	if unit then
    		PlayerTargetChange(unit)
    	else
    		Update()
    	end
    end
    
    local function Off()
    	if not Enabled then
    		return
    	end
    	
    	Enabled = false
    	
    	HideBuffs()
    	
    	UnregisterEvent(TrackingSpecifierChangeEvent, PlayerTargetChange)
    	UnregisterEvent(Event.Buff.Add, BuffAdd)
    	UnregisterEvent(Event.Buff.Remove, BuffRemove)
    end
    
    local function Default()
    	HasTarget = false
    	
    	BuffWatch_x = floor(UIParent:GetWidth() / 2)
    	BuffWatch_y = floor(UIParent:GetHeight() / 2)
    	BuffWatch_anchorX = 0
    	BuffWatch_anchorY = 0
    	BuffWatch_iconSize = 40
    	BuffWatch_spacing = 4
    	BuffWatch_direction = 0
    	BuffWatch_trackSpecifier = "player.target"
    	
    	UpdateAlign(BuffWatch_direction)
    	UpdateIconSize(BuffWatch_iconSize)
    	
    	ChangeTrackingSpecifier(BuffWatch_trackSpecifier, true)
    end
    
    local function Colorize(text, fromHex, toHex)
    	local colored = ""
    	local len = text:len() - 1
    	
    	local from = {
    		r = bit.rshift(fromHex, 16),
    		g = bit.band(bit.rshift(fromHex, 8), 0xff),
    		b = bit.band(fromHex, 0xff),
    	}
    	
    	local to = {
    		r = bit.rshift(toHex, 16),
    		g = bit.band(bit.rshift(toHex, 8), 0xff),
    		b = bit.band(toHex, 0xff),
    	}
    	
    	local step = {
    		r = (to.r - from.r) / len,
    		g = (to.g - from.g) / len,
    		b = (to.b - from.b) / len
    	}
    
    	for char in text:gmatch(".") do
    		colored = colored .. ("<font color=\"#%02x%02x%02x\">%s</font>"):format(from.r, from.g, from.b, char)
    		from.r = from.r + step.r
    		from.g = from.g + step.g
    		from.b = from.b + step.b
    	end
    
    	return colored
    end
    
    local function LoadEnd(identifier)
    	if identifier ~= Info.identifier then
    		return
    	end
    	
    	PlayerID = Inspect.Unit.Lookup("player")
    	TrackingSpecifierChangeEvent = Library.LibUnitChange.Register(BuffWatch_trackSpecifier)
    	
    	Init()
    	On()
    	
    	Command.Console.Display("general", true, Colorize(("%s v%s loaded. /bw for commands"):format(Info.toc.Name, Info.toc.Version), 0x0065FF, 0x00D0FF), true)
    end
    
    local SlashCommands = setmetatable({
    	on = function()
    		On()
    	end,
    	off = function()
    		Off()
    	end,
    	default = function()
    		Default()
    	end,
    	track = function(specifier)
    		ChangeTrackingSpecifier(specifier)
    	end,
    	toggle = function()
    		if Enabled then
    			Off()
    		else
    			On()
    		end
    	end
    }, {
    	__index = function(t, key)
    		return function()
    			commands = {}
    			for cmd, func in pairs(t) do
    				tinsert(commands, cmd)
    			end
    			Command.Console.Display("general", true, Colorize(table.concat(commands, ", "), 0x0065FF, 0x00D0FF), true)
    		end
    	end
    })
    
    local function SlashHandler(params)
    	list = {}
    	for param in params:gmatch("[^%s]+") do
    		tinsert(list, param)
    	end
    	SlashCommands[list[1]](unpack(list, 2, #list))
    end
    
    tinsert(Event.Addon.Load.End, {LoadEnd, Info.identifier, "Init"})
    tinsert(Command.Slash.Register("bw"), {SlashHandler, Info.identifier, "Slash Handler"})

  12. #12
    Rift Disciple chuckySTAR's Avatar
    Join Date
    Feb 2011
    Posts
    152
    Vince
    GAME OVER
    WORLD FIRST PRE NERFZ REGULOS

  13. #13
    Rift Disciple windspin's Avatar
    Join Date
    Sep 2011
    Posts
    124

    Default

    Quote Originally Posted by chuckySTAR View Post
    Thanks you guys, grats on your kill!

    http://teamvirus.enjin.com/home / Old pals add me for the new cross-realm ques!

  14. #14
    Rift Disciple chuckySTAR's Avatar
    Join Date
    Feb 2011
    Posts
    152

    Default

    Quote Originally Posted by chuckySTAR View Post
    Seems like the Addon wasn't updated somehow :'(
    After 6 days fixed now, sorry ^^
    Vince
    GAME OVER
    WORLD FIRST PRE NERFZ REGULOS

+ Reply to Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts