- added a new builtin plugin: Details_YouAreNotPrepared.

- options panel recreated from scretch.
This commit is contained in:
terciob19
2013-12-20 19:23:57 -02:00
parent 985f8badb8
commit f6d807bf51
34 changed files with 2986 additions and 1296 deletions
+2 -1
View File
@@ -8,4 +8,5 @@ move-folders:
Details/plugins/Details_SpellDetails: Details_SpellDetails
Details/plugins/Details_TimeAttack: Details_TimeAttack
Details/plugins/Details_TinyThreat: Details_TinyThreat
Details/plugins/Details_Vanguard: Details_Vanguard
Details/plugins/Details_Vanguard: Details_Vanguard
Details/plugins/Details_YouAreNotPrepared: Details_YouAreNotPrepared
+3 -3
View File
@@ -8,9 +8,9 @@
_ = nil
_detalhes = LibStub("AceAddon-3.0"):NewAddon("_detalhes", "AceTimer-3.0", "AceComm-3.0", "AceSerializer-3.0", "NickTag-1.0")
_detalhes.userversion = "v1.7.0"
_detalhes.version = "Alpha 011"
_detalhes.realversion = 11
_detalhes.userversion = "v1.8.0"
_detalhes.version = "Alpha 012"
_detalhes.realversion = 12
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--> initialization stuff
+2 -2
View File
@@ -2067,9 +2067,9 @@ function _detalhes:envia_relatorio (linhas, custom)
end
if (_detalhes.time_type == 2) then
linhas[1] = linhas[1] .. " (Co)"
linhas[1] = linhas[1] .. " (Ef)"
else
linhas[1] = linhas[1] .. " (Cr)"
linhas[1] = linhas[1] .. " (Ac)"
end
local editbox = _detalhes.janela_report.editbox
+13 -7
View File
@@ -287,6 +287,18 @@
_detalhes:SendEvent ("COMBAT_PLAYER_ENTER", nil, _detalhes.tabela_vigente)
end
function _detalhes:DelayedSyncAlert()
local lower_instance = _detalhes:GetLowerInstanceNumber()
if (lower_instance) then
lower_instance = _detalhes:GetInstance (lower_instance)
if (lower_instance) then
if (not lower_instance:HaveInstanceAlert()) then
lower_instance:InstanceAlert (Loc ["STRING_EQUILIZING"], {[[Interface\COMMON\StreamCircle]], 22, 22, true}, 5, {function() end})
end
end
end
end
function _detalhes:SairDoCombate (bossKilled)
@@ -365,13 +377,7 @@
--> schedule sync
_detalhes:EqualizeActorsSchedule (_detalhes.host_of)
if (_detalhes:GetEncounterEqualize (_detalhes.tabela_vigente.is_boss.mapid, _detalhes.tabela_vigente.is_boss.index)) then
local lower_instance = _detalhes:GetLowerInstanceNumber()
if (lower_instance) then
lower_instance = _detalhes:GetInstance (lower_instance)
if (lower_instance) then
lower_instance:InstanceAlert (Loc ["STRING_EQUILIZING"], {[[Interface\COMMON\StreamCircle]], 22, 22, true}, 5)
end
end
_detalhes:ScheduleTimer ("DelayedSyncAlert", 3)
end
--> schedule clean up
+23 -1
View File
@@ -103,7 +103,9 @@
local _in_combat = false
--> hooks
local _hook_cooldowns = false
local _hook_deaths = false
local _hook_cooldowns_container = _detalhes.hooks ["HOOK_COOLDOWN"]
local _hook_deaths_container = _detalhes.hooks ["HOOK_DEATH"]
@@ -2226,6 +2228,20 @@
_table_sort (esta_morte, _detalhes.Sort4)
if (_hook_deaths) then
--> send event to registred functions
local death_at = _tempo - _current_combat.start_time
local max_health = _UnitHealthMax (alvo_name)
local new_death_table = {}
for index, t in _ipairs (esta_morte) do
new_death_table [index] = t
end
for _, func in _ipairs (_hook_deaths_container) do
func (nil, token, time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, new_death_table, este_jogador.last_cooldown, death_at, max_health)
end
end
if (_detalhes.deadlog_limit and #esta_morte > _detalhes.deadlog_limit) then
for i = #esta_morte, _detalhes.deadlog_limit+1, -1 do
_table_remove (esta_morte, i)
@@ -2265,7 +2281,7 @@
--> reseta a pool
dano.last_events_table = _detalhes:CreateActorLastEventTable()
cura.last_events_table = _detalhes:CreateActorLastEventTable()
end
end
end
@@ -2736,6 +2752,12 @@
else
_hook_cooldowns = false
end
if (_detalhes.hooks ["HOOK_DEATH"].enabled) then
_hook_deaths = true
else
_hook_deaths = false
end
return _detalhes:ClearParserCache()
end
+52 -6
View File
@@ -407,7 +407,7 @@ local ButtonMetaFunctions = {}
end
--> custom textures
function ButtonMetaFunctions:InstallCustomTexture (texture, rect)
function ButtonMetaFunctions:InstallCustomTexture (texture, rect, coords)
self.button:SetNormalTexture (nil)
self.button:SetPushedTexture (nil)
@@ -424,7 +424,13 @@ local ButtonMetaFunctions = {}
self.button.texture:SetPoint ("bottomright", self.button, "bottomright", rect.x2, rect.y2)
end
self.button.texture:SetTexCoord (0, 1, 0, 0.24609375)
if (coords) then
self.button.texture.coords = coords
self.button.texture:SetTexCoord (_unpack (coords.Normal))
else
self.button.texture:SetTexCoord (0, 1, 0, 0.24609375)
end
self.button.texture:SetTexture (texture)
end
@@ -440,8 +446,14 @@ local ButtonMetaFunctions = {}
end
end
button.MyObject.is_mouse_over = true
if (button.texture) then
button.texture:SetTexCoord (0, 1, 0.25+(0.0078125/2), 0.5+(0.0078125/2))
if (button.texture.coords) then
button.texture:SetTexCoord (_unpack (button.texture.coords.Highlight))
else
button.texture:SetTexCoord (0, 1, 0.24609375, 0.49609375)
end
end
if (button.MyObject.have_tooltip) then
@@ -466,10 +478,16 @@ local ButtonMetaFunctions = {}
end
end
if (button.texture) then
button.texture:SetTexCoord (0, 1, 0, 0.24609375)
button.MyObject.is_mouse_over = false
if (button.texture and not button.MyObject.is_mouse_down) then
if (button.texture.coords) then
button.texture:SetTexCoord (_unpack (button.texture.coords.Normal))
else
button.texture:SetTexCoord (0, 1, 0, 0.24609375)
end
end
if (button.MyObject.have_tooltip) then
_detalhes.popup:ShowMe (false)
end
@@ -512,6 +530,16 @@ local ButtonMetaFunctions = {}
end
end
button.MyObject.is_mouse_down = true
if (button.texture) then
if (button.texture.coords) then
button.texture:SetTexCoord (_unpack (button.texture.coords.Pushed))
else
button.texture:SetTexCoord (0, 1, 0.5078125, 0.75)
end
end
button.text:SetPoint ("center", button,"center", 1, -1)
button.mouse_down = GetTime()
@@ -548,7 +576,25 @@ local ButtonMetaFunctions = {}
return
end
end
button.MyObject.is_mouse_down = false
if (button.texture) then
if (button.texture.coords) then
if (button.MyObject.is_mouse_over) then
button.texture:SetTexCoord (_unpack (button.texture.coords.Highlight))
else
button.texture:SetTexCoord (_unpack (coords.Normal))
end
else
if (button.MyObject.is_mouse_over) then
button.texture:SetTexCoord (0, 1, 0.24609375, 0.49609375)
else
button.texture:SetTexCoord (0, 1, 0, 0.24609375)
end
end
end
button.text:SetPoint ("center", button,"center", 0, 0)
if (button.MyObject.container.isMoving) then
+8 -1
View File
@@ -239,7 +239,7 @@ local DropDownMetaFunctions = {}
end
--> frame stratas
function DropDownMetaFunctions:SetFrameStrata()
function DropDownMetaFunctions:GetFrameStrata()
return self.dropdown:GetFrameStrata()
end
function DropDownMetaFunctions:SetFrameStrata (strata)
@@ -423,6 +423,13 @@ function DetailsDropDownOnMouseDown (button)
local selectedTexture = _G [button:GetName() .. "_ScrollFrame_ScrollChild_SelectedTexture"]
local mouseOverTexture = _G [button:GetName() .. "_ScrollFrame_ScrollChild_MouseOverTexture"]
--scrollFrame:SetFrameStrata ("DIALOG")
--scrollBorder:SetFrameStrata ("DIALOG")
--scrollChild:SetFrameStrata ("DIALOG")
--print (scrollFrame:GetFrameStrata())
--print (_G ["DetailsOptionsWindow1FragsPvpSlider"]:GetFrameStrata())
local i = 1
local showing = 0
local currentText = button.text:GetText() or ""
+4 -4
View File
@@ -69,7 +69,7 @@
<Frames>
<Frame name="$Parent_Border" parentKey="dropdownborder" hidden="true">
<Frame name="$Parent_Border" parentKey="dropdownborder" hidden="true" frameStrata="DIALOG">
<Size x="150" y="170"/>
<Anchors>
@@ -99,14 +99,14 @@
</Frame>
<ScrollFrame name="$Parent_ScrollFrame" parentKey="dropdownframe" hidden="true">
<ScrollFrame name="$Parent_ScrollFrame" parentKey="dropdownframe" hidden="true" frameStrata="DIALOG">
<Size x="150" y="150"/>
<Anchors>
<Anchor point="TOPLEFT" relativeTo="$Parent" relativePoint="BOTTOMLEFT" x="0" y="-10" />
</Anchors>
<ScrollChild>
<Frame name="$Parent_ScrollChild">
<Frame name="$Parent_ScrollChild" frameStrata="DIALOG">
<Size x="150" y="150"/>
@@ -183,7 +183,7 @@
</Button>
<Button name="DetailsDropDownOptionTemplate" virtual="true">
<Button name="DetailsDropDownOptionTemplate" virtual="true" frameStrata="DIALOG">
<Size x="150" y="20" />
<Layers>
+18 -1
View File
@@ -130,6 +130,17 @@ local LabelMetaFunctions = {}
end
return _object.label:SetJustifyH (_value)
end
--> text valign
local smember_textvalign = function (_object, _value)
if (_value == "^") then
_value = "top"
elseif (_value == "_") then
_value = "bottom"
elseif (_value == "|") then
_value = "middle"
end
return _object.label:SetJustifyV (_value)
end
--> field size width
local smember_width = function (_object, _value)
return _object.label:SetWidth (_value)
@@ -138,11 +149,16 @@ local LabelMetaFunctions = {}
local smember_height = function (_object, _value)
return _object.label:SetHeight (_value)
end
--> outline (shadow)
local smember_outline = function (_object, _value)
_detalhes:SetFontOutline (_object.label, _value)
end
local set_members_function_index = {
["show"] = smember_show,
["hide"] = smember_hide,
["align"] = smember_textalign,
["valign"] = smember_textvalign,
["text"] = smember_text,
["width"] = smember_width,
["height"] = smember_height,
@@ -152,7 +168,8 @@ local LabelMetaFunctions = {}
["fontsize"] = smember_textsize,
["textcolor"] = smember_textcolor,
["textfont"] = smember_textfont,
["textsize"] = smember_textsize
["textsize"] = smember_textsize,
["shadow"] = smember_outline
}
LabelMetaFunctions.__newindex = function (_table, _key, _value)
+2 -2
View File
@@ -397,7 +397,7 @@ local APIFrameFunctions
frame.isMoving = true
frame:StartMoving()
end
elseif (not frame.MyObject.container.isLocked and frame.MyObject.container:IsMovable()) then
if (not frame.isLocked and frame:IsMovable()) then
frame.MyObject.container.isMoving = true
@@ -431,7 +431,7 @@ local APIFrameFunctions
frame.MyObject.container.isMoving = false
end
end
end
end
------------------------------------------------------------------------------------------------------------
--> object constructor
+2
View File
@@ -6,11 +6,13 @@
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--[[global]] DETAILS_HOOK_COOLDOWN = "HOOK_COOLDOWN"
--[[global]] DETAILS_HOOK_DEATH = "HOOK_DEATH"
local _detalhes = _G._detalhes
local _
_detalhes.hooks ["HOOK_COOLDOWN"] = {}
_detalhes.hooks ["HOOK_DEATH"] = {}
function _detalhes:InstallHook (hook_type, func)
+1
View File
@@ -669,6 +669,7 @@ local function cria_container_alvos (este_gump)
este_gump.container_alvos = container_alvos_window
end
--> search key: ~create
function gump:CriaJanelaInfo()
--> cria a janela em si
+1876 -1259
View File
File diff suppressed because it is too large Load Diff
+24 -1
View File
@@ -68,7 +68,10 @@ end
local COORDS_SLIDER_TOP = {0.00146484375, 0.03173828125, 0.00244140625, 0.03271484375} -- 1 2 33 34
local COORDS_SLIDER_MIDDLE = {0.00146484375, 0.03173828125, 0.03955078125, 0.10107421875} -- 1 40 33 104
local COORDS_SLIDER_DOWN = {0.00146484375, 0.03173828125, 0.11767578125, 0.14794921875} -- 1 120 33 152
--local COORDS_SLIDER_DOWN = {0.00146484375, 0.03173828125, 0.11767578125, 0.14794921875} -- 1 120 33 152
local COORDS_SLIDER_DOWN = {0.00146484375, 0.03173828125, 0.10986328125, 0.14013671875} -- 1 112 33 144
local COORDS_STRETCH = {0.00146484375, 0.03173828125, 0.21435546875, 0.22900390625} -- 1 219 33 235
local COORDS_RESIZE_RIGHT = {0.00146484375, 0.01611328125, 0.24560546875, 0.26025390625} -- 1 251 17 267
@@ -1585,6 +1588,10 @@ local function iterate_scroll_scripts (BackGroundDisplay, BackGroundFrame, BaseF
end)
end
function _detalhes:HaveInstanceAlert()
return self.alert:IsShown()
end
function _detalhes:InstanceAlertTime (instance)
instance.alert:Hide()
instance.alert.rotate:Stop()
@@ -1593,6 +1600,22 @@ end
function _detalhes:InstanceAlert (msg, icon, time, clickfunc)
if (not self.meu_id) then
local lower = _detalhes:GetLowerInstanceNumber()
if (lower) then
self = _detalhes:GetInstance (lower)
else
return
end
end
if (type (msg) == "boolean" and not msg) then
self.alert:Hide()
self.alert.rotate:Stop()
self.alert_time = nil
return
end
if (msg) then
self.alert.text:SetText (msg)
else
BIN
View File
Binary file not shown.
Binary file not shown.
Binary file not shown.
+162 -5
View File
@@ -3,7 +3,7 @@ if not Loc then return end
--------------------------------------------------------------------------------------------------------------------------------------------
-- \n\n|cFFFFFF00-|r
Loc ["STRING_VERSION_LOG"] = "|cFFFFFF00v1.7.0|r\n\n- Fixed some colors issues with enimies bars.\n\n|cFFFFFF00-|r Fixed some phrases which isn't still not translated to enUS.\n\n|cFFFFFF00-|r Major rewrite on CC-Breaks, now it's working properly.\n\n|cFFFFFF00-|r Added new sub attribute for damage: Voidzones & Debuffs.|cFFFFFF00v1.6.7|r\n\n- Added support to skins, you can change over options panel.\n\n|cFFFFFF00v1.6.5|r\n\n|cFFFFFF00-|r Added sub attribute 'Enemies' which shows, of course, only enemies.\n\n|cFFFFFF00-|r Fixed issue with successful spell cast.\n\n|cFFFFFF00v1.6.3|r\n\n|cFFFFFF00-|r data capture now runs 4% faster.\n\n|cFFFFFF00-|r Fixed issue with pets were wasn't uptading owner activity time.\n\n|cFFFFFF00-|r Fixed healing being counted even out of combat.\n\n|cFFFFFF00-|r Fixed some problems with multi-boss encountes like Twin Consorts.\n\n|cFFFFFF00-|r Added options for concatenate trash segments.\n\n|cFFFFFF00-|r Added options for auto remove trash segments. \n\n|cFFFFFF00-|r Added options for change bar height. \n\n|cFFFFFF00-|r Encounter Details now display how many interrupted and successful cast of a boss skill.\n\n|cFFFFFF00v1.6.1|r\n\n|cFFFFFF00-|r Fixed:\n- a issue with debuff uptime.\n- overall data dps and hps for overall data on micro display.\n- many bugs involving sword and book menus.\n- garbage collector erasing actors with interactions with your group members.\n\n|cFFFFFF00-|r overall data now always use the combat data for measure dps and hps.\n\n|cFFFFFF00v1.6.0|r\n\n|cFFFFFF00-|r Added debuff uptime at misc attribute.\n\n|cFFFFFF00-|r Disabled attributes now have a darkness effect over sword menu.\n\n|cFFFFFF00-|r Fixed a issue were sometimes you need to /reload before change a talent.\n\n|cFFFFFF00v1.5.3|r\n\n|cFFFFFF00-|r Fixed a issue with report data during combat lockdown.\n\n|cFFFFFF00-|r Improved pet owner recognition and added a ignore list if couldn't find his owner.\n\n|cFFFFFF00-|r Added an option to display only frags on enemy players.\n\n|cFFFFFF00-|r Added class colors for frags.\n\n|cFFFFFF00v1.5.2|r\n\n|cFFFFFF00-|r Fixed a issue were turning off buff uptime was disabling healing done too.\n\n|cFFFFFF00-|r Avoidance statistics will not be recorded for pets, ungrouped players and monsters.\n\n|cFFFFFF00-|r Fixed a issue were sometimes buff uptime was taking too long to save data on logout.\n\n|cFFFFFF00v1.5.1|r\n\n|cFFFFFF00-|r Fixed a issue with report data were sometimes wasn't working.\n\n|cFFFFFF00v1.5.0|r\n\n|cFFFFFF00-|r Buff Uptime was been implemented over Miscellaneous attribute.\n\n|cFFFFFF00-|r Death Logs now also display cooldowns and last cooldown used.\n\n|cFFFFFF00-|r Added this window showing the latest changes.\n\n|cFFFFFF00-|r Fixed the issue were sometimes the instance stops to update when clicking on the attribute name over sword menu.\n\n|cFFFFFF00-|r Disabling Healing now shutdown the absorbs too, disabling auras doesn't interrupt absorbs any more.\n\n|cFFFFFF00-|r Friendly Fire now only track players which is inside a group.\n\n|cFFFFFF00-|r Fixed a issue were pet damage on target isn't added to owner target.\n\n|cFFFFFF00-|r Fixed a bug were refreshing a cooldown isn't counting.\n\n|cFFFFFF00-|r Added absorbs for shammy and monk 2P tier 16.\n\n|cFFFFFF00-|r Added slash command 'worldboss' and 'updates'.\n\n"
Loc ["STRING_VERSION_LOG"] = "|cFFFFFF00v1.8.0|r\n\n- Added a new plugin: You Are Not Prepared.\n\n|cFFFFFF00-|r New options panel!\n\n|cFFFFFF00v1.7.0|r\n\n- Fixed some colors issues with enimies bars.\n\n|cFFFFFF00-|r Fixed some phrases which isn't still not translated to enUS.\n\n|cFFFFFF00-|r Major rewrite on CC-Breaks, now it's working properly.\n\n|cFFFFFF00-|r Added new sub attribute for damage: Voidzones & Debuffs.|cFFFFFF00v1.6.7|r\n\n- Added support to skins, you can change over options panel.\n\n|cFFFFFF00v1.6.5|r\n\n|cFFFFFF00-|r Added sub attribute 'Enemies' which shows, of course, only enemies.\n\n|cFFFFFF00-|r Fixed issue with successful spell cast.\n\n|cFFFFFF00v1.6.3|r\n\n|cFFFFFF00-|r data capture now runs 4% faster.\n\n|cFFFFFF00-|r Fixed issue with pets were wasn't uptading owner activity time.\n\n|cFFFFFF00-|r Fixed healing being counted even out of combat.\n\n|cFFFFFF00-|r Fixed some problems with multi-boss encountes like Twin Consorts.\n\n|cFFFFFF00-|r Added options for concatenate trash segments.\n\n|cFFFFFF00-|r Added options for auto remove trash segments. \n\n|cFFFFFF00-|r Added options for change bar height. \n\n|cFFFFFF00-|r Encounter Details now display how many interrupted and successful cast of a boss skill.\n\n|cFFFFFF00v1.6.1|r\n\n|cFFFFFF00-|r Fixed:\n- a issue with debuff uptime.\n- overall data dps and hps for overall data on micro display.\n- many bugs involving sword and book menus.\n- garbage collector erasing actors with interactions with your group members.\n\n|cFFFFFF00-|r overall data now always use the combat data for measure dps and hps.\n\n|cFFFFFF00v1.6.0|r\n\n|cFFFFFF00-|r Added debuff uptime at misc attribute.\n\n|cFFFFFF00-|r Disabled attributes now have a darkness effect over sword menu.\n\n|cFFFFFF00-|r Fixed a issue were sometimes you need to /reload before change a talent.\n\n|cFFFFFF00v1.5.3|r\n\n|cFFFFFF00-|r Fixed a issue with report data during combat lockdown.\n\n|cFFFFFF00-|r Improved pet owner recognition and added a ignore list if couldn't find his owner.\n\n|cFFFFFF00-|r Added an option to display only frags on enemy players.\n\n|cFFFFFF00-|r Added class colors for frags.\n\n|cFFFFFF00v1.5.2|r\n\n|cFFFFFF00-|r Fixed a issue were turning off buff uptime was disabling healing done too.\n\n|cFFFFFF00-|r Avoidance statistics will not be recorded for pets, ungrouped players and monsters.\n\n|cFFFFFF00-|r Fixed a issue were sometimes buff uptime was taking too long to save data on logout.\n\n|cFFFFFF00v1.5.1|r\n\n|cFFFFFF00-|r Fixed a issue with report data were sometimes wasn't working.\n\n|cFFFFFF00v1.5.0|r\n\n|cFFFFFF00-|r Buff Uptime was been implemented over Miscellaneous attribute.\n\n|cFFFFFF00-|r Death Logs now also display cooldowns and last cooldown used.\n\n|cFFFFFF00-|r Added this window showing the latest changes.\n\n|cFFFFFF00-|r Fixed the issue were sometimes the instance stops to update when clicking on the attribute name over sword menu.\n\n|cFFFFFF00-|r Disabling Healing now shutdown the absorbs too, disabling auras doesn't interrupt absorbs any more.\n\n|cFFFFFF00-|r Friendly Fire now only track players which is inside a group.\n\n|cFFFFFF00-|r Fixed a issue were pet damage on target isn't added to owner target.\n\n|cFFFFFF00-|r Fixed a bug were refreshing a cooldown isn't counting.\n\n|cFFFFFF00-|r Added absorbs for shammy and monk 2P tier 16.\n\n|cFFFFFF00-|r Added slash command 'worldboss' and 'updates'.\n\n"
Loc ["STRING_DETAILS1"] = "|cffffaeaeDetails:|r " --> color and details name
@@ -344,10 +344,6 @@ if not Loc then return end
Loc ["STRING_HELP_MODEGROUP"] = "Use this option to display only you or players which are in your group or raid."
Loc ["STRING_HELP_MODEALL"] = "This mode will show every player, npc, boss with data captured by Details!."
Loc ["STRING_HELP_MODERAID"] = "The raid mode is the opposite of self mode, this plugins are intended to work with data captured from your group. You can change the plugin on sword menu."
--O modo sozinho possui plugins que irão trabalhar apenas em cima dos dados capturados do seu personagem, como o dano que ele causa, os buffs e debuffs que ele possui, entre outros.
--> misc
@@ -363,7 +359,168 @@ if not Loc then return end
-- OPTIONS PANEL -----------------------------------------------------------------------------------------------------------------
Loc ["STRING_OPTIONS_SWITCHINFO"] = "|cFFF79F81 LEFT DISABLED|r |cFF81BEF7 RIGHT ENABLED|r"
Loc ["STRING_OPTIONS_PICKCOLOR"] = "color"
Loc ["STRING_OPTIONS_EDITIMAGE"] = "Edit Image"
Loc ["STRING_OPTIONS_PRESETTOOLD"] = "This preset requires a newer version of Details!."
Loc ["STRING_OPTIONS_PRESETNONAME"] = "Give a name to your preset."
Loc ["STRING_OPTIONS_EDITINSTANCE"] = "Editing Instance:"
Loc ["STRING_OPTIONS_GENERAL"] = "General Settings"
Loc ["STRING_OPTIONS_APPEARANCE"] = "Appearance"
Loc ["STRING_OPTIONS_PERFORMANCE"] = "Performance"
Loc ["STRING_OPTIONS_SOCIAL"] = "Social"
Loc ["STRING_OPTIONS_SOCIAL_DESC"] = "Tell how do you want to be known in your guild enviorement."
Loc ["STRING_OPTIONS_NICKNAME"] = "Nickname"
Loc ["STRING_OPTIONS_NICKNAME_DESC"] = "Type your nickname in this box. The chosen nickname will be broadcasted for members of your guild and Details! shown it instead of your character name."
Loc ["STRING_OPTIONS_AVATAR"] = "Choose Avatar"
Loc ["STRING_OPTIONS_AVATAR_DESC"] = "Your avatar is also broadcasted for your guild mates and Details! show it on the top of tooltips when you mouse over a bar."
Loc ["STRING_OPTIONS_REALMNAME"] = "Remove Realm Name"
Loc ["STRING_OPTIONS_REALMNAME_DESC"] = "When enabled, the realm name of character isn't displayed with his name.\n\n|cFFFFFFFFExample:|r\n\nCharles-Netherwing |cFFFFFFFF(disabled)|r\nCharles |cFFFFFFFF(enabled)|r"
Loc ["STRING_OPTIONS_MAXSEGMENTS"] = "Max. Segments"
Loc ["STRING_OPTIONS_MAXSEGMENTS_DESC"] = "This option control how many segments you want to maintain.\n\nRecommended value is |cFFFFFFFF12|r, but feel free to adjust this number to be comfortable for you.\n\nComputers with |cFFFFFFFF2GB|r or less memory ram should keep low segments amount, this can help your system overall."
Loc ["STRING_OPTIONS_SCROLLBAR"] = "Scroll Bar"
Loc ["STRING_OPTIONS_SCROLLBAR_DESC"] = "Enable ou Disable the scroll bar.\n\nBy default, Details! scroll bars are replaced by a mechanism that stretches the window.\n\nThe |cFFFFFFFFstretch handle|r is outside over instances button/menu (left of close button)."
Loc ["STRING_OPTIONS_MAXINSTANCES"] = "Max. Instances"
Loc ["STRING_OPTIONS_MAXINSTANCES_DESC"] = "Limit the number of Details! instances which can be created.\n\nYou can open and re-open instances clicking on the instance button |cFFFFFFFF#X|r."
Loc ["STRING_OPTIONS_PVPFRAGS"] = "Only Pvp Frags"
Loc ["STRING_OPTIONS_PVPFRAGS_DESC"] = "When enabled, only kills against enemy players will be count."
Loc ["STRING_OPTIONS_TIMEMEASURE"] = "Time Measure"
Loc ["STRING_OPTIONS_TIMEMEASURE_DESC"] = "|cFFFFFFFFActivity|r: the timer of each raid member is put on hold if his activity is ceased and back again to count when is resumed, common way of mensure Dps and Hps.\n\n|cFFFFFFFFEffective|r: used on rankings, this method uses the elapsed combat time for mensure the Dps and Hps of all raid members."
Loc ["STRING_OPTIONS_PERFORMANCE1"] = "Performance Tweaks"
Loc ["STRING_OPTIONS_PERFORMANCE1_DESC"] = "This options can help save some cpu usage."
Loc ["STRING_OPTIONS_MEMORYT"] = "Memory Threshold"
Loc ["STRING_OPTIONS_MEMORYT_DESC"] = "Details! have internal mechanisms to handle memory and try adjust it self within the amount of memory avaliable on your system.\n\nAlso is recommeded keep the amount of segments low on systems with |cFFFFFFFF2GB|r or less of memory."
Loc ["STRING_OPTIONS_SEGMENTSSAVE"] = "Segments Saved"
Loc ["STRING_OPTIONS_SEGMENTSSAVE_DESC"] = "This options controls how many segments you wish save between game sesions.\n\nHigh values can make your character logoff take more time\n\nIf you rarelly use the data of last day, it`s high recommeded leave this option in |cFFFFFFFF1|r."
Loc ["STRING_OPTIONS_PANIMODE"] = "Panic Mode"
Loc ["STRING_OPTIONS_PANIMODE_DESC"] = "When enabled and you got dropped from the game (by a disconnect, for instance) and you are fighting against a boss encounter, all segments are erased, this make your logoff process faster."
Loc ["STRING_OPTIONS_ANIMATEBARS"] = "Animate Bars"
Loc ["STRING_OPTIONS_ANIMATEBARS_DESC"] = "Instead of 'jumping' all bars moves to the left or right when this options is activated."
Loc ["STRING_OPTIONS_ANIMATESCROLL"] = "Animate Scroll Bar"
Loc ["STRING_OPTIONS_ANIMATESCROLL_DESC"] = "When enabled, scrollbar uses a animation when showing up or hiding."
Loc ["STRING_OPTIONS_WINDOWSPEED"] = "Update Speed"
Loc ["STRING_OPTIONS_WINDOWSPEED_DESC"] = "Seconds between each update on instances (opened windows).\n\n|cFFFFFFFF0.3|r: update about 3 times each second.\n\n|cFFFFFFFF3.0|r: update once every 3 seconds."
Loc ["STRING_OPTIONS_CLEANUP"] = "Auto Erase Cleanup Segments"
Loc ["STRING_OPTIONS_CLEANUP_DESC"] = "Segments with trash mobs' are considered clean up segments.\n\nThis option enable the auto erase of this segments when possible."
Loc ["STRING_OPTIONS_PERFORMANCECAPTURES"] = "Data Collector"
Loc ["STRING_OPTIONS_PERFORMANCECAPTURES_DESC"] = "This options are responsible for analysis and collect combat data."
Loc ["STRING_OPTIONS_CDAMAGE"] = "Collect Damage"
Loc ["STRING_OPTIONS_CHEAL"] = "Collect Heal"
Loc ["STRING_OPTIONS_CENERGY"] = "Collect Energy"
Loc ["STRING_OPTIONS_CMISC"] = "Collect Misc"
Loc ["STRING_OPTIONS_CAURAS"] = "Collect Auras"
Loc ["STRING_OPTIONS_CDAMAGE_DESC"] = "Enable capture of:\n\n- |cFFFFFFFFDamage Done|r\n- |cFFFFFFFFDamage Per Second|r\n- |cFFFFFFFFFriendly Fire|r\n- |cFFFFFFFFDamage Taken|r"
Loc ["STRING_OPTIONS_CHEAL_DESC"] = "Enable capture of:\n\n- |cFFFFFFFFHealing Done|r\n- |cFFFFFFFFAbsorbs|r\n- |cFFFFFFFFHealing Per Second|r\n- |cFFFFFFFFOverhealing|r\n- |cFFFFFFFFHealing Taken|r\n- |cFFFFFFFFEnemy Healed|r\n- |cFFFFFFFFDamage Prevented|r"
Loc ["STRING_OPTIONS_CENERGY_DESC"] = "Enable capture of:\n\n- |cFFFFFFFFMana Restored|r\n- |cFFFFFFFFRage Generated|r\n- |cFFFFFFFFEnergy Generated|r\n- |cFFFFFFFFRunic Power Generated|r"
Loc ["STRING_OPTIONS_CMISC_DESC"] = "Enable capture of:\n\n- |cFFFFFFFFCrowd Control Break|r\n- |cFFFFFFFFDispells|r\n- |cFFFFFFFFInterrupts|r\n- |cFFFFFFFFResurrection|r\n- |cFFFFFFFFDeaths|r"
Loc ["STRING_OPTIONS_CAURAS_DESC"] = "Enable capture of:\n\n- |cFFFFFFFFBuffs Uptime|r\n- |cFFFFFFFFDebuffs Uptime|r\n- |cFFFFFFFFVoid Zones|r\n-|cFFFFFFFF Cooldowns|r"
Loc ["STRING_OPTIONS_CLOUD"] = "Cloud Capture"
Loc ["STRING_OPTIONS_CLOUD_DESC"] = "When enabled, the data of disabled collectors are collected within others raid members."
Loc ["STRING_OPTIONS_BARS"] = "Bar Settings"
Loc ["STRING_OPTIONS_BARS_DESC"] = "This options control the appearance of the instance bars."
Loc ["STRING_OPTIONS_BAR_TEXTURE"] = "Texture"
Loc ["STRING_OPTIONS_BAR_TEXTURE_DESC"] = "Choose the texture of bars."
Loc ["STRING_OPTIONS_BAR_BTEXTURE"] = "Background Texture"
Loc ["STRING_OPTIONS_BAR_BTEXTURE_DESC"] = "Choose the background texture of bars."
Loc ["STRING_OPTIONS_BAR_BCOLOR"] = "Background Color"
Loc ["STRING_OPTIONS_BAR_BCOLOR_DESC"] = "Choose the background color of bars."
Loc ["STRING_OPTIONS_BAR_HEIGHT"] = "Height"
Loc ["STRING_OPTIONS_BAR_HEIGHT_DESC"] = "Change the height of bars."
Loc ["STRING_OPTIONS_BAR_COLORBYCLASS"] = "Color By Class"
Loc ["STRING_OPTIONS_BAR_COLORBYCLASS_DESC"] = "When enabled, the instance bars have the color of the character class.\n\nDisabled: bars have a fixed color."
Loc ["STRING_OPTIONS_BAR_COLORBYCLASS2"] = "Background Color By Class"
Loc ["STRING_OPTIONS_BAR_COLORBYCLASS2_DESC"] = "When enabled, the instance bars background have the color of the character class.\n\nDisabled: bars have a fixed color."
--
Loc ["STRING_OPTIONS_TEXT"] = "Text Settings"
Loc ["STRING_OPTIONS_TEXT_DESC"] = "This options control the appearance of the instance bar texts."
Loc ["STRING_OPTIONS_TEXT_SIZE"] = "Size"
Loc ["STRING_OPTIONS_TEXT_SIZE_DESC"] = "Change the size of bar texts."
Loc ["STRING_OPTIONS_TEXT_FONT"] = "Font"
Loc ["STRING_OPTIONS_TEXT_FONT_DESC"] = "Change the font of bar texts."
Loc ["STRING_OPTIONS_TEXT_LOUTILINE"] = "Left Text Outline"
Loc ["STRING_OPTIONS_TEXT_LOUTILINE_DESC"] = "Enable or Disable the outline for left text."
Loc ["STRING_OPTIONS_TEXT_ROUTILINE"] = "Right Text Outline"
Loc ["STRING_OPTIONS_TEXT_ROUTILINE_DESC"] = "Enable or Disable the outline for right text."
Loc ["STRING_OPTIONS_TEXT_LCLASSCOLOR"] = "Left Text Color By Class"
Loc ["STRING_OPTIONS_TEXT_LCLASSCOLOR_DESC"] = "When enabled, the left text uses the class color of the character.\n\nIf disabled, choose the color on the color picker button."
Loc ["STRING_OPTIONS_TEXT_RCLASSCOLOR"] = "Right Text Color By Class"
Loc ["STRING_OPTIONS_TEXT_RCLASSCOLOR_DESC"] = "When enabled, the right text uses the class color of the character.\n\nIf disabled, choose the color on the color picker button."
--
Loc ["STRING_OPTIONS_INSTANCE"] = "Instance Settings"
Loc ["STRING_OPTIONS_INSTANCE_DESC"] = "This options control the appearance of the instance it self."
Loc ["STRING_OPTIONS_INSTANCE_COLOR"] = "Color"
Loc ["STRING_OPTIONS_INSTANCE_COLOR_DESC"] = "Change the color of instance window."
Loc ["STRING_OPTIONS_INSTANCE_ALPHA"] = "Alpha"
Loc ["STRING_OPTIONS_INSTANCE_ALPHA_DESC"] = "This option let you change the color and transparency of instance window background."
Loc ["STRING_OPTIONS_INSTANCE_CURRENT"] = "Auto Switch To Current"
Loc ["STRING_OPTIONS_INSTANCE_CURRENT_DESC"] = "Whenever a combat start and there is no other instance on current segment, this instance auto switch to current segment."
Loc ["STRING_OPTIONS_INSTANCE_SKIN"] = "Skin"
Loc ["STRING_OPTIONS_INSTANCE_SKIN_DESC"] = "Modify all window textures based on a skin theme."
Loc ["STRING_OPTIONS_WP"] = "Wallpaper Settings"
Loc ["STRING_OPTIONS_WP_DESC"] = "This options control the wallpaper of instance."
Loc ["STRING_OPTIONS_WP_ENABLE"] = "Show"
Loc ["STRING_OPTIONS_WP_ENABLE_DESC"] = "Enable or Disable the wallpaper of the instance.\n\nSelect the category and the image you want on the two following boxes."
Loc ["STRING_OPTIONS_WP_GROUP"] = "Category"
Loc ["STRING_OPTIONS_WP_GROUP_DESC"] = "In this box, you select the group of the wallpaper, the images of this category can be chosen on the next dropbox."
Loc ["STRING_OPTIONS_WP_GROUP2"] = "Wallpaper"
Loc ["STRING_OPTIONS_WP_GROUP2_DESC"] = "Select the wallpaper, for more, choose a diferent category on the left dropbox."
Loc ["STRING_OPTIONS_WP_ALIGN"] = "Align"
Loc ["STRING_OPTIONS_WP_ALIGN_DESC"] = "Select how the wallpaper will align within the window instance.\n\n- |cFFFFFFFFFill|r: auto resize and align with all corners.\n\n- |cFFFFFFFFCenter|r: doesn`t resize and align with the center of the window.\n\n-|cFFFFFFFFStretch|r: auto resize on vertical or horizontal and align with left-right or top-bottom sides.\n\n-|cFFFFFFFFFour Corners|r: align with specified corner, no auto resize is made."
Loc ["STRING_OPTIONS_WP_EDIT"] = "Edit Image"
Loc ["STRING_OPTIONS_WP_EDIT_DESC"] = "Open the image editor to change some wallpaper aspects."
Loc ["STRING_OPTIONS_SAVELOAD"] = "Save and Load"
Loc ["STRING_OPTIONS_SAVELOAD_DESC"] = "This options allow you to save or load predefined settings."
Loc ["STRING_OPTIONS_SAVELOAD_PNAME"] = "Preset Name"
Loc ["STRING_OPTIONS_SAVELOAD_SAVE"] = "save"
Loc ["STRING_OPTIONS_SAVELOAD_LOAD"] = "load"
Loc ["STRING_OPTIONS_SAVELOAD_REMOVE"] = "x"
Loc ["STRING_OPTIONS_SAVELOAD_RESET"] = "reset to default"
Loc ["STRING_OPTIONS_SAVELOAD_APPLYTOALL"] = "apply to all instances"
+1 -1
View File
@@ -3,7 +3,7 @@ if not Loc then return end
--------------------------------------------------------------------------------------------------------------------------------------------
Loc ["STRING_VERSION_LOG"] = "|cFFFFFF00v1.7.0|r\n\n- Corrigido alguns problemas com as cores das barras de inimigos.\n\n|cFFFFFF00-|r CC Quebrado foi inteiramente reescrito e agora deve funcionar corretamente.\n\n|cFFFFFF00-|r Adicionado novo sub atributo ao dano: Voidzones & Debuffs.|cFFFFFF00v1.6.7|r\n\n- Adicionado suporte a skins, troque ela atraves do painel de opcoes.\n\n|cFFFFFF00v1.6.5|r\n\n|cFFFFFF00-|r Adicionado o sub atributo 'Inimigos' que mostra, eh claro, somente inimigos.\n\n|cFFFFFF00-|r Corrigido um problema na captura das magias conjuradas.|cFFFFFF00v1.6.3|r\n\n|cFFFFFF00-|r captura de dados agora roda 4% mais rapido.\n\n|cFFFFFF00-|r Corrigido problema onde os ajudantes nao atualizavam o tempo de atividade do dono.\n\n|cFFFFFF00-|r Corrigido problema onde o healing era contado mesmo fora do combate.\n\n|cFFFFFF00-|r Corrigido problema com chefes multiplos como Twin Consorts.\n\n|cFFFFFF00-|r Adicionada opcao para juntar os segmentos de trash mobs.\n\n|cFFFFFF00-|r Adicionada opcao para auto remover os segmentos de trash mobs. \n\n|cFFFFFF00-|r Adicionada opcao para alterar a altura das barras.\n\n|cFFFFFF00-|r Plugin Encounter Details agora mostra quantos cast bem sucedidos as magias interrompidas tiveram.\n\n|cFFFFFF00v1.6.1|r\n\n|cFFFFFF00-|r Corrigido:\n- problema com o tempo de debuffs.\n- dps dos dados gerais e o dps no micro display .\n- varios bugs envolvendo o menu da espada e do livro.\n- o coletor de lixo nao ira mais apagar jogadores com vinculo a membros do grupo.\n\n|cFFFFFF00-|r dados gerais agora sempre ira usar o tempo do combate para medir dps e hps.\n\n|cFFFFFF00v1.6.0|r\n\n|cFFFFFF00-|r Adicionado tempo de debuff no atributo miscelanea.\n\n|cFFFFFF00-|r Atributos desativados agora ficam escurecidos no menu da espada.\n\n|cFFFFFF00-|r Corrigido um problema aonde algumas vezes era necessario dar /reload para trocar um talento.\n\n|cFFFFFF00v1.5.3|r\n\n|cFFFFFF00-|r Corrigido problema ao reportar durante o combate.\n\n|cFFFFFF00-|r Melhorado a reconhecimento dos donos de ajudantes.\n\n|cFFFFFF00-|r Adicionada uma opcao para mostrar apenas frags em cima de jogadores inimigos.\n\n|cFFFFFF00-|r Adicionado cor e icone aos frags.\n\n|cFFFFFF00v1.5.2|r\n\n|cFFFFFF00-|r Corrigido problema onde desativando o tempo dos buffs estava desativando tambem a cura feita.\n\n|cFFFFFF00-|r Estatisticas de Avoidance nao seram mais capturadas para pessoas foram do grupo, monstros ou ajudantes.\n\n|cFFFFFF00-|r Corrigido problema onde as vezes estava demorando muito para salvar o tempo dos buffs ao sair do jogo.\n\n|cFFFFFF00v1.5.1|r\n\n|cFFFFFF00-|r Corrigido problema ao reportar o Dps onde as vezes nao mostrava nenhum jogador.\n\n|cFFFFFF00v1.5.0|r\n\n|cFFFFFF00-|r Buff Uptime foi implementado no atributo miscelanea.\n\n|cFFFFFF00-|r Cooldowns usados agora aparecem nos registros da morte.\n\n|cFFFFFF00-|r Implementado esta janela mostrando as atualizacoes.\n\n|cFFFFFF00-|r Corrigido problema onde algumas vezes clicando no nome do atributo fazia a instancia parar de atualizar.\n\n|cFFFFFF00-|r Desativando a cura agora para as absorcoes tambem. Desligando as Auras nao interrompe as absorcoes. \n\n|cFFFFFF00-|r Fogo Amigo agora conta apenas jogadores dentro do grupo.\n\n|cFFFFFF00-|r Corrigido problema onde o dano feito por um ajudando nao estava contando no alvo do dono.\n\n|cFFFFFF00-|r Corrigido problema onde a atualizacao de um cooldown nao estava sendo contada.\n\n|cFFFFFF00-|r Adicionada as magias de absorcao para 2P tier 16.\n\n|cFFFFFF00-|r Adicionado os comandos de barra 'worldboss' e 'updates'.\n\n|cFFFFFF00-|r Corrigido problema ao reportar onde algumas vezes nao estava funcionando."
Loc ["STRING_VERSION_LOG"] = "|cFFFFFF00v1.8.0|r\n\n- Adicionado novo plugin: You Are Not Prepared.\n\n|cFFFFFF00-|r Novo painel de opcoes!\n\n|cFFFFFF00v1.7.0|r\n\n- Corrigido alguns problemas com as cores das barras de inimigos.\n\n|cFFFFFF00-|r CC Quebrado foi inteiramente reescrito e agora deve funcionar corretamente.\n\n|cFFFFFF00-|r Adicionado novo sub atributo ao dano: Voidzones & Debuffs.|cFFFFFF00v1.6.7|r\n\n- Adicionado suporte a skins, troque ela atraves do painel de opcoes.\n\n|cFFFFFF00v1.6.5|r\n\n|cFFFFFF00-|r Adicionado o sub atributo 'Inimigos' que mostra, eh claro, somente inimigos.\n\n|cFFFFFF00-|r Corrigido um problema na captura das magias conjuradas.|cFFFFFF00v1.6.3|r\n\n|cFFFFFF00-|r captura de dados agora roda 4% mais rapido.\n\n|cFFFFFF00-|r Corrigido problema onde os ajudantes nao atualizavam o tempo de atividade do dono.\n\n|cFFFFFF00-|r Corrigido problema onde o healing era contado mesmo fora do combate.\n\n|cFFFFFF00-|r Corrigido problema com chefes multiplos como Twin Consorts.\n\n|cFFFFFF00-|r Adicionada opcao para juntar os segmentos de trash mobs.\n\n|cFFFFFF00-|r Adicionada opcao para auto remover os segmentos de trash mobs. \n\n|cFFFFFF00-|r Adicionada opcao para alterar a altura das barras.\n\n|cFFFFFF00-|r Plugin Encounter Details agora mostra quantos cast bem sucedidos as magias interrompidas tiveram.\n\n|cFFFFFF00v1.6.1|r\n\n|cFFFFFF00-|r Corrigido:\n- problema com o tempo de debuffs.\n- dps dos dados gerais e o dps no micro display .\n- varios bugs envolvendo o menu da espada e do livro.\n- o coletor de lixo nao ira mais apagar jogadores com vinculo a membros do grupo.\n\n|cFFFFFF00-|r dados gerais agora sempre ira usar o tempo do combate para medir dps e hps.\n\n|cFFFFFF00v1.6.0|r\n\n|cFFFFFF00-|r Adicionado tempo de debuff no atributo miscelanea.\n\n|cFFFFFF00-|r Atributos desativados agora ficam escurecidos no menu da espada.\n\n|cFFFFFF00-|r Corrigido um problema aonde algumas vezes era necessario dar /reload para trocar um talento.\n\n|cFFFFFF00v1.5.3|r\n\n|cFFFFFF00-|r Corrigido problema ao reportar durante o combate.\n\n|cFFFFFF00-|r Melhorado a reconhecimento dos donos de ajudantes.\n\n|cFFFFFF00-|r Adicionada uma opcao para mostrar apenas frags em cima de jogadores inimigos.\n\n|cFFFFFF00-|r Adicionado cor e icone aos frags.\n\n|cFFFFFF00v1.5.2|r\n\n|cFFFFFF00-|r Corrigido problema onde desativando o tempo dos buffs estava desativando tambem a cura feita.\n\n|cFFFFFF00-|r Estatisticas de Avoidance nao seram mais capturadas para pessoas foram do grupo, monstros ou ajudantes.\n\n|cFFFFFF00-|r Corrigido problema onde as vezes estava demorando muito para salvar o tempo dos buffs ao sair do jogo.\n\n|cFFFFFF00v1.5.1|r\n\n|cFFFFFF00-|r Corrigido problema ao reportar o Dps onde as vezes nao mostrava nenhum jogador.\n\n|cFFFFFF00v1.5.0|r\n\n|cFFFFFF00-|r Buff Uptime foi implementado no atributo miscelanea.\n\n|cFFFFFF00-|r Cooldowns usados agora aparecem nos registros da morte.\n\n|cFFFFFF00-|r Implementado esta janela mostrando as atualizacoes.\n\n|cFFFFFF00-|r Corrigido problema onde algumas vezes clicando no nome do atributo fazia a instancia parar de atualizar.\n\n|cFFFFFF00-|r Desativando a cura agora para as absorcoes tambem. Desligando as Auras nao interrompe as absorcoes. \n\n|cFFFFFF00-|r Fogo Amigo agora conta apenas jogadores dentro do grupo.\n\n|cFFFFFF00-|r Corrigido problema onde o dano feito por um ajudando nao estava contando no alvo do dono.\n\n|cFFFFFF00-|r Corrigido problema onde a atualizacao de um cooldown nao estava sendo contada.\n\n|cFFFFFF00-|r Adicionada as magias de absorcao para 2P tier 16.\n\n|cFFFFFF00-|r Adicionado os comandos de barra 'worldboss' e 'updates'.\n\n|cFFFFFF00-|r Corrigido problema ao reportar onde algumas vezes nao estava funcionando."
Loc ["STRING_DETAILS1"] = "|cffffaeaeDetalhes:|r " --> color and details name
@@ -596,7 +596,6 @@ local siege_of_orgrimmar = {
[6] = {
boss = "Iron Juggernaut",
portrait = [[Interface\EncounterJournal\UI-EJ-BOSS-Iron Juggernaut]],
combat_end = {1, 71466},
spell_mechanics = {
@@ -1030,7 +1029,7 @@ local siege_of_orgrimmar = {
[11] = {
boss = "Thok the Bloodthirsty",
portrait = [[Interface\EncounterJournal\UI-EJ-BOSS-Thok the Bloodthirsty]],
combat_end = {1, 71529},
spell_mechanics = {
@@ -0,0 +1,426 @@
local AceLocale = LibStub ("AceLocale-3.0")
local Loc = AceLocale:GetLocale ("Details_YouAreNotPrepared")
--> create the plugin object
local YouAreNotPrepared = _detalhes:NewPluginObject ("Details_YouAreNotPrepared", DETAILSPLUGIN_ALWAYSENABLED)
tinsert (UISpecialFrames, "Details_YouAreNotPrepared")
--> main frame (shortcut)
local YouAreNotPreparedFrame = YouAreNotPrepared.Frame
local debugmode = false
local function CreatePluginFrames()
--> catch Details! main object
local _detalhes = _G._detalhes
local DetailsFrameWork = _detalhes.gump
local GameCooltip = GameCooltip
local _GetSpellInfo = _detalhes.getspellinfo
YouAreNotPrepared.deaths_table = {}
YouAreNotPrepared.last_death_combat_id = -1
---------- event parser -------------
function YouAreNotPrepared:OnDetailsEvent (event, ...)
if (event == "HIDE") then --> plugin hidded, disabled
self.open = false
elseif (event == "SHOW") then --> plugin hidded, disabled
self.open = true
elseif (event == "COMBAT_PLAYER_ENTER") then --> combat started
elseif (event == "COMBAT_PLAYER_LEAVE") then --> combat ended
YouAreNotPrepared:EndCombat()
elseif (event == "DETAILS_DATA_RESET") then
table.wipe (YouAreNotPrepared.deaths_table)
YouAreNotPrepared:Clear()
end
end
---------- build frames -------------
local BAR_HEIGHT = 13
local BAR_AMOUNT = 10
local BUTTON_AMOUNT = 6
function YouAreNotPrepared:Clear()
YouAreNotPrepared.deaths_table = {}
_detalhes_databaseYANP = YouAreNotPrepared.deaths_table
for i = 1, BUTTON_AMOUNT do
local button = YouAreNotPrepared.buttons [i]
button:Disable()
button.widget.b_texture:SetDesaturated (true)
button.lefttext.text = "#" .. i
end
for bar_index = 1, BAR_AMOUNT do
YouAreNotPrepared.container_bars.bars [bar_index]:Hide()
end
end
--main frame
YouAreNotPreparedFrame:SetSize (424, 223)
YouAreNotPreparedFrame:SetPoint ("center", UIParent, "center")
YouAreNotPreparedFrame:EnableMouse (true)
YouAreNotPreparedFrame:SetResizable (false)
YouAreNotPreparedFrame:SetMovable (true)
YouAreNotPreparedFrame:SetScript ("OnMouseUp", function (self, button)
if (button == "RightButton") then
YouAreNotPreparedFrame:Hide()
else
if (YouAreNotPreparedFrame.isMoving) then
YouAreNotPreparedFrame:StopMovingOrSizing()
YouAreNotPreparedFrame.isMoving = false
end
end
end)
YouAreNotPreparedFrame:SetScript ("OnMouseDown", function (self, button)
if (button == "LeftButton") then
if (not YouAreNotPreparedFrame.isMoving) then
YouAreNotPreparedFrame:StartMoving()
YouAreNotPreparedFrame.isMoving = true
end
end
end)
--close button
local c = CreateFrame ("Button", nil, YouAreNotPreparedFrame, "UIPanelCloseButton")
c:SetWidth (32)
c:SetHeight (32)
c:SetPoint ("TOPRIGHT", YouAreNotPreparedFrame, "TOPRIGHT", 1, -15)
c:SetFrameLevel (YouAreNotPreparedFrame:GetFrameLevel()+1)
--background image
local b = DetailsFrameWork:NewImage (YouAreNotPreparedFrame, nil, "$parentBackground", nil, 512, 256, [[Interface\AddOns\Details_YouAreNotPrepared\background]])
b:SetPoint ("topleft", YouAreNotPreparedFrame, "topleft")
--title
local t = DetailsFrameWork:NewLabel (YouAreNotPreparedFrame, nil, "$parentTitle", nil, Loc ["STRING_PLUGIN_NAME"], "GameFontHighlightLeft", 12, {227/255, 186/255, 4/255})
t:SetPoint ("top", YouAreNotPreparedFrame, "top", 20, -26)
t:SetPoint ("center", YouAreNotPreparedFrame, "center", 0, 0)
--bar container
local container_bars = CreateFrame ("frame", "Details_YouAreNotPrepared_FauxScroll_Box", YouAreNotPreparedFrame)
container_bars:SetPoint ("topleft", YouAreNotPreparedFrame, "topleft", 23, -80)
container_bars:SetSize (252, 137)
container_bars:SetBackdrop ({bgFile = "Interface\\AddOns\\Details\\images\\background", tile = true, tileSize = 16,
insets = {left = 0, right = 0, top = 0, bottom = 0}})
container_bars:SetBackdropColor (.1, .1, .1, .2)
YouAreNotPrepared.container_bars = container_bars
container_bars.bars = {}
local MouseUpCloseHook = function (_, button)
if (button == "RightButton") then
YouAreNotPreparedFrame:Hide()
return true --> interrupt
end
end
function container_bars:CreateChild()
local bar_number = #self.bars + 1
local bar = DetailsFrameWork:NewPanel (self, YouAreNotPreparedFrame, "$parentBar" .. bar_number, nil, 250, BAR_HEIGHT)
bar:SetPoint ("topleft", self, "topleft", 1, bar_number*13*-1+9)
bar:SetHook ("OnMouseUp", MouseUpCloseHook)
bar.locked = false
bar.backdrop = nil
bar.hide = true
local statusbar = DetailsFrameWork:NewBar (bar, nil, "$parentStatusbar", "statusbar", 250, BAR_HEIGHT)
statusbar:SetPoint ("left", bar, "left")
statusbar.fontsize = 9
statusbar.textleft:SetHeight (16)
YouAreNotPrepared:SetFontFace (statusbar.textleft, "GameFontHighlightSmall")
YouAreNotPrepared:SetFontFace (statusbar.textleft, "GameFontNormal")
container_bars.bars [bar_number] = bar
return bar
end
function container_bars:UpdateChild (bar_number, data, time_of_death, max_health)
local spellname, _, icon = _GetSpellInfo (data[2])
local bar = container_bars.bars [bar_number]
if (spellname) then
local hp = math.floor (data[5] / max_health * 100)
if (hp > 100) then
hp = 100
end
if (data[1]) then --> damage
if (data[3] and type (data [1]) == "boolean") then --> is a real damage, not a battle ress and its not a last cooldown line
bar.statusbar.textleft:SetText (string.format ("%.1f", data [4] - time_of_death) .. "s " .. spellname .. " (" .. data [6] .. ")")
bar.statusbar.textright:SetText ("-" .. YouAreNotPrepared:ToK (data [3]) .. " (" .. hp .. "%)")
bar.statusbar.icon:SetTexture (icon)
bar.statusbar.color = "red"
bar.statusbar.background:SetVertexColor (1, 0, 0, .2)
bar.statusbar.textleft:SetWidth (250 - bar.statusbar.textright:GetStringWidth() - 20)
bar.statusbar.value = hp
return true
end
else
bar.statusbar.textleft:SetText (string.format ("%.1f", data [4] - time_of_death) .. "s " .. spellname .. " (" .. data [6] .. ")")
bar.statusbar.textright:SetText ("+" .. YouAreNotPrepared:ToK (data [3]) .. " (" .. hp .. "%)")
bar.statusbar.icon:SetTexture (icon)
bar.statusbar.color = "green"
bar.statusbar.background:SetVertexColor (0, 1, 0, .2)
bar.statusbar.textleft:SetWidth (250 - bar.statusbar.textright:GetStringWidth() - 20)
bar.statusbar.value = hp
return true
end
end
return false
end
--create 10 childs (bars)
for i = 1, 10 do
container_bars:CreateChild()
end
--create scrollbar
local refresh_function = function (self)
local offset = FauxScrollFrame_GetOffset (self)
for bar_index = 1, BAR_AMOUNT do
local data = YouAreNotPrepared.s_table[4] [bar_index + offset] --bar_index + offset ---------- preciso pegar os dados de uma pool
if (data) then
local successful = container_bars:UpdateChild (bar_index, data, YouAreNotPrepared.s_table[6], YouAreNotPrepared.s_table[5]) --index, death table, clock time of death, max health
if (not successful) then
container_bars.bars [bar_index]:Hide()
else
container_bars.bars [bar_index]:Show()
end
else
container_bars.bars [bar_index]:Hide()
end
end
end
local scrollbar = CreateFrame ("scrollframe", "Details_YouAreNotPrepared_FauxScroll", container_bars, "FauxScrollFrameTemplate")
scrollbar:SetScript ("OnVerticalScroll", function (self, offset) FauxScrollFrame_OnVerticalScroll (self, offset, BAR_HEIGHT, refresh_function) end)
scrollbar:SetPoint ("topleft", YouAreNotPreparedFrame, "topleft", 23, -80)
scrollbar:SetSize (250, 138)
container_bars:EnableMouse (true)
--choose death menu
YouAreNotPrepared.buttons = {}
local select_death = function (selected)
YouAreNotPrepared.s_table = YouAreNotPrepared.deaths_table [selected]
if (not YouAreNotPrepared.s_table) then
return
end
FauxScrollFrame_Update (scrollbar, #YouAreNotPrepared.s_table[4], BAR_AMOUNT, BAR_HEIGHT)
refresh_function (scrollbar)
end
YouAreNotPrepared.select_death = select_death
function YouAreNotPrepared:CreateDeathButton()
local button_number = #self.buttons + 1
local button = DetailsFrameWork:NewButton (YouAreNotPreparedFrame, _, "$parentButton" .. button_number, nil, 113, 20, select_death, button_number)
button:SetPoint ("topleft", YouAreNotPreparedFrame, "topleft", 300, -59 + (button_number*23*-1))
button:Disable()
local b_texture = button:CreateTexture (nil, "artwork")
b_texture:SetTexture ([[Interface\AddOns\Details\images\icons]])
b_texture:SetTexCoord (0.297851, 0.444335, 0.004882, 0.040039) --152 228 2 21 0.0009765625
b_texture:SetPoint ("topleft", button.widget, "topleft")
b_texture:SetSize (113, 20)
b_texture:SetDesaturated (true)
button.widget.b_texture = b_texture
local icon = DetailsFrameWork:NewImage (button, _, "$parentIcon", "icon", 20, 20)
icon:SetTexCoord (0, 0.4921875, 0, 0.4921875) --0.0078125
icon:SetPoint ("left", button, "left", 1, 0)
icon.texture = [[Interface\WorldStateFrame\SkullBones]]
icon:SetBlendMode ("ADD")
icon:SetAlpha (.5)
button:SetHook ("OnMouseDown", function (self, button)
self.b_texture:SetPoint ("topleft", self, "topleft", 1, -1)
--self.MyObject.lefttext:SetPoint ("left", self.MyObject.icon, "right", 2, 0)
self.MyObject.icon:SetPoint ("left", self, "left", 2, -1)
end)
button:SetHook ("OnMouseUp", function (self, button)
self.b_texture:SetPoint ("topleft", self, "topleft")
--self.MyObject.lefttext:SetPoint ("left", self.MyObject.icon, "right", 2, 0)
self.MyObject.icon:SetPoint ("left", self, "left", 1, 0)
end)
button:SetHook ("OnEnter", function (self, button)
self.b_texture:SetBlendMode ("ADD")
end)
button:SetHook ("OnLeave", function (self, button)
self.b_texture:SetBlendMode ("BLEND")
end)
local lefttext = DetailsFrameWork:NewLabel (button, nil, "$parentLeftText", "lefttext", "", "GameFontHighlightSmall", 9)
lefttext:SetPoint ("left", icon, "right", 2)
lefttext.width = 80
lefttext.height = 13
local righttext = DetailsFrameWork:NewLabel (button, nil, "$parentRightText", "righttext", " ", "GameFontHighlightSmall", 9)
righttext:SetPoint ("right", button, "right", -1)
YouAreNotPrepared.buttons [button_number] = button
return bar
end
for i = 1, 6 do
YouAreNotPrepared:CreateDeathButton()
end
function YouAreNotPrepared:AddDeath (t)
--> t = [1] = enemy name [2] = time of death [3] = last cooldown [4] = death table [5] = max health [6] = clock time of the death
--add and remove
table.insert (YouAreNotPrepared.deaths_table, 1, t)
table.remove (YouAreNotPrepared.deaths_table, 7)
--update buttons
for i = 1, 6 do
local button = YouAreNotPrepared.buttons [i]
local death_table = YouAreNotPrepared.deaths_table [i]
if (death_table) then
button:Enable()
button.widget.b_texture:SetDesaturated (false)
button.lefttext.text = "#" .. i .. " " .. death_table [1]
else
button:Disable()
button.widget.b_texture:SetDesaturated (true)
button.lefttext.text = "#" .. i
end
end
YouAreNotPrepared:DeathWarning()
_detalhes_databaseYANP = YouAreNotPrepared.deaths_table
end
function YouAreNotPrepared:UpdateButtons()
for i = 1, 6 do
local button = YouAreNotPrepared.buttons [i]
local death_table = YouAreNotPrepared.deaths_table [i]
if (death_table) then
button:Enable()
button.widget.b_texture:SetDesaturated (false)
button.lefttext.text = "#" .. i .. " " .. death_table [1]
else
button:Disable()
button.widget.b_texture:SetDesaturated (true)
button.lefttext.text = "#" .. i
end
end
end
function YouAreNotPrepared:ShowMe() --> used for debug
YouAreNotPreparedFrame:Show()
YouAreNotPrepared:UpdateButtons()
_detalhes:InstanceAlert (Loc ["STRING_PLUGIN_ALERT"], {[[Interface\ICONS\Achievement_Boss_Illidan]], 14, 14, false, 0.8984375, 0.0546875, 0.0546875, 0.8984375}, 20, {YouAreNotPrepared.ShowMeFromInstanceAlert})
end
--YouAreNotPrepared:ScheduleTimer (YouAreNotPrepared.ShowMe, 3)
end
function YouAreNotPrepared:ShowMeFromInstanceAlert()
YouAreNotPreparedFrame:Show()
YouAreNotPrepared.select_death (1)
YouAreNotPrepared:UpdateButtons()
_detalhes:InstanceAlert (false)
end
function YouAreNotPrepared:DeathWarning()
_detalhes:InstanceAlert (Loc ["STRING_PLUGIN_ALERT"], {[[Interface\ICONS\Achievement_Boss_Illidan]], 14, 14, false, 0.8984375, 0.0546875, 0.0546875, 0.8984375} , 15, {YouAreNotPrepared.ShowMeFromInstanceAlert})
end
function YouAreNotPrepared:EndCombat()
if (YouAreNotPrepared.last_death_combat_id == YouAreNotPrepared.combat_id) then
_detalhes:InstanceAlert (Loc ["STRING_PLUGIN_ALERT"], {[[Interface\ICONS\Achievement_Boss_Illidan]], 14, 14, false, 0.8984375, 0.0546875, 0.0546875, 0.8984375} , 25, {YouAreNotPrepared.ShowMeFromInstanceAlert})
end
end
function YouAreNotPrepared:OnDeath (token, time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, death_table, last_cooldown, time_of_death, max_health)
if (alvo_name == YouAreNotPrepared.playername) then
--[[ debug mode
if (not combat.is_boss) then
return YouAreNotPrepared:AddDeath ({combat.enemy or "Unknown", time_of_death, last_cooldown, death_table, max_health, time})
else
return YouAreNotPrepared:AddDeath ({combat.is_boss.name or combat.enemy or "Unknown", time_of_death, last_cooldown, death_table, max_health, time})
end
--]]
local combat = YouAreNotPrepared:GetCombat ("current")
if (combat.is_boss) then --> encounter or pvp
YouAreNotPrepared.last_death_combat_id = YouAreNotPrepared.combat_id
return YouAreNotPrepared:AddDeath ({combat.is_boss.name or combat.enemy or "Unknown", time_of_death, last_cooldown, death_table, max_health, time})
end
end
end
function YouAreNotPrepared:OnEvent (_, event, ...)
if (event == "ADDON_LOADED") then
local AddonName = select (1, ...)
if (AddonName == "Details_YouAreNotPrepared") then
if (_G._detalhes) then
--> create widgets
CreatePluginFrames()
--> core version required
local MINIMAL_DETAILS_VERSION_REQUIRED = 12
--> install
local install = _G._detalhes:InstallPlugin ("TOOLBAR", Loc ["STRING_PLUGIN_NAME"], "placeholder string", YouAreNotPrepared, "DETAILS_PLUGIN_YANP", MINIMAL_DETAILS_VERSION_REQUIRED)
if (type (install) == "table" and install.error) then
print (install.error)
end
--> register needed events
_G._detalhes:RegisterEvent (YouAreNotPrepared, "DETAILS_DATA_RESET")
_G._detalhes:RegisterEvent (YouAreNotPrepared, "COMBAT_PLAYER_LEAVE")
--> register needed hooks
_G._detalhes:InstallHook (DETAILS_HOOK_DEATH, YouAreNotPrepared.OnDeath)
--> retrive saved data
YouAreNotPrepared.deaths_table = _detalhes_databaseYANP or {}
--> install slash command
SLASH_Details_YouAreNotPrepared1 = "/yanp"
function SlashCmdList.Details_YouAreNotPrepared (msg, editbox)
YouAreNotPrepared:ShowMeFromInstanceAlert()
end
end
end
end
end
@@ -0,0 +1,14 @@
## Interface: 50400
## Title: Details You Are Not Prepared (plugin)
## Notes: Plugin for Details
## RequiredDeps: Details
## SavedVariablesPerCharacter: _detalhes_databaseYANP
## OptionalDeps: Ace3
#@no-lib-strip@
embeds.xml
#@end-no-lib-strip@
enUS.lua
ptBR.lua
Details_YouAreNotPrepared.lua
@@ -0,0 +1,137 @@
--- **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
@@ -0,0 +1,4 @@
<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>
@@ -0,0 +1,51 @@
-- $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
@@ -0,0 +1,13 @@
## 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
@@ -0,0 +1,41 @@
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)
@@ -0,0 +1,27 @@
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
@@ -0,0 +1,14 @@
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
@@ -0,0 +1,41 @@
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")
Binary file not shown.
@@ -0,0 +1,7 @@
<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>
@@ -0,0 +1,9 @@
local Loc = LibStub("AceLocale-3.0"):NewLocale ("Details_YouAreNotPrepared", "enUS", true)
if (not Loc) then
return
end
Loc ["STRING_PLUGIN_NAME"] = "You Are Not Prepared (plugin for Details!)"
Loc ["STRING_PLUGIN_ALERT"] = "|cFFFFFF00YANP|r: click to see the death log "
@@ -0,0 +1,8 @@
local Loc = LibStub("AceLocale-3.0"):NewLocale ("Details_YouAreNotPrepared", "ptBR")
if (not Loc) then
return
end
Loc ["STRING_PLUGIN_NAME"] = "You Are Not Prepared (plugin for Details!)"
Loc ["STRING_PLUGIN_ALERT"] = "YANP: clique para ver o registro da morte"