Updated LibOpenRaid and DetailsFramework
This commit is contained in:
+22
-22
@@ -6,7 +6,7 @@
|
||||
local _
|
||||
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
--> local pointers
|
||||
--local pointers
|
||||
|
||||
local _math_floor = math.floor --lua local
|
||||
local _cstr = string.format --lua local
|
||||
@@ -19,13 +19,13 @@
|
||||
local CLASS_ICON_TCOORDS = CLASS_ICON_TCOORDS
|
||||
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
--> constants
|
||||
--constants
|
||||
|
||||
local modo_raid = _detalhes._detalhes_props["MODO_RAID"]
|
||||
local modo_alone = _detalhes._detalhes_props["MODO_ALONE"]
|
||||
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
--> internal functions
|
||||
--internal functions
|
||||
|
||||
function _detalhes.RaidTables:DisableRaidMode (instance)
|
||||
--free
|
||||
@@ -59,28 +59,28 @@
|
||||
|
||||
function _detalhes.RaidTables:EnableRaidMode (instance, plugin_name, from_cooltip, from_mode_menu)
|
||||
|
||||
--> check if came from cooltip
|
||||
--check if came from cooltip
|
||||
if (from_cooltip) then
|
||||
self = _detalhes.RaidTables
|
||||
instance = plugin_name
|
||||
plugin_name = from_cooltip
|
||||
end
|
||||
|
||||
--> set the mode
|
||||
--set the mode
|
||||
if (instance.modo == modo_alone) then
|
||||
instance:SoloMode (false)
|
||||
end
|
||||
instance.modo = modo_raid
|
||||
|
||||
--> hide rows, scrollbar
|
||||
Details.FadeHandler.Fader (instance, 1, nil, "barras")
|
||||
--hide rows, scrollbar
|
||||
Details.FadeHandler.Fader(instance, 1, nil, "barras")
|
||||
if (instance.rolagem) then
|
||||
instance:EsconderScrollBar (true) --> hida a scrollbar
|
||||
instance:EsconderScrollBar (true) --hida a scrollbar
|
||||
end
|
||||
_detalhes:ResetaGump (instance)
|
||||
instance:RefreshMainWindow (true)
|
||||
instance:RefreshMainWindow(true)
|
||||
|
||||
--> get the plugin name
|
||||
--get the plugin name
|
||||
|
||||
--if the desired plugin isn't passed, try to get the latest used.
|
||||
if (not plugin_name) then
|
||||
@@ -124,7 +124,7 @@
|
||||
|
||||
function _detalhes.RaidTables:GetAvailablePlugins()
|
||||
local available = {}
|
||||
for index, plugin in ipairs (self.Menu) do
|
||||
for index, plugin in ipairs(self.Menu) do
|
||||
if (not self.PluginsInUse [ plugin [4] ] and plugin [3].__enabled) then -- 3 = plugin object 4 = absolute name
|
||||
tinsert (available, plugin)
|
||||
end
|
||||
@@ -212,10 +212,10 @@
|
||||
|
||||
self:SetInUse (plugin_name, instance:GetId())
|
||||
plugin_object.instance_id = instance:GetId()
|
||||
plugin_object.Frame:SetPoint ("TOPLEFT", instance.bgframe)
|
||||
plugin_object.Frame:SetPoint("TOPLEFT", instance.bgframe)
|
||||
plugin_object.Frame:Show()
|
||||
instance:ChangeIcon (plugin_object.__icon)--; print (instance:GetId(),"icon",plugin_object.__icon)
|
||||
_detalhes:SendEvent ("DETAILS_INSTANCE_CHANGEATTRIBUTE", nil, instance, instance.atributo, instance.sub_atributo)
|
||||
_detalhes:SendEvent("DETAILS_INSTANCE_CHANGEATTRIBUTE", nil, instance, instance.atributo, instance.sub_atributo)
|
||||
|
||||
if (update_menu) then
|
||||
GameCooltip:ExecFunc (instance.baseframe.cabecalho.atributo)
|
||||
@@ -238,7 +238,7 @@
|
||||
|
||||
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
--> built in announcers
|
||||
--built in announcers
|
||||
|
||||
function _detalhes:SendMsgToChannel (msg, channel, towho)
|
||||
if (channel == "RAID" or channel == "PARTY") then
|
||||
@@ -249,10 +249,10 @@
|
||||
|
||||
elseif (channel == "BNET") then
|
||||
|
||||
if (type (towho) == "number") then
|
||||
if (type(towho) == "number") then
|
||||
BNSendWhisper (towho, msg)
|
||||
|
||||
elseif (type (towho) == "string") then
|
||||
elseif (type(towho) == "string") then
|
||||
--local BnetFriends = BNGetNumFriends()
|
||||
--for i = 1, BnetFriends do
|
||||
-- local presenceID, presenceName, battleTag, isBattleTagPresence, toonName, toonID, client, isOnline, lastOnline, isAFK, isDND, messageText, noteText, isRIDFriend, broadcastTime, canSoR = BNGetFriendInfo (i)
|
||||
@@ -531,13 +531,13 @@
|
||||
channel = "INSTANCE_CHAT"
|
||||
end
|
||||
|
||||
elseif (where == 4) then --> observer
|
||||
elseif (where == 4) then --observer
|
||||
if (zone ~= "raid" and zone ~= "party") then
|
||||
return
|
||||
end
|
||||
channel = "PRINT"
|
||||
|
||||
elseif (where == 5) then --> officers
|
||||
elseif (where == 5) then --officers
|
||||
if (IsInGuild()) then
|
||||
channel = "OFFICER"
|
||||
end
|
||||
@@ -555,7 +555,7 @@
|
||||
alvo_name = _detalhes:GetOnlyName (alvo_name)
|
||||
|
||||
local msg
|
||||
if (where == 4) then --> observer
|
||||
if (where == 4) then --observer
|
||||
local _, class = _UnitClass (alvo_name)
|
||||
local class_color = "|cFFFFFFFF"
|
||||
|
||||
@@ -575,14 +575,14 @@
|
||||
for i = 1, _detalhes.announce_deaths.last_hits do
|
||||
for o = last, 1, -1 do
|
||||
local this_death = death_table [o]
|
||||
if (type (this_death[1]) == "boolean" and this_death[1] and this_death[4]+5 > time) then
|
||||
if (type(this_death[1]) == "boolean" and this_death[1] and this_death[4]+5 > time) then
|
||||
local spelllink
|
||||
if (this_death [2] > 10) then
|
||||
spelllink = GetSpellLink(this_death [2])
|
||||
else
|
||||
spelllink = "[" .. _GetSpellInfo(this_death [2]) .. "]"
|
||||
end
|
||||
spells = spelllink .. ": " .. _detalhes:ToK2 (_math_floor (this_death [3])) .. " " .. spells
|
||||
spells = spelllink .. ": " .. _detalhes:ToK2 (_math_floor(this_death [3])) .. " " .. spells
|
||||
last = o-1
|
||||
break
|
||||
end
|
||||
@@ -591,7 +591,7 @@
|
||||
|
||||
msg = msg .. " " .. spells
|
||||
|
||||
if (where == 4) then --> observer
|
||||
if (where == 4) then --observer
|
||||
local minute, second = _detalhes:GetCombat():GetFormatedCombatTime()
|
||||
if (second < 10) then
|
||||
second = "0" .. second
|
||||
|
||||
Reference in New Issue
Block a user