- Added Acitivity Time for Damage + Healing, tooltip show the activity separately.

- Major changes on Encounter Details Plugin making more easy to use.
- Removed Spell Details Plugin.
- Added new plugin: Dps Tuning.

- New API: actor:GetActorSpells() return table with spellid, spelltable.
- New API: actor:GetSpell (spellid) return the table for the spellid.
- New API: combat:GetCombatNumber() return a unique ID number identifying the combat.
- New API: framework:CreateButton (parent, func, w, h, text, param1, param2, texture, member, name, short_method)
- New API: framework:CreateDropDown (parent, func, default, w, h, member, name)
- New API: framework:CreateLabel (parent, text, size, color, font, member, name, layer)
- New API: framework:CreateBar (parent, texture, w, h, value, member, name)
- New API: framework:CreateChartPanel (parent, w, h, name)
This commit is contained in:
tercio
2014-09-08 17:17:56 -03:00
parent 27c2e40bcc
commit 20a9773a58
43 changed files with 2960 additions and 2843 deletions
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,7 @@
## Interface: 50400
## Title: Details Dps Tuning (plugin)
## Notes: Plugin for Details
## RequiredDeps: Details
## OptionalDeps: Ace3
Details_DpsTuning.lua
@@ -38,7 +38,7 @@ local _combat_object
local CLASS_ICON_TCOORDS = _G.CLASS_ICON_TCOORDS
EncounterDetails.name = "Encounter Details"
EncounterDetails.debugmode = false
local ability_type_table = {
[0x1] = "|cFF00FF00"..Loc ["STRING_HEAL"].."|r",
@@ -61,8 +61,6 @@ local ability_type_table = {
}
local debugmode = false
--> main object frame functions
local function CreatePluginFrames (data)
@@ -138,7 +136,7 @@ local function CreatePluginFrames (data)
--_detalhes:TimeDataRegister ("Raid Damage Done", damage_done_func, {last_damage = 0, max_damage = 0}, "Encounter Details", "v1.0", [[Interface\ICONS\Ability_DualWield]], true)
_detalhes:TimeDataRegister ("Raid Damage Done", string_damage_done_func, nil, "Encounter Details", "v1.0", [[Interface\ICONS\Ability_DualWield]], true, true)
if (EncounterDetails.db.show_icon == 4) then
EncounterDetails:ShowIcon()
elseif (EncounterDetails.db.show_icon == 5) then
@@ -194,7 +192,8 @@ local function CreatePluginFrames (data)
--drop last combat table
EncounterDetails.LastSegmentShown = nil
--table.wipe (EncounterDetails.boss_emotes_table)
--wipe emotes
table.wipe (EncounterDetails.boss_emotes_table)
elseif (event == "GROUP_ONENTER") then
if (EncounterDetails.db.show_icon == 2) then
@@ -231,7 +230,7 @@ local function CreatePluginFrames (data)
function EncounterDetails:WasEncounter()
--> check if last combat was a boss encounter fight
if (not debugmode) then
if (not EncounterDetails.debugmode) then
if (not _combat_object.is_boss) then
return
@@ -269,6 +268,7 @@ local function CreatePluginFrames (data)
end
--> build all window data
EncounterDetails.db.opened = EncounterDetails.db.opened + 1
EncounterDetails:OpenAndRefresh()
--> show
EncounterDetailsFrame:Show()
@@ -322,14 +322,12 @@ end
local function KillInfo (deathTable, row)
local lastEvents = deathTable [1]
local timeOfDeath = deathTable [2]
local eventos = deathTable [1]
local hora_da_morte = deathTable [2]
local hp_max = deathTable [5]
local lines = {}
local battleress = false
local skillTable = row.extra
local lastcooldown = false
local GameCooltip = GameCooltip
@@ -337,90 +335,98 @@ end
GameCooltip:SetType ("tooltipbar")
GameCooltip:SetOwner (row)
GameCooltip:AddLine ("Click to Report", nil, 1, "orange")
GameCooltip:AddIcon ([[Interface\TUTORIALFRAME\UI-TUTORIAL-FRAME]], 1, 1, 12, 16, 0.015625, 0.13671875, 0.4375, 0.59765625)
GameCooltip:AddStatusBar (0, 1, 1, 1, 1, 1, false, {value = 100, color = {.3, .3, .3, 1}, specialSpark = false, texture = [[Interface\AddOns\Details\images\bar_serenity]]})
--death parser
for index, event in _ipairs (eventos) do
for index, event in _ipairs (lastEvents) do
--max hp percent (in case of hp cooldowns)
local hp = _math_floor (event[5]/hp_max*100)
if (hp > 100) then
hp = 100
end
if (event [1]) then --> DAMAGE
local nome_magia, _, icone_magia = _GetSpellInfo (event [2])
if (not event[3] and not battleress) then --> battle ress
GameCooltip:AddLine ("+".._cstr ("%.1f", event[4] - timeOfDeath) .."s "..nome_magia.." ("..event[6]..")", "-- -- -- ", 1, "white")
GameCooltip:AddIcon ("Interface\\Glues\\CharacterSelect\\Glues-AddOn-Icons", 1, 1, nil, nil, .75, 1, 0, 1)
GameCooltip:AddStatusBar (100, 1, "silver", false)
battleress = true
local evtype = event [1]
local spellname, _, spellicon = _GetSpellInfo (event [2])
local amount = event [3]
local time = event [4]
local source = event [6]
if (type (evtype) == "boolean") then
--> is damage or heal
if (evtype) then
--> damage
GameCooltip:AddLine ("" .. _cstr ("%.1f", time - hora_da_morte) .. "s " .. spellname .. " (" .. source .. ")", "-" .. _detalhes:ToK (amount) .. " (" .. hp .. "%)", 1, "white", "white")
GameCooltip:AddIcon (spellicon)
elseif (event[3]) then
local habilidade_school = skillTable [event [2]] --> pegou a tabela com os hex
local _school = ""
if (habilidade_school) then
for _, hex in _ipairs (habilidade_school) do
_school = _school .. " " .. ability_type_table [hex]
end
end
_school = _detalhes:trim (_school)
local texto_esquerdo
if (nome_magia) then
texto_esquerdo = "".._cstr ("%.1f", event[4] - timeOfDeath) .."s " .. nome_magia .. " (".. event [6] ..")" --" (".. _school ..")"
texto_esquerdo = texto_esquerdo:gsub ("(%()%)", "")
if (event [9]) then
--> friendly fire
GameCooltip:AddStatusBar (hp, 1, "darkorange", true)
else
texto_esquerdo = ""
--> from a enemy
GameCooltip:AddStatusBar (hp, 1, "red", true)
end
else
--> heal
GameCooltip:AddLine ("" .. _cstr ("%.1f", time - hora_da_morte) .. "s " .. spellname .. " (" .. source .. ")", "+" .. _detalhes:ToK (amount) .. " (" .. hp .. "%)", 1, "white", "white")
GameCooltip:AddIcon (spellicon)
GameCooltip:AddStatusBar (hp, 1, "green", true)
end
elseif (type (evtype) == "number") then
if (evtype == 1) then
--> cooldown
GameCooltip:AddLine ("" .. _cstr ("%.1f", time - hora_da_morte) .. "s " .. spellname .. " (" .. source .. ")", "cooldown (" .. hp .. "%)", 1, "white", "white")
GameCooltip:AddIcon (spellicon)
GameCooltip:AddStatusBar (100, 1, "yellow", true)
elseif (evtype == 2 and not battleress) then
--> battle ress
battleress = event
elseif (evtype == 3) then
--> last cooldown used
lastcooldown = event
if (type (event [1]) ~= "boolean" and event [1] == 2) then --> last cooldown
if (event[3] == 1) then
GameCooltip:AddLine ("".._cstr ("%.1f", event[4] - timeOfDeath) .. "s " .. nome_magia .. " (" .. Loc ["STRING_LAST_COOLDOWN"] .. ")")
GameCooltip:AddIcon (icone_magia)
GameCooltip:AddStatusBar (100, 1, "gray", true)
else
GameCooltip:AddLine (Loc ["STRING_NOLAST_COOLDOWN"])
GameCooltip:AddStatusBar (100, 1, "gray", true)
end
else
GameCooltip:AddLine (texto_esquerdo, "-".._detalhes:ToK (event[3]).." (".. hp .."%)", 1, "white", "white")
GameCooltip:AddIcon (icone_magia)
if (type (event [1]) ~= "boolean" and event [1] == 1) then --> cooldown
GameCooltip:AddStatusBar (100, 1, "yellow", true)
else
GameCooltip:AddStatusBar (hp, 1, "red", true)
end
end
end
else
local nome_magia, _, icone_magia = _GetSpellInfo (event [2])
GameCooltip:AddLine ("".._cstr ("%.1f", event[4] - timeOfDeath) .."s "..nome_magia.." ("..event[6]..")", "+".._detalhes:ToK (event[3]).." (".. hp .."%)", 1, "white", "white")
GameCooltip:AddIcon (icone_magia, 1, 1)
GameCooltip:AddStatusBar (hp, 1, "green", true)
end
end
GameCooltip:AddLine (deathTable [6] .. " " .. "died" , "-- -- -- ", 1, "white")
GameCooltip:AddIcon ("Interface\\AddOns\\Details\\images\\small_icons", 1, 1, nil, nil, .75, 1, 0, 1)
GameCooltip:AddStatusBar (0, 1, .5, .5, .5, .5, false, {value = 100, color = {.5, .5, .5, 1}, specialSpark = false, texture = [[Interface\AddOns\Details\images\bar4_vidro]]})
if (battleress) then
GameCooltip:AddSpecial ("line", 2, nil, deathTable [6] .. " "..Loc ["STRING_DIED"], "-- -- -- ", 1, "white")
GameCooltip:AddSpecial ("icon", 2, nil, "Interface\\AddOns\\Details\\images\\small_icons", 1, 1, nil, nil, .75, 1, 0, 1)
GameCooltip:AddSpecial ("statusbar", 2, nil, 100, 1, "darkgray", false)
else
GameCooltip:AddSpecial ("line", 1, nil, deathTable [6] .. " "..Loc ["STRING_DIED"], "-- -- -- ", 1, "white")
GameCooltip:AddSpecial ("icon", 1, nil, "Interface\\AddOns\\Details\\images\\small_icons", 1, 1, nil, nil, .75, 1, 0, 1)
GameCooltip:AddSpecial ("statusbar", 1, nil, 100, 1, "darkgray", false)
local nome_magia, _, icone_magia = _GetSpellInfo (battleress [2])
GameCooltip:AddLine ("+" .. _cstr ("%.1f", battleress[4] - hora_da_morte) .. "s " .. nome_magia .. " (" .. battleress[6] .. ")", "", 1, "white")
GameCooltip:AddIcon ("Interface\\Glues\\CharacterSelect\\Glues-AddOn-Icons", 1, 1, nil, nil, .75, 1, 0, 1)
GameCooltip:AddStatusBar (0, 1, .5, .5, .5, .5, false, {value = 100, color = {.5, .5, .5, 1}, specialSpark = false, texture = [[Interface\AddOns\Details\images\bar4_vidro]]})
end
if (lastcooldown) then
if (lastcooldown[3] == 1) then
local nome_magia, _, icone_magia = _GetSpellInfo (lastcooldown [2])
GameCooltip:AddLine (_cstr ("%.1f", lastcooldown[4] - hora_da_morte) .. "s " .. nome_magia .. " (" .. Loc ["STRING_LAST_COOLDOWN"] .. ")")
GameCooltip:AddIcon (icone_magia)
else
GameCooltip:AddLine (Loc ["STRING_NOLAST_COOLDOWN"])
GameCooltip:AddIcon ([[Interface\CHARACTERFRAME\UI-Player-PlayTimeUnhealthy]], 1, 1, 18, 18)
end
GameCooltip:AddStatusBar (0, 1, 1, 1, 1, 1, false, {value = 100, color = {.3, .3, .3, 1}, specialSpark = false, texture = [[Interface\AddOns\Details\images\bar_serenity]]})
end
GameCooltip:SetOption ("StatusBarHeightMod", -6)
GameCooltip:SetOption ("FixedWidth", 400)
GameCooltip:SetOption ("FixedWidth", 300)
GameCooltip:SetOption ("TextSize", 9)
GameCooltip:SetOption ("StatusBarTexture", "Interface\\AddOns\\Details\\images\\bar_serenity")
GameCooltip:ShowCooltip()
GameCooltip:SetOption ("LeftBorderSize", -4)
GameCooltip:SetOption ("RightBorderSize", 5)
GameCooltip:SetOption ("StatusBarTexture", [[Interface\AddOns\Details\images\bar4_reverse]])
GameCooltip:SetWallpaper (1, [[Interface\SPELLBOOK\Spellbook-Page-1]], {.6, 0.1, 0.64453125, 0}, {.8, .8, .8, 0.2}, true)
GameCooltip:ShowCooltip()
end
--> custom tooltip for dispells details ---------------------------------------------------------------------------------------------------------
@@ -614,6 +620,9 @@ end
--> custom tooltip that handle mouse enter and leave on customized rows ---------------------------------------------------------------------------------------------------------
local backdrop_bar_onenter = {bgFile = [[Interface\AddOns\Details\images\background]], tile = true, tileSize = 16, edgeFile = "Interface\\DialogFrame\\UI-DialogBox-Border", edgeSize = 8, insets = {left = 1, right = 1, top = 0, bottom = 1}}
local backdrop_bar_onleave = {bgFile = [[Interface\AddOns\Details\images\background]], tile = true, tileSize = 16, insets = {left = 1, right = 1, top = 0, bottom = 1}}
function EncounterDetails:SetRowScripts (barra, index, container)
barra:SetScript ("OnMouseDown", function (self)
@@ -663,9 +672,9 @@ function EncounterDetails:SetRowScripts (barra, index, container)
self:SetHeight (17)
self:SetAlpha(1)
self:SetBackdrop({edgeFile = "Interface\\DialogFrame\\UI-DialogBox-Border", tile = true, tileSize = 16, edgeSize = 10,insets = {left = 1, right = 1, top = 0, bottom = 1},})
self:SetBackdropBorderColor (170/255, 170/255, 170/255)
self:SetBackdropColor (24/255, 24/255, 24/255)
self:SetBackdrop (backdrop_bar_onenter)
self:SetBackdropColor (.0, .0, .0, 0.3)
self:SetBackdropBorderColor (.0, .0, .0, 0.5)
GameTooltip:SetOwner (self, "ANCHOR_TOPRIGHT")
@@ -714,11 +723,10 @@ function EncounterDetails:SetRowScripts (barra, index, container)
end
self:SetHeight (16)
self:SetAlpha(0.9)
self:SetAlpha (0.9)
self:SetBackdrop({bgFile = "", edgeFile = "", tile = true, tileSize = 16, edgeSize = 32, insets = {left = 1, right = 1, top = 0, bottom = 1},})
self:SetBackdropBorderColor (0, 0, 0, 0)
self:SetBackdropColor (0, 0, 0, 0)
self:SetBackdrop (backdrop_bar_onleave)
self:SetBackdropColor (.0, .0, .0, 0.3)
GameTooltip:Hide()
_detalhes.popup:ShowMe (false, "tooltip")
@@ -739,21 +747,23 @@ function EncounterDetails:OpenAndRefresh (_, segment)
if (segment) then
--get combat segment, 1 more recently ...25 oldest
_combat_object = EncounterDetails:GetCombat (segment)
EncounterDetails._segment = segment
else
_G [frame:GetName().."SegmentsDropdown"].MyObject:Select (1, true)
EncounterDetails._segment = 1
end
local boss_id
local map_id
local boss_info
if (debugmode and not _combat_object.is_boss) then
if (EncounterDetails.debugmode and not _combat_object.is_boss) then
_combat_object.is_boss = {
index = 1,
name = _detalhes:GetBossName (1098, 1),
zone = "Throne of Thunder",
mapid = 1098,
encounter = "Jin'Rohk the Breaker"
name = "Immerseus",
zone = "Siege of Orggrimar",
mapid = 1136,
encounter = "Immerseus"
}
end
@@ -785,6 +795,10 @@ function EncounterDetails:OpenAndRefresh (_, segment)
end
end
if (EncounterDetailsFrame.ShowType == "graph") then
EncounterDetails:BuildDpsGraphic()
end
EncounterDetails.LastSegmentShown = _combat_object
-------------- set boss name and zone name --------------
@@ -795,14 +809,18 @@ function EncounterDetails:OpenAndRefresh (_, segment)
local L, R, T, B, Texture = EncounterDetails:GetBossIcon (_combat_object.is_boss.mapid, _combat_object.is_boss.index)
EncounterDetailsFrame.boss_icone:SetTexture (Texture)
EncounterDetailsFrame.boss_icone:SetTexCoord (L, R, T, B)
EncounterDetailsFrame.raidbackground:SetTexture (EncounterDetails:GetRaidBackground (_combat_object.is_boss.mapid))
local file, L, R, T, B = EncounterDetails:GetRaidBackground (_combat_object.is_boss.mapid)
EncounterDetailsFrame.raidbackground:SetTexture (file)
EncounterDetailsFrame.raidbackground:SetTexCoord (L, R, T, B)
EncounterDetailsFrame.raidbackground:SetAlpha (0.8)
-------------- set totals on down frame --------------
--[[ data mine:
_combat_object ["totals_grupo"] hold the total [1] damage // [2] heal // [3] [energy_name] energies // [4] [misc_name] miscs --]]
EncounterDetailsFrame.StatusBar_totaldamage:SetText (Loc ["STRING_TOTAL_DAMAGE"]..": ".. _detalhes:comma_value (_combat_object.totals_grupo[1])) --> [1] total damage
EncounterDetailsFrame.StatusBar_totalheal:SetText (Loc ["STRING_TOTAL_HEAL"]..": ".. _detalhes:comma_value (_combat_object.totals_grupo[2])) --> [2] total heal
--EncounterDetailsFrame.StatusBar_totaldamage:SetText (Loc ["STRING_TOTAL_DAMAGE"]..": ".. _detalhes:comma_value (_combat_object.totals_grupo[1])) --> [1] total damage
--EncounterDetailsFrame.StatusBar_totalheal:SetText (Loc ["STRING_TOTAL_HEAL"]..": ".. _detalhes:comma_value (_combat_object.totals_grupo[2])) --> [2] total heal
--> Container Overall Damage Taken
--[[ data mine:
@@ -1026,6 +1044,7 @@ function EncounterDetails:OpenAndRefresh (_, segment)
--> agora ja tenho a lista de todos os adds da luta
-- vasculhar o container de dano e achar os adds:
-- ~add
local adds = {}
@@ -1089,8 +1108,11 @@ function EncounterDetails:OpenAndRefresh (_, segment)
--> montou a tabela, agora precisa mostrar no painel
local function _DanoFeito (barra)
barra = barra:GetParent()
local function _DanoFeito (self)
self.textura:SetBlendMode ("ADD")
local barra = self:GetParent()
local tabela = barra.jogador
local dano_em = tabela.dano_em
@@ -1111,8 +1133,11 @@ function EncounterDetails:OpenAndRefresh (_, segment)
GameTooltip:Show()
end
local function _DanoRecebido (barra)
barra = barra:GetParent()
local function _DanoRecebido (self)
self.textura:SetBlendMode ("ADD")
local barra = self:GetParent()
local tabela = barra.jogador
local damage_from = tabela.damage_from
@@ -1139,6 +1164,11 @@ function EncounterDetails:OpenAndRefresh (_, segment)
GameTooltip:Show()
end
local function _OnHide (self)
GameTooltip:Hide()
self.textura:SetBlendMode ("BLEND")
end
local y = 10
local frame_adds = EncounterDetailsFrame.overall_adds
container = frame_adds.gump
@@ -1153,8 +1183,11 @@ function EncounterDetails:OpenAndRefresh (_, segment)
local barra = container.barras [index]
if (not barra) then
barra = EncounterDetails:CreateRow (index, container)
barra:SetWidth (160)
barra = EncounterDetails:CreateRow (index, container, -0)
barra:SetBackdrop (backdrop_bar_onleave)
barra:SetBackdropColor (.0, .0, .0, 0.3)
barra:SetWidth (155)
barra._no_report = true
@@ -1168,11 +1201,11 @@ function EncounterDetails:OpenAndRefresh (_, segment)
add_damage_taken:SetResizable (false)
add_damage_taken:SetPoint ("left", barra, "left", 0, 0)
add_damage_taken:SetBackdrop (gump_fundo_backdrop)
add_damage_taken:SetBackdropColor (.3, .7, .7, 0.8)
add_damage_taken:SetBackdrop ({bgFile = [[Interface\AddOns\Details\images\background]], tile = true, tileSize = 16})
add_damage_taken:SetBackdropColor (.0, .5, .0, 0.5)
add_damage_taken:SetScript ("OnEnter", _DanoRecebido)
add_damage_taken:SetScript ("OnLeave", function() GameTooltip:Hide() end)
add_damage_taken:SetScript ("OnLeave", _OnHide)
add_damage_taken:SetScript ("OnClick", EncounterDetails.BossInfoRowClick)
add_damage_taken.textura = add_damage_taken:CreateTexture (nil, "overlay")
@@ -1191,8 +1224,8 @@ function EncounterDetails:OpenAndRefresh (_, segment)
add_damage_done:SetResizable (false)
add_damage_done:SetPoint ("left", add_damage_taken, "right", 0, 0)
add_damage_done:SetBackdrop (gump_fundo_backdrop)
add_damage_done:SetBackdropColor (.9, .9, .3, 0.8)
add_damage_done:SetBackdrop ({bgFile = [[Interface\AddOns\Details\images\background]], tile = true, tileSize = 16})
add_damage_done:SetBackdropColor (.5, .0, .0, 0.5)
add_damage_done.textura = add_damage_done:CreateTexture (nil, "overlay")
add_damage_done.textura:SetTexture ("Interface\\Buttons\\UI-MicroStream-Red")
@@ -1201,7 +1234,7 @@ function EncounterDetails:OpenAndRefresh (_, segment)
add_damage_done.textura:SetPoint ("topleft", add_damage_done, "topleft")
add_damage_done:SetScript ("OnEnter", _DanoFeito)
add_damage_done:SetScript ("OnLeave", function() GameTooltip:Hide() end)
add_damage_done:SetScript ("OnLeave", _OnHide)
add_damage_done:SetScript ("OnClick", EncounterDetails.BossInfoRowClick)
barra.texto_esquerdo:SetPoint ("left", add_damage_done, "right")
@@ -1213,10 +1246,7 @@ function EncounterDetails:OpenAndRefresh (_, segment)
end
barra.texto_esquerdo:SetText (addName)
--barra.texto_direita:SetText (_detalhes:comma_value (esta_tabela.total))
barra.texto_direita:SetText (_detalhes:ToK (esta_tabela.total))
barra.texto_esquerdo:SetSize (barra:GetWidth() - barra.texto_direita:GetStringWidth() - 34, 15)
barra.jogador = esta_tabela --> barra.jogador agora tem a tabela com --> [1] total dano causado [2] jogadores que foram alvos [3] jogadores que castaram essa magia [4] ID da magia
@@ -1225,9 +1255,6 @@ function EncounterDetails:OpenAndRefresh (_, segment)
barra.textura:SetStatusBarColor (1, 1, 1, 1) --> a cor pode ser a spell school da magia
barra.textura:SetValue (100)
--barra.icone:SetTexture (icone_magia)
--barra.icone:SetTexCoord (_unpack (CLASS_ICON_TCOORDS [jogador.classe]))
barra:Show()
quantidade = quantidade + 1
index = index +1
@@ -1300,6 +1327,9 @@ function EncounterDetails:OpenAndRefresh (_, segment)
barra = EncounterDetails:CreateRow (index, container, 3, 3, -6)
barra.TTT = "total_interrupt" -- tool tip type
barra.report_text = "Details! ".. Loc ["STRING_INTERRUPT_BY"]
barra:SetBackdrop (backdrop_bar_onleave)
barra:SetBackdropColor (.0, .0, .0, 0.3)
barra:SetWidth (155)
end
local spellid = tabela [3]
@@ -1411,6 +1441,9 @@ function EncounterDetails:OpenAndRefresh (_, segment)
barra = EncounterDetails:CreateRow (index, container, 3, 3, -6)
barra.TTT = "dispell" -- tool tip type
barra.report_text = "Details! ".. Loc ["STRING_DISPELLED_BY"]
barra:SetBackdrop (backdrop_bar_onleave)
barra:SetBackdropColor (.0, .0, .0, 0.3)
barra:SetWidth (160)
end
local nome_magia, _, icone_magia = _GetSpellInfo (tabela [3])
@@ -1471,6 +1504,7 @@ function EncounterDetails:OpenAndRefresh (_, segment)
_detalhes:SetFontSize (barra.texto_esquerdo, 9)
_detalhes:SetFontSize (barra.texto_direita, 9)
_detalhes:SetFontFace (barra.texto_esquerdo, "Arial Narrow")
barra:SetWidth (160)
end
if (tabela [3]:find ("-")) then
@@ -1530,6 +1564,7 @@ function EncounterDetails:OnEvent (_, event, ...)
show_icon = 5, --automatic
hide_on_combat = false, --hide the window when a new combat start
max_emote_segments = 3,
opened = 0,
}
--> Install
@@ -1549,8 +1584,6 @@ function EncounterDetails:OnEvent (_, event, ...)
print (install.error)
end
EncounterDetails.db = saveddata
EncounterDetails.charsaved = EncounterDetailsDB or {emotes = {}}
EncounterDetailsDB = EncounterDetails.charsaved
+323 -291
View File
@@ -31,18 +31,8 @@ do
end
local build_options_panel = function()
local options_frame = CreateFrame ("frame", "EncounterDetailsOptionsWindow", UIParent, "ButtonFrameTemplate")
tinsert (UISpecialFrames, "EncounterDetailsOptionsWindow")
options_frame:SetSize (500, 200)
options_frame:SetFrameStrata ("DIALOG")
options_frame:SetScript ("OnMouseDown", function(self) self:StartMoving()end)
options_frame:SetScript ("OnMouseUp", function(self) self:StopMovingOrSizing()end)
options_frame:SetMovable (true)
options_frame:EnableMouse (true)
options_frame:Hide()
options_frame:SetPoint ("center", UIParent, "center")
options_frame.TitleText:SetText ("Encounter Details Options")
options_frame.portrait:SetTexture ([[Interface\CHARACTERFRAME\TEMPORARYPORTRAIT-FEMALE-BLOODELF]])
local options_frame = EncounterDetails:CreatePluginOptionsFrame ("EncounterDetailsOptionsWindow", "Encounter Details Options", 2)
-- 1 = only when inside a raid map
-- 2 = only when in raid group
@@ -87,7 +77,6 @@ do
-- /dump DETAILS_PLUGIN_ENCOUNTER_DETAILS.db.show_icon
local menu = {
--show when dropdown
{
type = "select",
get = function() return EncounterDetails.db.show_icon end,
@@ -208,20 +197,38 @@ do
end
end
local grafico_cores = {{1, 1, 1, 1}, {1, 0.5, 0.3, 1}, {0.75, 0.7, 0.1, 1}, {0.2, 0.9, 0.2, 1}, {0.2, 0.5, 0.9, 1}} --, {0.9, 0.2, 0.35, 1}, {0.85, 0.55, 0.45, 1}, {0.4, 0.98, 0.29, 1}
local grafico_cores = {{1, 1, 1, 1}, {1, 0.5, 0.3, 1}, {0.75, 0.7, 0.1, 1}, {0.2, 0.9, 0.2, 1}, {0.2, 0.5, 0.9, 1}}
local lastBoss = nil
EncounterDetails.CombatsAlreadyDrew = {}
function EncounterDetails:BuildDpsGraphic()
EncounterDetails.LastGraphicDrew = EncounterDetails.LastGraphicDrew or {}
local graphicData = _detalhes.tabela_vigente:GetTimeData ("Raid Damage Done")
if (not graphicData or not _detalhes.tabela_vigente.start_time or not _detalhes.tabela_vigente.end_time) then
return
elseif (graphicData == EncounterDetails.LastGraphicDrew) then
return
local segment = EncounterDetails._segment
--print ("Segment:", segment)
local g
if (not _G.DetailsRaidDpsGraph) then
EncounterDetails:CreateGraphPanel()
g = _G.DetailsRaidDpsGraph
else
EncounterDetails.LastGraphicDrew = graphicData
g = _G.DetailsRaidDpsGraph
--if (not combat.is_boss or not lastBoss or combat.is_boss.index ~= lastBoss) then
-- g.max_damage = 0
--end
end
g:ResetData()
local combat = EncounterDetails:GetCombat (segment)
local graphicData = combat:GetTimeData ("Raid Damage Done")
if (not graphicData or not combat.start_time or not combat.end_time) then
EncounterDetails:Msg ("This segment doesn't have chart data.")
return
--elseif (EncounterDetails.CombatsAlreadyDrew [combat:GetCombatNumber()]) then
--return
end
if (graphicData.max_value == 0) then
@@ -229,128 +236,66 @@ do
end
--> battle time
if (_detalhes.tabela_vigente.end_time - _detalhes.tabela_vigente.start_time < 12) then
if (combat.end_time - combat.start_time < 12) then
return
end
local g
EncounterDetails.Frame.linhas = EncounterDetails.Frame.linhas or 0
EncounterDetails.Frame.linhas = EncounterDetails.Frame.linhas + 1
--EncounterDetails.Frame.linhas = EncounterDetails.Frame.linhas or 0
EncounterDetails.Frame.linhas = 1
if (EncounterDetails.Frame.linhas > 5) then
EncounterDetails.Frame.linhas = 1
end
if (not _G.DetailsRaidDpsGraph) then
g = Graphics:CreateGraphLine ("DetailsRaidDpsGraph", EncounterDetails.Frame, "topleft","topleft",20,-76,670,238)
g:SetXAxis (-1,1)
g:SetYAxis (-1,1)
g:SetGridSpacing (false, false)
g:SetGridColor ({0.5,0.5,0.5,0.3})
g:SetAxisDrawing (false,false)
g:SetAxisColor({1.0,1.0,1.0,1.0})
g:SetAutoScale (true)
g:SetLineTexture ("smallline")
g:SetBorderSize ("right", 0.001)
g.VerticalLines = {}
g.TryIndicator = {}
function g:ChangeColorOnDataSeries (index, color)
self.Data [index].Color = color
self.NeedsUpdate=true
end
function g:AddDataSeriesOnFirstIndex (points, color, n2)
local data
--Make sure there is data points
if not points then
return
end
data=points
if n2==nil then
n2=false
g.max_damage = 0
for _, line in ipairs (g.VerticalLines) do
line:Hide()
end
lastBoss = combat.is_boss and combat.is_boss.index
--
for i = segment + 4, segment+1, -1 do
local combat = EncounterDetails:GetCombat (i)
if (combat) then --the combat exists
local elapsed_time = combat:GetCombatTime()
if (EncounterDetails.debugmode and not combat.is_boss) then
combat.is_boss = {
index = 1,
name = _detalhes:GetBossName (1098, 1),
zone = "Throne of Thunder",
mapid = 1098,
encounter = "Jin'Rohk the Breaker"
}
end
if n2 or (table.getn(points)==2 and table.getn(points[1])~=2) then
data={}
for k,v in ipairs(points[1]) do
tinsert(data,{v,points[2][k]})
if (elapsed_time > 12 and combat.is_boss and combat.is_boss.index == lastBoss) then --is the same boss
local chart_data = combat:GetTimeData ("Raid Damage Done")
if (chart_data and chart_data.max_value and chart_data.max_value > 0) then --have a chart data
--if (not EncounterDetails.CombatsAlreadyDrew [combat:GetCombatNumber()]) then --isn't drew yet
EncounterDetails:DrawSegmentGraphic (g, chart_data, combat)
--EncounterDetails.CombatsAlreadyDrew [combat:GetCombatNumber()] = true
--end
end
end
table.insert (self.Data, 1, {Points=data;Color=color})
self.NeedsUpdate=true
end
DetailsFrameWork:NewLabel (EncounterDetails.Frame, EncounterDetails.Frame, nil, "timeamt0", "00:00", "GameFontHighlightSmall")
EncounterDetails.Frame["timeamt0"]:SetPoint ("TOPLEFT", EncounterDetails.Frame, "TOPLEFT", 85, -300)
for i = 1, 8, 1 do
local line = g:CreateTexture (nil, "overlay")
line:SetTexture (.5, .5, .5, .7)
line:SetWidth (670)
line:SetHeight (1)
line:SetVertexColor (.4, .4, .4, .8)
DetailsFrameWork:NewLabel (EncounterDetails.Frame, EncounterDetails.Frame, nil, "dpsamt"..i, "", "GameFontHighlightSmall")
EncounterDetails.Frame["dpsamt"..i]:SetPoint ("TOPLEFT", EncounterDetails.Frame, "TOPLEFT", 27, -61 + (-(24.6*i)))
line:SetPoint ("topleft", EncounterDetails.Frame["dpsamt"..i].widget, "bottom", -27, 0)
DetailsFrameWork:NewLabel (EncounterDetails.Frame, EncounterDetails.Frame, nil, "timeamt"..i, "", "GameFontHighlightSmall")
EncounterDetails.Frame["timeamt"..i].widget:SetPoint ("TOPLEFT", EncounterDetails.Frame, "TOPLEFT", 75+(73*i), -300)
end
g.max_time = 0
g.max_damage = 0
EncounterDetails.MaxGraphics = EncounterDetails.MaxGraphics or 5
for i = 1, EncounterDetails.MaxGraphics do
local texture = g:CreateTexture (nil, "overlay")
texture:SetWidth (9)
texture:SetHeight (9)
texture:SetPoint ("TOPLEFT", EncounterDetails.Frame, "TOPLEFT", (i*65) + 299, -81)
texture:SetTexture (unpack (grafico_cores[i]))
local text = g:CreateFontString (nil, "OVERLAY", "GameFontHighlightSmall")
text:SetPoint ("LEFT", texture, "right", 2, 0)
text:SetJustifyH ("LEFT")
if (i == 1) then
text:SetText (Loc ["STRING_CURRENT"])
else
text:SetText (Loc ["STRING_TRY"] .. " #" .. i)
end
--texture:Hide()
g.TryIndicator [#g.TryIndicator+1] = {texture = texture, text = text}
end
local v = g:CreateTexture (nil, "overlay")
v:SetWidth (1)
v:SetHeight (238)
v:SetPoint ("top", g, "top", 0, 1)
v:SetPoint ("left", g, "left", 55, 0)
v:SetTexture (1, 1, 1, 1)
local h = g:CreateTexture (nil, "overlay")
h:SetWidth (668)
h:SetHeight (2)
h:SetPoint ("top", g, "top", 0, -217)
h:SetPoint ("left", g, "left")
h:SetTexture (1, 1, 1, 1)
else
g = _G.DetailsRaidDpsGraph
if (not _detalhes.tabela_vigente.is_boss or not lastBoss or _detalhes.tabela_vigente.is_boss.index ~= lastBoss) then
g:ResetData()
g.max_damage = 0
end
end
--
lastBoss = _detalhes.tabela_vigente.is_boss and _detalhes.tabela_vigente.is_boss.index
EncounterDetails:DrawSegmentGraphic (g, graphicData, combat, combat)
EncounterDetails.CombatsAlreadyDrew [combat:GetCombatNumber()] = true
g:Show()
end
function EncounterDetails:DrawSegmentGraphic (g, graphicData, combat, drawDeathsCombat)
local _data = {}
local dps_max = graphicData.max_value
local amount = #graphicData
@@ -358,10 +303,11 @@ do
local scaleW = 1/670
local content = graphicData
table.insert (content, 1, 0)
table.insert (content, 1, 0)
table.insert (content, #content+1, 0)
table.insert (content, #content+1, 0)
tinsert (content, 1, 0)
tinsert (content, 1, 0)
tinsert (content, #content+1, 0)
tinsert (content, #content+1, 0)
local _i = 3
local graphMaxDps = math.max (g.max_damage, dps_max)
@@ -370,12 +316,13 @@ do
_data [#_data+1] = {scaleW*(_i-2), v/graphMaxDps} --> x and y coords
_i = _i + 1
end
tremove (content, 1)
tremove (content, 1)
tremove (content, #graphicData)
tremove (content, #graphicData)
--[[ precisa de uma proteção contra troca de tabela, no inicio dos trash
Message: ..\AddOns\Details_EncounterDetails\frames.lua line 156:
attempt to perform arithmetic on field 'end_time' (a nil value)--]]
local tempo = _detalhes.tabela_vigente.end_time - _detalhes.tabela_vigente.start_time
local tempo = combat.end_time - combat.start_time
if (g.max_time < tempo) then
g.max_time = tempo
@@ -394,20 +341,14 @@ Message: ..\AddOns\Details_EncounterDetails\frames.lua line 156:
end
end
--print ("DPSMAX: " .. dps_max .. " > " .. g.max_damage)
if (dps_max > g.max_damage) then
--> normalize previous data
--table.insert (self.Data, 1, {Points=data;Color=color})
if (g.max_damage > 0) then
local normalizePercent = g.max_damage / dps_max
for dataIndex, Data in ipairs (g.Data) do
local Points = Data.Points
for i = 1, #Points do
--print (Points[i][1], Points[i][2])
Points[i][2] = Points[i][2]*normalizePercent
end
end
@@ -435,102 +376,197 @@ Message: ..\AddOns\Details_EncounterDetails\frames.lua line 156:
for i = 2, #g.Data do
g:ChangeColorOnDataSeries (i, grafico_cores [i])
end
local mortes = _detalhes.tabela_vigente.last_events_tables
local scaleG = 650/_detalhes.tabela_vigente:GetCombatTime()
for _, row in _ipairs (g.VerticalLines) do
row:Hide()
end
for i = 1, math.min (3, #mortes) do
local vRowFrame = g.VerticalLines [i]
local deadTime = mortes [i][2] - _detalhes.tabela_vigente.start_time
if (drawDeathsCombat) then
local mortes = drawDeathsCombat.last_events_tables
--local scaleG = 650/_detalhes.tabela_vigente:GetCombatTime()
local scaleG = 610/drawDeathsCombat:GetCombatTime()
if (not vRowFrame) then
vRowFrame = CreateFrame ("frame", "DetailsEncountersVerticalLine"..i, g)
vRowFrame:SetWidth (20)
vRowFrame:SetHeight (43)
vRowFrame:SetFrameLevel (g:GetFrameLevel()+2)
vRowFrame:SetScript ("OnEnter", function (frame)
if (vRowFrame.dead[1] and vRowFrame.dead[1][3] and vRowFrame.dead[1][3][2]) then
local nome_magia3, _, icone_magia3 = _GetSpellInfo (vRowFrame.dead[1][3][2])
if (type (vRowFrame.dead[1][3][3]) == "number") then
nome_magia3 = _detalhes:comma_value (vRowFrame.dead[1][3][3]).." "..nome_magia3
end
local nome_magia2, _, icone_magia2 = _GetSpellInfo (vRowFrame.dead[1][2][2])
if (type (vRowFrame.dead[1][2][3]) == "number") then
nome_magia2 = _detalhes:comma_value (vRowFrame.dead[1][2][3]).." "..nome_magia2
end
local nome_magia1, _, icone_magia1 = _GetSpellInfo (vRowFrame.dead[1][1][2])
if (type (vRowFrame.dead[1][1][3]) == "number") then
nome_magia1 = _detalhes:comma_value (vRowFrame.dead[1][1][3]).." "..nome_magia1
else --bress
local decorrido = vRowFrame.dead[1][1][4] - _detalhes.tabela_vigente.start_time
local minutos, segundos = _math_floor (decorrido/60), _math_floor (decorrido%60)
nome_magia1 = minutos..":"..segundos.." "..nome_magia1
end
GameCooltip:Reset()
GameCooltip:AddLine (vRowFrame.dead[6].." "..vRowFrame.dead[3])
GameCooltip:AddIcon ("Interface\\AddOns\\Details_EncounterDetails\\images\\small_icons", _,_,_,_, .75, 1, 0, 1)
GameCooltip:AddLine (nome_magia3)
GameCooltip:AddIcon (icone_magia3)
GameCooltip:AddLine (nome_magia2)
GameCooltip:AddIcon (icone_magia1)
GameCooltip:AddLine (nome_magia1)
GameCooltip:AddIcon (icone_magia1)
GameCooltip:SetOption ("TextSize", 9.5)
GameCooltip:SetOption ("IconSize", 12)
GameCooltip:SetOption ("HeightAnchorMod", -15)
GameCooltip:ShowCooltip (frame, "tooltip")
end
end)
vRowFrame:SetScript ("OnLeave", function (frame)
_detalhes.popup:ShowMe (false)
end)
vRowFrame.texture = vRowFrame:CreateTexture (nil, "overlay")
vRowFrame.texture:SetTexture ("Interface\\AddOns\\Details\\images\\verticalline")
vRowFrame.texture:SetWidth (3)
vRowFrame.texture:SetHeight (20)
vRowFrame.texture:SetPoint ("center", "DetailsEncountersVerticalLine"..i, "center")
vRowFrame.texture:SetPoint ("bottom", "DetailsEncountersVerticalLine"..i, "bottom", 0, 0)
vRowFrame.texture:SetVertexColor (1, 1, 1, .5)
vRowFrame.icon = vRowFrame:CreateTexture (nil, "overlay")
vRowFrame.icon:SetTexture ("Interface\\WorldStateFrame\\SkullBones")
vRowFrame.icon:SetTexCoord (0.046875, 0.453125, 0.046875, 0.46875)
vRowFrame.icon:SetWidth (16)
vRowFrame.icon:SetHeight (16)
vRowFrame.icon:SetPoint ("center", "DetailsEncountersVerticalLine"..i, "center")
vRowFrame.icon:SetPoint ("bottom", "DetailsEncountersVerticalLine"..i, "bottom", 0, 20)
g.VerticalLines [i] = vRowFrame
for _, row in _ipairs (g.VerticalLines) do
row:Hide()
end
vRowFrame:SetPoint ("topleft", EncounterDetails.Frame, "topleft", (deadTime*scaleG), -268)
vRowFrame.dead = mortes [i]
vRowFrame:Show()
for i = 1, math.min (3, #mortes) do
local vRowFrame = g.VerticalLines [i]
if (not vRowFrame) then
vRowFrame = CreateFrame ("frame", "DetailsEncountersVerticalLine"..i, g)
vRowFrame:SetWidth (20)
vRowFrame:SetHeight (43)
vRowFrame:SetFrameLevel (g:GetFrameLevel()+2)
vRowFrame:SetScript ("OnEnter", function (frame)
if (vRowFrame.dead[1] and vRowFrame.dead[1][3] and vRowFrame.dead[1][3][2]) then
GameCooltip:Reset()
--time of death and player name
GameCooltip:AddLine (vRowFrame.dead[6].." "..vRowFrame.dead[3])
local class, l, r, t, b = _detalhes:GetClass (vRowFrame.dead[3])
if (class) then
GameCooltip:AddIcon ([[Interface\AddOns\Details\images\classes_small]], 1, 1, 12, 12, l, r, t, b)
end
GameCooltip:AddLine ("")
--last hits:
local death = vRowFrame.dead
local amt = 0
for i = #death[1], 1, -1 do
local this_hit = death[1][i]
if (type (this_hit[1]) == "boolean" and this_hit[1]) then
local spellname, _, spellicon = _GetSpellInfo (this_hit[2])
local t = death [2] - this_hit [4]
GameCooltip:AddLine ("-" .. _cstr ("%.1f", t) .. " " .. spellname .. " (" .. this_hit[6] .. ")", EncounterDetails:comma_value (this_hit [3]))
GameCooltip:AddIcon (spellicon, 1, 1, 12, 12, 0.1, 0.9, 0.1, 0.9)
amt = amt + 1
if (amt == 3) then
break
end
end
end
GameCooltip:SetOption ("TextSize", 9.5)
GameCooltip:SetOption ("HeightAnchorMod", -15)
GameCooltip:SetWallpaper (1, [[Interface\SPELLBOOK\Spellbook-Page-1]], {.6, 0.1, 0, 0.64453125}, {1, 1, 1, 0.1}, true)
GameCooltip:ShowCooltip (frame, "tooltip")
end
end)
vRowFrame:SetScript ("OnLeave", function (frame)
_detalhes.popup:ShowMe (false)
end)
vRowFrame.texture = vRowFrame:CreateTexture (nil, "overlay")
vRowFrame.texture:SetTexture ("Interface\\AddOns\\Details\\images\\verticalline")
vRowFrame.texture:SetWidth (3)
vRowFrame.texture:SetHeight (20)
vRowFrame.texture:SetPoint ("center", "DetailsEncountersVerticalLine"..i, "center")
vRowFrame.texture:SetPoint ("bottom", "DetailsEncountersVerticalLine"..i, "bottom", 0, 0)
vRowFrame.texture:SetVertexColor (1, 1, 1, .5)
vRowFrame.icon = vRowFrame:CreateTexture (nil, "overlay")
vRowFrame.icon:SetTexture ("Interface\\WorldStateFrame\\SkullBones")
vRowFrame.icon:SetTexCoord (0.046875, 0.453125, 0.046875, 0.46875)
vRowFrame.icon:SetWidth (16)
vRowFrame.icon:SetHeight (16)
vRowFrame.icon:SetPoint ("center", "DetailsEncountersVerticalLine"..i, "center")
vRowFrame.icon:SetPoint ("bottom", "DetailsEncountersVerticalLine"..i, "bottom", 0, 20)
g.VerticalLines [i] = vRowFrame
end
local deadTime = mortes [i].dead_at
--print (deadTime, mortes [i][3])
vRowFrame:SetPoint ("topleft", EncounterDetails.Frame, "topleft", (deadTime*scaleG)+70, -268)
vRowFrame.dead = mortes [i]
vRowFrame:Show()
end
end
end
function EncounterDetails:CreateGraphPanel()
local g = Graphics:CreateGraphLine ("DetailsRaidDpsGraph", EncounterDetails.Frame, "topleft","topleft",20,-76,670,238)
g:SetXAxis (-1,1)
g:SetYAxis (-1,1)
g:SetGridSpacing (false, false)
g:SetGridColor ({0.5,0.5,0.5,0.3})
g:SetAxisDrawing (false,false)
g:SetAxisColor({1.0,1.0,1.0,1.0})
g:SetAutoScale (true)
g:SetLineTexture ("smallline")
g:SetBorderSize ("right", 0.001)
g.VerticalLines = {}
g.TryIndicator = {}
function g:ChangeColorOnDataSeries (index, color)
self.Data [index].Color = color
self.NeedsUpdate=true
end
_G.DetailsRaidDpsGraph:Show()
function g:AddDataSeriesOnFirstIndex (points, color, n2)
local data
--Make sure there is data points
if not points then
return
end
data=points
if n2==nil then
n2=false
end
if n2 or (table.getn(points)==2 and table.getn(points[1])~=2) then
data={}
for k,v in ipairs(points[1]) do
tinsert(data,{v,points[2][k]})
end
end
table.insert (self.Data, 1, {Points=data;Color=color})
self.NeedsUpdate=true
end
DetailsFrameWork:NewLabel (EncounterDetails.Frame, EncounterDetails.Frame, nil, "timeamt0", "00:00", "GameFontHighlightSmall")
EncounterDetails.Frame["timeamt0"]:SetPoint ("TOPLEFT", EncounterDetails.Frame, "TOPLEFT", 85, -300)
end
for i = 1, 8, 1 do
local line = g:CreateTexture (nil, "overlay")
line:SetTexture (.5, .5, .5, .7)
line:SetWidth (670)
line:SetHeight (1)
line:SetVertexColor (.4, .4, .4, .8)
DetailsFrameWork:NewLabel (EncounterDetails.Frame, EncounterDetails.Frame, nil, "dpsamt"..i, "", "GameFontHighlightSmall")
EncounterDetails.Frame["dpsamt"..i]:SetPoint ("TOPLEFT", EncounterDetails.Frame, "TOPLEFT", 27, -61 + (-(24.6*i)))
line:SetPoint ("topleft", EncounterDetails.Frame["dpsamt"..i].widget, "bottom", -27, 0)
DetailsFrameWork:NewLabel (EncounterDetails.Frame, EncounterDetails.Frame, nil, "timeamt"..i, "", "GameFontHighlightSmall")
EncounterDetails.Frame["timeamt"..i].widget:SetPoint ("TOPLEFT", EncounterDetails.Frame, "TOPLEFT", 75+(73*i), -300)
end
g.max_time = 0
g.max_damage = 0
EncounterDetails.MaxGraphics = EncounterDetails.MaxGraphics or 5
for i = 1, EncounterDetails.MaxGraphics do
local texture = g:CreateTexture (nil, "overlay")
texture:SetWidth (9)
texture:SetHeight (9)
texture:SetPoint ("TOPLEFT", EncounterDetails.Frame, "TOPLEFT", (i*65) + 299, -81)
texture:SetTexture (unpack (grafico_cores[i]))
local text = g:CreateFontString (nil, "OVERLAY", "GameFontHighlightSmall")
text:SetPoint ("LEFT", texture, "right", 2, 0)
text:SetJustifyH ("LEFT")
if (i == 1) then
text:SetText (Loc ["STRING_CURRENT"])
else
text:SetText (Loc ["STRING_TRY"] .. " #" .. i)
end
--texture:Hide()
g.TryIndicator [#g.TryIndicator+1] = {texture = texture, text = text}
end
local v = g:CreateTexture (nil, "overlay")
v:SetWidth (1)
v:SetHeight (238)
v:SetPoint ("top", g, "top", 0, 1)
v:SetPoint ("left", g, "left", 55, 0)
v:SetTexture (1, 1, 1, 1)
local h = g:CreateTexture (nil, "overlay")
h:SetWidth (668)
h:SetHeight (2)
h:SetPoint ("top", g, "top", 0, -217)
h:SetPoint ("left", g, "left")
h:SetTexture (1, 1, 1, 1)
end
local BossFrame = EncounterDetails.Frame
@@ -565,6 +601,8 @@ Message: ..\AddOns\Details_EncounterDetails\frames.lua line 156:
if (botao == "LeftButton") then
self:StartMoving()
self.isMoving = true
elseif (botao == "RightButton" and not self.isMoving) then
EncounterDetails:CloseWindow()
end
end)
@@ -735,7 +773,8 @@ Message: ..\AddOns\Details_EncounterDetails\frames.lua line 156:
widget:Hide()
end
BossFrame.segmentosDropdown:Disable()
BossFrame.segmentosDropdown:Enable()
--BossFrame.segmentosDropdown:Disable()
end
end
@@ -809,7 +848,11 @@ Message: ..\AddOns\Details_EncounterDetails\frames.lua line 156:
--tooltips
BossFrame.buttonSwitchNormal.MouseOnEnterHook = function()
GameCooltip:Reset()
GameCooltip:AddLine (Loc ["STRING_FIGHT_SUMMARY"])
--GameCooltip:AddLine (Loc ["STRING_FIGHT_SUMMARY"])
GameCooltip:AddLine (Loc ["STRING_FIGHT_SUMMARY"], nil, nil, "orange", nil, 12)
--GameCooltip:AddIcon ("Interface\\AddOns\\Details_EncounterDetails\\images\\boss_frame_buttons", 1, 1, 16, 16, 0, 0.1015625, 0, 0.515625)
GameCooltip:SetWallpaper (1, [[Interface\SPELLBOOK\Spellbook-Page-1]], {.6, 0.1, 0, 0.64453125}, {1, 1, 1, 0.1}, true)
GameCooltip:ShowCooltip (BossFrame.buttonSwitchNormal, "tooltip")
t:SetBlendMode ("ADD")
end
@@ -817,7 +860,10 @@ Message: ..\AddOns\Details_EncounterDetails\frames.lua line 156:
--
BossFrame.buttonSwitchGraphic.MouseOnEnterHook = function()
GameCooltip:Reset()
GameCooltip:AddLine (Loc ["STRING_FIGHT_GRAPHIC"])
GameCooltip:AddLine (Loc ["STRING_FIGHT_GRAPHIC"], nil, nil, "orange", nil, 12)
--GameCooltip:AddIcon ("Interface\\AddOns\\Details_EncounterDetails\\images\\boss_frame_buttons", 1, 1, 16, 16, 0.1171875, 0.21875, 0, 0.515625)
GameCooltip:SetWallpaper (1, [[Interface\SPELLBOOK\Spellbook-Page-1]], {.6, 0.1, 0, 0.64453125}, {1, 1, 1, 0.1}, true)
GameCooltip:ShowCooltip (BossFrame.buttonSwitchGraphic, "tooltip")
g:SetBlendMode ("ADD")
end
@@ -825,7 +871,10 @@ Message: ..\AddOns\Details_EncounterDetails\frames.lua line 156:
--
BossFrame.buttonSwitchBossEmotes:SetHook ("OnEnter", function()
GameCooltip:Reset()
GameCooltip:AddLine ("boss emotes")
GameCooltip:AddLine ("boss emotes", nil, nil, "orange", nil, 12)
--GameCooltip:AddIcon ("Interface\\AddOns\\Details_EncounterDetails\\images\\boss_frame_buttons", 1, 1, 16, 16, 90/256, 116/256, 0, 0.515625)
GameCooltip:SetWallpaper (1, [[Interface\SPELLBOOK\Spellbook-Page-1]], {.6, 0.1, 0, 0.64453125}, {1, 1, 1, 0.1}, true)
GameCooltip:ShowCooltip (BossFrame.buttonSwitchBossEmotes, "tooltip")
e:SetBlendMode ("ADD")
end)
@@ -1278,10 +1327,12 @@ Message: ..\AddOns\Details_EncounterDetails\frames.lua line 156:
mouseOver_adds_frame:SetScript ("OnEnter",
function()
_G.DetailsBubble:SetOwner (mouseOver_adds_frame.imagem, nil, nil, -45, -22)
_G.DetailsBubble:FlipHorizontal()
_G.DetailsBubble:SetBubbleText (Loc ["STRING_ADDS_HELP"])
_G.DetailsBubble:ShowBubble()
if (EncounterDetails.db.opened < 30) then
_G.DetailsBubble:SetOwner (mouseOver_adds_frame.imagem, nil, nil, -45, -22)
_G.DetailsBubble:FlipHorizontal()
_G.DetailsBubble:SetBubbleText (Loc ["STRING_ADDS_HELP"])
_G.DetailsBubble:ShowBubble()
end
mouseOver_adds_frame.imagem:SetTexCoord (0.7734375, 0.99609375, 0.03125, 0.3671875)
end)
mouseOver_adds_frame:SetScript ("OnLeave",
@@ -1305,16 +1356,16 @@ Message: ..\AddOns\Details_EncounterDetails\frames.lua line 156:
--container_adds_window:SetBackdropColor (0, 0, 0, 0.1)
container_adds_frame:SetAllPoints (container_adds_window)
container_adds_frame:SetWidth (170)
container_adds_frame:SetWidth (175)
container_adds_frame:SetHeight (67)
container_adds_frame:EnableMouse (true)
container_adds_frame:SetResizable (false)
container_adds_frame:SetMovable (true)
container_adds_window:SetWidth (170)
container_adds_window:SetWidth (175)
container_adds_window:SetHeight (65)
container_adds_window:SetScrollChild (container_adds_frame)
container_adds_window:SetPoint ("TOPLEFT", frame, "TOPLEFT", 260, -113)
container_adds_window:SetPoint ("TOPLEFT", frame, "TOPLEFT", 255, -113)
DetailsFrameWork:NewLabel (container_adds_window, container_adds_window, nil, "titulo", Loc ["STRING_ADDS"], "QuestFont_Large", 16, {1, 1, 1})
container_adds_window.titulo:SetPoint ("bottomleft", container_adds_window, "topleft", 0, 4)
@@ -1355,10 +1406,11 @@ Message: ..\AddOns\Details_EncounterDetails\frames.lua line 156:
mouseOver_interrupt_frame:SetScript ("OnEnter",
function()
_G.DetailsBubble:SetOwner (mouseOver_interrupt_frame.imagem, nil, nil, 40, -18)
--_G.DetailsBubble:FlipHorizontal()
_G.DetailsBubble:SetBubbleText (Loc ["STRING_INTERRIPT_HELP"])
_G.DetailsBubble:ShowBubble()
if (EncounterDetails.db.opened < 30) then
_G.DetailsBubble:SetOwner (mouseOver_interrupt_frame.imagem, nil, nil, 40, -18)
_G.DetailsBubble:SetBubbleText (Loc ["STRING_INTERRIPT_HELP"])
_G.DetailsBubble:ShowBubble()
end
mouseOver_interrupt_frame.imagem:SetTexCoord (0.6015625, 1, 0.4296875, 0.6953125)
end)
mouseOver_interrupt_frame:SetScript ("OnLeave",
@@ -1374,29 +1426,22 @@ Message: ..\AddOns\Details_EncounterDetails\frames.lua line 156:
container_interrupt_frame.barras = {}
--container_interrupt_window:SetBackdrop({edgeFile = "Interface\\DialogFrame\\UI-DialogBox-gold-Border", tile = true, tileSize = 16, edgeSize = 5, insets = {left = 1, right = 1, top = 0, bottom = 1},})
--container_interrupt_window:SetBackdropBorderColor (0,0,0,0)
--container_interrupt_window:SetBackdrop (gump_fundo_backdrop)
--container_interrupt_window:SetBackdropBorderColor (1, 1, 1, 1)
--container_interrupt_window:SetBackdropColor (0, 0, 0, 0.1)
container_interrupt_frame:SetAllPoints (container_interrupt_window)
container_interrupt_frame:SetWidth (170)
container_interrupt_frame:SetWidth (185)
container_interrupt_frame:SetHeight (67)
container_interrupt_frame:EnableMouse (true)
container_interrupt_frame:SetResizable (false)
container_interrupt_frame:SetMovable (true)
container_interrupt_window:SetWidth (170)
container_interrupt_window:SetWidth (185)
container_interrupt_window:SetHeight (65)
container_interrupt_window:SetScrollChild (container_interrupt_frame)
container_interrupt_window:SetPoint ("TOPLEFT", frame, "TOPLEFT", 480, -113)
container_interrupt_window:SetPoint ("TOPLEFT", frame, "TOPLEFT", 470, -113)
DetailsFrameWork:NewLabel (container_interrupt_window, container_interrupt_window, nil, "titulo", Loc ["STRING_INTERRUPTS"], "QuestFont_Large", 16, {1, 1, 1})
container_interrupt_window.titulo:SetPoint ("bottomleft", container_interrupt_window, "topleft", 0, 4)
DetailsFrameWork:NewScrollBar (container_interrupt_window, container_interrupt_frame, 4, -13)
DetailsFrameWork:NewScrollBar (container_interrupt_window, container_interrupt_frame, -1, -13)
container_interrupt_window.slider:Altura (45)
container_interrupt_window.slider:cimaPoint (0, 1)
container_interrupt_window.slider:baixoPoint (0, -1)
@@ -1432,10 +1477,12 @@ Message: ..\AddOns\Details_EncounterDetails\frames.lua line 156:
mouseOver_dispell_frame:SetScript ("OnEnter",
function()
_G.DetailsBubble:SetOwner (mouseOver_dispell_frame.imagem, nil, nil, -45, -22)
_G.DetailsBubble:FlipHorizontal()
_G.DetailsBubble:SetBubbleText (Loc ["STRING_DISPELL_HELP"])
_G.DetailsBubble:ShowBubble()
if (EncounterDetails.db.opened < 30) then
_G.DetailsBubble:SetOwner (mouseOver_dispell_frame.imagem, nil, nil, -45, -22)
_G.DetailsBubble:FlipHorizontal()
_G.DetailsBubble:SetBubbleText (Loc ["STRING_DISPELL_HELP"])
_G.DetailsBubble:ShowBubble()
end
mouseOver_dispell_frame.imagem:SetTexCoord (0.1796875, 0.3359375, 0.4140625, 0.71875)
end)
mouseOver_dispell_frame:SetScript ("OnLeave",
@@ -1451,29 +1498,22 @@ Message: ..\AddOns\Details_EncounterDetails\frames.lua line 156:
container_dispell_frame.barras = {}
--container_dispell_window:SetBackdrop (backdrop)
--container_dispell_window:SetBackdropBorderColor (0,0,0,0)
--container_dispell_window:SetBackdrop (gump_fundo_backdrop)
--container_dispell_window:SetBackdropBorderColor (1, 1, 1, 1)
--container_dispell_window:SetBackdropColor (0, 0, 0, 0.1)
container_dispell_frame:SetAllPoints (container_dispell_window)
container_dispell_frame:SetWidth (170)
container_dispell_frame:SetWidth (190)
container_dispell_frame:SetHeight (62)
container_dispell_frame:EnableMouse (true)
container_dispell_frame:SetResizable (false)
container_dispell_frame:SetMovable (true)
container_dispell_window:SetWidth (170)
container_dispell_window:SetWidth (190)
container_dispell_window:SetHeight (68)
container_dispell_window:SetScrollChild (container_dispell_frame)
container_dispell_window:SetPoint ("TOPLEFT", frame, "TOPLEFT", 260, -231)
container_dispell_window:SetPoint ("TOPLEFT", frame, "TOPLEFT", 245, -231)
DetailsFrameWork:NewLabel (container_dispell_window, container_dispell_window, nil, "titulo", Loc ["STRING_DISPELLS"], "QuestFont_Large", 16, {1, 1, 1})
container_dispell_window.titulo:SetPoint ("bottomleft", container_dispell_window, "topleft", 0, 4)
DetailsFrameWork:NewScrollBar (container_dispell_window, container_dispell_frame, 4, -13)
DetailsFrameWork:NewScrollBar (container_dispell_window, container_dispell_frame, -1, -13)
container_dispell_window.slider:Altura (45)
container_dispell_window.slider:cimaPoint (0, 1)
container_dispell_window.slider:baixoPoint (0, -1)
@@ -1483,8 +1523,7 @@ Message: ..\AddOns\Details_EncounterDetails\frames.lua line 156:
container_dispell_frame.window = container_dispell_window
container_dispell_window.ultimo = 0
frame.overall_dispell = container_dispell_window
--> Caixa das mortes
local container_dead_window = CreateFrame ("ScrollFrame", "Details_Boss_ContainerDead", frame)
@@ -1510,10 +1549,11 @@ Message: ..\AddOns\Details_EncounterDetails\frames.lua line 156:
mouseOver_dead_frame:SetScript ("OnEnter",
function()
_G.DetailsBubble:SetOwner (mouseOver_dead_frame.imagem, nil, nil, 40, -18)
--_G.DetailsBubble:FlipHorizontal()
_G.DetailsBubble:SetBubbleText (Loc ["STRING_DEATHS_HELP"])
_G.DetailsBubble:ShowBubble()
if (EncounterDetails.db.opened < 30) then
_G.DetailsBubble:SetOwner (mouseOver_dead_frame.imagem, nil, nil, 40, -18)
_G.DetailsBubble:SetBubbleText (Loc ["STRING_DEATHS_HELP"])
_G.DetailsBubble:ShowBubble()
end
mouseOver_dead_frame.imagem:SetTexCoord (0.171875, 0.3359375, 0.03125, 0.34375)
end)
mouseOver_dead_frame:SetScript ("OnLeave",
@@ -1528,31 +1568,23 @@ Message: ..\AddOns\Details_EncounterDetails\frames.lua line 156:
mouseOver_dead_frame:SetScript ("OnMouseUp", mouse_up)
container_dead_frame.barras = {}
--container_dead_window:SetBackdrop({edgeFile = "Interface\\DialogFrame\\UI-DialogBox-gold-Border", tile = true, tileSize = 16, edgeSize = 5, insets = {left = 1, right = 1, top = 0, bottom = 1},})
--container_dead_window:SetBackdropBorderColor (0,0,0,0)
--container_dead_window:SetBackdrop (gump_fundo_backdrop)
--container_dead_window:SetBackdropBorderColor (1, 1, 1, 1)
--container_dead_window:SetBackdropColor (0, 0, 0, 0.1)
--container_dead_frame:SetAllPoints (container_dead_window)
container_dead_frame:SetPoint ("left", container_dead_window, "left")
container_dead_frame:SetPoint ("right", container_dead_window, "right")
container_dead_frame:SetPoint ("top", container_dead_window, "top")
container_dead_frame:SetPoint ("bottom", container_dead_window, "bottom", 0, 10)
container_dead_frame:SetWidth (170)
container_dead_frame:SetWidth (178)
container_dead_frame:SetHeight (60)
container_dead_frame:EnableMouse (true)
container_dead_frame:SetResizable (false)
container_dead_frame:SetMovable (true)
container_dead_window:SetWidth (170)
container_dead_window:SetWidth (178)
container_dead_window:SetHeight (70)
container_dead_window:SetScrollChild (container_dead_frame)
container_dead_window:SetPoint ("TOPLEFT", frame, "TOPLEFT", 480, -235)
container_dead_window:SetPoint ("TOPLEFT", frame, "TOPLEFT", 472, -235)
DetailsFrameWork:NewLabel (container_dead_window, container_dead_window, nil, "titulo", Loc ["STRING_DEATH_LOG"], "QuestFont_Large", 16, {1, 1, 1})
container_dead_window.titulo:SetPoint ("bottomleft", container_dead_window, "topleft", 0, 3)
@@ -20,8 +20,8 @@ local siege_of_orgrimmar = {
icon = "Interface\\AddOns\\Details_RaidInfo-SiegeOfOrgrimmar\\images\\icon256x128",
is_raid = true,
background = "Interface\\AddOns\\Details_RaidInfo-SiegeOfOrgrimmar\\images\\wallpaper",
backgroundFile = {file = [[Interface\Glues\LOADINGSCREENS\LoadScreenSiegeOfOrgrimmar]], coords = {0, 1, 256/1024, 840/1024}},
backgroundEJ = [[Interface\EncounterJournal\UI-EJ-LOREBG-SiegeofOrgrimmar]],
boss_names = {
@@ -21,7 +21,7 @@ local throne_of_thunder = {
is_raid = true,
background = "Interface\\AddOns\\Details_RaidInfo-ThroneOfThunder\\images\\raid_tot",
backgroundFile = {file = [[Interface\Glues\LOADINGSCREENS\LoadscreenThunderkingRaid]], coords = {0, 1, 256/1024, 840/1024}},
backgroundEJ = [[Interface\EncounterJournal\UI-EJ-LOREBG-ThunderKingRaid]],
boss_names = {
File diff suppressed because it is too large Load Diff
@@ -1,15 +0,0 @@
## Interface: 50400
## Title: Details Spells (plugin)
## Notes: Plugin for Details
## SavedVariablesPerCharacter: _detalhes_databaseSpellDetails
## RequiredDeps: Details
## OptionalDeps: Ace3
#@no-lib-strip@
embeds.xml
#@end-no-lib-strip@
enUS.lua
ptBR.lua
Details_SpellDetails.lua
@@ -1,137 +0,0 @@
--- **AceLocale-3.0** manages localization in addons, allowing for multiple locale to be registered with fallback to the base locale for untranslated strings.
-- @class file
-- @name AceLocale-3.0
-- @release $Id: AceLocale-3.0.lua 1035 2011-07-09 03:20:13Z kaelten $
local MAJOR,MINOR = "AceLocale-3.0", 6
local AceLocale, oldminor = LibStub:NewLibrary(MAJOR, MINOR)
if not AceLocale then return end -- no upgrade needed
-- Lua APIs
local assert, tostring, error = assert, tostring, error
local getmetatable, setmetatable, rawset, rawget = getmetatable, setmetatable, rawset, rawget
-- Global vars/functions that we don't upvalue since they might get hooked, or upgraded
-- List them here for Mikk's FindGlobals script
-- GLOBALS: GAME_LOCALE, geterrorhandler
local gameLocale = GetLocale()
if gameLocale == "enGB" then
gameLocale = "enUS"
end
AceLocale.apps = AceLocale.apps or {} -- array of ["AppName"]=localetableref
AceLocale.appnames = AceLocale.appnames or {} -- array of [localetableref]="AppName"
-- This metatable is used on all tables returned from GetLocale
local readmeta = {
__index = function(self, key) -- requesting totally unknown entries: fire off a nonbreaking error and return key
rawset(self, key, key) -- only need to see the warning once, really
geterrorhandler()(MAJOR..": "..tostring(AceLocale.appnames[self])..": Missing entry for '"..tostring(key).."'")
return key
end
}
-- This metatable is used on all tables returned from GetLocale if the silent flag is true, it does not issue a warning on unknown keys
local readmetasilent = {
__index = function(self, key) -- requesting totally unknown entries: return key
rawset(self, key, key) -- only need to invoke this function once
return key
end
}
-- Remember the locale table being registered right now (it gets set by :NewLocale())
-- NOTE: Do never try to register 2 locale tables at once and mix their definition.
local registering
-- local assert false function
local assertfalse = function() assert(false) end
-- This metatable proxy is used when registering nondefault locales
local writeproxy = setmetatable({}, {
__newindex = function(self, key, value)
rawset(registering, key, value == true and key or value) -- assigning values: replace 'true' with key string
end,
__index = assertfalse
})
-- This metatable proxy is used when registering the default locale.
-- It refuses to overwrite existing values
-- Reason 1: Allows loading locales in any order
-- Reason 2: If 2 modules have the same string, but only the first one to be
-- loaded has a translation for the current locale, the translation
-- doesn't get overwritten.
--
local writedefaultproxy = setmetatable({}, {
__newindex = function(self, key, value)
if not rawget(registering, key) then
rawset(registering, key, value == true and key or value)
end
end,
__index = assertfalse
})
--- Register a new locale (or extend an existing one) for the specified application.
-- :NewLocale will return a table you can fill your locale into, or nil if the locale isn't needed for the players
-- game locale.
-- @paramsig application, locale[, isDefault[, silent]]
-- @param application Unique name of addon / module
-- @param locale Name of the locale to register, e.g. "enUS", "deDE", etc.
-- @param isDefault If this is the default locale being registered (your addon is written in this language, generally enUS)
-- @param silent If true, the locale will not issue warnings for missing keys. Must be set on the first locale registered. If set to "raw", nils will be returned for unknown keys (no metatable used).
-- @usage
-- -- enUS.lua
-- local L = LibStub("AceLocale-3.0"):NewLocale("TestLocale", "enUS", true)
-- L["string1"] = true
--
-- -- deDE.lua
-- local L = LibStub("AceLocale-3.0"):NewLocale("TestLocale", "deDE")
-- if not L then return end
-- L["string1"] = "Zeichenkette1"
-- @return Locale Table to add localizations to, or nil if the current locale is not required.
function AceLocale:NewLocale(application, locale, isDefault, silent)
-- GAME_LOCALE allows translators to test translations of addons without having that wow client installed
local gameLocale = GAME_LOCALE or gameLocale
local app = AceLocale.apps[application]
if silent and app and getmetatable(app) ~= readmetasilent then
geterrorhandler()("Usage: NewLocale(application, locale[, isDefault[, silent]]): 'silent' must be specified for the first locale registered")
end
if not app then
if silent=="raw" then
app = {}
else
app = setmetatable({}, silent and readmetasilent or readmeta)
end
AceLocale.apps[application] = app
AceLocale.appnames[app] = application
end
if locale ~= gameLocale and not isDefault then
return -- nop, we don't need these translations
end
registering = app -- remember globally for writeproxy and writedefaultproxy
if isDefault then
return writedefaultproxy
end
return writeproxy
end
--- Returns localizations for the current locale (or default locale if translations are missing).
-- Errors if nothing is registered (spank developer, not just a missing translation)
-- @param application Unique name of addon / module
-- @param silent If true, the locale is optional, silently return nil if it's not found (defaults to false, optional)
-- @return The locale table for the current language.
function AceLocale:GetLocale(application, silent)
if not silent and not AceLocale.apps[application] then
error("Usage: GetLocale(application[, silent]): 'application' - No locales registered for '"..tostring(application).."'", 2)
end
return AceLocale.apps[application]
end
@@ -1,4 +0,0 @@
<Ui xmlns="http://www.blizzard.com/wow/ui/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.blizzard.com/wow/ui/
..\FrameXML\UI.xsd">
<Script file="AceLocale-3.0.lua"/>
</Ui>
@@ -1,51 +0,0 @@
-- $Id: LibStub.lua 76 2007-09-03 01:50:17Z mikk $
-- LibStub is a simple versioning stub meant for use in Libraries. http://www.wowace.com/wiki/LibStub for more info
-- LibStub is hereby placed in the Public Domain
-- Credits: Kaelten, Cladhaire, ckknight, Mikk, Ammo, Nevcairiel, joshborke
local LIBSTUB_MAJOR, LIBSTUB_MINOR = "LibStub", 2 -- NEVER MAKE THIS AN SVN REVISION! IT NEEDS TO BE USABLE IN ALL REPOS!
local LibStub = _G[LIBSTUB_MAJOR]
-- Check to see is this version of the stub is obsolete
if not LibStub or LibStub.minor < LIBSTUB_MINOR then
LibStub = LibStub or {libs = {}, minors = {} }
_G[LIBSTUB_MAJOR] = LibStub
LibStub.minor = LIBSTUB_MINOR
-- LibStub:NewLibrary(major, minor)
-- major (string) - the major version of the library
-- minor (string or number ) - the minor version of the library
--
-- returns nil if a newer or same version of the lib is already present
-- returns empty library object or old library object if upgrade is needed
function LibStub:NewLibrary(major, minor)
assert(type(major) == "string", "Bad argument #2 to `NewLibrary' (string expected)")
minor = assert(tonumber(strmatch(minor, "%d+")), "Minor version must either be a number or contain a number.")
local oldminor = self.minors[major]
if oldminor and oldminor >= minor then return nil end
self.minors[major], self.libs[major] = minor, self.libs[major] or {}
return self.libs[major], oldminor
end
-- LibStub:GetLibrary(major, [silent])
-- major (string) - the major version of the library
-- silent (boolean) - if true, library is optional, silently return nil if its not found
--
-- throws an error if the library can not be found (except silent is set)
-- returns the library object if found
function LibStub:GetLibrary(major, silent)
if not self.libs[major] and not silent then
error(("Cannot find a library instance of %q."):format(tostring(major)), 2)
end
return self.libs[major], self.minors[major]
end
-- LibStub:IterateLibraries()
--
-- Returns an iterator for the currently registered libraries
function LibStub:IterateLibraries()
return pairs(self.libs)
end
setmetatable(LibStub, { __call = LibStub.GetLibrary })
end
@@ -1,13 +0,0 @@
## Interface: 40200
## Title: Lib: LibStub
## Notes: Universal Library Stub
## Credits: Kaelten, Cladhaire, ckknight, Mikk, Ammo, Nevcairiel
## X-Website: http://www.wowace.com/addons/libstub/
## X-Category: Library
## X-License: Public Domain
## X-Curse-Packaged-Version: r95
## X-Curse-Project-Name: LibStub
## X-Curse-Project-ID: libstub
## X-Curse-Repository-ID: wow/libstub/mainline
LibStub.lua
@@ -1,41 +0,0 @@
debugstack = debug.traceback
strmatch = string.match
loadfile("../LibStub.lua")()
local lib, oldMinor = LibStub:NewLibrary("Pants", 1) -- make a new thingy
assert(lib) -- should return the library table
assert(not oldMinor) -- should not return the old minor, since it didn't exist
-- the following is to create data and then be able to check if the same data exists after the fact
function lib:MyMethod()
end
local MyMethod = lib.MyMethod
lib.MyTable = {}
local MyTable = lib.MyTable
local newLib, newOldMinor = LibStub:NewLibrary("Pants", 1) -- try to register a library with the same version, should silently fail
assert(not newLib) -- should not return since out of date
local newLib, newOldMinor = LibStub:NewLibrary("Pants", 0) -- try to register a library with a previous, should silently fail
assert(not newLib) -- should not return since out of date
local newLib, newOldMinor = LibStub:NewLibrary("Pants", 2) -- register a new version
assert(newLib) -- library table
assert(rawequal(newLib, lib)) -- should be the same reference as the previous
assert(newOldMinor == 1) -- should return the minor version of the previous version
assert(rawequal(lib.MyMethod, MyMethod)) -- verify that values were saved
assert(rawequal(lib.MyTable, MyTable)) -- verify that values were saved
local newLib, newOldMinor = LibStub:NewLibrary("Pants", "Blah 3 Blah") -- register a new version with a string minor version (instead of a number)
assert(newLib) -- library table
assert(newOldMinor == 2) -- previous version was 2
local newLib, newOldMinor = LibStub:NewLibrary("Pants", "Blah 4 and please ignore 15 Blah") -- register a new version with a string minor version (instead of a number)
assert(newLib)
assert(newOldMinor == 3) -- previous version was 3 (even though it gave a string)
local newLib, newOldMinor = LibStub:NewLibrary("Pants", 5) -- register a new library, using a normal number instead of a string
assert(newLib)
assert(newOldMinor == 4) -- previous version was 4 (even though it gave a string)
@@ -1,27 +0,0 @@
debugstack = debug.traceback
strmatch = string.match
loadfile("../LibStub.lua")()
for major, library in LibStub:IterateLibraries() do
-- check that MyLib doesn't exist yet, by iterating through all the libraries
assert(major ~= "MyLib")
end
assert(not LibStub:GetLibrary("MyLib", true)) -- check that MyLib doesn't exist yet by direct checking
assert(not pcall(LibStub.GetLibrary, LibStub, "MyLib")) -- don't silently fail, thus it should raise an error.
local lib = LibStub:NewLibrary("MyLib", 1) -- create the lib
assert(lib) -- check it exists
assert(rawequal(LibStub:GetLibrary("MyLib"), lib)) -- verify that :GetLibrary("MyLib") properly equals the lib reference
assert(LibStub:NewLibrary("MyLib", 2)) -- create a new version
local count=0
for major, library in LibStub:IterateLibraries() do
-- check that MyLib exists somewhere in the libraries, by iterating through all the libraries
if major == "MyLib" then -- we found it!
count = count +1
assert(rawequal(library, lib)) -- verify that the references are equal
end
end
assert(count == 1) -- verify that we actually found it, and only once
@@ -1,14 +0,0 @@
debugstack = debug.traceback
strmatch = string.match
loadfile("../LibStub.lua")()
local proxy = newproxy() -- non-string
assert(not pcall(LibStub.NewLibrary, LibStub, proxy, 1)) -- should error, proxy is not a string, it's userdata
local success, ret = pcall(LibStub.GetLibrary, proxy, true)
assert(not success or not ret) -- either error because proxy is not a string or because it's not actually registered.
assert(not pcall(LibStub.NewLibrary, LibStub, "Something", "No number in here")) -- should error, minor has no string in it.
assert(not LibStub:GetLibrary("Something", true)) -- shouldn't've created it from the above statement
@@ -1,41 +0,0 @@
debugstack = debug.traceback
strmatch = string.match
loadfile("../LibStub.lua")()
-- Pretend like loaded libstub is old and doesn't have :IterateLibraries
assert(LibStub.minor)
LibStub.minor = LibStub.minor - 0.0001
LibStub.IterateLibraries = nil
loadfile("../LibStub.lua")()
assert(type(LibStub.IterateLibraries)=="function")
-- Now pretend that we're the same version -- :IterateLibraries should NOT be re-created
LibStub.IterateLibraries = 123
loadfile("../LibStub.lua")()
assert(LibStub.IterateLibraries == 123)
-- Now pretend that a newer version is loaded -- :IterateLibraries should NOT be re-created
LibStub.minor = LibStub.minor + 0.0001
loadfile("../LibStub.lua")()
assert(LibStub.IterateLibraries == 123)
-- Again with a huge number
LibStub.minor = LibStub.minor + 1234567890
loadfile("../LibStub.lua")()
assert(LibStub.IterateLibraries == 123)
print("OK")
-6
View File
@@ -1,6 +0,0 @@
<Ui xmlns="http://www.blizzard.com/wow/ui/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.blizzard.com/wow/ui/
..\FrameXML\UI.xsd">
<Script file="Libs\LibStub\LibStub.lua"/>
<Include file="Libs\AceLocale-3.0\AceLocale-3.0.xml" />
</Ui>
-20
View File
@@ -1,20 +0,0 @@
local Loc = LibStub("AceLocale-3.0"):NewLocale("Details_SpellDetails", "enUS", true)
if (not Loc) then
return
end
Loc ["PLUGIN_NAME"] = "Spell Details"
Loc ["STRING_TOOSHORT"] = "Combat time was too short \n and the graph cannot be generated."
Loc ["STRING_DAMAGE"] = "DMG"
Loc ["STRING_DPS"] = "DPS"
Loc ["STRING_TEMPO"] = "TIME"
Loc ["STRING_PERCENT"] = "Percent"
Loc ["STRING_UPTIME"] = "Uptime"
Loc ["STRING_CRIT"] = "Critical"
Loc ["STRING_MISS"] = "Miss"
Loc ["STRING_BLOCKED"] = "Blocked"
Loc ["STRING_GLANCING"] = "Glancing"
Loc ["STRING_DEBUFFNAME"] = "insert buff name"
Loc ["STRING_INCOMBAT"] = "You are in combat"
Binary file not shown.

Before

Width:  |  Height:  |  Size: 512 KiB

-21
View File
@@ -1,21 +0,0 @@
local Loc = LibStub("AceLocale-3.0"):NewLocale("Details_SpellDetails", "ptBR")
if (not Loc) then
return
end
Loc ["PLUGIN_NAME"] = "Detalhes das Magias"
Loc ["STRING_TOOSHORT"] = "O tempo do combat foi curto\n e o grafico nao pode ser gerado."
Loc ["STRING_DAMAGE"] = "Dano"
Loc ["STRING_DPS"] = "Dps"
Loc ["STRING_TEMPO"] = "Tempo"
Loc ["STRING_PERCENT"] = "Porcentagem"
Loc ["STRING_UPTIME"] = "Ativo"
Loc ["STRING_CRIT"] = "Critico"
Loc ["STRING_MISS"] = "Erros"
Loc ["STRING_BLOCKED"] = "Bloqueios"
Loc ["STRING_GLANCING"] = "Golpes Fracos"
Loc ["STRING_DEBUFFNAME"] = "insira o nome do buff"
Loc ["STRING_INCOMBAT"] = "Voce esta em combate"