- Fixed bugs on sending messages to chat for Raid Tools.

- Continuing the implementation of RaidCheck, plugin for check food, flasks and pre-pots.
This commit is contained in:
tercio
2014-12-17 21:00:25 -02:00
parent 7497183fb0
commit e70b25602e
10 changed files with 241 additions and 68 deletions
+10 -5
View File
File diff suppressed because one or more lines are too long
+48 -7
View File
@@ -1407,16 +1407,23 @@ function _detalhes:CatchRaidBuffUptime (in_or_out)
if (in_or_out == "BUFF_UPTIME_IN") then
local string_output = "pre-potion: " --> localize-me
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.pre_pot_used = string_output
_detalhes:SendEvent ("COMBAT_PREPOTION_UPDATED", nil, pot_usage)
end
elseif (_IsInGroup()) then
local pot_usage = {}
for groupIndex = 1, _GetNumGroupMembers()-1 do
for buffIndex = 1, 41 do
local name, _, _, _, _, _, _, unitCaster, _, _, spellid = _UnitAura ("party"..groupIndex, buffIndex, nil, "HELPFUL")
@@ -1429,6 +1436,12 @@ function _detalhes:CatchRaidBuffUptime (in_or_out)
if (realmName and realmName ~= "") then
playerName = playerName .. "-" .. realmName
end
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(), playerGUID, playerName, 0x00000417, playerGUID, playerName, 0x00000417, spellid, name, in_or_out)
end
@@ -1442,11 +1455,31 @@ function _detalhes:CatchRaidBuffUptime (in_or_out)
local playerName = _UnitName ("player")
local playerGUID = _UnitGUID ("player")
if (playerGUID) then
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(), playerGUID, playerName, 0x00000417, playerGUID, playerName, 0x00000417, spellid, name, in_or_out)
end
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.pre_pot_used = string_output
_detalhes:SendEvent ("COMBAT_PREPOTION_UPDATED", nil, pot_usage)
end
else
local pot_usage = {}
@@ -1469,15 +1502,23 @@ function _detalhes:CatchRaidBuffUptime (in_or_out)
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 "
--[
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.pre_pot_used = string_output
_detalhes:SendEvent ("COMBAT_PREPOTION_UPDATED", nil, pot_usage)
end
--]]
-- _detalhes:Msg (string_output)
end
+9 -6
View File
@@ -229,6 +229,7 @@ function _detalhes:StoreEncounter (combat)
local boss_info = combat:GetBossInfo()
local encounter_id = boss_info and boss_info.id
if (not encounter_id) then
return
end
@@ -236,7 +237,7 @@ function _detalhes:StoreEncounter (combat)
local diff = combat:GetDifficulty()
--> check for heroic mode
if (diff == 5 or diff == 6 or diff == 15) then
if (diff == 5 or diff == 6 or diff == 15) then --test on raid finder or diff == 7 or diff == 17
local role = UnitGroupRolesAssigned ("player")
if (role ~= "DAMAGER" and role ~= "HEALER") then
@@ -262,7 +263,7 @@ function _detalhes:StoreEncounter (combat)
elseif (not db) then
return
end
local self_database = db.SELF_STORAGE
if (not self_database) then
@@ -291,7 +292,9 @@ function _detalhes:StoreEncounter (combat)
}
if (role == "DAMAGER") then
local player = combat (1, _detalhes.player_name)
local player = combat (1, _detalhes.playername)
if (player) then
t.total = player.total
for spellid, spell in pairs (player.spells._ActorTable) do
@@ -300,7 +303,7 @@ function _detalhes:StoreEncounter (combat)
end
elseif (role == "HEALER") then
local player = combat (2, _detalhes.player_name)
local player = combat (2, _detalhes.playername)
if (player) then
t.total = player.total
for spellid, spell in pairs (player.spells._ActorTable) do
@@ -377,7 +380,7 @@ function _detalhes:StoreEncounter (combat)
}
if (role == "DAMAGER") then
local player = combat (1, _detalhes.player_name)
local player = combat (1, _detalhes.playername)
if (player) then
t.total = player.total
for spellid, spell in pairs (player.spells._ActorTable) do
@@ -386,7 +389,7 @@ function _detalhes:StoreEncounter (combat)
end
elseif (role == "HEALER") then
local player = combat (2, _detalhes.player_name)
local player = combat (2, _detalhes.playername)
if (player) then
t.total = player.total
for spellid, spell in pairs (player.spells._ActorTable) do
+4 -4
View File
@@ -2207,7 +2207,7 @@
if (_hook_deaths) then
--> send event to registred functions
local death_at = _tempo - _current_combat:GetStartTime()
local death_at = _GetTime() - _current_combat:GetStartTime()
local max_health = _UnitHealthMax (alvo_name)
for _, func in _ipairs (_hook_deaths_container) do
@@ -2242,7 +2242,7 @@
esta_morte [#esta_morte+1] = t
end
local decorrido = _tempo - _current_combat:GetStartTime()
local decorrido = _GetTime() - _current_combat:GetStartTime()
local minutos, segundos = _math_floor (decorrido/60), _math_floor (decorrido%60)
local t = {esta_morte, time, este_jogador.nome, este_jogador.classe, _UnitHealthMax (alvo_name), minutos.."m "..segundos.."s", ["dead"] = true, ["last_cooldown"] = este_jogador.last_cooldown, ["dead_at"] = decorrido}
@@ -2627,14 +2627,14 @@
end
_detalhes.latest_ENCOUNTER_END = _detalhes.latest_ENCOUNTER_END or 0
if (_detalhes.latest_ENCOUNTER_END + 15 > _detalhes._tempo) then
if (_detalhes.latest_ENCOUNTER_END + 15 > _GetTime()) then
return
end
--_detalhes.latest_ENCOUNTER_END = _detalhes._tempo
_detalhes.latest_ENCOUNTER_END = _GetTime()
--_detalhes.encounter_table ["end"] = time() - 0.4
_detalhes.encounter_table ["end"] = _GetTime() - 0.4
_detalhes.encounter_table ["end"] = _GetTime() -- - 0.4 --0.4 para o antigo metodo de tempo
local _, _, _, _, _, _, _, zoneMapID = _GetInstanceInfo()
+57 -11
View File
@@ -1,7 +1,3 @@
--File Revision: 1
--Last Modification: 27/07/2013
-- Change Log:
-- 27/07/2013: Finished alpha version.
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
@@ -271,6 +267,12 @@
--/run local s="teste {spell}"; s=s:gsub("{spell}", "tercio");print(s)
function _detalhes:interrupt_announcer (token, time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, spellid, spellname, spelltype, extraSpellID, extraSpellName, extraSchool)
-- add novo canal Self.
-- no canal self ele mostra todos os interrupts além do meu.
-- add canal self pras mortes tbm?
if (who_name == _detalhes.playername) then -- and _detalhes.announce_interrupts.enabled
local channel = _detalhes.announce_interrupts.channel
local next = _detalhes.announce_interrupts.next
@@ -283,6 +285,23 @@
spellname = _GetSpellInfo (extraSpellID)
end
if (channel == "RAID") then
local zone = _detalhes:GetZoneType()
if (zone ~= "party" and zone ~= "raid") then
return
end
if (zone == "raid") then
channel = "RAID"
elseif (zone == "party") then
channel = "PARTY"
end
if (GetNumGroupMembers (LE_PARTY_CATEGORY_INSTANCE) > 0) then
channel = "INSTANCE_CHAT"
end
end
if (custom ~= "") then
custom = custom:gsub ("{spell}", spellname)
custom = custom:gsub ("{next}", next)
@@ -308,13 +327,27 @@
local channel = _detalhes.announce_cooldowns.channel
if (channel == "WHISPER") then
if (alvo_name == _detalhes.playername) then
return
end
if (alvo_name == Loc ["STRING_RAID_WIDE"]) then
channel = "RAID"
end
end
if (channel == "RAID") then
local zone = _detalhes:GetZoneType()
if (zone ~= "party" and zone ~= "raid") then
return
end
if (zone == "raid") then
channel = "RAID"
elseif (zone == "party") then
channel = "PARTY"
end
if (GetNumGroupMembers (LE_PARTY_CATEGORY_INSTANCE) > 0) then
channel = "INSTANCE_CHAT"
end
end
local spellname
if (spellid > 10) then
@@ -322,7 +355,7 @@
else
spellname = _GetSpellInfo (spellid)
end
local custom = _detalhes.announce_cooldowns.custom
if (custom ~= "") then
@@ -344,28 +377,42 @@
end
function _detalhes:death_announcer (token, time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, death_table, last_cooldown, death_at, max_health)
--if (_detalhes.announce_deaths.enabled) then
local where = _detalhes.announce_deaths.where
local zone = _detalhes:GetZoneType()
local channel = ""
if (where == 1) then
if (zone ~= "party" and zone ~= "raid") then
return
end
if (zone == "raid") then
channel = "RAID"
elseif (zone == "party") then
channel = "PARTY"
end
if (GetNumGroupMembers (LE_PARTY_CATEGORY_INSTANCE) > 0) then
channel = "INSTANCE_CHAT"
end
elseif (where == 2) then
if (zone ~= "raid") then
return
end
channel = "RAID"
if (GetNumGroupMembers (LE_PARTY_CATEGORY_INSTANCE) > 0) then
channel = "INSTANCE_CHAT"
end
elseif (where == 3) then
if (zone ~= "party") then
return
end
channel = "PARTY"
if (GetNumGroupMembers (LE_PARTY_CATEGORY_INSTANCE) > 0) then
channel = "INSTANCE_CHAT"
end
end
local only_first = _detalhes.announce_deaths.only_first
@@ -402,8 +449,7 @@
msg = msg .. " " .. spells
_detalhes:SendMsgToChannel (msg, channel)
--print (msg)
--end
end
function _detalhes:StartAnnouncers()
+2
View File
@@ -33,6 +33,7 @@
["COMBAT_PLAYER_TIMESTARTED"] = {},
["COMBAT_BOSS_FOUND"] = {},
["COMBAT_INVALID"] = {},
["COMBAT_PREPOTION_UPDATED"] = {},
--> area
["ZONE_TYPE_CHANGED"] = {},
@@ -78,6 +79,7 @@ local common_events = {
["COMBAT_PLAYER_TIMESTARTED"] = true,
["COMBAT_BOSS_FOUND"] = true,
["COMBAT_INVALID"] = true,
["COMBAT_PREPOTION_UPDATED"] = true,
["GROUP_ONENTER"] = true,
["GROUP_ONLEAVE"] = true,
["ZONE_TYPE_CHANGED"] = true,
+2 -2
View File
@@ -7504,7 +7504,7 @@ function window:CreateFrame11()
local channel_list = {
{value = "SAY", icon = [[Interface\FriendsFrame\UI-Toast-ToastIcons]], iconsize = {14, 14}, texcoord = {0.0390625, 0.203125, 0.09375, 0.375}, label = Loc ["STRING_CHANNEL_SAY"], onclick = on_select_channel},
{value = "YELL", icon = [[Interface\FriendsFrame\UI-Toast-ToastIcons]], iconsize = {14, 14}, texcoord = {0.0390625, 0.203125, 0.09375, 0.375}, iconcolor = {1, 0.3, 0, 1}, label = Loc ["STRING_CHANNEL_YELL"], onclick = on_select_channel},
{value = "RAID", icon = [[Interface\FriendsFrame\UI-Toast-ToastIcons]], iconcolor = {1, 0.49, 0}, iconsize = {14, 14}, texcoord = {0.53125, 0.7265625, 0.078125, 0.40625}, label = Loc ["STRING_CHANNEL_RAID"], onclick = on_select_channel},
{value = "RAID", icon = [[Interface\FriendsFrame\UI-Toast-ToastIcons]], iconcolor = {1, 0.49, 0}, iconsize = {14, 14}, texcoord = {0.53125, 0.7265625, 0.078125, 0.40625}, label = Loc ["STRING_INSTANCE_CHAT"], onclick = on_select_channel},
{value = "WHISPER", icon = [[Interface\FriendsFrame\UI-Toast-ToastIcons]], iconcolor = {1, 0.49, 1}, iconsize = {14, 14}, texcoord = {0.0546875, 0.1953125, 0.625, 0.890625}, label = Loc ["STRING_CHANNEL_WHISPER"], onclick = on_select_channel},
}
local build_channel_menu = function()
@@ -7605,7 +7605,7 @@ function window:CreateFrame11()
local channel_list = {
{value = "SAY", icon = [[Interface\FriendsFrame\UI-Toast-ToastIcons]], iconsize = {14, 14}, texcoord = {0.0390625, 0.203125, 0.09375, 0.375}, label = Loc ["STRING_CHANNEL_SAY"], onclick = on_select_channel},
{value = "YELL", icon = [[Interface\FriendsFrame\UI-Toast-ToastIcons]], iconsize = {14, 14}, texcoord = {0.0390625, 0.203125, 0.09375, 0.375}, iconcolor = {1, 0.3, 0, 1}, label = Loc ["STRING_CHANNEL_YELL"], onclick = on_select_channel},
{value = "RAID", icon = [[Interface\FriendsFrame\UI-Toast-ToastIcons]], iconcolor = {1, 0.49, 0}, iconsize = {14, 14}, texcoord = {0.53125, 0.7265625, 0.078125, 0.40625}, label = Loc ["STRING_CHANNEL_RAID"], onclick = on_select_channel},
{value = "RAID", icon = [[Interface\FriendsFrame\UI-Toast-ToastIcons]], iconcolor = {1, 0.49, 0}, iconsize = {14, 14}, texcoord = {0.53125, 0.7265625, 0.078125, 0.40625}, label = Loc ["STRING_INSTANCE_CHAT"], onclick = on_select_channel},
{value = "WHISPER", icon = [[Interface\FriendsFrame\UI-Toast-ToastIcons]], iconcolor = {1, 0.49, 1}, iconsize = {14, 14}, texcoord = {0.0546875, 0.1953125, 0.625, 0.890625}, label = Loc ["STRING_CHANNEL_WHISPER_TARGET_COOLDOWN"], onclick = on_select_channel},
}
local build_channel_menu = function()
+107 -32
View File
@@ -1,5 +1,8 @@
local _UnitAura = UnitAura
local _GetSpellInfo = GetSpellInfo
local _UnitClass = UnitClass
local _UnitName = UnitName
local flask_list = {
[156064] = true, --Greater Draenic Agility Flask
@@ -12,20 +15,6 @@ local flask_list = {
[156084] = true, --Greater Draenic Stamina Flask
}
-- 175790, --shiftness potion (70% speed)
-- 175817, --living action potion (remove stun)
-- 156445, --rejuvenation potion (restore 70k hp)
-- 156436, --mana potion
-- 156432, --channeled mana potion
local pre_potions_list = {
[156426] = true, --draenic intellect potion
[156430] = true, --draenic armor potion
[156423] = true, --draenic agility potion
[156428] = true, --draenic strength potion
[175821] = true, --draenic pure rage potion
}
local food_list = {
[160600] = true, --
[160724] = true, --
@@ -54,8 +43,7 @@ local food_list = {
local DetailsRaidCheck = _detalhes:NewPluginObject ("DetailsRaidCheck", DETAILSPLUGIN_ALWAYSENABLED)
tinsert (UISpecialFrames, "DetailsRaidCheck")
DetailsRaidCheck:SetPluginDescription (Loc ["STRING_RAIDCHECK_PLUGIN_DESC"])
local CreatePluginFrames = function()
DetailsRaidCheck.usedprepot_table = {}
@@ -73,14 +61,14 @@ local food_list = {
DetailsRaidCheck:CheckZone (...)
elseif (event == "COMBAT_PREPOTION_UPDATED") then
DetailsRaidCheck.usedprepot_table = select (1, ...)
vardump (DetailsRaidCheck.usedprepot_table)
elseif (event == "COMBAT_PLAYER_LEAVE") then
if (DetailsRaidCheck.on_raid) then
--> GET PRE POTION LIST
table.wipe (DetailsRaidCheck.usedprepot_table or empty_table)
DetailsRaidCheck.usedprepot_table = DetailsRaidCheck:FormatTable (DetailsRaidCheck.last_combat_pre_pot_used or "")
DetailsRaidCheck:StartTrackBuffs()
end
@@ -116,18 +104,64 @@ local food_list = {
DetailsRaidCheck.ToolbarButton.shadow = true --> loads icon_shadow.tga when the instance is showing icons with shadows
DetailsRaidCheck:ShowToolbarIcon (DetailsRaidCheck.ToolbarButton, "star")
--DetailsRaidCheck:HideToolbarIcon (DetailsRaidCheck.ToolbarButton)
function DetailsRaidCheck:SetGreenIcon()
local lower_instance = _detalhes:GetLowerInstanceNumber()
if (not lower_instance) then
return
end
local instance = _detalhes:GetInstance (lower_instance)
if (instance.menu_icons.shadow) then
DetailsRaidCheck.ToolbarButton:SetNormalTexture ([[Interface\AddOns\Details_RaidCheck\icon_shadow]])
DetailsRaidCheck.ToolbarButton:SetPushedTexture ([[Interface\AddOns\Details_RaidCheck\icon_shadow]])
DetailsRaidCheck.ToolbarButton:SetDisabledTexture ([[Interface\AddOns\Details_RaidCheck\icon_shadow]])
DetailsRaidCheck.ToolbarButton:SetHighlightTexture ([[Interface\AddOns\Details_RaidCheck\icon_shadow]], "ADD")
else
DetailsRaidCheck.ToolbarButton:SetNormalTexture ([[Interface\AddOns\Details_RaidCheck\icon]])
DetailsRaidCheck.ToolbarButton:SetPushedTexture ([[Interface\AddOns\Details_RaidCheck\icon]])
DetailsRaidCheck.ToolbarButton:SetDisabledTexture ([[Interface\AddOns\Details_RaidCheck\icon]])
DetailsRaidCheck.ToolbarButton:SetHighlightTexture ([[Interface\AddOns\Details_RaidCheck\icon]], "ADD")
end
end
function DetailsRaidCheck:SetRedIcon()
local lower_instance = _detalhes:GetLowerInstanceNumber()
if (not lower_instance) then
return
end
local instance = _detalhes:GetInstance (lower_instance)
if (instance.menu_icons.shadow) then
DetailsRaidCheck.ToolbarButton:SetNormalTexture ([[Interface\AddOns\Details_RaidCheck\icon_red_shadow]])
DetailsRaidCheck.ToolbarButton:SetPushedTexture ([[Interface\AddOns\Details_RaidCheck\icon_red_shadow]])
DetailsRaidCheck.ToolbarButton:SetDisabledTexture ([[Interface\AddOns\Details_RaidCheck\icon_red_shadow]])
DetailsRaidCheck.ToolbarButton:SetHighlightTexture ([[Interface\AddOns\Details_RaidCheck\icon_red_shadow]], "ADD")
else
DetailsRaidCheck.ToolbarButton:SetNormalTexture ([[Interface\AddOns\Details_RaidCheck\icon_red]])
DetailsRaidCheck.ToolbarButton:SetPushedTexture ([[Interface\AddOns\Details_RaidCheck\icon_red]])
DetailsRaidCheck.ToolbarButton:SetDisabledTexture ([[Interface\AddOns\Details_RaidCheck\icon_red]])
DetailsRaidCheck.ToolbarButton:SetHighlightTexture ([[Interface\AddOns\Details_RaidCheck\icon_red]], "ADD")
end
end
local show_panel = CreateFrame ("frame", nil, UIParent)
show_panel:SetSize (400, 300)
show_panel:SetBackdrop ({bgFile = [[Interface\AddOns\Details\images\background]], tile = true, tileSize = 16})
show_panel:SetPoint ("bottom", DetailsRaidCheck.ToolbarButton, "top", 0, 10)
local food_str = show_panel:CreateFontString (nil, "overlay", "GameFontHighlightSmall")
food_str:SetJustifyH ("left")
food_str:SetPoint ("topleft", show_panel, "topleft", 15, -20)
local flask_str = show_panel:CreateFontString (nil, "overlay", "GameFontHighlightSmall")
flask_str:SetJustifyH ("left")
flask_str:SetPoint ("topleft", show_panel, "topleft", 150, -20)
local prepot_str = show_panel:CreateFontString (nil, "overlay", "GameFontHighlightSmall")
prepot_str:SetJustifyH ("left")
prepot_str:SetPoint ("topleft", show_panel, "topleft", 285, -20)
show_panel:Hide()
@@ -139,18 +173,33 @@ local food_list = {
local update_panel = function (self)
local s, f = "No Food:\n\n", "No Flask:\n\n"
local s, f, p, n = "No Food:\n\n", "No Flask:\n\n", "Used Pre Pot:\n\n", "Not Used Pre Pot:\n\n"
for i = 1, GetNumGroupMembers(), 1 do
local name = UnitName ("raid" .. i)
if (not DetailsRaidCheck.havefood_table [name]) then
s = s .. name .. "\n"
local _, class = _UnitClass (name)
local class_color = "FFFFFFFF"
if (class) then
local coords = CLASS_ICON_TCOORDS [class]
class_color = "|TInterface\\AddOns\\Details\\images\\classes_small_alpha:12:12:0:-5:128:128:" .. coords[1]*128 .. ":" .. coords[2]*128 .. ":" .. coords[3]*128 .. ":" .. coords[4]*128 .. "|t |c" .. RAID_CLASS_COLORS [class].colorStr
end
s = s .. class_color .. name .. "|r\n"
end
if (not DetailsRaidCheck.haveflask_table [name]) then
f = f .. name .. "\n"
local _, class = _UnitClass (name)
local class_color = "FFFFFFFF"
if (class) then
local coords = CLASS_ICON_TCOORDS [class]
class_color = "|TInterface\\AddOns\\Details\\images\\classes_small_alpha:12:12:0:-5:128:128:" .. coords[1]*128 .. ":" .. coords[2]*128 .. ":" .. coords[3]*128 .. ":" .. coords[4]*128 .. "|t |c" .. RAID_CLASS_COLORS [class].colorStr
end
f = f .. class_color .. name .. "|r\n"
end
end
@@ -158,6 +207,39 @@ local food_list = {
food_str:SetText (s)
flask_str:SetText (f)
for player_name, potid in pairs (DetailsRaidCheck.usedprepot_table) do
local name, _, icon = _GetSpellInfo (potid)
local _, class = _UnitClass (player_name)
local class_color = "FFFFFFFF"
if (class) then
class_color = RAID_CLASS_COLORS [class].colorStr
end
p = p .. "|T" .. icon .. ":12:12:0:-5:64:64:0:64:0:64|t |c" .. class_color .. player_name .. "|r\n"
end
for i = 1, GetNumGroupMembers(), 1 do
local playerName, realmName = _UnitName ("raid" .. i)
if (realmName and realmName ~= "") then
playerName = playerName .. "-" .. realmName
end
if (not DetailsRaidCheck.usedprepot_table [playerName]) then
local _, class = _UnitClass (playerName)
local class_color = "FFFFFFFF"
if (class) then
local coords = CLASS_ICON_TCOORDS [class]
class_color = "|TInterface\\AddOns\\Details\\images\\classes_small_alpha:12:12:0:-5:128:128:" .. coords[1]*128 .. ":" .. coords[2]*128 .. ":" .. coords[3]*128 .. ":" .. coords[4]*128 .. "|t |c" .. RAID_CLASS_COLORS [class].colorStr
end
n = n .. class_color .. playerName .. "|r\n"
end
end
prepot_str:SetText (p .. "\n\n" .. n)
end
DetailsRaidCheck.ToolbarButton:SetScript ("OnEnter", function (self)
@@ -221,14 +303,6 @@ local food_list = {
end
function DetailsRaidCheck:FormatTable (t)
for k, v in ipairs ({strsplit ( "|c", t )}) do
tinsert (DetailsRaidCheck.usedprepot_table, "|c" .. v)
end
end
-- DETAILS_PLUGIN_RAIDCHECK
-- /run vardump (DETAILS_PLUGIN_RAIDCHECK.havefood_table)
-- DETAILS_PLUGIN_RAIDCHECK.tracking_buffs
@@ -300,6 +374,7 @@ local food_list = {
_G._detalhes:RegisterEvent (DetailsRaidCheck, "COMBAT_PLAYER_LEAVE")
_G._detalhes:RegisterEvent (DetailsRaidCheck, "COMBAT_PLAYER_ENTER")
_G._detalhes:RegisterEvent (DetailsRaidCheck, "COMBAT_PREPOTION_UPDATED")
_G._detalhes:RegisterEvent (DetailsRaidCheck, "ZONE_TYPE_CHANGED")
end
Binary file not shown.
+2 -1
View File
@@ -496,8 +496,9 @@ function _G._detalhes:Start()
local actor = row.minha_tabela
if (actor) then
local dps_text = row.ps_text
if (dps_text) then
local new_dps = math.floor (actor.total / actor:Tempo())
local new_dps = math.floor (actor.total / (GetTime() - instance.showing.start_time_float))
local formated_dps = _detalhes.ToKFunctions [_detalhes.ps_abbreviation] (_, new_dps)
row.texto_direita:SetText (row.texto_direita:GetText():gsub (dps_text, formated_dps))