- debug: print in the chat the pre-potion found in the combat beggining while in raid.
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
|
||||
_ = nil
|
||||
_detalhes = LibStub("AceAddon-3.0"):NewAddon("_detalhes", "AceTimer-3.0", "AceComm-3.0", "AceSerializer-3.0", "NickTag-1.0", "LibHotCorners")
|
||||
_detalhes.userversion = "v1.17.5"
|
||||
_detalhes.userversion = "v1.18.0a"
|
||||
_detalhes.version = "Alpha 020"
|
||||
_detalhes.realversion = 20
|
||||
|
||||
|
||||
@@ -1210,10 +1210,14 @@ function _detalhes:CatchRaidDebuffUptime (in_or_out) -- "DEBUFF_UPTIME_IN"
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
|
||||
function _detalhes:CatchRaidBuffUptime (in_or_out)
|
||||
|
||||
if (_IsInRaid()) then
|
||||
|
||||
local pot_usage = {}
|
||||
|
||||
for raidIndex = 1, _GetNumGroupMembers() do
|
||||
for buffIndex = 1, 41 do
|
||||
local name, _, _, _, _, _, _, unitCaster, _, _, spellid = _UnitAura ("raid"..raidIndex, buffIndex, nil, "HELPFUL")
|
||||
@@ -1225,7 +1229,13 @@ function _detalhes:CatchRaidBuffUptime (in_or_out)
|
||||
playerName = playerName .. "-" .. realmName
|
||||
end
|
||||
|
||||
_detalhes.parser:add_buff_uptime (nil, GetTime(), _UnitGUID ("raid"..raidIndex), playerName, 0x00000417, _UnitGUID ("raid"..raidIndex), playerName, 0x00000417, spellid, name, in_or_out)
|
||||
if (in_or_out == "BUFF_UPTIME_IN") then
|
||||
if (_detalhes.PotionList [spellid]) then
|
||||
pot_usage [playerName] = spellid
|
||||
end
|
||||
end
|
||||
|
||||
_detalhes.parser:add_buff_uptime (nil, GetTime(), _UnitGUID ("raid"..raidIndex), playerName, 0x00000514, _UnitGUID ("raid"..raidIndex), playerName, 0x00000514, spellid, name, in_or_out)
|
||||
|
||||
else
|
||||
--break
|
||||
@@ -1233,16 +1243,39 @@ function _detalhes:CatchRaidBuffUptime (in_or_out)
|
||||
end
|
||||
end
|
||||
|
||||
--> i don't remmember why do we iterate through the player again.
|
||||
for buffIndex = 1, 41 do
|
||||
local name, _, _, _, _, _, _, unitCaster, _, _, spellid = _UnitAura ("player", buffIndex, nil, "HELPFUL")
|
||||
if (name and unitCaster == "player") then
|
||||
local playerName = _UnitName ("player")
|
||||
_detalhes.parser:add_buff_uptime (nil, GetTime(), _UnitGUID ("player"), playerName, 0x00000417, _UnitGUID ("player"), playerName, 0x00000417, spellid, name, in_or_out)
|
||||
|
||||
if (in_or_out == "BUFF_UPTIME_IN") then
|
||||
if (_detalhes.PotionList [spellid]) then
|
||||
pot_usage [playerName] = spellid
|
||||
end
|
||||
end
|
||||
|
||||
_detalhes.parser:add_buff_uptime (nil, GetTime(), _UnitGUID ("player"), playerName, 0x00000514, _UnitGUID ("player"), playerName, 0x00000514, spellid, name, in_or_out)
|
||||
else
|
||||
break
|
||||
end
|
||||
end
|
||||
|
||||
if (in_or_out == "BUFF_UPTIME_IN") then
|
||||
|
||||
local string_output = "pre-potion: "
|
||||
|
||||
for playername, potspellid in _pairs (pot_usage) do
|
||||
local name, _, icon = _GetSpellInfo (potspellid)
|
||||
local _, class = UnitClass (playername)
|
||||
local class_color = RAID_CLASS_COLORS [class].colorStr
|
||||
string_output = string_output .. "|c" .. class_color .. playername .. "|r |T" .. icon .. ":14:14:0:0:64:64:0:64:0:64|t "
|
||||
end
|
||||
|
||||
_detalhes:Msg (string_output)
|
||||
|
||||
end
|
||||
|
||||
elseif (_IsInGroup()) then
|
||||
for groupIndex = 1, _GetNumGroupMembers()-1 do
|
||||
for buffIndex = 1, 41 do
|
||||
@@ -1273,15 +1306,37 @@ function _detalhes:CatchRaidBuffUptime (in_or_out)
|
||||
end
|
||||
|
||||
else
|
||||
|
||||
local pot_usage = {}
|
||||
|
||||
for buffIndex = 1, 41 do
|
||||
local name, _, _, _, _, _, _, unitCaster, _, _, spellid = _UnitAura ("player", buffIndex, nil, "HELPFUL")
|
||||
if (name and unitCaster == "player") then
|
||||
local playerName = _UnitName ("player")
|
||||
|
||||
if (in_or_out == "BUFF_UPTIME_IN") then
|
||||
if (_detalhes.PotionList [spellid]) then
|
||||
pot_usage [playerName] = spellid
|
||||
end
|
||||
end
|
||||
|
||||
_detalhes.parser:add_buff_uptime (nil, GetTime(), _UnitGUID ("player"), playerName, 0x00000417, _UnitGUID ("player"), playerName, 0x00000417, spellid, name, in_or_out)
|
||||
else
|
||||
break
|
||||
end
|
||||
end
|
||||
|
||||
local string_output = "pre-potion: "
|
||||
|
||||
for playername, potspellid in _pairs (pot_usage) do
|
||||
local name, _, icon = _GetSpellInfo (potspellid)
|
||||
local _, class = UnitClass (playername)
|
||||
local class_color = RAID_CLASS_COLORS [class].colorStr
|
||||
string_output = string_output .. "|c" .. class_color .. playername .. "|r |T" .. icon .. ":14:14:0:0:64:64:0:64:0:64|t "
|
||||
end
|
||||
|
||||
-- _detalhes:Msg (string_output)
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@@ -79,6 +79,9 @@ function SlashCmdList.DETAILS (msg, editbox)
|
||||
|
||||
-------- debug ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
elseif (msg == "chaticon") then
|
||||
_detalhes:Msg ("|TInterface\\AddOns\\Details\\images\\icones_barra:" .. 14 .. ":" .. 14 .. ":0:0:256:32:0:32:0:32|tteste")
|
||||
|
||||
elseif (msg == "align") then
|
||||
local c = RightChatPanel
|
||||
local w,h = c:GetSize()
|
||||
|
||||
@@ -2,6 +2,13 @@ do
|
||||
|
||||
local _detalhes = _G._detalhes
|
||||
|
||||
_detalhes.PotionList = {
|
||||
[105702] = true, --jade serpent
|
||||
[105706] = true, --mogu power
|
||||
[105697] = true, --virmen's bite
|
||||
[105698] = true, --montains
|
||||
}
|
||||
|
||||
_detalhes.SpecSpellList = {
|
||||
|
||||
}
|
||||
|
||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user