- Now when showing custom displays, clicking on a bar report what is shown on bar's tooltip.
- More fixes for dungeon bosses identification. - Fixed a tooltip bug with Debuff Uptime and Aura & Voidzone displays. - Fixed Player Details Window for friendly fire and damage taken. - Fixed Molten Core Raid Finder version boss identification.
This commit is contained in:
@@ -1,11 +1,7 @@
|
||||
move-folders:
|
||||
Details/plugins/Details_DmgRank: Details_DmgRank
|
||||
Details/plugins/Details_ErrorReport: Details_ErrorReport
|
||||
Details/plugins/Details_EncounterDetails: Details_EncounterDetails
|
||||
Details/plugins/Details_RaidInfo-ThroneOfThunder: Details_RaidInfo-ThroneOfThunder
|
||||
Details/plugins/Details_RaidInfo-SiegeOfOrgrimmar: Details_RaidInfo-SiegeOfOrgrimmar
|
||||
Details/plugins/Details_DungeonInfo-Pandaria: Details_DungeonInfo-Pandaria
|
||||
Details/plugins/Details_SaveData: Details_SaveData
|
||||
Details/plugins/Details_SpellDetails: Details_SpellDetails
|
||||
Details/plugins/Details_TimeAttack: Details_TimeAttack
|
||||
Details/plugins/Details_TinyThreat: Details_TinyThreat
|
||||
@@ -14,4 +10,5 @@ move-folders:
|
||||
Details/plugins/Details_RaidInfo-BlackrockFoundry: Details_RaidInfo-BlackrockFoundry
|
||||
Details/plugins/Details_RaidInfo-Highmaul: Details_RaidInfo-Highmaul
|
||||
Details/plugins/Details_DataStorage: Details_DataStorage
|
||||
Details/plugins/Details_DungeonInfo-Warlords: Details_DungeonInfo-Warlords
|
||||
Details/plugins/Details_DungeonInfo-Warlords: Details_DungeonInfo-Warlords
|
||||
Details/plugins/Details_3DModelsPaths: Details_3DModelsPaths
|
||||
@@ -20,8 +20,10 @@
|
||||
--
|
||||
-- Can run as a standalone addon also, but, really, just embed it! :-)
|
||||
--
|
||||
-- LICENSE: ChatThrottleLib is released into the Public Domain
|
||||
--
|
||||
|
||||
local CTL_VERSION = 22
|
||||
local CTL_VERSION = 23
|
||||
|
||||
local _G = _G
|
||||
|
||||
@@ -71,8 +73,10 @@ local math_min = math.min
|
||||
local math_max = math.max
|
||||
local next = next
|
||||
local strlen = string.len
|
||||
local GetFrameRate = GetFrameRate
|
||||
|
||||
local GetFramerate = GetFramerate
|
||||
local strlower = string.lower
|
||||
local unpack,type,pairs,wipe = unpack,type,pairs,wipe
|
||||
local UnitInRaid,UnitInParty = UnitInRaid,UnitInParty
|
||||
|
||||
|
||||
-----------------------------------------------------------------------
|
||||
@@ -115,24 +119,20 @@ end
|
||||
|
||||
-----------------------------------------------------------------------
|
||||
-- Recycling bin for pipes
|
||||
-- A pipe is a plain integer-indexed queue, which also happens to be a ring member
|
||||
-- A pipe is a plain integer-indexed queue of messages
|
||||
-- Pipes normally live in Rings of pipes (3 rings total, one per priority)
|
||||
|
||||
ChatThrottleLib.PipeBin = nil -- pre-v19, drastically different
|
||||
local PipeBin = setmetatable({}, {__mode="k"})
|
||||
|
||||
local function DelPipe(pipe)
|
||||
for i = #pipe, 1, -1 do
|
||||
pipe[i] = nil
|
||||
end
|
||||
pipe.prev = nil
|
||||
pipe.next = nil
|
||||
|
||||
PipeBin[pipe] = true
|
||||
end
|
||||
|
||||
local function NewPipe()
|
||||
local pipe = next(PipeBin)
|
||||
if pipe then
|
||||
wipe(pipe)
|
||||
PipeBin[pipe] = nil
|
||||
return pipe
|
||||
end
|
||||
@@ -281,12 +281,16 @@ end
|
||||
|
||||
-----------------------------------------------------------------------
|
||||
-- Despooling logic
|
||||
-- Reminder:
|
||||
-- - We have 3 Priorities, each containing a "Ring" construct ...
|
||||
-- - ... made up of N "Pipe"s (1 for each destination/pipename)
|
||||
-- - and each pipe contains messages
|
||||
|
||||
function ChatThrottleLib:Despool(Prio)
|
||||
local ring = Prio.Ring
|
||||
while ring.pos and Prio.avail > ring.pos[1].nSize do
|
||||
local msg = table_remove(Prio.Ring.pos, 1)
|
||||
if not Prio.Ring.pos[1] then
|
||||
local msg = table_remove(ring.pos, 1)
|
||||
if not ring.pos[1] then -- did we remove last msg in this pipe?
|
||||
local pipe = Prio.Ring.pos
|
||||
Prio.Ring:Remove(pipe)
|
||||
Prio.ByName[pipe.name] = nil
|
||||
@@ -294,15 +298,26 @@ function ChatThrottleLib:Despool(Prio)
|
||||
else
|
||||
Prio.Ring.pos = Prio.Ring.pos.next
|
||||
end
|
||||
Prio.avail = Prio.avail - msg.nSize
|
||||
bMyTraffic = true
|
||||
msg.f(unpack(msg, 1, msg.n))
|
||||
bMyTraffic = false
|
||||
Prio.nTotalSent = Prio.nTotalSent + msg.nSize
|
||||
DelMsg(msg)
|
||||
if msg.callbackFn then
|
||||
msg.callbackFn (msg.callbackArg)
|
||||
local didSend=false
|
||||
local lowerDest = strlower(msg[3] or "")
|
||||
if lowerDest == "raid" and not UnitInRaid("player") then
|
||||
-- do nothing
|
||||
elseif lowerDest == "party" and not UnitInParty("player") then
|
||||
-- do nothing
|
||||
else
|
||||
Prio.avail = Prio.avail - msg.nSize
|
||||
bMyTraffic = true
|
||||
msg.f(unpack(msg, 1, msg.n))
|
||||
bMyTraffic = false
|
||||
Prio.nTotalSent = Prio.nTotalSent + msg.nSize
|
||||
DelMsg(msg)
|
||||
didSend = true
|
||||
end
|
||||
-- notify caller of delivery (even if we didn't send it)
|
||||
if msg.callbackFn then
|
||||
msg.callbackFn (msg.callbackArg, didSend)
|
||||
end
|
||||
-- USER CALLBACK MAY ERROR
|
||||
end
|
||||
end
|
||||
|
||||
@@ -374,7 +389,6 @@ end
|
||||
-----------------------------------------------------------------------
|
||||
-- Spooling logic
|
||||
|
||||
|
||||
function ChatThrottleLib:Enqueue(prioname, pipename, msg)
|
||||
local Prio = self.Prio[prioname]
|
||||
local pipe = Prio.ByName[pipename]
|
||||
@@ -391,8 +405,6 @@ function ChatThrottleLib:Enqueue(prioname, pipename, msg)
|
||||
self.bQueueing = true
|
||||
end
|
||||
|
||||
|
||||
|
||||
function ChatThrottleLib:SendChatMessage(prio, prefix, text, chattype, language, destination, queueName, callbackFn, callbackArg)
|
||||
if not self or not prio or not prefix or not text or not self.Prio[prio] then
|
||||
error('Usage: ChatThrottleLib:SendChatMessage("{BULK||NORMAL||ALERT}", "prefix", "text"[, "chattype"[, "language"[, "destination"]]]', 2)
|
||||
@@ -417,8 +429,9 @@ function ChatThrottleLib:SendChatMessage(prio, prefix, text, chattype, languag
|
||||
bMyTraffic = false
|
||||
self.Prio[prio].nTotalSent = self.Prio[prio].nTotalSent + nSize
|
||||
if callbackFn then
|
||||
callbackFn (callbackArg)
|
||||
callbackFn (callbackArg, true)
|
||||
end
|
||||
-- USER CALLBACK MAY ERROR
|
||||
return
|
||||
end
|
||||
|
||||
@@ -469,8 +482,9 @@ function ChatThrottleLib:SendAddonMessage(prio, prefix, text, chattype, target,
|
||||
bMyTraffic = false
|
||||
self.Prio[prio].nTotalSent = self.Prio[prio].nTotalSent + nSize
|
||||
if callbackFn then
|
||||
callbackFn (callbackArg)
|
||||
callbackFn (callbackArg, true)
|
||||
end
|
||||
-- USER CALLBACK MAY ERROR
|
||||
return
|
||||
end
|
||||
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
-- AceTimer supports one-shot timers and repeating timers. All timers are stored in an efficient
|
||||
-- data structure that allows easy dispatching and fast rescheduling. Timers can be registered
|
||||
-- or canceled at any time, even from within a running timer, without conflict or large overhead.\\
|
||||
-- AceTimer is currently limited to firing timers at a frequency of 0.01s. This constant may change
|
||||
-- in the future, but for now it's required as animations with lower frequencies are buggy.
|
||||
-- AceTimer is currently limited to firing timers at a frequency of 0.01s as this is what the WoW timer API
|
||||
-- restricts us to.
|
||||
--
|
||||
-- All `:Schedule` functions will return a handle to the current timer, which you will need to store if you
|
||||
-- need to cancel the timer you just registered.
|
||||
@@ -15,79 +15,63 @@
|
||||
-- make into AceTimer.
|
||||
-- @class file
|
||||
-- @name AceTimer-3.0
|
||||
-- @release $Id: AceTimer-3.0.lua 1079 2013-02-17 19:56:06Z funkydude $
|
||||
-- @release $Id: AceTimer-3.0.lua 1119 2014-10-14 17:23:29Z nevcairiel $
|
||||
|
||||
local MAJOR, MINOR = "AceTimer-3.0", 16 -- Bump minor on changes
|
||||
local MAJOR, MINOR = "AceTimer-3.0", 17 -- Bump minor on changes
|
||||
local AceTimer, oldminor = LibStub:NewLibrary(MAJOR, MINOR)
|
||||
|
||||
if not AceTimer then return end -- No upgrade needed
|
||||
|
||||
AceTimer.frame = AceTimer.frame or CreateFrame("Frame", "AceTimer30Frame") -- Animation parent
|
||||
AceTimer.inactiveTimers = AceTimer.inactiveTimers or {} -- Timer recycling storage
|
||||
AceTimer.activeTimers = AceTimer.activeTimers or {} -- Active timer list
|
||||
AceTimer.activeTimers = AceTimer.activeTimers or {} -- Active timer list
|
||||
local activeTimers = AceTimer.activeTimers -- Upvalue our private data
|
||||
|
||||
-- Lua APIs
|
||||
local type, unpack, next, error, pairs, tostring, select = type, unpack, next, error, pairs, tostring, select
|
||||
|
||||
-- Upvalue our private data
|
||||
local inactiveTimers = AceTimer.inactiveTimers
|
||||
local activeTimers = AceTimer.activeTimers
|
||||
|
||||
local function OnFinished(self)
|
||||
local id = self.id
|
||||
if type(self.func) == "string" then
|
||||
-- We manually set the unpack count to prevent issues with an arg set that contains nil and ends with nil
|
||||
-- e.g. local t = {1, 2, nil, 3, nil} print(#t) will result in 2, instead of 5. This fixes said issue.
|
||||
self.object[self.func](self.object, unpack(self.args, 1, self.argsCount))
|
||||
else
|
||||
self.func(unpack(self.args, 1, self.argsCount))
|
||||
end
|
||||
|
||||
-- If the id is different it means that the timer was already cancelled
|
||||
-- and has been used to create a new timer during the OnFinished callback.
|
||||
if not self.looping and id == self.id then
|
||||
activeTimers[self.id] = nil
|
||||
self.args = nil
|
||||
inactiveTimers[self] = true
|
||||
end
|
||||
end
|
||||
local type, unpack, next, error, select = type, unpack, next, error, select
|
||||
-- WoW APIs
|
||||
local GetTime, C_TimerAfter = GetTime, C_Timer.After
|
||||
|
||||
local function new(self, loop, func, delay, ...)
|
||||
local timer = next(inactiveTimers)
|
||||
if timer then
|
||||
inactiveTimers[timer] = nil
|
||||
else
|
||||
local anim = AceTimer.frame:CreateAnimationGroup()
|
||||
timer = anim:CreateAnimation()
|
||||
timer:SetScript("OnFinished", OnFinished)
|
||||
end
|
||||
|
||||
-- Very low delays cause the animations to fail randomly.
|
||||
-- A limited resolution of 0.01 seems reasonable.
|
||||
if delay < 0.01 then
|
||||
delay = 0.01
|
||||
delay = 0.01 -- Restrict to the lowest time that the C_Timer API allows us
|
||||
end
|
||||
|
||||
local timer = {...}
|
||||
timer.object = self
|
||||
timer.func = func
|
||||
timer.looping = loop
|
||||
timer.args = {...}
|
||||
timer.argsCount = select("#", ...)
|
||||
timer.delay = delay
|
||||
timer.ends = GetTime() + delay
|
||||
|
||||
local anim = timer:GetParent()
|
||||
if loop then
|
||||
anim:SetLooping("REPEAT")
|
||||
else
|
||||
anim:SetLooping("NONE")
|
||||
activeTimers[timer] = timer
|
||||
|
||||
-- Create new timer closure to wrap the "timer" object
|
||||
timer.callback = function()
|
||||
if not timer.cancelled then
|
||||
if type(timer.func) == "string" then
|
||||
-- We manually set the unpack count to prevent issues with an arg set that contains nil and ends with nil
|
||||
-- e.g. local t = {1, 2, nil, 3, nil} print(#t) will result in 2, instead of 5. This fixes said issue.
|
||||
timer.object[timer.func](timer.object, unpack(timer, 1, timer.argsCount))
|
||||
else
|
||||
timer.func(unpack(timer, 1, timer.argsCount))
|
||||
end
|
||||
|
||||
if timer.looping and not timer.cancelled then
|
||||
-- Compensate delay to get a perfect average delay, even if individual times don't match up perfectly
|
||||
-- due to fps differences
|
||||
local time = GetTime()
|
||||
local delay = timer.delay - (time - timer.ends)
|
||||
-- Ensure the delay doesn't go below the threshold
|
||||
if delay < 0.01 then delay = 0.01 end
|
||||
C_TimerAfter(delay, timer.callback)
|
||||
timer.ends = time + delay
|
||||
else
|
||||
activeTimers[timer.handle or timer] = nil
|
||||
end
|
||||
end
|
||||
end
|
||||
timer:SetDuration(delay)
|
||||
|
||||
local id = tostring(timer.args)
|
||||
timer.id = id
|
||||
activeTimers[id] = timer
|
||||
|
||||
anim:Play()
|
||||
return id
|
||||
C_TimerAfter(delay, timer.callback)
|
||||
return timer
|
||||
end
|
||||
|
||||
--- Schedule a new one-shot timer.
|
||||
@@ -160,15 +144,14 @@ end
|
||||
-- @param id The id of the timer, as returned by `:ScheduleTimer` or `:ScheduleRepeatingTimer`
|
||||
function AceTimer:CancelTimer(id)
|
||||
local timer = activeTimers[id]
|
||||
if not timer then return false end
|
||||
|
||||
local anim = timer:GetParent()
|
||||
anim:Stop()
|
||||
|
||||
activeTimers[id] = nil
|
||||
timer.args = nil
|
||||
inactiveTimers[timer] = true
|
||||
return true
|
||||
if not timer then
|
||||
return false
|
||||
else
|
||||
timer.cancelled = true
|
||||
activeTimers[id] = nil
|
||||
return true
|
||||
end
|
||||
end
|
||||
|
||||
--- Cancels all timers registered to the current addon object ('self')
|
||||
@@ -186,15 +169,18 @@ end
|
||||
-- @return The time left on the timer.
|
||||
function AceTimer:TimeLeft(id)
|
||||
local timer = activeTimers[id]
|
||||
if not timer then return 0 end
|
||||
return timer:GetDuration() - timer:GetElapsed()
|
||||
if not timer then
|
||||
return 0
|
||||
else
|
||||
return timer.ends - GetTime()
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
-- ---------------------------------------------------------------------
|
||||
-- Upgrading
|
||||
|
||||
-- Upgrade from old hash-bucket based timers to animation timers
|
||||
-- Upgrade from old hash-bucket based timers to C_Timer.After timers.
|
||||
if oldminor and oldminor < 10 then
|
||||
-- disable old timer logic
|
||||
AceTimer.frame:SetScript("OnUpdate", nil)
|
||||
@@ -204,42 +190,58 @@ if oldminor and oldminor < 10 then
|
||||
for object,timers in pairs(AceTimer.selfs) do
|
||||
for handle,timer in pairs(timers) do
|
||||
if type(timer) == "table" and timer.callback then
|
||||
local id
|
||||
local newTimer
|
||||
if timer.delay then
|
||||
id = AceTimer.ScheduleRepeatingTimer(timer.object, timer.callback, timer.delay, timer.arg)
|
||||
newTimer = AceTimer.ScheduleRepeatingTimer(timer.object, timer.callback, timer.delay, timer.arg)
|
||||
else
|
||||
id = AceTimer.ScheduleTimer(timer.object, timer.callback, timer.when - GetTime(), timer.arg)
|
||||
newTimer = AceTimer.ScheduleTimer(timer.object, timer.callback, timer.when - GetTime(), timer.arg)
|
||||
end
|
||||
-- change id to the old handle
|
||||
local t = activeTimers[id]
|
||||
activeTimers[id] = nil
|
||||
activeTimers[handle] = t
|
||||
t.id = handle
|
||||
-- Use the old handle for old timers
|
||||
activeTimers[newTimer] = nil
|
||||
activeTimers[handle] = newTimer
|
||||
newTimer.handle = handle
|
||||
end
|
||||
end
|
||||
end
|
||||
AceTimer.selfs = nil
|
||||
AceTimer.hash = nil
|
||||
AceTimer.debug = nil
|
||||
elseif oldminor and oldminor < 13 then
|
||||
for handle, id in pairs(AceTimer.hashCompatTable) do
|
||||
local t = activeTimers[id]
|
||||
if t then
|
||||
activeTimers[id] = nil
|
||||
activeTimers[handle] = t
|
||||
t.id = handle
|
||||
elseif oldminor and oldminor < 17 then
|
||||
-- Upgrade from old animation based timers to C_Timer.After timers.
|
||||
AceTimer.inactiveTimers = nil
|
||||
AceTimer.frame = nil
|
||||
local oldTimers = AceTimer.activeTimers
|
||||
-- Clear old timer table and update upvalue
|
||||
AceTimer.activeTimers = {}
|
||||
activeTimers = AceTimer.activeTimers
|
||||
for handle, timer in pairs(oldTimers) do
|
||||
local newTimer
|
||||
-- Stop the old timer animation
|
||||
local duration, elapsed = timer:GetDuration(), timer:GetElapsed()
|
||||
timer:GetParent():Stop()
|
||||
if timer.looping then
|
||||
newTimer = AceTimer.ScheduleRepeatingTimer(timer.object, timer.func, duration, unpack(timer.args, 1, timer.argsCount))
|
||||
else
|
||||
newTimer = AceTimer.ScheduleTimer(timer.object, timer.func, duration - elapsed, unpack(timer.args, 1, timer.argsCount))
|
||||
end
|
||||
-- Use the old handle for old timers
|
||||
activeTimers[newTimer] = nil
|
||||
activeTimers[handle] = newTimer
|
||||
newTimer.handle = handle
|
||||
end
|
||||
AceTimer.hashCompatTable = nil
|
||||
end
|
||||
|
||||
-- upgrade existing timers to the latest OnFinished
|
||||
for timer in pairs(inactiveTimers) do
|
||||
timer:SetScript("OnFinished", OnFinished)
|
||||
end
|
||||
|
||||
for _,timer in pairs(activeTimers) do
|
||||
timer:SetScript("OnFinished", OnFinished)
|
||||
-- Migrate transitional handles
|
||||
if oldminor < 13 and AceTimer.hashCompatTable then
|
||||
for handle, id in pairs(AceTimer.hashCompatTable) do
|
||||
local t = activeTimers[id]
|
||||
if t then
|
||||
activeTimers[id] = nil
|
||||
activeTimers[handle] = t
|
||||
t.handle = handle
|
||||
end
|
||||
end
|
||||
AceTimer.hashCompatTable = nil
|
||||
end
|
||||
end
|
||||
|
||||
-- ---------------------------------------------------------------------
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
--[[ $Id: CallbackHandler-1.0.lua 14 2010-08-09 00:43:38Z mikk $ ]]
|
||||
--[[ $Id: CallbackHandler-1.0.lua 965 2010-08-09 00:47:52Z mikk $ ]]
|
||||
local MAJOR, MINOR = "CallbackHandler-1.0", 6
|
||||
local CallbackHandler = LibStub:NewLibrary(MAJOR, MINOR)
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--[[
|
||||
Name: LibSharedMedia-3.0
|
||||
Revision: $Revision: 69 $
|
||||
Revision: $Revision: 89 $
|
||||
Author: Elkano (elkano@gmx.de)
|
||||
Inspired By: SurfaceLib by Haste/Otravi (troeks@gmail.com)
|
||||
Website: http://www.wowace.com/projects/libsharedmedia-3-0/
|
||||
@@ -9,7 +9,7 @@ Dependencies: LibStub, CallbackHandler-1.0
|
||||
License: LGPL v2.1
|
||||
]]
|
||||
|
||||
local MAJOR, MINOR = "LibSharedMedia-3.0", 4030402 -- increase manualy on changes
|
||||
local MAJOR, MINOR = "LibSharedMedia-3.0", 6000201 -- 6.0.2 v1 / increase manually on changes
|
||||
local lib = LibStub:NewLibrary(MAJOR, MINOR)
|
||||
|
||||
if not lib then return end
|
||||
@@ -60,9 +60,13 @@ lib.MediaType.SOUND = "sound" -- sound files
|
||||
-- BACKGROUND
|
||||
if not lib.MediaTable.background then lib.MediaTable.background = {} end
|
||||
lib.MediaTable.background["None"] = [[]]
|
||||
lib.MediaTable.background["Blizzard Collections Background"] = [[Interface\Collections\CollectionsBackgroundTile]]
|
||||
lib.MediaTable.background["Blizzard Dialog Background"] = [[Interface\DialogFrame\UI-DialogBox-Background]]
|
||||
lib.MediaTable.background["Blizzard Dialog Background Dark"] = [[Interface\DialogFrame\UI-DialogBox-Background-Dark]]
|
||||
lib.MediaTable.background["Blizzard Dialog Background Gold"] = [[Interface\DialogFrame\UI-DialogBox-Gold-Background]]
|
||||
lib.MediaTable.background["Blizzard Garrison Background"] = [[Interface\Garrison\GarrisonUIBackground]]
|
||||
lib.MediaTable.background["Blizzard Garrison Background 2"] = [[Interface\Garrison\GarrisonUIBackground2]]
|
||||
lib.MediaTable.background["Blizzard Garrison Background 3"] = [[Interface\Garrison\GarrisonMissionUIInfoBoxBackgroundTile]]
|
||||
lib.MediaTable.background["Blizzard Low Health"] = [[Interface\FullScreenTextures\LowHealth]]
|
||||
lib.MediaTable.background["Blizzard Marble"] = [[Interface\FrameGeneral\UI-Background-Marble]]
|
||||
lib.MediaTable.background["Blizzard Out of Control"] = [[Interface\FullScreenTextures\OutOfControl]]
|
||||
@@ -88,6 +92,36 @@ lib.DefaultMedia.border = "None"
|
||||
-- FONT
|
||||
if not lib.MediaTable.font then lib.MediaTable.font = {} end
|
||||
local SML_MT_font = lib.MediaTable.font
|
||||
--[[
|
||||
All font files are currently in all clients, the following table depicts which font supports which charset as of 5.0.4
|
||||
Fonts were checked using langcover.pl from DejaVu fonts (http://sourceforge.net/projects/dejavu/) and FontForge (http://fontforge.org/)
|
||||
latin means check for: de, en, es, fr, it, pt
|
||||
|
||||
file name latin koKR ruRU zhCN zhTW
|
||||
2002.ttf 2002 X X X - -
|
||||
2002B.ttf 2002 Bold X X X - -
|
||||
ARHei.ttf AR CrystalzcuheiGBK Demibold X - X X X
|
||||
ARIALN.TTF Arial Narrow X - X - -
|
||||
ARKai_C.ttf AR ZhongkaiGBK Medium (Combat) X - X X X
|
||||
ARKai_T.ttf AR ZhongkaiGBK Medium X - X X X
|
||||
bHEI00M.ttf AR Heiti2 Medium B5 - - - - X
|
||||
bHEI01B.ttf AR Heiti2 Bold B5 - - - - X
|
||||
bKAI00M.ttf AR Kaiti Medium B5 - - - - X
|
||||
bLEI00D.ttf AR Leisu Demi B5 - - - - X
|
||||
FRIZQT__.TTF Friz Quadrata TT X - - - -
|
||||
FRIZQT___CYR.TTF FrizQuadrataCTT x - X - -
|
||||
K_Damage.TTF YDIWingsM - X X - -
|
||||
K_Pagetext.TTF MoK X X X - -
|
||||
MORPHEUS.TTF Morpheus X - - - -
|
||||
MORPHEUS_CYR.TTF Morpheus X - X - -
|
||||
NIM_____.ttf Nimrod MT X - X - -
|
||||
SKURRI.TTF Skurri X - - - -
|
||||
SKURRI_CYR.TTF Skurri X - X - -
|
||||
|
||||
WARNING: Although FRIZQT___CYR is available on western clients, it doesn't support special European characters e.g. é, ï, ö
|
||||
Due to this, we cannot use it as a replacement for FRIZQT__.TTF
|
||||
]]
|
||||
|
||||
if locale == "koKR" then
|
||||
LOCALE_MASK = lib.LOCALE_BIT_koKR
|
||||
--
|
||||
@@ -120,11 +154,17 @@ elseif locale == "zhTW" then
|
||||
elseif locale == "ruRU" then
|
||||
LOCALE_MASK = lib.LOCALE_BIT_ruRU
|
||||
--
|
||||
SML_MT_font["Arial Narrow"] = [[Fonts\ARIALN.TTF]]
|
||||
SML_MT_font["Friz Quadrata TT"] = [[Fonts\FRIZQT__.TTF]]
|
||||
SML_MT_font["Morpheus"] = [[Fonts\MORPHEUS.TTF]]
|
||||
SML_MT_font["Nimrod MT"] = [[Fonts\NIM_____.ttf]]
|
||||
SML_MT_font["Skurri"] = [[Fonts\SKURRI.TTF]]
|
||||
SML_MT_font["2002"] = [[Fonts\2002.TTF]]
|
||||
SML_MT_font["2002 Bold"] = [[Fonts\2002B.TTF]]
|
||||
SML_MT_font["AR CrystalzcuheiGBK Demibold"] = [[Fonts\ARHei.TTF]]
|
||||
SML_MT_font["AR ZhongkaiGBK Medium (Combat)"] = [[Fonts\ARKai_C.TTF]]
|
||||
SML_MT_font["AR ZhongkaiGBK Medium"] = [[Fonts\ARKai_T.TTF]]
|
||||
SML_MT_font["Arial Narrow"] = [[Fonts\ARIALN.TTF]]
|
||||
SML_MT_font["Friz Quadrata TT"] = [[Fonts\FRIZQT___CYR.TTF]]
|
||||
SML_MT_font["MoK"] = [[Fonts\K_Pagetext.TTF]]
|
||||
SML_MT_font["Morpheus"] = [[Fonts\MORPHEUS_CYR.TTF]]
|
||||
SML_MT_font["Nimrod MT"] = [[Fonts\NIM_____.ttf]]
|
||||
SML_MT_font["Skurri"] = [[Fonts\SKURRI_CYR.TTF]]
|
||||
--
|
||||
lib.DefaultMedia.font = "Friz Quadrata TT"
|
||||
--
|
||||
@@ -132,10 +172,17 @@ else
|
||||
LOCALE_MASK = lib.LOCALE_BIT_western
|
||||
locale_is_western = true
|
||||
--
|
||||
SML_MT_font["Arial Narrow"] = [[Fonts\ARIALN.TTF]]
|
||||
SML_MT_font["Friz Quadrata TT"] = [[Fonts\FRIZQT__.TTF]]
|
||||
SML_MT_font["Morpheus"] = [[Fonts\MORPHEUS.TTF]]
|
||||
SML_MT_font["Skurri"] = [[Fonts\SKURRI.TTF]]
|
||||
SML_MT_font["2002"] = [[Fonts\2002.TTF]]
|
||||
SML_MT_font["2002 Bold"] = [[Fonts\2002B.TTF]]
|
||||
SML_MT_font["AR CrystalzcuheiGBK Demibold"] = [[Fonts\ARHei.TTF]]
|
||||
SML_MT_font["AR ZhongkaiGBK Medium (Combat)"] = [[Fonts\ARKai_C.TTF]]
|
||||
SML_MT_font["AR ZhongkaiGBK Medium"] = [[Fonts\ARKai_T.TTF]]
|
||||
SML_MT_font["Arial Narrow"] = [[Fonts\ARIALN.TTF]]
|
||||
SML_MT_font["Friz Quadrata TT"] = [[Fonts\FRIZQT__.TTF]]
|
||||
SML_MT_font["MoK"] = [[Fonts\K_Pagetext.TTF]]
|
||||
SML_MT_font["Morpheus"] = [[Fonts\MORPHEUS_CYR.TTF]]
|
||||
SML_MT_font["Nimrod MT"] = [[Fonts\NIM_____.ttf]]
|
||||
SML_MT_font["Skurri"] = [[Fonts\SKURRI_CYR.TTF]]
|
||||
--
|
||||
lib.DefaultMedia.font = "Friz Quadrata TT"
|
||||
--
|
||||
@@ -145,6 +192,7 @@ end
|
||||
if not lib.MediaTable.statusbar then lib.MediaTable.statusbar = {} end
|
||||
lib.MediaTable.statusbar["Blizzard"] = [[Interface\TargetingFrame\UI-StatusBar]]
|
||||
lib.MediaTable.statusbar["Blizzard Character Skills Bar"] = [[Interface\PaperDollInfoFrame\UI-Character-Skills-Bar]]
|
||||
lib.MediaTable.statusbar["Blizzard Raid Bar"] = [[Interface\RaidFrame\Raid-Bar-Hp-Fill]]
|
||||
lib.DefaultMedia.statusbar = "Blizzard"
|
||||
|
||||
-- SOUND
|
||||
@@ -174,7 +222,7 @@ function lib:Register(mediatype, key, data, langmask)
|
||||
error(MAJOR..":Register(mediatype, key, data, langmask) - key must be string, got "..type(key))
|
||||
end
|
||||
mediatype = mediatype:lower()
|
||||
if mediatype == lib.MediaType.FONT and ((langmask and band(langmask, LOCALE_MASK) == 0) or not (langmask or locale_is_western)) then return false end
|
||||
if mediatype == lib.MediaType.FONT and ((langmask and band(langmask, LOCALE_MASK) == 0) or not (langmask or locale_is_western)) then return false end
|
||||
if not mediaTable[mediatype] then mediaTable[mediatype] = {} end
|
||||
local mtable = mediaTable[mediatype]
|
||||
if mtable[key] then return false end
|
||||
|
||||
@@ -1,22 +1,13 @@
|
||||
-- $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
|
||||
-- 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.")
|
||||
@@ -27,12 +18,6 @@ if not LibStub or LibStub.minor < LIBSTUB_MINOR then
|
||||
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)
|
||||
@@ -40,12 +25,6 @@ if not LibStub or LibStub.minor < LIBSTUB_MINOR then
|
||||
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
|
||||
|
||||
function LibStub:IterateLibraries() return pairs(self.libs) end
|
||||
setmetatable(LibStub, { __call = LibStub.GetLibrary })
|
||||
end
|
||||
|
||||
+22
-24
@@ -492,9 +492,9 @@
|
||||
esta_barra.texto_esquerdo:SetSize (esta_barra:GetWidth() - esta_barra.texto_direita:GetStringWidth() - 20, 15)
|
||||
|
||||
if (colocacao == 1) then
|
||||
esta_barra.statusbar:SetValue (100)
|
||||
esta_barra:SetValue (100)
|
||||
else
|
||||
esta_barra.statusbar:SetValue (tabela [2] / instancia.top * 100)
|
||||
esta_barra:SetValue (tabela [2] / instancia.top * 100)
|
||||
end
|
||||
|
||||
if (esta_barra.hidden or esta_barra.fading_in or esta_barra.faded) then
|
||||
@@ -560,18 +560,18 @@
|
||||
alvos = habilidade.targets
|
||||
end
|
||||
|
||||
local container = actor.debuff_uptime_targets._ActorTable
|
||||
local container = actor.debuff_uptime_targets
|
||||
|
||||
for _, alvo in _ipairs (container) do
|
||||
for target_name, debuff_table in _pairs (container) do
|
||||
if (alvos) then
|
||||
local damage_alvo = alvos [alvo.nome]
|
||||
local damage_alvo = alvos [target_name]
|
||||
if (damage_alvo) then
|
||||
alvo.damage = damage_alvo
|
||||
debuff_table.damage = damage_alvo
|
||||
else
|
||||
alvo.damage = 0
|
||||
debuff_table.damage = 0
|
||||
end
|
||||
else
|
||||
alvo.damage = 0
|
||||
debuff_table.damage = 0
|
||||
end
|
||||
end
|
||||
|
||||
@@ -585,7 +585,7 @@
|
||||
return false;
|
||||
end)
|
||||
|
||||
actor.debuff_uptime_targets:remapear()
|
||||
--actor.debuff_uptime_targets:remapear()
|
||||
|
||||
--> monta o cooltip
|
||||
local GameCooltip = GameCooltip
|
||||
@@ -593,16 +593,16 @@
|
||||
GameCooltip:AddLine (Loc ["STRING_VOIDZONE_TOOLTIP"], nil, nil, headerColor, nil, 12)
|
||||
GameCooltip:AddIcon ([[Interface\Addons\Details\images\icons]], 1, 1, 14, 14, 0.126953125, 0.1796875, 0, 0.0546875)
|
||||
|
||||
for _, alvo in _ipairs (container) do
|
||||
for target_name, debuff_table in _pairs (container) do
|
||||
|
||||
local minutos, segundos = _math_floor (alvo.uptime / 60), _math_floor (alvo.uptime % 60)
|
||||
local minutos, segundos = _math_floor (debuff_table.uptime / 60), _math_floor (debuff_table.uptime % 60)
|
||||
if (minutos > 0) then
|
||||
GameCooltip:AddLine (alvo.nome, FormatTooltipNumber (_, alvo.damage) .. " (" .. minutos .. "m " .. segundos .. "s" .. ")")
|
||||
GameCooltip:AddLine (target_name, FormatTooltipNumber (_, debuff_table.damage) .. " (" .. minutos .. "m " .. segundos .. "s" .. ")")
|
||||
else
|
||||
GameCooltip:AddLine (alvo.nome, FormatTooltipNumber (_, alvo.damage) .. " (" .. segundos .. "s" .. ")")
|
||||
GameCooltip:AddLine (target_name, FormatTooltipNumber (_, debuff_table.damage) .. " (" .. segundos .. "s" .. ")")
|
||||
end
|
||||
|
||||
local classe = _detalhes:GetClass (alvo.nome)
|
||||
local classe = _detalhes:GetClass (target_name)
|
||||
if (classe) then
|
||||
GameCooltip:AddIcon ([[Interface\AddOns\Details\images\classes_small]], nil, nil, 14, 14, unpack (_detalhes.class_coords [classe]))
|
||||
else
|
||||
@@ -670,7 +670,7 @@
|
||||
esta_barra.texto_esquerdo:SetText (colocacao .. ". " .. self.nome)
|
||||
esta_barra.texto_esquerdo:SetSize (esta_barra:GetWidth() - esta_barra.texto_direita:GetStringWidth() - 20, 15)
|
||||
|
||||
esta_barra.statusbar:SetValue (100)
|
||||
esta_barra:SetValue (100)
|
||||
|
||||
if (esta_barra.hidden or esta_barra.fading_in or esta_barra.faded) then
|
||||
gump:Fade (esta_barra, "out")
|
||||
@@ -1121,7 +1121,7 @@ function atributo_damage:RefreshWindow (instancia, tabela_do_combate, forcar, ex
|
||||
row1.texto_esquerdo:SetText (Loc ["STRING_TOTAL"])
|
||||
row1.texto_direita:SetText (_detalhes:ToK2 (total) .. " (" .. _detalhes:ToK (total / combat_time) .. ")")
|
||||
|
||||
row1.statusbar:SetValue (100)
|
||||
row1:SetValue (100)
|
||||
local r, b, g = unpack (instancia.total_bar.color)
|
||||
row1.textura:SetVertexColor (r, b, g)
|
||||
|
||||
@@ -1177,7 +1177,7 @@ function atributo_damage:RefreshWindow (instancia, tabela_do_combate, forcar, ex
|
||||
row1.texto_esquerdo:SetText (Loc ["STRING_TOTAL"])
|
||||
row1.texto_direita:SetText (_detalhes:ToK2 (total) .. " (" .. _detalhes:ToK (total / combat_time) .. ")")
|
||||
|
||||
row1.statusbar:SetValue (100)
|
||||
row1:SetValue (100)
|
||||
local r, b, g = unpack (instancia.total_bar.color)
|
||||
row1.textura:SetVertexColor (r, b, g)
|
||||
|
||||
@@ -1394,7 +1394,7 @@ end
|
||||
--> primeiro colocado
|
||||
if (esta_barra.colocacao == 1) then
|
||||
if (not tabela_anterior or tabela_anterior ~= esta_barra.minha_tabela or forcar) then
|
||||
esta_barra.statusbar:SetValue (100)
|
||||
esta_barra:SetValue (100)
|
||||
|
||||
if (esta_barra.hidden or esta_barra.fading_in or esta_barra.faded) then
|
||||
gump:Fade (esta_barra, "out")
|
||||
@@ -1407,16 +1407,14 @@ end
|
||||
else
|
||||
|
||||
if (esta_barra.hidden or esta_barra.fading_in or esta_barra.faded) then
|
||||
|
||||
--esta_barra.statusbar:SetValue (esta_porcentagem)
|
||||
|
||||
if (use_animations) then
|
||||
esta_barra.animacao_fim = esta_porcentagem
|
||||
else
|
||||
esta_barra.statusbar:SetValue (esta_porcentagem)
|
||||
esta_barra:SetValue (esta_porcentagem)
|
||||
esta_barra.animacao_ignorar = true
|
||||
end
|
||||
|
||||
|
||||
gump:Fade (esta_barra, "out")
|
||||
|
||||
if (instancia.row_info.texture_class_colors) then
|
||||
@@ -1435,7 +1433,7 @@ end
|
||||
if (use_animations) then
|
||||
esta_barra.animacao_fim = esta_porcentagem
|
||||
else
|
||||
esta_barra.statusbar:SetValue (esta_porcentagem)
|
||||
esta_barra:SetValue (esta_porcentagem)
|
||||
esta_barra.animacao_ignorar = true
|
||||
end
|
||||
|
||||
@@ -1448,7 +1446,7 @@ end
|
||||
if (use_animations) then
|
||||
esta_barra.animacao_fim = esta_porcentagem
|
||||
else
|
||||
esta_barra.statusbar:SetValue (esta_porcentagem)
|
||||
esta_barra:SetValue (esta_porcentagem)
|
||||
end
|
||||
esta_barra.last_value = esta_porcentagem
|
||||
|
||||
|
||||
@@ -217,7 +217,7 @@ function atributo_energy:AtualizarResources (qual_barra, colocacao, instancia)
|
||||
esta_barra.texto_esquerdo:SetText (colocacao .. ". " .. self.nome)
|
||||
esta_barra.texto_esquerdo:SetSize (esta_barra:GetWidth() - esta_barra.texto_direita:GetStringWidth() - 20, 15)
|
||||
|
||||
esta_barra.statusbar:SetValue (100)
|
||||
esta_barra:SetValue (100)
|
||||
|
||||
if (esta_barra.hidden or esta_barra.fading_in or esta_barra.faded) then
|
||||
gump:Fade (esta_barra, "out")
|
||||
@@ -489,7 +489,7 @@ function atributo_energy:RefreshWindow (instancia, tabela_do_combate, forcar, ex
|
||||
row1.texto_esquerdo:SetText (Loc ["STRING_TOTAL"])
|
||||
row1.texto_direita:SetText (_detalhes:ToK2 (total) .. " (" .. _detalhes:ToK (total / combat_time) .. ")")
|
||||
|
||||
row1.statusbar:SetValue (100)
|
||||
row1:SetValue (100)
|
||||
local r, b, g = unpack (instancia.total_bar.color)
|
||||
row1.textura:SetVertexColor (r, b, g)
|
||||
|
||||
@@ -545,7 +545,7 @@ function atributo_energy:RefreshWindow (instancia, tabela_do_combate, forcar, ex
|
||||
row1.texto_esquerdo:SetText (Loc ["STRING_TOTAL"])
|
||||
row1.texto_direita:SetText (_detalhes:ToK2 (total) .. " (" .. _detalhes:ToK (total / combat_time) .. ")")
|
||||
|
||||
row1.statusbar:SetValue (100)
|
||||
row1:SetValue (100)
|
||||
local r, b, g = unpack (instancia.total_bar.color)
|
||||
row1.textura:SetVertexColor (r, b, g)
|
||||
|
||||
@@ -654,7 +654,7 @@ function atributo_energy:RefreshBarra2 (esta_barra, instancia, tabela_anterior,
|
||||
--> primeiro colocado
|
||||
if (esta_barra.colocacao == 1) then
|
||||
if (not tabela_anterior or tabela_anterior ~= esta_barra.minha_tabela or forcar) then
|
||||
esta_barra.statusbar:SetValue (100)
|
||||
esta_barra:SetValue (100)
|
||||
|
||||
if (esta_barra.hidden or esta_barra.fading_in or esta_barra.faded) then
|
||||
gump:Fade (esta_barra, "out")
|
||||
@@ -667,13 +667,11 @@ function atributo_energy:RefreshBarra2 (esta_barra, instancia, tabela_anterior,
|
||||
else
|
||||
|
||||
if (esta_barra.hidden or esta_barra.fading_in or esta_barra.faded) then
|
||||
|
||||
--esta_barra.statusbar:SetValue (esta_porcentagem)
|
||||
|
||||
if (use_animations) then
|
||||
esta_barra.animacao_fim = esta_porcentagem
|
||||
else
|
||||
esta_barra.statusbar:SetValue (esta_porcentagem)
|
||||
esta_barra:SetValue (esta_porcentagem)
|
||||
esta_barra.animacao_ignorar = true
|
||||
end
|
||||
|
||||
@@ -695,7 +693,7 @@ function atributo_energy:RefreshBarra2 (esta_barra, instancia, tabela_anterior,
|
||||
if (use_animations) then
|
||||
esta_barra.animacao_fim = esta_porcentagem
|
||||
else
|
||||
esta_barra.statusbar:SetValue (esta_porcentagem)
|
||||
esta_barra:SetValue (esta_porcentagem)
|
||||
esta_barra.animacao_ignorar = true
|
||||
end
|
||||
|
||||
@@ -708,7 +706,7 @@ function atributo_energy:RefreshBarra2 (esta_barra, instancia, tabela_anterior,
|
||||
if (use_animations) then
|
||||
esta_barra.animacao_fim = esta_porcentagem
|
||||
else
|
||||
esta_barra.statusbar:SetValue (esta_porcentagem)
|
||||
esta_barra:SetValue (esta_porcentagem)
|
||||
end
|
||||
esta_barra.last_value = esta_porcentagem
|
||||
|
||||
|
||||
@@ -420,7 +420,7 @@ function atributo_heal:RefreshWindow (instancia, tabela_do_combate, forcar, expo
|
||||
row1.texto_esquerdo:SetText (Loc ["STRING_TOTAL"])
|
||||
row1.texto_direita:SetText (_detalhes:ToK2 (total) .. " (" .. _detalhes:ToK (total / combat_time) .. ")")
|
||||
|
||||
row1.statusbar:SetValue (100)
|
||||
row1:SetValue (100)
|
||||
local r, b, g = unpack (instancia.total_bar.color)
|
||||
row1.textura:SetVertexColor (r, b, g)
|
||||
|
||||
@@ -476,7 +476,7 @@ function atributo_heal:RefreshWindow (instancia, tabela_do_combate, forcar, expo
|
||||
row1.texto_esquerdo:SetText (Loc ["STRING_TOTAL"])
|
||||
row1.texto_direita:SetText (_detalhes:ToK2 (total) .. " (" .. _detalhes:ToK (total / combat_time) .. ")")
|
||||
|
||||
row1.statusbar:SetValue (100)
|
||||
row1:SetValue (100)
|
||||
local r, b, g = unpack (instancia.total_bar.color)
|
||||
row1.textura:SetVertexColor (r, b, g)
|
||||
|
||||
@@ -700,7 +700,7 @@ function atributo_heal:RefreshBarra2 (esta_barra, instancia, tabela_anterior, fo
|
||||
--> primeiro colocado
|
||||
if (esta_barra.colocacao == 1) then
|
||||
if (not tabela_anterior or tabela_anterior ~= esta_barra.minha_tabela or forcar) then
|
||||
esta_barra.statusbar:SetValue (100)
|
||||
esta_barra:SetValue (100)
|
||||
|
||||
if (esta_barra.hidden or esta_barra.fading_in or esta_barra.faded) then
|
||||
gump:Fade (esta_barra, "out")
|
||||
@@ -714,12 +714,10 @@ function atributo_heal:RefreshBarra2 (esta_barra, instancia, tabela_anterior, fo
|
||||
|
||||
if (esta_barra.hidden or esta_barra.fading_in or esta_barra.faded) then
|
||||
|
||||
--esta_barra.statusbar:SetValue (esta_porcentagem)
|
||||
|
||||
if (use_animations) then
|
||||
esta_barra.animacao_fim = esta_porcentagem
|
||||
else
|
||||
esta_barra.statusbar:SetValue (esta_porcentagem)
|
||||
esta_barra:SetValue (esta_porcentagem)
|
||||
esta_barra.animacao_ignorar = true
|
||||
end
|
||||
|
||||
@@ -741,7 +739,7 @@ function atributo_heal:RefreshBarra2 (esta_barra, instancia, tabela_anterior, fo
|
||||
if (use_animations) then
|
||||
esta_barra.animacao_fim = esta_porcentagem
|
||||
else
|
||||
esta_barra.statusbar:SetValue (esta_porcentagem)
|
||||
esta_barra:SetValue (esta_porcentagem)
|
||||
esta_barra.animacao_ignorar = true
|
||||
end
|
||||
|
||||
@@ -754,7 +752,7 @@ function atributo_heal:RefreshBarra2 (esta_barra, instancia, tabela_anterior, fo
|
||||
if (use_animations) then
|
||||
esta_barra.animacao_fim = esta_porcentagem
|
||||
else
|
||||
esta_barra.statusbar:SetValue (esta_porcentagem)
|
||||
esta_barra:SetValue (esta_porcentagem)
|
||||
end
|
||||
esta_barra.last_value = esta_porcentagem
|
||||
|
||||
|
||||
@@ -166,8 +166,16 @@ _detalhes.instance_defaults = {
|
||||
--percent type
|
||||
percent_type = 1,
|
||||
--backdrop
|
||||
backdrop = {enabled = false, size = 12, color = {1, 1, 1, 1}, texture = "Details BarBorder 2"}
|
||||
|
||||
backdrop = {enabled = false, size = 12, color = {1, 1, 1, 1}, texture = "Details BarBorder 2"},
|
||||
--model
|
||||
models = {
|
||||
upper_enabled = false,
|
||||
upper_model = [[Spells\AcidBreath_SuperGreen.M2]],
|
||||
upper_alpha = 0.50,
|
||||
lower_enabled = false,
|
||||
lower_model = [[World\EXPANSION02\DOODADS\Coldarra\COLDARRALOCUS.m2]],
|
||||
lower_alpha = 0.10,
|
||||
},
|
||||
},
|
||||
--instance window color
|
||||
color = {1, 1, 1, 1},
|
||||
|
||||
@@ -459,7 +459,7 @@ function atributo_misc:DeadAtualizarBarra (morte, qual_barra, colocacao, instanc
|
||||
esta_barra.texto_esquerdo:SetText (colocacao .. ". " .. morte [3]:gsub (("%-.*"), ""))
|
||||
esta_barra.texto_direita:SetText (morte [6])
|
||||
|
||||
esta_barra.statusbar:SetValue (100)
|
||||
esta_barra:SetValue (100)
|
||||
if (esta_barra.hidden or esta_barra.fading_in or esta_barra.faded) then
|
||||
gump:Fade (esta_barra, "out")
|
||||
end
|
||||
@@ -772,7 +772,7 @@ function atributo_misc:RefreshBarra2 (esta_barra, instancia, tabela_anterior, fo
|
||||
--> primeiro colocado
|
||||
if (esta_barra.colocacao == 1) then
|
||||
if (not tabela_anterior or tabela_anterior ~= esta_barra.minha_tabela or forcar) then
|
||||
esta_barra.statusbar:SetValue (100)
|
||||
esta_barra:SetValue (100)
|
||||
|
||||
if (esta_barra.hidden or esta_barra.fading_in or esta_barra.faded) then
|
||||
gump:Fade (esta_barra, "out")
|
||||
@@ -785,13 +785,11 @@ function atributo_misc:RefreshBarra2 (esta_barra, instancia, tabela_anterior, fo
|
||||
else
|
||||
|
||||
if (esta_barra.hidden or esta_barra.fading_in or esta_barra.faded) then
|
||||
|
||||
--esta_barra.statusbar:SetValue (esta_porcentagem)
|
||||
|
||||
if (use_animations) then
|
||||
esta_barra.animacao_fim = esta_porcentagem
|
||||
else
|
||||
esta_barra.statusbar:SetValue (esta_porcentagem)
|
||||
esta_barra:SetValue (esta_porcentagem)
|
||||
esta_barra.animacao_ignorar = true
|
||||
end
|
||||
|
||||
@@ -813,7 +811,7 @@ function atributo_misc:RefreshBarra2 (esta_barra, instancia, tabela_anterior, fo
|
||||
if (use_animations) then
|
||||
esta_barra.animacao_fim = esta_porcentagem
|
||||
else
|
||||
esta_barra.statusbar:SetValue (esta_porcentagem)
|
||||
esta_barra:SetValue (esta_porcentagem)
|
||||
esta_barra.animacao_ignorar = true
|
||||
end
|
||||
|
||||
@@ -826,7 +824,7 @@ function atributo_misc:RefreshBarra2 (esta_barra, instancia, tabela_anterior, fo
|
||||
if (use_animations) then
|
||||
esta_barra.animacao_fim = esta_porcentagem
|
||||
else
|
||||
esta_barra.statusbar:SetValue (esta_porcentagem)
|
||||
esta_barra:SetValue (esta_porcentagem)
|
||||
end
|
||||
esta_barra.last_value = esta_porcentagem
|
||||
|
||||
|
||||
+8
-2
@@ -89,6 +89,12 @@
|
||||
-- try get the current encounter name during the encounter
|
||||
|
||||
local boss_found = function (index, name, zone, mapid, diff, encounterid)
|
||||
|
||||
local ejid = EJ_GetCurrentInstance()
|
||||
if (ejid == 0) then
|
||||
ejid = _detalhes:GetInstanceEJID()
|
||||
end
|
||||
|
||||
local boss_table = {
|
||||
index = index,
|
||||
name = name,
|
||||
@@ -97,7 +103,7 @@
|
||||
mapid = mapid,
|
||||
diff = diff,
|
||||
diff_string = select (4, GetInstanceInfo()),
|
||||
ej_instance_id = EJ_GetCurrentInstance(),
|
||||
ej_instance_id = ejid,
|
||||
id = encounterid,
|
||||
}
|
||||
|
||||
@@ -444,7 +450,7 @@
|
||||
_detalhes.tabela_vigente.is_boss.killed = true
|
||||
|
||||
--> add to storage
|
||||
if (not InCombatLockdown() and not UnitAffectingCombat ("player")) then
|
||||
if (not InCombatLockdown() and not UnitAffectingCombat ("player") and not _detalhes.logoff_saving_data) then
|
||||
pcall (_detalhes.StoreEncounter)
|
||||
else
|
||||
_detalhes.schedule_store_boss_encounter = true
|
||||
|
||||
+1
-1
@@ -210,7 +210,7 @@ _detalhes.background_tasks_loop = _detalhes:ScheduleRepeatingTimer ("DoBackgroun
|
||||
local store_instances = {
|
||||
[1205] = true, --Blackrock Foundry
|
||||
[1228] = true, --Highmaul
|
||||
[1136] = true, --SoO
|
||||
--[1136] = true, --SoO
|
||||
}
|
||||
|
||||
function _detalhes:StoreEncounter (combat)
|
||||
|
||||
+253
-187
@@ -172,14 +172,165 @@
|
||||
|
||||
end
|
||||
|
||||
function _detalhes:DoInstanceCleanup()
|
||||
|
||||
--> normal instances
|
||||
for _, esta_instancia in _ipairs (_detalhes.tabela_instancias) do
|
||||
|
||||
if (esta_instancia.StatusBar.left) then
|
||||
esta_instancia.StatusBarSaved = {
|
||||
["left"] = esta_instancia.StatusBar.left.real_name or "NONE",
|
||||
["center"] = esta_instancia.StatusBar.center.real_name or "NONE",
|
||||
["right"] = esta_instancia.StatusBar.right.real_name or "NONE",
|
||||
}
|
||||
esta_instancia.StatusBarSaved.options = {
|
||||
[esta_instancia.StatusBarSaved.left] = esta_instancia.StatusBar.left.options,
|
||||
[esta_instancia.StatusBarSaved.center] = esta_instancia.StatusBar.center.options,
|
||||
[esta_instancia.StatusBarSaved.right] = esta_instancia.StatusBar.right.options
|
||||
}
|
||||
end
|
||||
|
||||
--> erase all widgets frames
|
||||
|
||||
esta_instancia.scroll = nil
|
||||
esta_instancia.baseframe = nil
|
||||
esta_instancia.bgframe = nil
|
||||
esta_instancia.bgdisplay = nil
|
||||
esta_instancia.freeze_icon = nil
|
||||
esta_instancia.freeze_texto = nil
|
||||
esta_instancia.barras = nil
|
||||
esta_instancia.showing = nil
|
||||
esta_instancia.agrupada_a = nil
|
||||
esta_instancia.grupada_pos = nil
|
||||
esta_instancia.agrupado = nil
|
||||
esta_instancia._version = nil
|
||||
|
||||
esta_instancia.h_baixo = nil
|
||||
esta_instancia.h_esquerda = nil
|
||||
esta_instancia.h_direita = nil
|
||||
esta_instancia.h_cima = nil
|
||||
esta_instancia.break_snap_button = nil
|
||||
esta_instancia.alert = nil
|
||||
|
||||
esta_instancia.StatusBar = nil
|
||||
esta_instancia.consolidateFrame = nil
|
||||
esta_instancia.consolidateButtonTexture = nil
|
||||
esta_instancia.consolidateButton = nil
|
||||
esta_instancia.lastIcon = nil
|
||||
esta_instancia.firstIcon = nil
|
||||
|
||||
esta_instancia.menu_attribute_string = nil
|
||||
|
||||
esta_instancia.wait_for_plugin_created = nil
|
||||
esta_instancia.waiting_raid_plugin = nil
|
||||
esta_instancia.waiting_pid = nil
|
||||
|
||||
end
|
||||
|
||||
--> unused instances
|
||||
for _, esta_instancia in _ipairs (_detalhes.unused_instances) do
|
||||
|
||||
if (esta_instancia.StatusBar.left) then
|
||||
esta_instancia.StatusBarSaved = {
|
||||
["left"] = esta_instancia.StatusBar.left.real_name or "NONE",
|
||||
["center"] = esta_instancia.StatusBar.center.real_name or "NONE",
|
||||
["right"] = esta_instancia.StatusBar.right.real_name or "NONE",
|
||||
}
|
||||
esta_instancia.StatusBarSaved.options = {
|
||||
[esta_instancia.StatusBarSaved.left] = esta_instancia.StatusBar.left.options,
|
||||
[esta_instancia.StatusBarSaved.center] = esta_instancia.StatusBar.center.options,
|
||||
[esta_instancia.StatusBarSaved.right] = esta_instancia.StatusBar.right.options
|
||||
}
|
||||
end
|
||||
|
||||
--> erase all widgets frames
|
||||
esta_instancia.scroll = nil
|
||||
esta_instancia.baseframe = nil
|
||||
esta_instancia.bgframe = nil
|
||||
esta_instancia.bgdisplay = nil
|
||||
esta_instancia.freeze_icon = nil
|
||||
esta_instancia.freeze_texto = nil
|
||||
esta_instancia.barras = nil
|
||||
esta_instancia.showing = nil
|
||||
esta_instancia.agrupada_a = nil
|
||||
esta_instancia.grupada_pos = nil
|
||||
esta_instancia.agrupado = nil
|
||||
esta_instancia._version = nil
|
||||
|
||||
esta_instancia.h_baixo = nil
|
||||
esta_instancia.h_esquerda = nil
|
||||
esta_instancia.h_direita = nil
|
||||
esta_instancia.h_cima = nil
|
||||
esta_instancia.break_snap_button = nil
|
||||
esta_instancia.alert = nil
|
||||
|
||||
esta_instancia.StatusBar = nil
|
||||
esta_instancia.consolidateFrame = nil
|
||||
esta_instancia.consolidateButtonTexture = nil
|
||||
esta_instancia.consolidateButton = nil
|
||||
esta_instancia.lastIcon = nil
|
||||
esta_instancia.firstIcon = nil
|
||||
|
||||
esta_instancia.menu_attribute_string = nil
|
||||
|
||||
esta_instancia.wait_for_plugin_created = nil
|
||||
esta_instancia.waiting_raid_plugin = nil
|
||||
esta_instancia.waiting_pid = nil
|
||||
end
|
||||
end
|
||||
|
||||
function _detalhes:DoOwnerCleanup()
|
||||
for index, combat in _ipairs (_detalhes.tabela_historico.tabelas or {}) do
|
||||
for index, container in _ipairs (combat) do
|
||||
for index, esta_classe in _ipairs (container._ActorTable) do
|
||||
esta_classe.owner = nil
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
function _detalhes:DoClassesCleanup()
|
||||
for index, combat in _ipairs (_detalhes.tabela_historico.tabelas or {}) do
|
||||
for class_type, container in _ipairs (combat) do
|
||||
for index, esta_classe in _ipairs (container._ActorTable) do
|
||||
|
||||
esta_classe.displayName = nil
|
||||
esta_classe.minha_barra = nil
|
||||
|
||||
if (class_type == class_type_dano) then
|
||||
_detalhes.clear:c_atributo_damage (esta_classe)
|
||||
elseif (class_type == class_type_cura) then
|
||||
_detalhes.clear:c_atributo_heal (esta_classe)
|
||||
elseif (class_type == class_type_e_energy) then
|
||||
_detalhes.clear:c_atributo_energy (esta_classe)
|
||||
elseif (class_type == class_type_misc) then
|
||||
_detalhes.clear:c_atributo_misc (esta_classe)
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
function _detalhes:DoContainerCleanup()
|
||||
for index, combat in _ipairs (_detalhes.tabela_historico.tabelas or {}) do
|
||||
_detalhes.clear:c_combate (combat)
|
||||
for index, container in _ipairs (combat) do
|
||||
_detalhes.clear:c_container_combatentes (container)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--> limpa indexes, metatables e shadows
|
||||
function _detalhes:PrepareTablesForSave()
|
||||
|
||||
----------------------------//overall
|
||||
|
||||
local tabelas_de_combate = {}
|
||||
--> clear instances
|
||||
_detalhes:DoInstanceCleanup()
|
||||
_detalhes:DoClassesCleanup()
|
||||
_detalhes:DoContainerCleanup()
|
||||
|
||||
--> clear combats
|
||||
local tabelas_de_combate = {}
|
||||
local historico_tabelas = _detalhes.tabela_historico.tabelas or {}
|
||||
|
||||
--> remove os segmentos de trash
|
||||
@@ -199,22 +350,19 @@
|
||||
end
|
||||
end
|
||||
|
||||
--tabela do combate atual
|
||||
--> tabela do combate atual
|
||||
local tabela_atual = _detalhes.tabela_vigente or _detalhes.combate:NovaTabela (_, _detalhes.tabela_overall)
|
||||
|
||||
--limpa a tabela overall
|
||||
--> limpa a tabela overall
|
||||
_detalhes.tabela_overall = nil
|
||||
|
||||
for _, _tabela in _ipairs (historico_tabelas) do
|
||||
tabelas_de_combate [#tabelas_de_combate+1] = _tabela
|
||||
end
|
||||
|
||||
--verifica se a database existe mesmo
|
||||
_detalhes_database = _detalhes_database or {}
|
||||
|
||||
for tabela_index, _combate in _ipairs (tabelas_de_combate) do
|
||||
|
||||
--> limpa a tabela do grafico -- clear graphic table
|
||||
--> limpa a tabela do grafico
|
||||
if (_detalhes.clear_graphic) then
|
||||
_combate.TimeData = {}
|
||||
end
|
||||
@@ -241,142 +389,112 @@
|
||||
local conteudo = _tabela._ActorTable
|
||||
|
||||
--> Limpa tabelas que não estejam em grupo
|
||||
if (conteudo) then
|
||||
|
||||
_detalhes.clear_ungrouped = true
|
||||
|
||||
if (_detalhes.clear_ungrouped) then
|
||||
|
||||
local _iter = {index = 1, data = conteudo[1], cleaned = 0} --> ._ActorTable[1] para pegar o primeiro index
|
||||
_detalhes.clear_ungrouped = true
|
||||
|
||||
if (_detalhes.clear_ungrouped) then
|
||||
|
||||
local _iter = {index = 1, data = conteudo[1], cleaned = 0} --> ._ActorTable[1] para pegar o primeiro index
|
||||
|
||||
while (_iter.data) do --serach key: deletar apagar
|
||||
local can_erase = true
|
||||
|
||||
if (_iter.data.grupo or _iter.data.boss or _iter.data.boss_fight_component or IsBossEncounter) then
|
||||
can_erase = false
|
||||
else
|
||||
local owner = _iter.data.owner
|
||||
if (owner) then
|
||||
local owner_actor = _combate (class_type, owner.nome)
|
||||
if (owner_actor) then
|
||||
if (owner.grupo or owner.boss or owner.boss_fight_component) then
|
||||
can_erase = false
|
||||
while (_iter.data) do --search key: ~deletar ~apagar
|
||||
local can_erase = true
|
||||
|
||||
if (_iter.data.grupo or _iter.data.boss or _iter.data.boss_fight_component or IsBossEncounter) then
|
||||
can_erase = false
|
||||
else
|
||||
local owner = _iter.data.owner
|
||||
if (owner) then
|
||||
local owner_actor = _combate [class_type]._NameIndexTable [owner.nome]
|
||||
if (owner_actor) then
|
||||
local owner_actor = _combate [class_type]._ActorTable [owner_actor]
|
||||
if (owner_actor) then
|
||||
if (owner.grupo or owner.boss or owner.boss_fight_component) then
|
||||
can_erase = false
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
if (can_erase) then
|
||||
|
||||
if (not _iter.data.owner) then --> pet
|
||||
local myself = _iter.data
|
||||
|
||||
if (myself.tipo == class_type_dano or myself.tipo == class_type_cura) then
|
||||
_combate.totals [myself.tipo] = _combate.totals [myself.tipo] - myself.total
|
||||
if (myself.grupo) then
|
||||
_combate.totals_grupo [myself.tipo] = _combate.totals_grupo [myself.tipo] - myself.total
|
||||
end
|
||||
|
||||
elseif (myself.tipo == class_type_e_energy) then
|
||||
_combate.totals [myself.tipo] [myself.powertype] = _combate.totals [myself.tipo] [myself.powertype] - myself.total
|
||||
if (myself.grupo) then
|
||||
_combate.totals_grupo [myself.tipo] [myself.powertype] = _combate.totals_grupo [myself.tipo] [myself.powertype] - myself.total
|
||||
end
|
||||
|
||||
elseif (myself.tipo == class_type_misc) then
|
||||
if (myself.cc_break) then
|
||||
_combate.totals [myself.tipo] ["cc_break"] = _combate.totals [myself.tipo] ["cc_break"] - myself.cc_break
|
||||
if (myself.grupo) then
|
||||
_combate.totals_grupo [myself.tipo] ["cc_break"] = _combate.totals_grupo [myself.tipo] ["cc_break"] - myself.cc_break
|
||||
end
|
||||
end
|
||||
if (myself.ress) then
|
||||
_combate.totals [myself.tipo] ["ress"] = _combate.totals [myself.tipo] ["ress"] - myself.ress
|
||||
if (myself.grupo) then
|
||||
_combate.totals_grupo [myself.tipo] ["ress"] = _combate.totals_grupo [myself.tipo] ["ress"] - myself.ress
|
||||
end
|
||||
end
|
||||
--> não precisa diminuir o total dos buffs e debuffs
|
||||
if (myself.cooldowns_defensive) then
|
||||
_combate.totals [myself.tipo] ["cooldowns_defensive"] = _combate.totals [myself.tipo] ["cooldowns_defensive"] - myself.cooldowns_defensive
|
||||
if (myself.grupo) then
|
||||
_combate.totals_grupo [myself.tipo] ["cooldowns_defensive"] = _combate.totals_grupo [myself.tipo] ["cooldowns_defensive"] - myself.cooldowns_defensive
|
||||
end
|
||||
end
|
||||
if (myself.interrupt) then
|
||||
_combate.totals [myself.tipo] ["interrupt"] = _combate.totals [myself.tipo] ["interrupt"] - myself.interrupt
|
||||
if (myself.grupo) then
|
||||
_combate.totals_grupo [myself.tipo] ["interrupt"] = _combate.totals_grupo [myself.tipo] ["interrupt"] - myself.interrupt
|
||||
end
|
||||
end
|
||||
if (myself.dispell) then
|
||||
_combate.totals [myself.tipo] ["dispell"] = _combate.totals [myself.tipo] ["dispell"] - myself.dispell
|
||||
if (myself.grupo) then
|
||||
_combate.totals_grupo [myself.tipo] ["dispell"] = _combate.totals_grupo [myself.tipo] ["dispell"] - myself.dispell
|
||||
end
|
||||
end
|
||||
if (myself.dead) then
|
||||
_combate.totals [myself.tipo] ["dead"] = _combate.totals [myself.tipo] ["dead"] - myself.dead
|
||||
if (myself.grupo) then
|
||||
_combate.totals_grupo [myself.tipo] ["dead"] = _combate.totals_grupo [myself.tipo] ["dead"] - myself.dead
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
_table_remove (conteudo, _iter.index)
|
||||
_iter.cleaned = _iter.cleaned + 1
|
||||
_iter.data = conteudo [_iter.index]
|
||||
else
|
||||
_iter.index = _iter.index + 1
|
||||
_iter.data = conteudo [_iter.index]
|
||||
end
|
||||
end
|
||||
|
||||
if (can_erase) then
|
||||
|
||||
if (not _iter.data.owner) then --> pet (not a pet?)
|
||||
local myself = _iter.data
|
||||
|
||||
if (myself.tipo == class_type_dano or myself.tipo == class_type_cura) then
|
||||
_combate.totals [myself.tipo] = _combate.totals [myself.tipo] - myself.total
|
||||
if (myself.grupo) then
|
||||
_combate.totals_grupo [myself.tipo] = _combate.totals_grupo [myself.tipo] - myself.total
|
||||
end
|
||||
|
||||
elseif (myself.tipo == class_type_e_energy) then
|
||||
_combate.totals [myself.tipo] [myself.powertype] = _combate.totals [myself.tipo] [myself.powertype] - myself.total
|
||||
if (myself.grupo) then
|
||||
_combate.totals_grupo [myself.tipo] [myself.powertype] = _combate.totals_grupo [myself.tipo] [myself.powertype] - myself.total
|
||||
end
|
||||
|
||||
elseif (myself.tipo == class_type_misc) then
|
||||
if (myself.cc_break) then
|
||||
_combate.totals [myself.tipo] ["cc_break"] = _combate.totals [myself.tipo] ["cc_break"] - myself.cc_break
|
||||
if (myself.grupo) then
|
||||
_combate.totals_grupo [myself.tipo] ["cc_break"] = _combate.totals_grupo [myself.tipo] ["cc_break"] - myself.cc_break
|
||||
end
|
||||
end
|
||||
if (myself.ress) then
|
||||
_combate.totals [myself.tipo] ["ress"] = _combate.totals [myself.tipo] ["ress"] - myself.ress
|
||||
if (myself.grupo) then
|
||||
_combate.totals_grupo [myself.tipo] ["ress"] = _combate.totals_grupo [myself.tipo] ["ress"] - myself.ress
|
||||
end
|
||||
end
|
||||
--> não precisa diminuir o total dos buffs e debuffs
|
||||
if (myself.cooldowns_defensive) then
|
||||
_combate.totals [myself.tipo] ["cooldowns_defensive"] = _combate.totals [myself.tipo] ["cooldowns_defensive"] - myself.cooldowns_defensive
|
||||
if (myself.grupo) then
|
||||
_combate.totals_grupo [myself.tipo] ["cooldowns_defensive"] = _combate.totals_grupo [myself.tipo] ["cooldowns_defensive"] - myself.cooldowns_defensive
|
||||
end
|
||||
end
|
||||
if (myself.interrupt) then
|
||||
_combate.totals [myself.tipo] ["interrupt"] = _combate.totals [myself.tipo] ["interrupt"] - myself.interrupt
|
||||
if (myself.grupo) then
|
||||
_combate.totals_grupo [myself.tipo] ["interrupt"] = _combate.totals_grupo [myself.tipo] ["interrupt"] - myself.interrupt
|
||||
end
|
||||
end
|
||||
if (myself.dispell) then
|
||||
_combate.totals [myself.tipo] ["dispell"] = _combate.totals [myself.tipo] ["dispell"] - myself.dispell
|
||||
if (myself.grupo) then
|
||||
_combate.totals_grupo [myself.tipo] ["dispell"] = _combate.totals_grupo [myself.tipo] ["dispell"] - myself.dispell
|
||||
end
|
||||
end
|
||||
if (myself.dead) then
|
||||
_combate.totals [myself.tipo] ["dead"] = _combate.totals [myself.tipo] ["dead"] - myself.dead
|
||||
if (myself.grupo) then
|
||||
_combate.totals_grupo [myself.tipo] ["dead"] = _combate.totals_grupo [myself.tipo] ["dead"] - myself.dead
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
_table_remove (conteudo, _iter.index)
|
||||
_iter.cleaned = _iter.cleaned + 1
|
||||
_iter.data = conteudo [_iter.index]
|
||||
else
|
||||
_iter.index = _iter.index + 1
|
||||
_iter.data = conteudo [_iter.index]
|
||||
if (_iter.cleaned > 0) then --> desencargo de consciência, reconstruir o mapa depois de excluir
|
||||
ReconstroiMapa (_tabela)
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
if (_iter.cleaned > 0) then --> desencargo de consciência, reconstruir o mapa depois de excluir
|
||||
ReconstroiMapa (_tabela)
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
for _, esta_classe in _ipairs (conteudo) do
|
||||
|
||||
esta_classe.displayName = nil
|
||||
esta_classe.owner = nil
|
||||
|
||||
if (class_type == class_type_dano) then
|
||||
_detalhes.clear:c_atributo_damage (esta_classe)
|
||||
elseif (class_type == class_type_cura) then
|
||||
_detalhes.clear:c_atributo_heal (esta_classe)
|
||||
elseif (class_type == class_type_e_energy) then
|
||||
_detalhes.clear:c_atributo_energy (esta_classe)
|
||||
elseif (class_type == class_type_misc) then
|
||||
_detalhes.clear:c_atributo_misc (esta_classe)
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
--> Clear Containers
|
||||
for tabela_index, _combate in _ipairs (tabelas_de_combate) do
|
||||
local container_dano = _combate [class_type_dano]
|
||||
local container_cura = _combate [class_type_cura]
|
||||
local container_e_energy = _combate [class_type_e_energy]
|
||||
local container_misc = _combate [class_type_misc]
|
||||
|
||||
local todos_atributos = {container_dano, container_cura, container_e_energy, container_misc}
|
||||
|
||||
for class_type, _tabela in _ipairs (todos_atributos) do
|
||||
_detalhes.clear:c_combate (_combate)
|
||||
_detalhes.clear:c_container_combatentes (container_dano)
|
||||
_detalhes.clear:c_container_combatentes (container_cura)
|
||||
_detalhes.clear:c_container_combatentes (container_e_energy)
|
||||
_detalhes.clear:c_container_combatentes (container_misc)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
--> panic mode
|
||||
if (_detalhes.segments_panic_mode and _detalhes.can_panic_mode) then
|
||||
if (_detalhes.tabela_vigente.is_boss) then
|
||||
@@ -384,63 +502,11 @@
|
||||
end
|
||||
end
|
||||
|
||||
--> Limpa instâncias
|
||||
for _, esta_instancia in _ipairs (_detalhes.tabela_instancias) do
|
||||
--> detona a janela do Solo Mode
|
||||
|
||||
if (esta_instancia.StatusBar.left) then
|
||||
esta_instancia.StatusBarSaved = {
|
||||
["left"] = esta_instancia.StatusBar.left.real_name or "NONE",
|
||||
["center"] = esta_instancia.StatusBar.center.real_name or "NONE",
|
||||
["right"] = esta_instancia.StatusBar.right.real_name or "NONE",
|
||||
--["options"] = esta_instancia.StatusBar.options
|
||||
}
|
||||
esta_instancia.StatusBarSaved.options = {
|
||||
[esta_instancia.StatusBarSaved.left] = esta_instancia.StatusBar.left.options,
|
||||
[esta_instancia.StatusBarSaved.center] = esta_instancia.StatusBar.center.options,
|
||||
[esta_instancia.StatusBarSaved.right] = esta_instancia.StatusBar.right.options
|
||||
}
|
||||
end
|
||||
|
||||
--> erase all widgets frames
|
||||
|
||||
esta_instancia.scroll = nil
|
||||
esta_instancia.baseframe = nil
|
||||
esta_instancia.bgframe = nil
|
||||
esta_instancia.bgdisplay = nil
|
||||
esta_instancia.freeze_icon = nil
|
||||
esta_instancia.freeze_texto = nil
|
||||
esta_instancia.barras = nil
|
||||
esta_instancia.showing = nil
|
||||
esta_instancia.agrupada_a = nil
|
||||
esta_instancia.grupada_pos = nil
|
||||
esta_instancia.agrupado = nil
|
||||
esta_instancia._version = nil
|
||||
|
||||
esta_instancia.h_baixo = nil
|
||||
esta_instancia.h_esquerda = nil
|
||||
esta_instancia.h_direita = nil
|
||||
esta_instancia.h_cima = nil
|
||||
esta_instancia.break_snap_button = nil
|
||||
esta_instancia.alert = nil
|
||||
|
||||
esta_instancia.StatusBar = nil
|
||||
esta_instancia.consolidateFrame = nil
|
||||
esta_instancia.consolidateButtonTexture = nil
|
||||
esta_instancia.consolidateButton = nil
|
||||
esta_instancia.lastIcon = nil
|
||||
esta_instancia.firstIcon = nil
|
||||
|
||||
esta_instancia.menu_attribute_string = nil
|
||||
|
||||
esta_instancia.wait_for_plugin_created = nil
|
||||
esta_instancia.waiting_raid_plugin = nil
|
||||
esta_instancia.waiting_pid = nil
|
||||
|
||||
end
|
||||
|
||||
_detalhes.clear:c_atributo_custom()
|
||||
--> clear customs
|
||||
_detalhes.clear:c_atributo_custom()
|
||||
|
||||
--> clear owners
|
||||
_detalhes:DoOwnerCleanup()
|
||||
end
|
||||
|
||||
function _detalhes:reset_window (instancia)
|
||||
|
||||
+58
-39
@@ -2477,6 +2477,10 @@
|
||||
-- ~encounter
|
||||
function _detalhes.parser_functions:ENCOUNTER_START (...)
|
||||
|
||||
if (_detalhes.debug) then
|
||||
_detalhes:Msg ("(debug) ENCOUNTER_START event triggered.")
|
||||
end
|
||||
|
||||
_detalhes.latest_ENCOUNTER_END = _detalhes.latest_ENCOUNTER_END or 0
|
||||
if (_detalhes.latest_ENCOUNTER_END + 10 > _detalhes._tempo) then
|
||||
return
|
||||
@@ -2540,6 +2544,10 @@
|
||||
|
||||
function _detalhes.parser_functions:ENCOUNTER_END (...)
|
||||
|
||||
if (_detalhes.debug) then
|
||||
_detalhes:Msg ("(debug) ENCOUNTER_END event triggered.")
|
||||
end
|
||||
|
||||
local encounterID, encounterName, difficultyID, raidSize, endStatus = _select (1, ...)
|
||||
|
||||
--_detalhes:Msg ("encounter against|cFFFFC000", encounterName, "|rended.")
|
||||
@@ -2653,7 +2661,9 @@
|
||||
end
|
||||
|
||||
if (_detalhes.schedule_store_boss_encounter) then
|
||||
pcall (_detalhes.StoreEncounter)
|
||||
if (not _detalhes.logoff_saving_data) then
|
||||
pcall (_detalhes.StoreEncounter)
|
||||
end
|
||||
_detalhes.schedule_store_boss_encounter = nil
|
||||
end
|
||||
|
||||
@@ -2811,49 +2821,58 @@
|
||||
end
|
||||
|
||||
_detalhes.listener:SetScript ("OnEvent", _detalhes.OnEvent)
|
||||
|
||||
|
||||
--> logout function ~save
|
||||
function _detalhes:PLAYER_LOGOUT (...)
|
||||
|
||||
local saver = CreateFrame ("frame", nil, UIParent)
|
||||
saver:RegisterEvent ("PLAYER_LOGOUT")
|
||||
saver:SetScript ("OnEvent", function (...)
|
||||
|
||||
--> close info window
|
||||
if (_detalhes.FechaJanelaInfo) then
|
||||
_detalhes:FechaJanelaInfo()
|
||||
end
|
||||
|
||||
--> do not save window pos
|
||||
for id, instance in _detalhes:ListInstances() do
|
||||
if (instance.baseframe) then
|
||||
instance.baseframe:SetUserPlaced (false)
|
||||
end
|
||||
end
|
||||
|
||||
--> leave combat start save tables
|
||||
if (_detalhes.in_combat and _detalhes.tabela_vigente) then
|
||||
_detalhes:SairDoCombate()
|
||||
_detalhes.can_panic_mode = true
|
||||
end
|
||||
|
||||
if (_detalhes.CheckSwitchOnLogon and _detalhes.tabela_instancias[1] and getmetatable (_detalhes.tabela_instancias[1])) then
|
||||
_detalhes:CheckSwitchOnLogon()
|
||||
end
|
||||
|
||||
if (_detalhes.wipe_full_config) then
|
||||
_detalhes_global = nil
|
||||
_detalhes_database = nil
|
||||
return
|
||||
end
|
||||
local saver_error = function (errortext)
|
||||
_detalhes_global = _detalhes_global or {}
|
||||
_detalhes_global.exit_errors = _detalhes_global.exit_errors or {}
|
||||
|
||||
--> save the config
|
||||
_detalhes:SaveConfig()
|
||||
_detalhes:SaveProfile()
|
||||
|
||||
--> save the nicktag cache
|
||||
_detalhes_database.nick_tag_cache = table_deepcopy (_detalhes_database.nick_tag_cache)
|
||||
tinsert (_detalhes_global.exit_errors, 1, _detalhes.userversion .. " " .. errortext)
|
||||
tremove (_detalhes_global.exit_errors, 6)
|
||||
end
|
||||
|
||||
local saver = CreateFrame ("frame", "_detalhes_saver_frame", UIParent)
|
||||
saver:RegisterEvent ("PLAYER_LOGOUT")
|
||||
saver:SetScript ("OnEvent", _detalhes.PLAYER_LOGOUT)
|
||||
_detalhes.logoff_saving_data = true
|
||||
|
||||
--> close info window
|
||||
if (_detalhes.FechaJanelaInfo) then
|
||||
xpcall (_detalhes.FechaJanelaInfo, saver_error)
|
||||
end
|
||||
|
||||
--> do not save window pos
|
||||
for id, instance in _detalhes:ListInstances() do
|
||||
if (instance.baseframe) then
|
||||
instance.baseframe:SetUserPlaced (false)
|
||||
end
|
||||
end
|
||||
|
||||
--> leave combat start save tables
|
||||
if (_detalhes.in_combat and _detalhes.tabela_vigente) then
|
||||
xpcall (_detalhes.SairDoCombate, saver_error)
|
||||
_detalhes.can_panic_mode = true
|
||||
end
|
||||
|
||||
if (_detalhes.CheckSwitchOnLogon and _detalhes.tabela_instancias[1] and getmetatable (_detalhes.tabela_instancias[1])) then
|
||||
xpcall (_detalhes.CheckSwitchOnLogon, saver_error)
|
||||
end
|
||||
|
||||
if (_detalhes.wipe_full_config) then
|
||||
_detalhes_global = nil
|
||||
_detalhes_database = nil
|
||||
return
|
||||
end
|
||||
|
||||
--> save the config
|
||||
xpcall (_detalhes.SaveConfig, saver_error)
|
||||
xpcall (_detalhes.SaveProfile, saver_error)
|
||||
|
||||
--> save the nicktag cache
|
||||
_detalhes_database.nick_tag_cache = table_deepcopy (_detalhes_database.nick_tag_cache)
|
||||
end)
|
||||
|
||||
--> end
|
||||
|
||||
|
||||
+8
-6
@@ -16,7 +16,8 @@
|
||||
local _UIParent = UIParent --wow api local
|
||||
|
||||
local gump = _detalhes.gump --details local
|
||||
|
||||
local _
|
||||
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
--> constants
|
||||
|
||||
@@ -74,9 +75,9 @@
|
||||
|
||||
if (v_proxima > v) then
|
||||
if (row.animacao_fim >= v_proxima) then
|
||||
row.statusbar:SetValue (v_proxima)
|
||||
row:SetValue (v_proxima)
|
||||
else
|
||||
row.statusbar:SetValue (row.animacao_fim)
|
||||
row:SetValue (row.animacao_fim)
|
||||
row_proxima.statusbar:SetValue (row.animacao_fim)
|
||||
end
|
||||
end
|
||||
@@ -116,7 +117,7 @@
|
||||
|
||||
function _detalhes:FazerAnimacao_Esquerda (elapsed)
|
||||
self.inicio = self.inicio - 1
|
||||
self.statusbar:SetValue (self.inicio)
|
||||
self:SetValue (self.inicio)
|
||||
if (self.inicio-1 <= self.fim) then
|
||||
self.tem_animacao = false
|
||||
self:SetScript ("OnUpdate", nil)
|
||||
@@ -125,7 +126,7 @@
|
||||
|
||||
function _detalhes:FazerAnimacao_Direita (elapsed)
|
||||
self.inicio = self.inicio + 1
|
||||
self.statusbar:SetValue (self.inicio)
|
||||
self:SetValue (self.inicio)
|
||||
if (self.inicio+1 >= self.fim) then
|
||||
self.tem_animacao = false
|
||||
self:SetScript ("OnUpdate", nil)
|
||||
@@ -894,7 +895,7 @@
|
||||
--GameCooltip:Hide()
|
||||
end
|
||||
|
||||
local reset = gump:NewLabel (panel, _, nil, nil, "|TInterface\\TUTORIALFRAME\\UI-TUTORIAL-FRAME:" .. 20 .. ":" .. 20 .. ":0:1:512:512:8:70:328:409|t " .. Loc ["STRING_OPTIONS_CLASSCOLOR_RESET"])
|
||||
local reset = gump:NewLabel (panel, panel, nil, nil, "|TInterface\\TUTORIALFRAME\\UI-TUTORIAL-FRAME:" .. 20 .. ":" .. 20 .. ":0:1:512:512:8:70:328:409|t " .. Loc ["STRING_OPTIONS_CLASSCOLOR_RESET"])
|
||||
reset:SetPoint ("bottomright", panel, "bottomright", -23, 38)
|
||||
local reset_texture = gump:CreateImage (panel, [[Interface\MONEYFRAME\UI-MONEYFRAME-BORDER]], 138, 45, "border")
|
||||
reset_texture:SetPoint ("center", reset, "center", 0, -7)
|
||||
@@ -2036,6 +2037,7 @@
|
||||
|
||||
--> minimap icon and hotcorner
|
||||
function _detalhes:RegisterMinimap()
|
||||
|
||||
local LDB = LibStub ("LibDataBroker-1.1", true)
|
||||
local LDBIcon = LDB and LibStub ("LibDBIcon-1.0", true)
|
||||
|
||||
|
||||
+28
-8
@@ -381,12 +381,12 @@ local ButtonMetaFunctions = {}
|
||||
end
|
||||
|
||||
-- icon
|
||||
function ButtonMetaFunctions:SetIcon (texture, width, height, layout, texcoord, overlay, textdistance)
|
||||
function ButtonMetaFunctions:SetIcon (texture, width, height, layout, texcoord, overlay, textdistance, leftpadding)
|
||||
if (not self.icon) then
|
||||
self.icon = self:CreateTexture (nil, "artwork")
|
||||
self.icon:SetSize (self.height*0.8, self.height*0.8)
|
||||
self.icon:SetPoint ("left", self.widget, "left", 4, 0)
|
||||
|
||||
self.icon:SetPoint ("left", self.widget, "left", 4 + (leftpadding or 0), 0)
|
||||
self.icon.leftpadding = leftpadding or 0
|
||||
self.widget.text:ClearAllPoints()
|
||||
self.widget.text:SetPoint ("left", self.icon, "right", textdistance or 2, 0)
|
||||
end
|
||||
@@ -479,7 +479,7 @@ local ButtonMetaFunctions = {}
|
||||
end
|
||||
|
||||
--> custom textures
|
||||
function ButtonMetaFunctions:InstallCustomTexture (texture, rect, coords, use_split, side_textures)
|
||||
function ButtonMetaFunctions:InstallCustomTexture (texture, rect, coords, use_split, side_textures, side_textures2)
|
||||
|
||||
self.button:SetNormalTexture (nil)
|
||||
self.button:SetPushedTexture (nil)
|
||||
@@ -548,6 +548,7 @@ local ButtonMetaFunctions = {}
|
||||
left:SetPoint ("left", self.button, 0, 0)
|
||||
left:SetWidth (10)
|
||||
left:SetHeight (self.button:GetHeight()+2)
|
||||
self.button.left_border = left
|
||||
|
||||
local right = self.button:CreateTexture (nil, "overlay")
|
||||
right:SetTexture ([[Interface\TALENTFRAME\talent-main]])
|
||||
@@ -555,6 +556,25 @@ local ButtonMetaFunctions = {}
|
||||
right:SetPoint ("right", self.button, 0, 0)
|
||||
right:SetWidth (10)
|
||||
right:SetHeight (self.button:GetHeight()+2)
|
||||
self.button.right_border = right
|
||||
|
||||
elseif (side_textures2) then
|
||||
|
||||
local left = self.button:CreateTexture (nil, "overlay")
|
||||
left:SetTexture ([[Interface\AddOns\Details\images\icons]])
|
||||
left:SetTexCoord (94/512, 123/512, 42/512, 87/512)
|
||||
left:SetPoint ("left", self.button, 0, 0)
|
||||
left:SetWidth (10)
|
||||
left:SetHeight (self.button:GetHeight()+2)
|
||||
self.button.left_border = left
|
||||
|
||||
local right = self.button:CreateTexture (nil, "overlay")
|
||||
right:SetTexture ([[Interface\AddOns\Details\images\icons]])
|
||||
right:SetTexCoord (65/512, 94/512, 42/512, 87/512)
|
||||
right:SetPoint ("right", self.button, 0, 0)
|
||||
right:SetWidth (10)
|
||||
right:SetHeight (self.button:GetHeight()+2)
|
||||
self.button.right_border = right
|
||||
end
|
||||
end
|
||||
|
||||
@@ -705,7 +725,7 @@ local ButtonMetaFunctions = {}
|
||||
|
||||
if (button.MyObject.capsule_textalign) then
|
||||
if (button.MyObject.icon) then
|
||||
button.MyObject.icon:SetPoint ("left", button, "left", 5, -1)
|
||||
button.MyObject.icon:SetPoint ("left", button, "left", 5 + button.MyObject.icon.leftpadding, -1)
|
||||
elseif (button.MyObject.capsule_textalign == "left") then
|
||||
button.text:SetPoint ("left", button, "left", 3, -1)
|
||||
elseif (button.MyObject.capsule_textalign == "center") then
|
||||
@@ -715,7 +735,7 @@ local ButtonMetaFunctions = {}
|
||||
end
|
||||
else
|
||||
if (button.MyObject.icon) then
|
||||
button.MyObject.icon:SetPoint ("left", button, "left", 7, -2)
|
||||
button.MyObject.icon:SetPoint ("left", button, "left", 7 + button.MyObject.icon.leftpadding, -2)
|
||||
else
|
||||
button.text:SetPoint ("center", button,"center", 1, -1)
|
||||
end
|
||||
@@ -800,7 +820,7 @@ local ButtonMetaFunctions = {}
|
||||
|
||||
if (button.MyObject.capsule_textalign) then
|
||||
if (button.MyObject.icon) then
|
||||
button.MyObject.icon:SetPoint ("left", button, "left", 4, 0)
|
||||
button.MyObject.icon:SetPoint ("left", button, "left", 4 + button.MyObject.icon.leftpadding, 0)
|
||||
elseif (button.MyObject.capsule_textalign == "left") then
|
||||
button.text:SetPoint ("left", button, "left", 2, 0)
|
||||
elseif (button.MyObject.capsule_textalign == "center") then
|
||||
@@ -810,7 +830,7 @@ local ButtonMetaFunctions = {}
|
||||
end
|
||||
else
|
||||
if (button.MyObject.icon) then
|
||||
button.MyObject.icon:SetPoint ("left", button, "left", 4, 0)
|
||||
button.MyObject.icon:SetPoint ("left", button, "left", 4 + button.MyObject.icon.leftpadding, 0)
|
||||
else
|
||||
button.text:SetPoint ("center", button,"center", 0, 0)
|
||||
end
|
||||
|
||||
@@ -1696,7 +1696,7 @@ function DetailsCreateCoolTip()
|
||||
if (not button1) then
|
||||
return "", ""
|
||||
else
|
||||
return button1.leftText:GetText(), button1.rightText:GetText()
|
||||
return button1.leftText:GetText() or "", button1.rightText:GetText() or ""
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@@ -976,7 +976,7 @@ function gump:NewSlider (parent, container, name, member, w, h, min, max, step,
|
||||
end
|
||||
|
||||
if (SliderObject.useDecimals) then
|
||||
SliderObject.amt:SetText (string.format ("%.1f", amt))
|
||||
SliderObject.amt:SetText (string.format ("%.2f", amt))
|
||||
else
|
||||
SliderObject.amt:SetText (math.floor (amt))
|
||||
end
|
||||
|
||||
@@ -198,6 +198,17 @@ do
|
||||
return actors
|
||||
end
|
||||
|
||||
function _detalhes:GetInstanceEJID (mapid)
|
||||
mapid = mapid or select (8, GetInstanceInfo())
|
||||
if (mapid) then
|
||||
local instance_info = _detalhes.EncounterInformation [mapid]
|
||||
if (instance_info) then
|
||||
return instance_info.ej_id or 0
|
||||
end
|
||||
end
|
||||
return 0
|
||||
end
|
||||
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
--> core
|
||||
|
||||
|
||||
@@ -786,6 +786,12 @@ function gump:CriaJanelaInfo()
|
||||
end
|
||||
_detalhes:SetPlayerDetailsWindowTexture ("Interface\\AddOns\\Details\\images\\info_window_background")
|
||||
|
||||
este_gump.bg1_sec_texture = este_gump:CreateTexture (nil, "BORDER")
|
||||
este_gump.bg1_sec_texture:SetDrawLayer ("BORDER", 2)
|
||||
este_gump.bg1_sec_texture:SetPoint ("topleft", este_gump.bg1, "topleft", 348, -86)
|
||||
este_gump.bg1_sec_texture:SetHeight (262)
|
||||
este_gump.bg1_sec_texture:SetWidth (264)
|
||||
|
||||
--> botão de fechar
|
||||
este_gump.fechar = _CreateFrame ("Button", nil, este_gump, "UIPanelCloseButton")
|
||||
este_gump.fechar:SetWidth (32)
|
||||
|
||||
+225
-80
@@ -382,8 +382,8 @@ function _detalhes:OpenOptionsWindow (instance, no_reopen, section)
|
||||
local menus = { --labels nos menus
|
||||
{Loc ["STRING_OPTIONSMENU_DISPLAY"], Loc ["STRING_OPTIONSMENU_COMBAT"], Loc ["STRING_OPTIONSMENU_TOOLTIP"], Loc ["STRING_OPTIONSMENU_DATAFEED"], Loc ["STRING_OPTIONSMENU_PROFILES"]},
|
||||
|
||||
{Loc ["STRING_OPTIONSMENU_SKIN"], Loc ["STRING_OPTIONSMENU_ROWSETTINGS"], Loc ["STRING_OPTIONSMENU_ROWTEXTS"], Loc ["STRING_OPTIONSMENU_SHOWHIDE"],
|
||||
Loc ["STRING_OPTIONSMENU_WINDOW"], Loc ["STRING_OPTIONSMENU_TITLETEXT"], Loc ["STRING_OPTIONSMENU_LEFTMENU"], Loc ["STRING_OPTIONSMENU_RIGHTMENU"],
|
||||
{Loc ["STRING_OPTIONSMENU_SKIN"], Loc ["STRING_OPTIONSMENU_ROWSETTINGS"], Loc ["STRING_OPTIONSMENU_ROWTEXTS"], Loc ["STRING_OPTIONSMENU_ROWMODELS"], Loc ["STRING_OPTIONSMENU_SHOWHIDE"],
|
||||
Loc ["STRING_OPTIONSMENU_WINDOW"], Loc ["STRING_OPTIONSMENU_TITLETEXT"], Loc ["STRING_OPTIONSMENU_LEFTMENU"],
|
||||
Loc ["STRING_OPTIONSMENU_WALLPAPER"], Loc ["STRING_OPTIONSMENU_MISC"]},
|
||||
|
||||
{Loc ["STRING_OPTIONSMENU_RAIDTOOLS"], Loc ["STRING_OPTIONSMENU_PERFORMANCE"], Loc ["STRING_OPTIONSMENU_PLUGINS"], Loc ["STRING_OPTIONSMENU_SPELLS"],
|
||||
@@ -398,7 +398,7 @@ local menus = { --labels nos menus
|
||||
Loc ["STRING_OPTIONSMENU_ROWTEXTS"], --5
|
||||
Loc ["STRING_OPTIONSMENU_WINDOW"], --6
|
||||
Loc ["STRING_OPTIONSMENU_LEFTMENU"], --7
|
||||
Loc ["STRING_OPTIONSMENU_RIGHTMENU"], --8
|
||||
Loc ["STRING_OPTIONSMENU_ROWMODELS"], --8
|
||||
Loc ["STRING_OPTIONSMENU_WALLPAPER"], --9
|
||||
Loc ["STRING_OPTIONSMENU_PERFORMANCE"],--10
|
||||
Loc ["STRING_OPTIONSMENU_RAIDTOOLS"], --11
|
||||
@@ -499,7 +499,7 @@ local menus = { --labels nos menus
|
||||
|
||||
|
||||
--> index dos menus
|
||||
local menus_settings = {1, 2, 20, 19, 13, 3, 4, 5, 17, 6, 14, 7, 8, 9, 18, 11, 10, 12, 15, 16}
|
||||
local menus_settings = {1, 2, 20, 19, 13, 3, 4, 5, 8, 17, 6, 14, 7, 9, 18, 11, 10, 12, 15, 16}
|
||||
|
||||
|
||||
--> create menus
|
||||
@@ -981,6 +981,8 @@ local menus = { --labels nos menus
|
||||
window.right_start_at = 360
|
||||
window.top_start_at = -90
|
||||
|
||||
window.buttons_width = 160
|
||||
|
||||
function window:arrange_menu (frame, t, x, y_start)
|
||||
local y = y_start
|
||||
|
||||
@@ -1260,11 +1262,11 @@ function window:CreateFrame20()
|
||||
local unlock_function = function()
|
||||
DetailsTooltipAnchor:MoveAnchor()
|
||||
end
|
||||
local unlock_anchor_button = g:NewButton (frame20, nil, "$parentUnlockAnchorButton", "UnlockAnchorButton", 160, 20, unlock_function, nil, nil, nil, Loc ["STRING_OPTIONS_TOOLTIPS_ANCHOR_TO_CHOOSE"], 1)
|
||||
unlock_anchor_button:InstallCustomTexture()
|
||||
local unlock_anchor_button = g:NewButton (frame20, nil, "$parentUnlockAnchorButton", "UnlockAnchorButton", window.buttons_width, 18, unlock_function, nil, nil, nil, Loc ["STRING_OPTIONS_TOOLTIPS_ANCHOR_TO_CHOOSE"], 1)
|
||||
unlock_anchor_button:InstallCustomTexture (nil, nil, nil, nil, nil, true)
|
||||
frame20.UnlockAnchorButton:SetTextColor (button_color_rgb)
|
||||
|
||||
frame20.UnlockAnchorButton:SetIcon ([[Interface\COMMON\UI-ModelControlPanel]], nil, nil, nil, {20/64, 34/64, 38/128, 52/128}, nil, 4)
|
||||
frame20.UnlockAnchorButton:SetIcon ([[Interface\COMMON\UI-ModelControlPanel]], nil, nil, nil, {20/64, 34/64, 38/128, 52/128}, nil, 4, 2)
|
||||
|
||||
if (_detalhes.tooltip.anchored_to == 1) then
|
||||
unlock_anchor_button:Disable()
|
||||
@@ -2041,9 +2043,6 @@ function window:CreateFrame18()
|
||||
confirm_button:SetScript ("OnClick", delete_instance)
|
||||
frame18.deleteInstanceButton = confirm_button
|
||||
|
||||
--local confirm_button = g:NewButton (frame18, nil, "$parentDeleteInstanceButton", "deleteInstanceButton", 60, 20, delete_instance, nil, nil, nil, "delete")
|
||||
--confirm_button:InstallCustomTexture()
|
||||
|
||||
--> menu text size
|
||||
g:NewLabel (frame18, _, "$parentMenuTextSizeLabel", "MenuTextSizeLabel", Loc ["STRING_OPTIONS_MENU_FONT_SIZE"], "GameFontHighlightLeft")
|
||||
local s = g:NewSlider (frame18, _, "$parentMenuTextSizeSlider", "MenuTextSizeSlider", SLIDER_WIDTH, 20, 8, 32, 1, _detalhes.font_sizes.menus)
|
||||
@@ -3234,11 +3233,13 @@ function window:CreateFrame1()
|
||||
|
||||
--> persona
|
||||
|
||||
frame1.HaveAvatar = false
|
||||
|
||||
g:NewLabel (frame1, _, "$parentNickNameLabel", "nicknameLabel", Loc ["STRING_OPTIONS_NICKNAME"], "GameFontHighlightLeft")
|
||||
|
||||
local avatar_x_anchor2 = window.right_start_at - 15
|
||||
|
||||
local box = g:NewTextEntry (frame1, _, "$parentNicknameEntry", "nicknameEntry", SLIDER_WIDTH, 20, onPressEnter)
|
||||
--box:SetBackdrop ({bgFile = "Interface\\DialogFrame\\UI-DialogBox-Background", edgeFile = "Interface\\DialogFrame\\UI-DialogBox-Border", tile = true,
|
||||
--edgeSize = 10, tileSize = 16, insets = {left = 1, right = 1, top = 0, bottom = 1}})
|
||||
|
||||
frame1.nicknameEntry:SetPoint ("left", frame1.nicknameLabel, "right", 2, 0)
|
||||
|
||||
@@ -3253,6 +3254,14 @@ function window:CreateFrame1()
|
||||
_G.DetailsOptionsWindow1AvatarPreviewTexture2.MyObject.texcoord = textureBackgroundTexCoord
|
||||
_G.DetailsOptionsWindow1AvatarPreviewTexture2.MyObject:SetVertexColor (unpack (textureBackgroundColor))
|
||||
|
||||
if (not textureAvatar:find ("UI%-EJ%-BOSS%-Default")) then
|
||||
_G.DetailsOptionsWindow1.ChooseAvatarLabel:SetTextColor (1, 0.93, 0.74, 0)
|
||||
_G.DetailsOptionsWindow1.HaveAvatar = true
|
||||
else
|
||||
_G.DetailsOptionsWindow1.ChooseAvatarLabel:SetTextColor (1, 0.93, 0.74)
|
||||
_G.DetailsOptionsWindow1.HaveAvatar = false
|
||||
end
|
||||
|
||||
_G.AvatarPickFrame.callback = nil
|
||||
end
|
||||
|
||||
@@ -3261,14 +3270,11 @@ function window:CreateFrame1()
|
||||
_G.AvatarPickFrame:Show()
|
||||
end
|
||||
|
||||
--g:NewButton (frame1, _, "$parentAvatarFrame", "chooseAvatarButton", frame1.nicknameLabel:GetStringWidth() + SLIDER_WIDTH + 2, 18, openAtavarPickFrame, nil, nil, nil, Loc ["STRING_OPTIONS_AVATAR"], 1)
|
||||
g:NewButton (frame1, _, "$parentAvatarFrame", "chooseAvatarButton", 275, 85, openAtavarPickFrame, nil, nil, nil, "", 1) --
|
||||
frame1.chooseAvatarButton:InstallCustomTexture (nil, nil, nil, true)
|
||||
frame1.chooseAvatarButton:SetTextColor (button_color_rgb)
|
||||
--frame1.chooseAvatarButton:SetIcon ([[Interface\Buttons\UI-Panel-MinimizeButton-Up]], nil, nil, nil, {0.143125, 0.8653125, 0.1446875, 0.8653125})
|
||||
|
||||
g:NewLabel (frame1, _, "$parentChooseAvatarLabel", "ChooseAvatarLabel", Loc ["STRING_OPTIONS_AVATAR"], "GameFontHighlightLeft")
|
||||
frame1.ChooseAvatarLabel:SetPoint ("topright", frame1.chooseAvatarButton, "topright", -10, -10)
|
||||
frame1.ChooseAvatarLabel:SetPoint ("topright", frame1.chooseAvatarButton, "topright", -50, -25)
|
||||
frame1.ChooseAvatarLabel:SetTextColor (button_color_rgb)
|
||||
|
||||
--> avatar preview
|
||||
@@ -3278,7 +3284,9 @@ function window:CreateFrame1()
|
||||
|
||||
--> avatar button
|
||||
frame1.chooseAvatarButton:SetHook ("OnEnter", function()
|
||||
frame1.ChooseAvatarLabel:SetTextColor (1, 1, 1)
|
||||
if (not frame1.HaveAvatar) then
|
||||
frame1.ChooseAvatarLabel:SetTextColor (1, 1, 1)
|
||||
end
|
||||
|
||||
_detalhes:CooltipPreset (2)
|
||||
GameCooltip:AddLine (Loc ["STRING_OPTIONS_AVATAR_DESC"])
|
||||
@@ -3288,25 +3296,26 @@ function window:CreateFrame1()
|
||||
return true
|
||||
end)
|
||||
frame1.chooseAvatarButton:SetHook ("OnLeave", function()
|
||||
frame1.ChooseAvatarLabel:SetTextColor (button_color_rgb)
|
||||
if (not frame1.HaveAvatar) then
|
||||
frame1.ChooseAvatarLabel:SetTextColor (button_color_rgb)
|
||||
end
|
||||
|
||||
GameCooltip:Hide()
|
||||
--frame1.avatarPreview:SetBlendMode ("BLEND")
|
||||
frame1.avatarPreview2:SetBlendMode ("BLEND")
|
||||
return true
|
||||
end)
|
||||
frame1.chooseAvatarButton:SetHook ("OnMouseDown", function()
|
||||
local avatar_x_anchor = window.right_start_at
|
||||
frame1.avatarPreview:SetPoint (avatar_x_anchor+2, -158)
|
||||
frame1.avatarPreview2:SetPoint (avatar_x_anchor+2, -160)
|
||||
frame1.avatarNickname:SetPoint (avatar_x_anchor+110, -192)
|
||||
frame1.ChooseAvatarLabel:SetPoint ("topright", frame1.chooseAvatarButton, "topright", -9, -11)
|
||||
frame1.avatarPreview:SetPoint (avatar_x_anchor2+2, -158)
|
||||
frame1.avatarPreview2:SetPoint (avatar_x_anchor2+2, -160)
|
||||
frame1.avatarNickname:SetPoint (avatar_x_anchor2+110, -192)
|
||||
frame1.ChooseAvatarLabel:SetPoint ("topright", frame1.chooseAvatarButton, "topright", -49, -26)
|
||||
end)
|
||||
frame1.chooseAvatarButton:SetHook ("OnMouseUp", function()
|
||||
local avatar_x_anchor = window.right_start_at
|
||||
frame1.avatarPreview:SetPoint (avatar_x_anchor+1, -157)
|
||||
frame1.avatarPreview2:SetPoint (avatar_x_anchor+1, -159)
|
||||
frame1.avatarNickname:SetPoint (avatar_x_anchor+109, -191)
|
||||
frame1.ChooseAvatarLabel:SetPoint ("topright", frame1.chooseAvatarButton, "topright", -10, -10)
|
||||
frame1.avatarPreview:SetPoint (avatar_x_anchor2+1, -157)
|
||||
frame1.avatarPreview2:SetPoint (avatar_x_anchor2+1, -159)
|
||||
frame1.avatarNickname:SetPoint (avatar_x_anchor2+109, -191)
|
||||
frame1.ChooseAvatarLabel:SetPoint ("topright", frame1.chooseAvatarButton, "topright", -50, -25)
|
||||
end)
|
||||
|
||||
--window:CreateLineBackground2 (frame1, "chooseAvatarButton", "chooseAvatarButton", Loc ["STRING_OPTIONS_AVATAR_DESC"], nil, {1, 0.8, 0}, button_color_rgb)
|
||||
@@ -3453,7 +3462,7 @@ function window:CreateFrame1()
|
||||
|
||||
--> update speed
|
||||
|
||||
local s = g:NewSlider (frame1, _, "$parentSliderUpdateSpeed", "updatespeedSlider", SLIDER_WIDTH, 20, 0.050, 3, 0.050, _detalhes.update_speed, true)
|
||||
local s = g:NewSlider (frame1, _, "$parentSliderUpdateSpeed", "updatespeedSlider", SLIDER_WIDTH, 20, 0.05, 3, 0.05, _detalhes.update_speed, true)
|
||||
s:SetBackdrop (slider_backdrop)
|
||||
s:SetBackdropColor (unpack (slider_backdrop_color))
|
||||
|
||||
@@ -3482,38 +3491,41 @@ function window:CreateFrame1()
|
||||
|
||||
--> window controls
|
||||
|
||||
local buttons_width = 160
|
||||
|
||||
|
||||
--lock unlock
|
||||
g:NewButton (frame1, _, "$parentLockButton", "LockButton", buttons_width, 18, _detalhes.lock_instance_function, nil, nil, nil, Loc ["STRING_OPTIONS_WC_LOCK"], 1)
|
||||
frame1.LockButton:InstallCustomTexture()
|
||||
g:NewButton (frame1, _, "$parentLockButton", "LockButton", window.buttons_width, 18, _detalhes.lock_instance_function, nil, nil, nil, Loc ["STRING_OPTIONS_WC_LOCK"], 1)
|
||||
frame1.LockButton:InstallCustomTexture (nil, nil, nil, nil, nil, true)
|
||||
|
||||
window:CreateLineBackground2 (frame1, "LockButton", "LockButton", Loc ["STRING_OPTIONS_WC_LOCK_DESC"], nil, {1, 0.8, 0}, button_color_rgb)
|
||||
|
||||
frame1.LockButton:SetIcon ([[Interface\PetBattles\PetBattle-LockIcon]], nil, nil, nil, {0.0703125, 0.9453125, 0.0546875, 0.9453125})
|
||||
frame1.LockButton:SetIcon ([[Interface\PetBattles\PetBattle-LockIcon]], nil, nil, nil, {0.0703125, 0.9453125, 0.0546875, 0.9453125}, nil, nil, 2)
|
||||
frame1.LockButton:SetTextColor (button_color_rgb)
|
||||
|
||||
--break snap
|
||||
g:NewButton (frame1, _, "$parentBreakSnapButton", "BreakSnapButton", buttons_width, 18, _G.DetailsOptionsWindow.instance.Desagrupar, -1, nil, nil, Loc ["STRING_OPTIONS_WC_UNSNAP"], 1)
|
||||
frame1.BreakSnapButton:InstallCustomTexture()
|
||||
g:NewButton (frame1, _, "$parentBreakSnapButton", "BreakSnapButton", window.buttons_width, 18, _G.DetailsOptionsWindow.instance.Desagrupar, -1, nil, nil, Loc ["STRING_OPTIONS_WC_UNSNAP"], 1)
|
||||
frame1.BreakSnapButton:InstallCustomTexture (nil, nil, nil, nil, nil, true)
|
||||
|
||||
window:CreateLineBackground2 (frame1, "BreakSnapButton", "BreakSnapButton", Loc ["STRING_OPTIONS_WC_UNSNAP_DESC"], nil, {1, 0.8, 0}, button_color_rgb)
|
||||
|
||||
frame1.BreakSnapButton:SetIcon ([[Interface\AddOns\Details\images\icons]], nil, nil, nil, {160/512, 179/512, 142/512, 162/512})
|
||||
frame1.BreakSnapButton:SetIcon ([[Interface\AddOns\Details\images\icons]], nil, nil, nil, {160/512, 179/512, 142/512, 162/512}, nil, nil, 2)
|
||||
frame1.BreakSnapButton:SetTextColor (button_color_rgb)
|
||||
|
||||
--close
|
||||
g:NewButton (frame1, _, "$parentCloseButton", "CloseButton", buttons_width, 18, _detalhes.close_instancia_func, _G.DetailsOptionsWindow.instance, nil, nil, Loc ["STRING_OPTIONS_WC_CLOSE"], 1)
|
||||
frame1.CloseButton:InstallCustomTexture()
|
||||
g:NewButton (frame1, _, "$parentCloseButton", "CloseButton", window.buttons_width, 18, _detalhes.close_instancia_func, _G.DetailsOptionsWindow.instance, nil, nil, Loc ["STRING_OPTIONS_WC_CLOSE"], 1)
|
||||
frame1.CloseButton:InstallCustomTexture (nil, nil, nil, nil, nil, true)
|
||||
window:CreateLineBackground2 (frame1, "CloseButton", "CloseButton", Loc ["STRING_OPTIONS_WC_CLOSE_DESC"], nil, {1, 0.8, 0}, button_color_rgb)
|
||||
|
||||
frame1.CloseButton:SetIcon ([[Interface\Buttons\UI-Panel-MinimizeButton-Up]], nil, nil, nil, {0.143125, 0.8653125, 0.1446875, 0.8653125})
|
||||
frame1.CloseButton:SetIcon ([[Interface\Buttons\UI-Panel-MinimizeButton-Up]], nil, nil, nil, {0.143125, 0.8653125, 0.1446875, 0.8653125}, nil, nil, 2)
|
||||
frame1.CloseButton:SetTextColor (button_color_rgb)
|
||||
|
||||
--create
|
||||
g:NewButton (frame1, _, "$parentCreateWindowButton", "CreateWindowButton", buttons_width, 18, function() _detalhes.CriarInstancia (nil, nil, true) end, nil, nil, nil, Loc ["STRING_OPTIONS_WC_CREATE"], 1)
|
||||
frame1.CreateWindowButton:InstallCustomTexture()
|
||||
g:NewButton (frame1, _, "$parentCreateWindowButton", "CreateWindowButton", window.buttons_width, 18, function() _detalhes.CriarInstancia (nil, nil, true) end, nil, nil, nil, Loc ["STRING_OPTIONS_WC_CREATE"], 1)
|
||||
frame1.CreateWindowButton:InstallCustomTexture (nil, nil, nil, nil, nil, true)
|
||||
|
||||
window:CreateLineBackground2 (frame1, "CreateWindowButton", "CreateWindowButton", Loc ["STRING_OPTIONS_WC_CREATE_DESC"], nil, {1, 0.8, 0}, button_color_rgb)
|
||||
|
||||
frame1.CreateWindowButton:SetIcon ([[Interface\Buttons\UI-AttributeButton-Encourage-Up]])
|
||||
frame1.CreateWindowButton:SetIcon ([[Interface\Buttons\UI-AttributeButton-Encourage-Up]], nil, nil, nil, nil, nil, nil, 2)
|
||||
frame1.CreateWindowButton:SetTextColor (button_color_rgb)
|
||||
|
||||
--set color
|
||||
@@ -3531,11 +3543,12 @@ function window:CreateFrame1()
|
||||
_detalhes.gump:ColorPick (_G.DetailsOptionsWindow1SetWindowColorButton, r, g, b, a, windowcolor_callback)
|
||||
end
|
||||
|
||||
g:NewButton (frame1, _, "$parentSetWindowColorButton", "SetWindowColorButton", buttons_width, 18, change_color, nil, nil, nil, "Change Color", 1)
|
||||
frame1.SetWindowColorButton:InstallCustomTexture()
|
||||
g:NewButton (frame1, _, "$parentSetWindowColorButton", "SetWindowColorButton", window.buttons_width, 18, change_color, nil, nil, nil, "Change Color", 1)
|
||||
frame1.SetWindowColorButton:InstallCustomTexture (nil, nil, nil, nil, nil, true)
|
||||
|
||||
window:CreateLineBackground2 (frame1, "SetWindowColorButton", "SetWindowColorButton", "Shortcut to modify the window color.\nFor more options check out |cFFFFFF00Window Settings|r section.", nil, {1, 0.8, 0}, button_color_rgb)
|
||||
|
||||
frame1.SetWindowColorButton:SetIcon ([[Interface\AddOns\Details\images\icons]], nil, nil, nil, {0.640625, 0.6875, 0.630859375, 0.677734375})
|
||||
frame1.SetWindowColorButton:SetIcon ([[Interface\AddOns\Details\images\icons]], 10, 10, nil, {0.640625, 0.6875, 0.630859375, 0.677734375}, nil, nil, 4)
|
||||
frame1.SetWindowColorButton:SetTextColor (button_color_rgb)
|
||||
|
||||
--erase data
|
||||
@@ -3566,19 +3579,19 @@ function window:CreateFrame1()
|
||||
|
||||
|
||||
--config bookmarks
|
||||
g:NewButton (frame1, _, "$parentBookmarkButton", "BookmarkButton", buttons_width, 18, _detalhes.OpenBookmarkConfig, nil, nil, nil, Loc ["STRING_OPTIONS_WC_BOOKMARK"], 1)
|
||||
frame1.BookmarkButton:InstallCustomTexture()
|
||||
g:NewButton (frame1, _, "$parentBookmarkButton", "BookmarkButton", window.buttons_width, 18, _detalhes.OpenBookmarkConfig, nil, nil, nil, Loc ["STRING_OPTIONS_WC_BOOKMARK"], 1)
|
||||
frame1.BookmarkButton:InstallCustomTexture (nil, nil, nil, nil, nil, true)
|
||||
window:CreateLineBackground2 (frame1, "BookmarkButton", "BookmarkButton", Loc ["STRING_OPTIONS_WC_BOOKMARK_DESC"], nil, {1, 0.8, 0}, button_color_rgb)
|
||||
|
||||
frame1.BookmarkButton:SetIcon ([[Interface\Glues\CharacterSelect\Glues-AddOn-Icons]], nil, nil, nil, {0.75, 1, 0, 1})
|
||||
frame1.BookmarkButton:SetIcon ([[Interface\Glues\CharacterSelect\Glues-AddOn-Icons]], nil, nil, nil, {0.75, 1, 0, 1}, nil, nil, 2)
|
||||
frame1.BookmarkButton:SetTextColor (button_color_rgb)
|
||||
|
||||
--config class colors
|
||||
g:NewButton (frame1, _, "$parentClassColorsButton", "ClassColorsButton", buttons_width, 18, _detalhes.OpenClassColorsConfig, nil, nil, nil, Loc ["STRING_OPTIONS_CHANGE_CLASSCOLORS"], 1)
|
||||
frame1.ClassColorsButton:InstallCustomTexture()
|
||||
g:NewButton (frame1, _, "$parentClassColorsButton", "ClassColorsButton", window.buttons_width, 18, _detalhes.OpenClassColorsConfig, nil, nil, nil, Loc ["STRING_OPTIONS_CHANGE_CLASSCOLORS"], 1)
|
||||
frame1.ClassColorsButton:InstallCustomTexture (nil, nil, nil, nil, nil, true)
|
||||
window:CreateLineBackground2 (frame1, "ClassColorsButton", "ClassColorsButton", Loc ["STRING_OPTIONS_CHANGE_CLASSCOLORS_DESC"], nil, {1, 0.8, 0}, button_color_rgb)
|
||||
|
||||
frame1.ClassColorsButton:SetIcon ([[Interface\AddOns\Details\images\icons]], nil, nil, nil, {430/512, 459/512, 4/512, 30/512}) -- , "orange"
|
||||
frame1.ClassColorsButton:SetIcon ([[Interface\AddOns\Details\images\icons]], nil, nil, nil, {430/512, 459/512, 4/512, 30/512}, nil, nil, 2) -- , "orange"
|
||||
frame1.ClassColorsButton:SetTextColor (button_color_rgb)
|
||||
|
||||
--> anchors
|
||||
@@ -3601,9 +3614,9 @@ function window:CreateFrame1()
|
||||
frame1.nicknameLabel:SetPoint (avatar_x_anchor, -115)
|
||||
frame1.chooseAvatarButton:SetPoint (avatar_x_anchor+1, -140)
|
||||
|
||||
frame1.avatarPreview:SetPoint (avatar_x_anchor+1, -157)
|
||||
frame1.avatarPreview2:SetPoint (avatar_x_anchor+1, -159)
|
||||
frame1.avatarNickname:SetPoint (avatar_x_anchor+109, -191)
|
||||
frame1.avatarPreview:SetPoint (avatar_x_anchor2+1, -157)
|
||||
frame1.avatarPreview2:SetPoint (avatar_x_anchor2+1, -159)
|
||||
frame1.avatarNickname:SetPoint (avatar_x_anchor2+109, -191)
|
||||
|
||||
frame1.realmNameLabel:SetPoint (avatar_x_anchor, -235)
|
||||
|
||||
@@ -4147,9 +4160,9 @@ function window:CreateFrame13()
|
||||
_detalhes:ScheduleTimer ("RefreshOptionsAfterProfileReset", 1)
|
||||
end
|
||||
|
||||
local profile_reset_button = g:NewButton (frame13, _, "$parentProfileResetButton", "profileResetButton", 128, 19, reset_profile, nil, nil, nil, Loc ["STRING_OPTIONS_PROFILES_RESET"])
|
||||
profile_reset_button:InstallCustomTexture()
|
||||
frame13.profileResetButton:SetIcon ([[Interface\Buttons\UI-RefreshButton]], 14, 14, nil, {0, 1, 0, 1}, nil, 4)
|
||||
local profile_reset_button = g:NewButton (frame13, _, "$parentProfileResetButton", "profileResetButton", window.buttons_width, 18, reset_profile, nil, nil, nil, Loc ["STRING_OPTIONS_PROFILES_RESET"])
|
||||
profile_reset_button:InstallCustomTexture (nil, nil, nil, nil, nil, true)
|
||||
frame13.profileResetButton:SetIcon ([[Interface\Buttons\UI-RefreshButton]], 14, 14, nil, {0, 1, 0, 0.9375}, nil, 4, 2)
|
||||
frame13.profileResetButton:SetTextColor (button_color_rgb)
|
||||
|
||||
local hiddenlabel = g:NewLabel (frame13, _, "$parentProfileResetButtonLabel", "profileResetButtonLabel", "", "GameFontHighlightLeft")
|
||||
@@ -4380,7 +4393,7 @@ function window:CreateFrame3()
|
||||
g:NewTextEntry (frame3, _, "$parentSaveStyleName", "saveStyleName", 120, 20)
|
||||
g:NewLabel (frame3, _, "$parentSaveSkinLabel", "saveSkinLabel", Loc ["STRING_OPTIONS_SAVELOAD_PNAME"], "GameFontHighlightLeft")
|
||||
frame3.saveStyleName:SetPoint ("left", frame3.saveSkinLabel, "right", 2)
|
||||
g:NewButton (frame3, _, "$parentSaveStyleButton", "saveStyle", 50, 19, saveStyleFunc, nil, nil, nil, Loc ["STRING_OPTIONS_SAVELOAD_SAVE"])
|
||||
g:NewButton (frame3, _, "$parentSaveStyleButton", "saveStyle", 50, 18, saveStyleFunc, nil, nil, nil, Loc ["STRING_OPTIONS_SAVELOAD_SAVE"])
|
||||
frame3.saveStyle:InstallCustomTexture()
|
||||
|
||||
window:CreateLineBackground2 (frame3, "saveStyleName", "saveSkinLabel", Loc ["STRING_OPTIONS_SAVELOAD_CREATE_DESC"])
|
||||
@@ -4419,18 +4432,18 @@ function window:CreateFrame3()
|
||||
g:NewLabel (frame3, _, "$parentmakeDefaultLabel", "makeDefaultLabel", "", "GameFontHighlightLeft")
|
||||
|
||||
g:NewButton (frame3, _, "$parentToAllStyleButton", "applyToAll", 160, 18, applyToAll, nil, nil, nil, Loc ["STRING_OPTIONS_SAVELOAD_APPLYTOALL"], 1)
|
||||
frame3.applyToAll:InstallCustomTexture()
|
||||
frame3.applyToAll:InstallCustomTexture (nil, nil, nil, nil, nil, true)
|
||||
window:CreateLineBackground2 (frame3, "applyToAll", "applyToAll", Loc ["STRING_OPTIONS_SAVELOAD_APPLYALL_DESC"], nil, {1, 0.8, 0}, button_color_rgb)
|
||||
|
||||
g:NewButton (frame3, _, "$parentMakeDefaultButton", "makeDefault", 160, 18, makeDefault, nil, nil, nil, Loc ["STRING_OPTIONS_SAVELOAD_MAKEDEFAULT"])
|
||||
frame3.makeDefault:InstallCustomTexture()
|
||||
frame3.makeDefault:InstallCustomTexture (nil, nil, nil, nil, nil, true)
|
||||
window:CreateLineBackground2 (frame3, "makeDefault", "makeDefault", Loc ["STRING_OPTIONS_SAVELOAD_STD_DESC"], nil, {1, 0.8, 0}, button_color_rgb)
|
||||
|
||||
frame3.toAllStyleLabel:SetPoint ("left", frame3.applyToAll, "left")
|
||||
frame3.makeDefaultLabel:SetPoint ("left", frame3.makeDefault, "left")
|
||||
|
||||
frame3.makeDefault:SetIcon ([[Interface\Buttons\UI-CheckBox-Check]], 14, 14, nil, {4/32, 28/32, 4/32, 28/32}, "yellow", 4)
|
||||
frame3.applyToAll:SetIcon ([[Interface\Buttons\UI-HomeButton]], 14, 14, nil, {1/16, 14/16, 0, 1}, nil, 4)
|
||||
frame3.makeDefault:SetIcon ([[Interface\Buttons\UI-CheckBox-Check]], 14, 14, nil, {4/32, 28/32, 4/32, 28/32}, "yellow", 4, 2)
|
||||
frame3.applyToAll:SetIcon ([[Interface\Buttons\UI-HomeButton]], 14, 14, nil, {1/16, 14/16, 0, 1}, nil, 4, 2)
|
||||
frame3.makeDefault:SetTextColor (button_color_rgb)
|
||||
frame3.applyToAll:SetTextColor (button_color_rgb)
|
||||
|
||||
@@ -4601,8 +4614,8 @@ function window:CreateFrame3()
|
||||
end
|
||||
|
||||
g:NewButton (frame3, _, "$parentImportButton", "ImportButton", 160, 18, import_saved, nil, nil, nil, Loc ["STRING_OPTIONS_SAVELOAD_IMPORT"])
|
||||
frame3.ImportButton:InstallCustomTexture()
|
||||
frame3.ImportButton:SetIcon ([[Interface\Buttons\UI-GuildButton-PublicNote-Up]], 14, 14, nil, nil, nil, 4)
|
||||
frame3.ImportButton:InstallCustomTexture (nil, nil, nil, nil, nil, true)
|
||||
frame3.ImportButton:SetIcon ([[Interface\Buttons\UI-GuildButton-PublicNote-Up]], 14, 14, nil, nil, nil, 4, 2)
|
||||
frame3.ImportButton:SetTextColor (button_color_rgb)
|
||||
|
||||
g:NewLabel (frame3, _, "$parentImportLabel", "ImportLabel", "", "GameFontHighlightLeft")
|
||||
@@ -6210,17 +6223,133 @@ function window:CreateFrame7()
|
||||
end
|
||||
|
||||
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
-- Appearance - Reset Instance Close ~8
|
||||
-- Appearance - Rows: Advanced ~8
|
||||
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
function window:CreateFrame8()
|
||||
|
||||
local frame8 = window.options [8][1]
|
||||
|
||||
local titulo_toolbar2 = g:NewLabel (frame8, _, "$parentTituloToolbar_buttons", "tituloToolbarLabel", "-- x -- x --", "GameFontNormal", 16)
|
||||
local titulo_toolbar2_desc = g:NewLabel (frame8, _, "$parentTituloToolbar_buttons", "tituloToolbar2Label", "-- x -- x --", "GameFontNormal", 9, "white")
|
||||
titulo_toolbar2_desc.width = 320
|
||||
local titulo_toolbar = g:NewLabel (frame8, _, "$parentTituloToolbar_buttons", "tituloToolbarLabel", Loc ["STRING_OPTIONS_ROWADV_TITLE"], "GameFontNormal", 16)
|
||||
local titulo_toolbar_desc = g:NewLabel (frame8, _, "$parentTituloToolbar_buttons", "tituloToolbar2Label", Loc ["STRING_OPTIONS_ROWADV_TITLE_DESC"], "GameFontNormal", 9, "white")
|
||||
titulo_toolbar_desc.width = 320
|
||||
|
||||
--> models
|
||||
--> anchor
|
||||
g:NewLabel (frame8, _, "$parentModelUpperAnchor", "ModelUpperAnchor", Loc ["STRING_OPTIONS_3D_UANCHOR"], "GameFontNormal")
|
||||
g:NewLabel (frame8, _, "$parentModelLowerAnchor", "ModelLowerAnchor", Loc ["STRING_OPTIONS_3D_LANCHOR"], "GameFontNormal")
|
||||
|
||||
--> upper model enabled
|
||||
g:NewLabel (frame8, _, "$parentModelUpperEnabledLabel", "ModelUpperEnabledLabel", Loc ["STRING_OPTIONS_3D_ENABLED"], "GameFontHighlightLeft")
|
||||
g:NewSwitch (frame8, _, "$parentModelUpperEnabledSlider", "ModelUpperEnabledSlider", 60, 20, _, _, _G.DetailsOptionsWindow.instance.row_info.models.upper_enabled)
|
||||
frame8.ModelUpperEnabledSlider:SetPoint ("left", frame8.ModelUpperEnabledLabel, "right", 2, -1)
|
||||
frame8.ModelUpperEnabledSlider.OnSwitch = function (self, instance, value)
|
||||
instance:SetBarModel (value)
|
||||
end
|
||||
window:CreateLineBackground2 (frame8, "ModelUpperEnabledSlider", "ModelUpperEnabledLabel", Loc ["STRING_OPTIONS_3D_UENABLED_DESC"])
|
||||
|
||||
--> upper model texture
|
||||
|
||||
local select_upper_model_callback = function (model)
|
||||
_G.DetailsOptionsWindow.instance:SetBarModel (nil, model)
|
||||
end
|
||||
local select_lower_model_callback = function (model)
|
||||
_G.DetailsOptionsWindow.instance:SetBarModel (nil, nil, nil, nil, model)
|
||||
end
|
||||
|
||||
local select_model = function (is_upper)
|
||||
if (not IsAddOnLoaded ("Details_3DModelsPaths")) then
|
||||
local loaded, reason = LoadAddOn ("Details_3DModelsPaths")
|
||||
if (not loaded) then
|
||||
return _detalhes:Msg ("Failed to load Details_3DModelsPaths addon.")
|
||||
end
|
||||
_G.Lib3DModelList:Embed (_detalhes)
|
||||
end
|
||||
|
||||
if (is_upper) then
|
||||
_detalhes:SelectModel (select_upper_model_callback, _G.DetailsOptionsWindow.instance.row_info.models.upper_model)
|
||||
else
|
||||
_detalhes:SelectModel (select_lower_model_callback, _G.DetailsOptionsWindow.instance.row_info.models.lower_model)
|
||||
end
|
||||
end
|
||||
|
||||
g:NewButton (frame8, frame8, "$parentModelUpperSelect", "ModelUpperSelect", window.buttons_width, 18, select_model, true, nil, nil, Loc ["STRING_OPTIONS_3D_SELECT"], 1)
|
||||
frame8.ModelUpperSelect:InstallCustomTexture (nil, nil, nil, nil, nil, true)
|
||||
window:CreateLineBackground2 (frame8, "ModelUpperSelect", "ModelUpperSelect", Loc ["STRING_OPTIONS_3D_USELECT_DESC"], nil, {1, 0.8, 0}, button_color_rgb)
|
||||
|
||||
frame8.ModelUpperSelect:SetIcon ([[Interface\WorldStateFrame\OrcHead]], nil, nil, nil, {0.03125, 1-0.03125, 0.03125, 1-0.03125}, nil, nil, 2)
|
||||
frame8.ModelUpperSelect:SetTextColor (button_color_rgb)
|
||||
|
||||
|
||||
--> upper model alpha
|
||||
g:NewLabel (frame8, _, "$parentModelUpperAlphaLabel", "ModelUpperAlphaLabel", Loc ["STRING_OPTIONS_3D_UALPHA"], "GameFontHighlightLeft")
|
||||
local s = g:NewSlider (frame8, _, "$parentModelUpperAlphaSlider", "ModelUpperAlphaSlider", SLIDER_WIDTH, 20, 0, 1, 0.05, _G.DetailsOptionsWindow.instance.row_info.models.upper_alpha, true)
|
||||
s:SetBackdrop (slider_backdrop)
|
||||
s:SetBackdropColor (unpack (slider_backdrop_color))
|
||||
s:SetThumbSize (50)
|
||||
|
||||
frame8.ModelUpperAlphaSlider:SetPoint ("left", frame8.ModelUpperAlphaLabel, "right", 2)
|
||||
|
||||
frame8.ModelUpperAlphaSlider:SetHook ("OnValueChange", function (self, instance, amount)
|
||||
instance:SetBarModel (nil, nil, amount)
|
||||
end)
|
||||
|
||||
window:CreateLineBackground2 (frame8, "ModelUpperAlphaSlider", "ModelUpperAlphaLabel", Loc ["STRING_OPTIONS_3D_UALPHA_DESC"])
|
||||
|
||||
--> lower model enabled
|
||||
g:NewLabel (frame8, _, "$parentModelLowerEnabledLabel", "ModelLowerEnabledLabel", Loc ["STRING_OPTIONS_3D_ENABLED"], "GameFontHighlightLeft")
|
||||
g:NewSwitch (frame8, _, "$parentModelLowerEnabledSlider", "ModelLowerEnabledSlider", 60, 20, _, _, _G.DetailsOptionsWindow.instance.row_info.models.lower_enabled)
|
||||
frame8.ModelLowerEnabledSlider:SetPoint ("left", frame8.ModelLowerEnabledLabel, "right", 2, -1)
|
||||
frame8.ModelLowerEnabledSlider.OnSwitch = function (self, instance, value)
|
||||
instance:SetBarModel (nil, nil, nil, value)
|
||||
end
|
||||
window:CreateLineBackground2 (frame8, "ModelLowerEnabledSlider", "ModelLowerEnabledLabel", Loc ["STRING_OPTIONS_3D_LENABLED_DESC"])
|
||||
|
||||
--> lower model texture
|
||||
|
||||
g:NewButton (frame8, frame8, "$parentModelLowerSelect", "ModelLowerSelect", window.buttons_width, 18, select_model, nil, nil, nil, Loc ["STRING_OPTIONS_3D_SELECT"])
|
||||
frame8.ModelLowerSelect:InstallCustomTexture (nil, nil, nil, nil, nil, true)
|
||||
window:CreateLineBackground2 (frame8, "ModelLowerSelect", "ModelLowerSelect", Loc ["STRING_OPTIONS_3D_LSELECT_DESC"], nil, {1, 0.8, 0}, button_color_rgb)
|
||||
|
||||
frame8.ModelLowerSelect:SetIcon ([[Interface\WorldStateFrame\OrcHead]], nil, nil, nil, {0.03125, 1-0.03125, 0.03125, 1-0.03125}, nil, nil, 2)
|
||||
frame8.ModelLowerSelect:SetTextColor (button_color_rgb)
|
||||
|
||||
--> lower model alpha
|
||||
g:NewLabel (frame8, _, "$parentModelLowerAlphaLabel", "ModelLowerAlphaLabel", Loc ["STRING_OPTIONS_3D_LALPHA"], "GameFontHighlightLeft")
|
||||
local s = g:NewSlider (frame8, _, "$parentModelLowerAlphaSlider", "ModelLowerAlphaSlider", SLIDER_WIDTH, 20, 0, 1, 0.05, _G.DetailsOptionsWindow.instance.row_info.models.lower_alpha, true)
|
||||
s:SetBackdrop (slider_backdrop)
|
||||
s:SetBackdropColor (unpack (slider_backdrop_color))
|
||||
s:SetThumbSize (50)
|
||||
|
||||
frame8.ModelLowerAlphaSlider:SetPoint ("left", frame8.ModelLowerAlphaLabel, "right", 2)
|
||||
|
||||
frame8.ModelLowerAlphaSlider:SetHook ("OnValueChange", function (self, instance, amount)
|
||||
instance:SetBarModel (nil, nil, nil, nil, nil, amount)
|
||||
end)
|
||||
|
||||
window:CreateLineBackground2 (frame8, "ModelLowerAlphaSlider", "ModelLowerAlphaLabel", Loc ["STRING_OPTIONS_3D_LALPHA_DESC"])
|
||||
|
||||
--> anchors
|
||||
|
||||
local x = window.left_start_at
|
||||
|
||||
titulo_toolbar:SetPoint (x, -30)
|
||||
titulo_toolbar_desc:SetPoint (x, -50)
|
||||
|
||||
local left_side = {
|
||||
{"ModelUpperAnchor", 1, true},
|
||||
{"ModelUpperEnabledLabel", 2},
|
||||
{"ModelUpperAlphaLabel", 3},
|
||||
{"ModelUpperSelect", 4},
|
||||
|
||||
{"ModelLowerAnchor", 5, true},
|
||||
{"ModelLowerEnabledLabel", 6},
|
||||
{"ModelLowerAlphaLabel", 7},
|
||||
{"ModelLowerSelect", 8},
|
||||
}
|
||||
|
||||
window:arrange_menu (frame8, left_side, x, -90)
|
||||
|
||||
end
|
||||
|
||||
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
@@ -6268,7 +6397,7 @@ function window:CreateFrame9()
|
||||
end
|
||||
end
|
||||
end
|
||||
g:NewButton (frame9, _, "$parentEditImage", "editImage", 200, 18, startImageEdit, nil, nil, nil, Loc ["STRING_OPTIONS_EDITIMAGE"])
|
||||
g:NewButton (frame9, _, "$parentEditImage", "editImage", window.buttons_width, 18, startImageEdit, nil, nil, nil, Loc ["STRING_OPTIONS_EDITIMAGE"])
|
||||
|
||||
--> agora o dropdown do alinhamento
|
||||
local onSelectAnchor = function (_, instance, anchor)
|
||||
@@ -6608,10 +6737,10 @@ function window:CreateFrame9()
|
||||
--
|
||||
frame9.anchorDropdown:SetPoint ("left", frame9.anchorLabel, "right", 2)
|
||||
--
|
||||
frame9.editImage:InstallCustomTexture()
|
||||
frame9.editImage:InstallCustomTexture (nil, nil, nil, nil, nil, true)
|
||||
window:CreateLineBackground2 (frame9, "editImage", "editImage", Loc ["STRING_OPTIONS_WP_EDIT_DESC"], nil, {1, 0.8, 0}, button_color_rgb)
|
||||
frame9.editImage:SetTextColor (button_color_rgb)
|
||||
frame9.editImage:SetIcon ([[Interface\AddOns\Details\images\icons]], 14, 14, nil, {469/512, 505/512, 290/512, 322/512}, nil, 4)
|
||||
frame9.editImage:SetIcon ([[Interface\AddOns\Details\images\icons]], 14, 14, nil, {469/512, 505/512, 290/512, 322/512}, nil, 4, 2)
|
||||
|
||||
window:CreateLineBackground2 (frame9, "useBackgroundSlider", "enablewallpaperLabel", Loc ["STRING_OPTIONS_WP_ENABLE_DESC"])
|
||||
|
||||
@@ -6844,11 +6973,11 @@ function window:CreateFrame9()
|
||||
DetailsLoadWallpaperImage:Show()
|
||||
end
|
||||
|
||||
g:NewButton (frame9, _, "$parentLoadImage", "LoadImage", 200, 18, load_image, nil, nil, nil, Loc ["STRING_OPTIONS_WALLPAPER_LOAD"])
|
||||
frame9.LoadImage:InstallCustomTexture()
|
||||
g:NewButton (frame9, _, "$parentLoadImage", "LoadImage", window.buttons_width, 18, load_image, nil, nil, nil, Loc ["STRING_OPTIONS_WALLPAPER_LOAD"])
|
||||
frame9.LoadImage:InstallCustomTexture (nil, nil, nil, nil, nil, true)
|
||||
window:CreateLineBackground2 (frame9, "LoadImage", "LoadImage", Loc ["STRING_OPTIONS_WALLPAPER_LOAD_DESC"], nil, {1, 0.8, 0}, button_color_rgb)
|
||||
frame9.LoadImage:SetTextColor (button_color_rgb)
|
||||
frame9.LoadImage:SetIcon ([[Interface\AddOns\Details\images\icons]], 11, 14, nil, {437/512, 467/512, 191/512, 239/512}, nil, 5)
|
||||
frame9.LoadImage:SetIcon ([[Interface\AddOns\Details\images\icons]], 10, 13, nil, {437/512, 467/512, 191/512, 239/512}, nil, 5, 3)
|
||||
|
||||
--> Anchors
|
||||
|
||||
@@ -7159,7 +7288,7 @@ function window:CreateFrame10()
|
||||
--window:CreateLineBackground2 (frame10, "animateSlider", "animateLabel", Loc ["STRING_OPTIONS_ANIMATEBARS_DESC"])
|
||||
|
||||
--update speed
|
||||
local s = g:NewSlider (frame10, _, "$parentSliderUpdateSpeed", "updatespeedSlider", SLIDER_WIDTH, 20, 0.050, 3, 0.050, _detalhes.update_speed, true)
|
||||
local s = g:NewSlider (frame10, _, "$parentSliderUpdateSpeed", "updatespeedSlider", SLIDER_WIDTH, 20, 0.05, 3, 0.05, _detalhes.update_speed, true)
|
||||
s:SetBackdrop (slider_backdrop)
|
||||
s:SetBackdropColor (unpack (slider_backdrop_color))
|
||||
|
||||
@@ -7520,7 +7649,7 @@ function window:CreateFrame11()
|
||||
--esquema para ativar ou desativar certos cooldowns
|
||||
--botão que abre um gump estilo welcome, com as spells pegas na lista de cooldowns
|
||||
|
||||
g:NewButton (frame11, _, "$parentCooldownIgnoreButton", "CooldownIgnoreButton", 140, 16, function()
|
||||
g:NewButton (frame11, _, "$parentCooldownIgnoreButton", "CooldownIgnoreButton", window.buttons_width, 18, function()
|
||||
if (not DetailsAnnounceSelectCooldownIgnored) then
|
||||
DetailsAnnounceSelectCooldownIgnored = CreateFrame ("frame", "DetailsAnnounceSelectCooldownIgnored", UIParent)
|
||||
local f = DetailsAnnounceSelectCooldownIgnored
|
||||
@@ -7618,10 +7747,10 @@ function window:CreateFrame11()
|
||||
|
||||
end, nil, nil, nil, Loc ["STRING_OPTIONS_RT_COOLDOWNS_SELECT"], 1)
|
||||
|
||||
frame11.CooldownIgnoreButton:InstallCustomTexture()
|
||||
frame11.CooldownIgnoreButton:InstallCustomTexture (nil, nil, nil, nil, nil, true)
|
||||
window:CreateLineBackground2 (frame11, "CooldownIgnoreButton", "CooldownIgnoreButton", Loc ["STRING_OPTIONS_RT_COOLDOWNS_SELECT_DESC"], nil, {1, 0.8, 0}, button_color_rgb)
|
||||
|
||||
frame11.CooldownIgnoreButton:SetIcon ([[Interface\COMMON\UI-DropDownRadioChecks]], nil, nil, nil, {0, 0.5, 0, 0.5})
|
||||
frame11.CooldownIgnoreButton:SetIcon ([[Interface\COMMON\UI-DropDownRadioChecks]], nil, nil, nil, {0, 0.5, 0, 0.5}, nil, nil, 2)
|
||||
frame11.CooldownIgnoreButton:SetTextColor (button_color_rgb)
|
||||
|
||||
--deaths
|
||||
@@ -8407,10 +8536,18 @@ end --> if not window
|
||||
_G.DetailsOptionsWindow7:update_menuanchor_xy (editing_instance)
|
||||
|
||||
--> window 8
|
||||
|
||||
_G.DetailsOptionsWindow8ModelUpperEnabledSlider.MyObject:SetFixedParameter (editing_instance)
|
||||
_G.DetailsOptionsWindow8ModelUpperEnabledSlider.MyObject:SetValue (editing_instance.row_info.models.upper_enabled)
|
||||
|
||||
-- _G.DetailsOptionsWindow8
|
||||
_G.DetailsOptionsWindow8ModelLowerEnabledSlider.MyObject:SetFixedParameter (editing_instance)
|
||||
_G.DetailsOptionsWindow8ModelLowerEnabledSlider.MyObject:SetValue (editing_instance.row_info.models.lower_enabled)
|
||||
|
||||
--instanceTextColorLabel
|
||||
_G.DetailsOptionsWindow8ModelUpperAlphaSlider.MyObject:SetFixedParameter (editing_instance)
|
||||
_G.DetailsOptionsWindow8ModelUpperAlphaSlider.MyObject:SetValue (editing_instance.row_info.models.upper_alpha)
|
||||
|
||||
_G.DetailsOptionsWindow8ModelLowerAlphaSlider.MyObject:SetFixedParameter (editing_instance)
|
||||
_G.DetailsOptionsWindow8ModelLowerAlphaSlider.MyObject:SetValue (editing_instance.row_info.models.lower_alpha)
|
||||
|
||||
|
||||
--> window 10
|
||||
@@ -8768,6 +8905,14 @@ end --> if not window
|
||||
_G.DetailsOptionsWindow1AvatarPreviewTexture2.MyObject.texture = background
|
||||
_G.DetailsOptionsWindow1AvatarPreviewTexture2.MyObject.texcoord = cords
|
||||
_G.DetailsOptionsWindow1AvatarPreviewTexture2.MyObject:SetVertexColor (unpack (color))
|
||||
|
||||
if (not avatar:find ("UI%-EJ%-BOSS%-Default")) then
|
||||
_G.DetailsOptionsWindow1.ChooseAvatarLabel:SetTextColor (1, 0.93, 0.74, 0)
|
||||
_G.DetailsOptionsWindow1.HaveAvatar = true
|
||||
else
|
||||
_G.DetailsOptionsWindow1.ChooseAvatarLabel:SetTextColor (1, 0.93, 0.74)
|
||||
_G.DetailsOptionsWindow1.HaveAvatar = false
|
||||
end
|
||||
|
||||
local nick = _detalhes:GetNickname (UnitGUID ("player"), UnitName ("player"), true)
|
||||
_G.DetailsOptionsWindow1AvatarNicknameLabel:SetText (nick)
|
||||
|
||||
+125
-6
@@ -1893,6 +1893,28 @@ local barra_scripts_onclick = function (self, button)
|
||||
|
||||
end
|
||||
|
||||
local barra_scripts_onshow = function (self)
|
||||
-- search key: ~model
|
||||
if (self.using_upper_3dmodels) then
|
||||
self.modelbox_high:SetModel (self._instance.row_info.models.upper_model)
|
||||
self.modelbox_high:SetAlpha (self._instance.row_info.models.upper_alpha)
|
||||
end
|
||||
if (self.using_lower_3dmodels) then
|
||||
self.modelbox_low:SetModel (self._instance.row_info.models.lower_model)
|
||||
self.modelbox_low:SetAlpha (self._instance.row_info.models.lower_alpha)
|
||||
end
|
||||
end
|
||||
|
||||
local set_bar_value = function (self, value)
|
||||
self.statusbar:SetValue (value)
|
||||
|
||||
if (self.using_upper_3dmodels) then
|
||||
local width = self:GetWidth()
|
||||
local p = (width / 100) * value
|
||||
self.modelbox_high:SetPoint ("bottomright", self, "bottomright", p - width, 0)
|
||||
end
|
||||
end
|
||||
|
||||
local function barra_scripts (esta_barra, instancia, i)
|
||||
esta_barra._instance = instancia
|
||||
|
||||
@@ -1901,18 +1923,35 @@ local function barra_scripts (esta_barra, instancia, i)
|
||||
esta_barra:SetScript ("OnMouseDown", barra_scripts_onmousedown)
|
||||
esta_barra:SetScript ("OnMouseUp", barra_scripts_onmouseup)
|
||||
esta_barra:SetScript ("OnClick", barra_scripts_onclick)
|
||||
|
||||
esta_barra:SetScript ("OnShow", barra_scripts_onshow)
|
||||
|
||||
esta_barra.SetValue = set_bar_value
|
||||
end
|
||||
|
||||
function _detalhes:ReportSingleLine (instancia, barra)
|
||||
|
||||
local reportar
|
||||
if (instancia.atributo == 5) then --> custom
|
||||
reportar = {"Details! " .. Loc ["STRING_CUSTOM_REPORT"] .. " " ..instancia.customName}
|
||||
|
||||
local actor_name = barra.texto_esquerdo:GetText() or ""
|
||||
actor_name = actor_name:gsub ((".*%."), "")
|
||||
|
||||
reportar = {"Details! " .. Loc ["STRING_CUSTOM_REPORT"] .. " " .. instancia.customName .. ": " .. actor_name}
|
||||
--> dump cooltip
|
||||
local GameCooltip = GameCooltip
|
||||
|
||||
local amt = GameCooltip.Indexes
|
||||
for i = 2, amt do
|
||||
local left_text, right_text = GameCooltip:GetText (i)
|
||||
reportar [#reportar+1] = (i-1) .. ". " .. left_text .. " ... " .. right_text
|
||||
end
|
||||
|
||||
else
|
||||
reportar = {"Details! " .. Loc ["STRING_REPORT"] .. " " .. _detalhes.sub_atributos [instancia.atributo].lista [instancia.sub_atributo]}
|
||||
reportar [#reportar+1] = barra.texto_esquerdo:GetText() .. " " .. barra.texto_direita:GetText()
|
||||
end
|
||||
|
||||
reportar [#reportar+1] = barra.texto_esquerdo:GetText().." "..barra.texto_direita:GetText()
|
||||
|
||||
return _detalhes:Reportar (reportar, {_no_current = true, _no_inverse = true, _custom = true})
|
||||
end
|
||||
@@ -3212,9 +3251,22 @@ function gump:CriaNovaBarra (instancia, index)
|
||||
new_row.statusbar = CreateFrame ("StatusBar", "DetailsBarra_Statusbar_"..instancia.meu_id.."_"..index, new_row)
|
||||
--> frame for hold the backdrop border
|
||||
new_row.border = CreateFrame ("Frame", "DetailsBarra_Border_" .. instancia.meu_id .. "_" .. index, new_row.statusbar)
|
||||
new_row.border:SetFrameLevel (new_row.statusbar:GetFrameLevel()+1)
|
||||
new_row.border:SetFrameLevel (new_row.statusbar:GetFrameLevel()+2)
|
||||
new_row.border:SetAllPoints (new_row)
|
||||
|
||||
-- search key: ~model
|
||||
|
||||
--low 3d bar
|
||||
new_row.modelbox_low = CreateFrame ("playermodel", "DetailsBarra_ModelBarLow_" .. instancia.meu_id .. "_" .. index, new_row) --rowframe
|
||||
new_row.modelbox_low:SetFrameLevel (new_row.statusbar:GetFrameLevel()-1)
|
||||
new_row.modelbox_low:SetPoint ("topleft", new_row, "topleft")
|
||||
new_row.modelbox_low:SetPoint ("bottomright", new_row, "bottomright")
|
||||
--high 3d bar
|
||||
new_row.modelbox_high = CreateFrame ("playermodel", "DetailsBarra_ModelBarHigh_" .. instancia.meu_id .. "_" .. index, new_row) --rowframe
|
||||
new_row.modelbox_high:SetFrameLevel (new_row.statusbar:GetFrameLevel()+1)
|
||||
new_row.modelbox_high:SetPoint ("topleft", new_row, "topleft")
|
||||
new_row.modelbox_high:SetPoint ("bottomright", new_row, "bottomright")
|
||||
|
||||
--> create textures and icons
|
||||
new_row.textura = new_row.statusbar:CreateTexture (nil, "artwork")
|
||||
new_row.textura:SetHorizTile (false)
|
||||
@@ -3231,7 +3283,7 @@ function gump:CriaNovaBarra (instancia, index)
|
||||
new_row.statusbar:SetValue (0)
|
||||
|
||||
--> class icon
|
||||
local icone_classe = new_row.statusbar:CreateTexture (nil, "overlay")
|
||||
local icone_classe = new_row.border:CreateTexture (nil, "overlay")
|
||||
icone_classe:SetHeight (instancia.row_info.height)
|
||||
icone_classe:SetWidth (instancia.row_info.height)
|
||||
icone_classe:SetTexture (instancia.row_info.icon_file)
|
||||
@@ -3243,13 +3295,13 @@ function gump:CriaNovaBarra (instancia, index)
|
||||
new_row.statusbar:SetPoint ("bottomright", new_row, "bottomright")
|
||||
|
||||
--> left text
|
||||
new_row.texto_esquerdo = new_row.statusbar:CreateFontString (nil, "overlay", "GameFontHighlight")
|
||||
new_row.texto_esquerdo = new_row.border:CreateFontString (nil, "overlay", "GameFontHighlight")
|
||||
new_row.texto_esquerdo:SetPoint ("left", new_row.icone_classe, "right", 3, 0)
|
||||
new_row.texto_esquerdo:SetJustifyH ("left")
|
||||
new_row.texto_esquerdo:SetNonSpaceWrap (true)
|
||||
|
||||
--> right text
|
||||
new_row.texto_direita = new_row.statusbar:CreateFontString (nil, "overlay", "GameFontHighlight")
|
||||
new_row.texto_direita = new_row.border:CreateFontString (nil, "overlay", "GameFontHighlight")
|
||||
new_row.texto_direita:SetPoint ("right", new_row.statusbar, "right")
|
||||
new_row.texto_direita:SetJustifyH ("right")
|
||||
|
||||
@@ -3368,6 +3420,38 @@ function _detalhes:SetBarBackdropSettings (enabled, size, color, texture)
|
||||
self:ReajustaGump()
|
||||
end
|
||||
|
||||
function _detalhes:SetBarModel (upper_enabled, upper_model, upper_alpha, lower_enabled, lower_model, lower_alpha)
|
||||
|
||||
--> is enabled
|
||||
if (type (upper_enabled) == "boolean") then
|
||||
self.row_info.models.upper_enabled = upper_enabled
|
||||
end
|
||||
if (type (lower_enabled) == "boolean") then
|
||||
self.row_info.models.lower_enabled = lower_enabled
|
||||
end
|
||||
|
||||
--> models:
|
||||
if (upper_model) then
|
||||
self.row_info.models.upper_model = upper_model
|
||||
end
|
||||
if (lower_model) then
|
||||
self.row_info.models.lower_model = lower_model
|
||||
end
|
||||
|
||||
--> alpha values:
|
||||
if (upper_alpha) then
|
||||
self.row_info.models.upper_alpha = upper_alpha
|
||||
end
|
||||
if (lower_alpha) then
|
||||
self.row_info.models.lower_alpha = lower_alpha
|
||||
end
|
||||
|
||||
self:InstanceReset()
|
||||
self:InstanceRefreshRows()
|
||||
self:ReajustaGump()
|
||||
_detalhes:AtualizaGumpPrincipal (-1, true)
|
||||
end
|
||||
|
||||
function _detalhes:SetBarSettings (height, texture, colorclass, fixedcolor, backgroundtexture, backgroundcolorclass, backgroundfixedcolor, alpha, iconfile, barstart, spacement)
|
||||
|
||||
--> bar start
|
||||
@@ -3504,7 +3588,19 @@ function _detalhes:InstanceRefreshRows (instancia)
|
||||
|
||||
--font face
|
||||
self.row_info.font_face_file = SharedMedia:Fetch ("font", self.row_info.font_face)
|
||||
|
||||
--models
|
||||
local upper_model_enabled = self.row_info.models.upper_enabled
|
||||
local lower_model_enabled = self.row_info.models.lower_enabled
|
||||
|
||||
local upper_model = self.row_info.models.upper_model
|
||||
local lower_model = self.row_info.models.lower_model
|
||||
|
||||
local upper_model_alpha = self.row_info.models.upper_alpha
|
||||
local lower_model_alpha = self.row_info.models.lower_alpha
|
||||
|
||||
--using_upper_3dmodels using_lower_3dmodels
|
||||
|
||||
-- do it
|
||||
|
||||
for _, row in _ipairs (self.barras) do
|
||||
@@ -3590,6 +3686,27 @@ function _detalhes:InstanceRefreshRows (instancia)
|
||||
row.border:SetBackdrop (nil)
|
||||
end
|
||||
|
||||
--> models
|
||||
if (upper_model_enabled) then
|
||||
row.using_upper_3dmodels = true
|
||||
row.modelbox_high:Show()
|
||||
row.modelbox_high:SetModel (upper_model)
|
||||
row.modelbox_high:SetAlpha (upper_model_alpha)
|
||||
else
|
||||
row.using_upper_3dmodels = false
|
||||
row.modelbox_high:Hide()
|
||||
end
|
||||
|
||||
if (lower_model_enabled) then
|
||||
row.using_lower_3dmodels = true
|
||||
row.modelbox_low:Show()
|
||||
row.modelbox_low:SetModel (lower_model)
|
||||
row.modelbox_low:SetAlpha (lower_model_alpha)
|
||||
else
|
||||
row.using_lower_3dmodels = false
|
||||
row.modelbox_low:Hide()
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
self:SetBarGrowDirection()
|
||||
@@ -4697,6 +4814,8 @@ local build_segment_list = function (self, elapsed)
|
||||
local enemy = thisCombat.is_boss and thisCombat.is_boss.name
|
||||
segments_used = segments_used + 1
|
||||
|
||||
--print (thisCombat.is_boss.name, thisCombat.instance_type, _detalhes:GetRaidIcon (thisCombat.is_boss.mapid), thisCombat.is_boss.ej_instance_id)
|
||||
|
||||
if (thisCombat.is_boss and thisCombat.is_boss.name) then
|
||||
|
||||
if (thisCombat.instance_type == "party") then
|
||||
|
||||
Binary file not shown.
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,8 @@
|
||||
## Interface: 60000
|
||||
## Title: Details! 3D Model Viewer
|
||||
## Notes: When the 3d models option is enabled, this tool is used to select which model will be used on the window's rows.
|
||||
## DefaultState: Enabled
|
||||
## LoadOnDemand: 1
|
||||
## Dependencies: Details
|
||||
|
||||
Details_3DModelsPaths.lua
|
||||
@@ -38,7 +38,7 @@ local Auchindoun = {
|
||||
},
|
||||
[2] = {
|
||||
boss = "Soulbinder Nyami",
|
||||
portrait = [[Interface\EncounterJournal\journal\UI-EJ-BOSS-Soulbinder Nyami]],
|
||||
portrait = [[Interface\EncounterJournal\UI-EJ-BOSS-Soulbinder Nyami]],
|
||||
},
|
||||
[3] = {
|
||||
boss = "Azzakel",
|
||||
@@ -106,40 +106,45 @@ local TheEverbloom = {
|
||||
name = "The Everbloom",
|
||||
|
||||
boss_names = {
|
||||
"Ancient Protectors",
|
||||
"Archmage Sol",
|
||||
"Xeri'tac",
|
||||
"Witherbark",
|
||||
"Ancient Protectors",
|
||||
"Xeri'tac",
|
||||
"Archmage Sol",
|
||||
"Yalnu",
|
||||
},
|
||||
|
||||
boss_ids = {
|
||||
[83894] = 1, --Ancient Protectors
|
||||
[86244] = 1, --Ancient Protectors
|
||||
[86246] = 2, --Archmage Sol
|
||||
[81522] = 1, --Witherbark
|
||||
[86242] = 1, --Witherbark
|
||||
[83894] = 2, --Ancient Protectors
|
||||
[83893] = 2, --Ancient Protectors
|
||||
[83892] = 2, --Ancient Protectors
|
||||
[86244] = 2, --Ancient Protectors
|
||||
[86247] = 3, --Xeri'tac
|
||||
[86242] = 4, --Witherbark
|
||||
[82682] = 4, --Witherbark
|
||||
[86246] = 4, --Archmage Sol
|
||||
[82682] = 4, --Archmage Sol
|
||||
[86248] = 5, --Yalnu
|
||||
[84336] = 5, --Yalnu
|
||||
[83846] = 5, --Yalnu
|
||||
},
|
||||
|
||||
encounters = {
|
||||
[1] = {
|
||||
boss = "Ancient Protectors",
|
||||
portrait = [[Interface\EncounterJournal\UI-EJ-BOSS-Dulhu]],
|
||||
boss = "Witherbark",
|
||||
portrait = [[Interface\EncounterJournal\UI-EJ-BOSS-Witherbark]],
|
||||
},
|
||||
[2] = {
|
||||
boss = "Archmage Sol",
|
||||
portrait = [[Interface\EncounterJournal\UI-EJ-BOSS-Archmage Sol]],
|
||||
boss = "Ancient Protectors",
|
||||
portrait = [[Interface\EncounterJournal\UI-EJ-BOSS-Dulhu]],
|
||||
},
|
||||
[3] = {
|
||||
boss = "Xeri'tac",
|
||||
portrait = [[Interface\EncounterJournal\UI-EJ-BOSS-Xeritac]],
|
||||
},
|
||||
[4] = {
|
||||
boss = "Witherbark",
|
||||
portrait = [[Interface\EncounterJournal\UI-EJ-BOSS-Witherbark]],
|
||||
},
|
||||
boss = "Archmage Sol",
|
||||
portrait = [[Interface\EncounterJournal\UI-EJ-BOSS-Archmage Sol]],
|
||||
},
|
||||
[5] = {
|
||||
boss = "Yalnu",
|
||||
portrait = [[Interface\EncounterJournal\UI-EJ-BOSS-Yalnu]],
|
||||
@@ -156,34 +161,35 @@ local GrimrailDepot = {
|
||||
name = "Grimrail Depot",
|
||||
|
||||
boss_names = {
|
||||
"Skylord Tovra",
|
||||
"Rocketspark and Borka",
|
||||
"Nitrogg Thundertower",
|
||||
"Skylord Tovra",
|
||||
},
|
||||
|
||||
boss_ids = {
|
||||
[86228] = 1, --Skylord Tovra
|
||||
[86225] = 2, --Rocketspark and Borka
|
||||
[86226] = 2, --Rocketspark and Borka
|
||||
[79545] = 2, --Rocketspark and Borka
|
||||
[79548] = 2, --Rocketspark and Borka
|
||||
[86227] = 3, --Nitrogg Thundertower
|
||||
[80005] = 3, --Nitrogg Thundertower
|
||||
[86225] = 1, --Rocketspark and Borka
|
||||
[86226] = 1, --Rocketspark and Borka
|
||||
[79548] = 1, --Rocketspark and Borka
|
||||
[77816] = 1, --Rocketspark and Borka
|
||||
[86227] = 2, --Nitrogg Thundertower
|
||||
[79545] = 2, --Nitrogg Thundertower
|
||||
[86228] = 3, --Skylord Tovra
|
||||
[80005] = 3, --Skylord Tovra
|
||||
},
|
||||
|
||||
encounters = {
|
||||
[1] = {
|
||||
boss = "Skylord Tovra",
|
||||
portrait = [[Interface\EncounterJournal\UI-EJ-BOSS-Thunderlord General]],
|
||||
},
|
||||
[2] = {
|
||||
boss = "Rocketspark and Borka",
|
||||
portrait = [[Interface\EncounterJournal\UI-EJ-BOSS-Pauli Rocketspark]],
|
||||
},
|
||||
[3] = {
|
||||
[2] = {
|
||||
boss = "Nitrogg Thundertower",
|
||||
portrait = [[Interface\EncounterJournal\UI-EJ-BOSS-Blackrock Assault Commander]],
|
||||
},
|
||||
[3] = {
|
||||
boss = "Skylord Tovra",
|
||||
portrait = [[Interface\EncounterJournal\UI-EJ-BOSS-Thunderlord General]],
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
@@ -1,9 +0,0 @@
|
||||
## Interface: 60000
|
||||
## Title: Details: Siege of Orgrimmar
|
||||
## Notes: Plugin for Details
|
||||
## RequiredDeps: Details
|
||||
|
||||
enUS.lua
|
||||
ptBR.lua
|
||||
|
||||
SiegeOfOrgrimmar.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")
|
||||
File diff suppressed because it is too large
Load Diff
@@ -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>
|
||||
@@ -1,52 +0,0 @@
|
||||
local Loc = LibStub("AceLocale-3.0"):NewLocale("Details_RaidInfo-SiegeOfOrgrimmar", "enUS", true)
|
||||
|
||||
if (not Loc) then
|
||||
return
|
||||
end
|
||||
|
||||
Loc ["PLUGIN_NAME"] = "Raid Info Siege of Orgrimmar"
|
||||
Loc ["STRING_RAID_NAME"] = "Siege of Orgrimmar"
|
||||
|
||||
---------------------------------------------------------------------------------------------------
|
||||
|
||||
-- The ancient inhabitants of Pandaria recognized the vital importance of the lifegiving Pools of Power, building an underground system of aqueducts to safeguard the waters and nurture life in the Vale of Eternal Blossoms. The touch of corruption has animated and twisted these waters, and Immerseus stands as an unnatural embodiment of the Vale's sorrow.
|
||||
Loc ["STRING_IMMERSEUS"] = "Immerseus"
|
||||
|
||||
-- The Golden Lotus and Shado-Pan guardians of the Vale of Eternal Blossoms were caught in the epicenter of the devastating blast that scarred the Vale, and torn apart by the dark energies. Their spirits linger in the place they once protected, confused and tormented by their failure.
|
||||
Loc ["STRING_THEFALLENPROTECTORS"] = "The Fallen Protectors"
|
||||
|
||||
-- Some say that the mogu race was created in the image of this titanic construct, left deep beneath Pandaria to watch over and guard the continent's darkest and most dangerous secret.
|
||||
Loc ["STRING_NORUSHEN"] = "Norushen"
|
||||
|
||||
-- The seventh sha, the Sha of Pride, was the final burden to which Emperor Shaohao clung, shrouding the land in mist and biding its time for millennia. When Garrosh awakened the Heart of Y'Shaarj, the force of his arrogance caused this dark energy to coalesce in the chamber where the Heart was unearthed.
|
||||
Loc ["STRING_SHAOFPRIDE"] = "Sha of Pride"
|
||||
|
||||
-- Warlord Zaela formed a close bond with Garrosh during events in the Twilight Highlands, and she and her Dragonmaw orcs have pledged loyalty to Garrosh's cause. Riding atop the fearsome Galakras, a direct descendant of the cataclysmic progenitor of all dragonkind, Zaela oversees the naval defense of Orgrimmar.
|
||||
Loc ["STRING_GALAKRAS"] = "Galakras"
|
||||
|
||||
-- This mechanical terror, designed nearly as much for intimidation as destruction, is the centerpiece of Garrosh's siege weaponry. Crafted in the image of the mighty Kor'kron war scorpion, the Iron Juggernaut guards the gates of Orgrimmar, crushing any who would rise up to challenge Garrosh's True Horde.
|
||||
Loc ["STRING_IRONJUGGERNAUT"] = "Iron Juggernaut"
|
||||
|
||||
-- Haromm and Kardris trained thousands of shaman to whisper reverently to the elements to requisition their aid. The army of Garrosh, however, does not ask - they take what they desire in the name of the True Horde. Dark Shamanism forces the elements into servitude, twisting them into burned-out ash, corrupted waters, and toxic air.
|
||||
Loc ["STRING_KORKRONDARKSAMAN"] = "Kor'kron Dark Shaman"
|
||||
|
||||
-- Once a grunt in service of the former warchief, Thrall, General Nazgrim rose quickly through the ranks after overwhelming victories in Grizzly Hills and the sunken city of Vashj'ir. Fiercely loyal to the Horde and bound by a rigorous code of honor and duty, Nazgrim will hold the line for his warchief until his dying breath.
|
||||
Loc ["STRING_GENERALNAZFRIM"] = "General Nazgrim"
|
||||
|
||||
-- Malkorok has been Garrosh's most loyal and trusted lieutenant throughout the Pandaria campaign. When the Warchief needed a volunteer to infuse with the power of Y'Shaarj, it was only natural that Malkorok would offer without hesitation.
|
||||
Loc ["STRING_MALKOROK"] = "Malkorok"
|
||||
|
||||
-- When Garrosh gazed across Pandaria, he saw untapped power. During the course of his campaign, Garrosh has plundered weapons, treasures, and artifacts of the pandaren, the mogu, and the mantid. They are kept in a warehouse deep within his underground base, guarded by a mysterious security system that appears to be of Titan origins.
|
||||
Loc ["STRING_SPOILSOFPANDARIA"] = "Spoils of Pandaria"
|
||||
|
||||
-- When the Isle of Giants was discovered off the coast of Pandaria, teeming with primal devilsaurs, Garrosh sent men to capture some of the most fearsome specimens, hoping to subjugate them and use them as beasts of war. Countless orcish beastmasters have fallen to Thok's jaws as they struggle to tame him, yet the creature's thirst for blood remains unslaked.
|
||||
Loc ["STRING_THOKTHEBLOODTHIRSTY"] = "Thok the Bloodthirsty"
|
||||
|
||||
-- Helix Blackfuse was the only goblin with the combination of engineering prowess, professionalism, and ruthlessness to satisfy Garrosh in his search for the engineer of the True Horde. A mercenary at heart, Blackfuse's love for his creations (and the gold they fetch) has forever linked his fate with that of his patron and Warchief.
|
||||
Loc ["STRING_SIEGECRAFTERBLACKFUSE"] = "Siegecrafter Blackfuse"
|
||||
|
||||
-- The nine surviving Klaxxi'va Paragons are ancient champions of the mantid who fought alongside the Wakener against the madness of Empress Shek'zeer. But the paragons, as do all mantid, hold a far deeper loyalty. When Garrosh unearthed the heart of Y'Shaarj, the paragons followed the whispers of their ancient master to the iron halls beneath Orgrimmar.
|
||||
Loc ["STRING_PARAGEONSOFTHEKLAXXI"] = "Paragons of the Klaxxi"
|
||||
|
||||
-- Garrosh, son of Grommash Hellscream, first learned of his father's heroism when Thrall encountered the young orc in Outland. The seeds of pride were planted. Garrosh spearheaded Horde victories in Northrend and, as Warchief, consolidated Horde power amidst the chaos of the Cataclysm. But his visions of orc supremacy by any means have brought the armies of the world crashing down upon Orgrimmar... a final reckoning that Garrosh himself awaits with brutal relish.
|
||||
Loc ["STRING_GARROSHHELLSCREAM"] = "Garrosh Hellscream"
|
||||
Binary file not shown.
Binary file not shown.
@@ -1,11 +0,0 @@
|
||||
local Loc = LibStub("AceLocale-3.0"):NewLocale("Details_RaidInfo-SiegeOfOrgrimmar", "ptBR")
|
||||
|
||||
if (not Loc) then
|
||||
return
|
||||
end
|
||||
|
||||
Loc ["PLUGIN_NAME"] = "Info da Raide Cerco a Orgrimmar"
|
||||
Loc ["STRING_RAID_NAME"] = "Cerco a Orgrimmar"
|
||||
|
||||
---------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -1,9 +0,0 @@
|
||||
## Interface: 60000
|
||||
## Title: Details: Throne of Thunder
|
||||
## Notes: Plugin for Details
|
||||
## RequiredDeps: Details
|
||||
|
||||
enUS.lua
|
||||
ptBR.lua
|
||||
|
||||
ThroneOfThunder.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")
|
||||
File diff suppressed because it is too large
Load Diff
@@ -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>
|
||||
@@ -1,24 +0,0 @@
|
||||
local Loc = LibStub("AceLocale-3.0"):NewLocale("Details_RaidInfo-ThroneOfThunder", "enUS", true)
|
||||
|
||||
if (not Loc) then
|
||||
return
|
||||
end
|
||||
|
||||
Loc ["PLUGIN_NAME"] = "Raid Info Throne of Thunder"
|
||||
Loc ["STRING_RAID_NAME"] = "Throne of Thunder"
|
||||
|
||||
---------------------------------------------------------------------------------------------------
|
||||
|
||||
Loc ["STRING_JINROKH"] = "Jin'rokh the Breaker"
|
||||
Loc ["STRING_HORRIDON"] = "Horridon"
|
||||
Loc ["STRING_CONCIL"] = "Council of Elders"
|
||||
Loc ["STRING_TORTOS"] = "Tortos"
|
||||
Loc ["STRING_MEGAERA"] = "Megaera"
|
||||
Loc ["STRING_JIKUN"] = "Ji'kun"
|
||||
Loc ["STRING_DURUMU"] = "Durumu the Forgotten"
|
||||
Loc ["STRING_PRIMORDIUS"] = "Primordius"
|
||||
Loc ["STRING_DARKANIMUS"] = "Dark Animus"
|
||||
Loc ["STRING_IRONQON"] = "Iron Qon"
|
||||
Loc ["STRING_TWINS"] = "Twin Consorts"
|
||||
Loc ["STRING_LEISHEN"] = "Lei Shen"
|
||||
Loc ["STRING_RADEN"] = "Ra-Den"
|
||||
Binary file not shown.
Binary file not shown.
@@ -1,11 +0,0 @@
|
||||
local Loc = LibStub("AceLocale-3.0"):NewLocale("Details_RaidInfo-ThroneOfThunder", "ptBR")
|
||||
|
||||
if (not Loc) then
|
||||
return
|
||||
end
|
||||
|
||||
Loc ["PLUGIN_NAME"] = "Info da Raide Trono do Trovao"
|
||||
Loc ["STRING_RAID_NAME"] = "Trono do Trovao"
|
||||
|
||||
---------------------------------------------------------------------------------------------------
|
||||
|
||||
+179
-10
@@ -389,14 +389,6 @@ function _G._detalhes:Start()
|
||||
end
|
||||
end
|
||||
|
||||
--> minimap
|
||||
_detalhes:RegisterMinimap()
|
||||
|
||||
function _detalhes:RegisterHotCorner()
|
||||
_detalhes:DoRegisterHotCorner()
|
||||
end
|
||||
_detalhes:ScheduleTimer ("RegisterHotCorner", 5)
|
||||
|
||||
function _detalhes:OpenOptionsWindowAtStart()
|
||||
--_detalhes:OpenOptionsWindow (_detalhes.tabela_instancias[1])
|
||||
--print (_G ["DetailsClearSegmentsButton1"]:GetSize())
|
||||
@@ -406,8 +398,15 @@ function _G._detalhes:Start()
|
||||
_detalhes:ScheduleTimer ("OpenOptionsWindowAtStart", 2)
|
||||
--_detalhes:OpenCustomDisplayWindow()
|
||||
|
||||
--BNSendFriendInvite ("tercio#1488")
|
||||
|
||||
--> minimap
|
||||
pcall (_detalhes.RegisterMinimap, _detalhes)
|
||||
|
||||
--> hot corner
|
||||
function _detalhes:RegisterHotCorner()
|
||||
_detalhes:DoRegisterHotCorner()
|
||||
end
|
||||
_detalhes:ScheduleTimer ("RegisterHotCorner", 5)
|
||||
|
||||
--> get in the realm chat channel
|
||||
if (not _detalhes.schedule_chat_enter and not _detalhes.schedule_chat_leave) then
|
||||
_detalhes:ScheduleTimer ("CheckChatOnZoneChange", 60)
|
||||
@@ -426,6 +425,7 @@ function _G._detalhes:Start()
|
||||
|
||||
_detalhes:BrokerTick()
|
||||
|
||||
|
||||
-- test dbm callbacks
|
||||
|
||||
if (_G.DBM) then
|
||||
@@ -580,5 +580,174 @@ function _G._detalhes:Start()
|
||||
|
||||
--]]
|
||||
|
||||
--> register molten core
|
||||
|
||||
local molten_core = {
|
||||
|
||||
id = 409,
|
||||
ej_id = 0, --encounter journal id
|
||||
|
||||
name = "Molten Core",
|
||||
|
||||
icons = [[Interface\AddOns\Details_RaidInfo-BlackrockFoundry\boss_faces]],
|
||||
icon = [[Interface\AddOns\Details_RaidInfo-BlackrockFoundry\icon256x128]],
|
||||
|
||||
is_raid = true,
|
||||
|
||||
backgroundFile = {file = [[Interface\Glues\LOADINGSCREENS\LoadingScreen_BlackrockFoundry]], coords = {0, 1, 132/512, 439/512}},
|
||||
backgroundEJ = [[Interface\EncounterJournal\UI-EJ-LOREBG-BlackrockFoundry]],
|
||||
|
||||
boss_names = {
|
||||
--[[ 1 ]] "Lucifron",
|
||||
--[[ 2 ]] "Magmadar",
|
||||
--[[ 3 ]] "Gehennas",
|
||||
--[[ 4 ]] "Garr",
|
||||
--[[ 5 ]] "Baron Geddon",
|
||||
--[[ 6 ]] "Shazzrah",
|
||||
--[[ 7 ]] "Sulfuron Harbinger",
|
||||
--[[ 8 ]] "Golemagg the Incinerator",
|
||||
--[[ 9 ]] "Majordomo Executus",
|
||||
--[[ 10 ]] "Ragnaros",
|
||||
},
|
||||
|
||||
encounter_ids = { --encounter journal encounter id
|
||||
--> Ids by Index
|
||||
1161, 1202, 1122, 1123, 1155, 1147, 1154, 1162, 1203, 959,
|
||||
|
||||
--> Boss Index
|
||||
[1161] = 1,
|
||||
[1202] = 2,
|
||||
[1122] = 3,
|
||||
[1123] = 4,
|
||||
[1155] = 5,
|
||||
[1147] = 6,
|
||||
[1154] = 7,
|
||||
[1162] = 8,
|
||||
[1203] = 9,
|
||||
[959] = 10,
|
||||
},
|
||||
|
||||
encounter_ids2 = {
|
||||
--combatlog encounter id
|
||||
[1694] = 3, --Beastlord Darmac
|
||||
[1689] = 4, --Flamebender Ka'graz
|
||||
[1693] = 5, --Hans'gar & Franzok
|
||||
[1692] = 6, --Operator Thogar
|
||||
[1713] = 8, --Kromog, Legend of the Mountain
|
||||
[1695] = 9, --The Iron Maidens
|
||||
},
|
||||
|
||||
boss_ids = {
|
||||
--npc ids
|
||||
[12118] = 1, --
|
||||
[11982] = 2, --
|
||||
[12259] = 3, --
|
||||
[12057] = 4, --
|
||||
[12056] = 5, --
|
||||
[12264] = 6, --
|
||||
[12098] = 7, --
|
||||
[11988] = 8, --
|
||||
[12018] = 9, --
|
||||
[11502] = 10, --
|
||||
},
|
||||
|
||||
encounters = {
|
||||
|
||||
[1] = {
|
||||
boss = "Gruul",
|
||||
portrait = [[Interface\ENCOUNTERJOURNAL\UI-EJ-BOSS-Gruul]],
|
||||
|
||||
--> spell list
|
||||
continuo = {
|
||||
},
|
||||
},
|
||||
|
||||
[2] = {
|
||||
boss = "Oregorger",
|
||||
portrait = [[Interface\ENCOUNTERJOURNAL\UI-EJ-BOSS-Oregorger]],
|
||||
|
||||
--> spell list
|
||||
continuo = {
|
||||
},
|
||||
},
|
||||
|
||||
[3] = {
|
||||
boss = "Beastlord Darmac",
|
||||
portrait = [[Interface\ENCOUNTERJOURNAL\UI-EJ-BOSS-Beastlord Darmac]],
|
||||
|
||||
--> spell list
|
||||
continuo = {
|
||||
},
|
||||
},
|
||||
|
||||
[4] = {
|
||||
boss = "Flamebender Ka'graz",
|
||||
portrait = [[Interface\ENCOUNTERJOURNAL\UI-EJ-BOSS-Flamebender Kagraz]],
|
||||
|
||||
--> spell list
|
||||
continuo = {
|
||||
},
|
||||
},
|
||||
|
||||
[5] = {
|
||||
boss = "Hans'gar and Franzok",
|
||||
portrait = [[Interface\ENCOUNTERJOURNAL\UI-EJ-BOSS-Franzok]],
|
||||
|
||||
--> spell list
|
||||
continuo = {
|
||||
},
|
||||
},
|
||||
|
||||
[6] = {
|
||||
boss = "Operator Thogar",
|
||||
portrait = [[Interface\ENCOUNTERJOURNAL\UI-EJ-BOSS-Operator Thogar]],
|
||||
|
||||
--> spell list
|
||||
continuo = {
|
||||
},
|
||||
},
|
||||
|
||||
[7] = {
|
||||
boss = "The Blast Furnace",
|
||||
portrait = [[Interface\ENCOUNTERJOURNAL\UI-EJ-BOSS-The Blast Furnace]],
|
||||
|
||||
--> spell list
|
||||
continuo = {
|
||||
},
|
||||
},
|
||||
|
||||
[8] = {
|
||||
boss = "Kromog, Legend of the Mountain",
|
||||
portrait = [[Interface\ENCOUNTERJOURNAL\UI-EJ-BOSS-Kromog]],
|
||||
|
||||
--> spell list
|
||||
continuo = {
|
||||
},
|
||||
},
|
||||
|
||||
[9] = {
|
||||
boss = "The Iron Maidens",
|
||||
portrait = [[Interface\ENCOUNTERJOURNAL\UI-EJ-BOSS-Iron Maidens]],
|
||||
|
||||
--> spell list
|
||||
continuo = {
|
||||
},
|
||||
},
|
||||
|
||||
[10] = {
|
||||
boss = "Blackhand",
|
||||
portrait = [[Interface\ENCOUNTERJOURNAL\UI-EJ-BOSS-Warlord Blackhand]],
|
||||
|
||||
--> spell list
|
||||
continuo = {
|
||||
},
|
||||
},
|
||||
|
||||
},
|
||||
|
||||
}
|
||||
|
||||
_detalhes:InstallEncounter (molten_core)
|
||||
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user