Small bug fixes and improvements

This commit is contained in:
Tercio Jose
2022-10-10 13:26:13 -03:00
parent b588d5e30c
commit 1ed29008aa
119 changed files with 6556 additions and 6650 deletions
+1 -1
View File
@@ -130,7 +130,7 @@ Total Code and Percent Code:
*Total - the total made by all actors.
local value, top, total, combat, instance = ...
local result = floor (value)
local result = floor(value)
return total
+8 -8
View File
@@ -49,7 +49,7 @@ local currentCombat = Details:GetCurrentCombat()
@TITLE- Getting a specific combat:@
@CODElocal combat = Details:GetCombat (segmentID = DETAILS_SEGMENTID_CURRENT)@
@CODElocal combat = Details:GetCombat(segmentID = DETAILS_SEGMENTID_CURRENT)@
@DESCFor overall use DETAILS_SEGMENTID_OVERALL, for older segments use the combat index (1 ... 25), when the current combat ends, it is added to index 1 on the old segments table.@
@@ -58,10 +58,10 @@ local currentCombat = Details:GetCurrentCombat()
@DESCThere's several ways to get a player object, the quick way is:@
@CODElocal player = Details:GetActor (segmentID = DETAILS_SEGMENTID_CURRENT, attributeID = DETAILS_ATTRIBUTE_DAMAGE, "PlayerName")@
@CODElocal player = Details:GetActor(segmentID = DETAILS_SEGMENTID_CURRENT, attributeID = DETAILS_ATTRIBUTE_DAMAGE, "PlayerName")@
@DESCThe segmentID is the same as described on GetCombat(), attributeID is the ID for the attribute type.
there is an alias which receives the player name as the first parameter: Details:GetPlayer (playerName, segmentID, attributeID), combat also accept GetActor(): combat:GetActor (attributeID, playerName).
there is an alias which receives the player name as the first parameter: Details:GetPlayer(playerName, segmentID, attributeID), combat also accept GetActor(): combat:GetActor(attributeID, playerName).
Retriving actors is expensive, try to cache the object once you have it.
@
@@ -71,7 +71,7 @@ Retriving actors is expensive, try to cache the object once you have it.
@CODElocal combat = Details:GetCurrentCombat()
@COMMENT--if the player is from a different realm, use 'playername-realmname'@
local player = combat:GetActor (DETAILS_ATTRIBUTE_DAMAGE, "PlayerName")
local player = combat:GetActor(DETAILS_ATTRIBUTE_DAMAGE, "PlayerName")
local damageDone = player.total
local combatTime = combat:GetCombatTime()
@@ -174,13 +174,13 @@ DETAILS_REJU_POTION_ID = 188018
[[
@TITLECombat Object:@
actor = combat:GetActor ( attribute, character_name ) or actor = combat ( attribute, character_name )
actor = combat:GetActor( attribute, character_name ) or actor = combat ( attribute, character_name )
@COMMENTreturns an actor object@
characterList = combat:GetActorList ( attribute )
@COMMENTreturns a numeric table with all actors of the specific attribute, contains players, npcs, pets, etc.@
combatName = combat:GetCombatName ( try_to_find )
combatName = combat:GetCombatName( try_to_find )
@COMMENTreturns the segment name, e.g. "Trainning Dummy", if try_to_find is true, it searches the combat for a enemy name.@
bossInfo = combat:GetBossInfo()
@@ -266,7 +266,7 @@ returns a iterated table of actors inside the container.
Usage: 'for index, actor in container:ListActors() do'
Note: if the container is a spell container, returns pairs() instead: 'for spellid, spelltable in container:ListActors() do'
actor = container:GetActor (character_name)
actor = container:GetActor(character_name)
returns the actor, for spell container use the spellid instead.
container:GetSpell (spellid)
@@ -733,7 +733,7 @@ Total Code and Percent Code:
*Total - the total made by all actors.
local value, top, total, combat, instance = ...
local result = floor (value)
local result = floor(value)
return total
]],
+14 -14
View File
@@ -106,7 +106,7 @@ Getting a Combat Object:
combat = Details:GetCurrentCombat()
returns the current combat object.
combat = Details:GetCombat (combat)
combat = Details:GetCombat(combat)
returns the requested combat object.
if 'combat' is omitted, returns the current combat.
combat can be a number: -1 for overall, 0 for current and > 0 for past segments (1, 2, 3, ...).
@@ -124,7 +124,7 @@ reset only the overall segment
Getting an Actor:
=======================================
local actor = Details:GetActor (combat = "current", attribute = DETAILS_ATTRIBUTE_DAMAGE, actorname = Details.playername)
local actor = Details:GetActor(combat = "current", attribute = DETAILS_ATTRIBUTE_DAMAGE, actorname = Details.playername)
returns the actor for the requested combat, attribute and actor name.
if some parameter are omitted, it uses the default value which are current combat, damage container and the name of the player character.
@@ -135,13 +135,13 @@ Combat Object:
A Combat object is a table with 4 numerical indexes holding: damage, healing, energy and misc containers.
function for combat objects:
actor = combat:GetActor ( attribute, character_name ) or actor = combat ( attribute, character_name )
actor = combat:GetActor( attribute, character_name ) or actor = combat ( attribute, character_name )
returns an actor object
characterList = combat:GetActorList ( attribute )
returns a numeric table with all actors of the specific attribute, contains players, npcs, pets, etc.
combatName = combat:GetCombatName ( try_to_find )
combatName = combat:GetCombatName( try_to_find )
returns the segment name, e.g. "Trainning Dummy", if try_to_find is true, it searches the combat for a enemy name.
bossInfo = combat:GetBossInfo()
@@ -235,7 +235,7 @@ returns if Details! is in combat or not.
Details:IsInEncounter()
returns if Details! is in a raid encounter combat.
damage, healing, energy, misc = Details:GetAllActors (combat, actorname)
damage, healing, energy, misc = Details:GetAllActors(combat, actorname)
returns all the four actor objects for the requested combat and actor.
combat must be a combat object.
@@ -258,7 +258,7 @@ returns a iterated table of actors inside the container.
Usage: 'for index, actor in container:ListActors() do'
Note: if the container is a spell container, returns pairs() instead: 'for spellid, spelltable in container:ListActors() do'
actor = container:GetActor (character_name)
actor = container:GetActor(character_name)
returns the actor, for spell container use the spellid instead.
container:GetSpell (spellid)
@@ -610,11 +610,11 @@ Examples:
1) Get the player damage, heal, dps and hps:
local combat = Details:GetCurrentCombat()
local damageActor = combat:GetActor (DETAILS_ATTRIBUTE_DAMAGE, UnitName ("player"))
local healingActor = combat:GetActor (DETAILS_ATTRIBUTE_HEAL, UnitName ("player"))
local damageActor = combat:GetActor(DETAILS_ATTRIBUTE_DAMAGE, UnitName ("player"))
local healingActor = combat:GetActor(DETAILS_ATTRIBUTE_HEAL, UnitName ("player"))
or
local damageActor = Details:GetActor ("current", DETAILS_ATTRIBUTE_DAMAGE, Details.playername)
local healingActor = Details:GetActor ("current", DETAILS_ATTRIBUTE_HEAL, Details.playername)
local damageActor = Details:GetActor("current", DETAILS_ATTRIBUTE_DAMAGE, Details.playername)
local healingActor = Details:GetActor("current", DETAILS_ATTRIBUTE_HEAL, Details.playername)
local totalDamage, totalHeal = damageActor.total, healingActor.total
@@ -702,13 +702,13 @@ for i, actor in damageContainer:ListActors() do
actor.custom = 0
end
local source = damageContainer:GetActor (sourceNpc)
local source = damageContainer:GetActor(sourceNpc)
local felfireVolleySpell = source:GetSpell (targetSpell)
if (felfireVolleySpell) then
for playerName, amount in pairs(felfireVolleySpell.targets) do
--players who took damage from this ability
--now this result may be placed on a external table or .custom may also be used
local targetActor = damageContainer:GetActor (playerName)
local targetActor = damageContainer:GetActor(playerName)
targetActor.custom = amount
end
end
@@ -749,14 +749,14 @@ Details.cache_npc_ids [90409] = npcName --for details!
2 - get the npc actor and its damage_from table.
local actor = damageContainer:GetActor (npcName)
local actor = damageContainer:GetActor(npcName)
if (actor) then
--reset the custom member on all actors:
for i, actor in damageContainer:ListActors() do
actor.custom = 0
end
for playerName, _ in pairs(actor.damage_from) do
local player = damageContainer:GetActor (playerName)
local player = damageContainer:GetActor(playerName)
if (player:IsPlayer()) then --we only want players. pets always has their damage merged on its owner damage.
player.custom = actor.targets [npcName]
end
+9 -9
View File
@@ -78,7 +78,7 @@ end
--old create addon
function DF:CreateAddOn (name, global_saved, global_table, options_table, broker)
local addon = LibStub ("AceAddon-3.0"):NewAddon (name, "AceConsole-3.0", "AceEvent-3.0", "AceTimer-3.0", "DetailsFramework-1.0", "AceComm-3.0")
local addon = LibStub("AceAddon-3.0"):NewAddon (name, "AceConsole-3.0", "AceEvent-3.0", "AceTimer-3.0", "DetailsFramework-1.0", "AceComm-3.0")
_G [name] = addon
addon.__name = name
@@ -86,17 +86,17 @@ function DF:CreateAddOn (name, global_saved, global_table, options_table, broker
if (global_saved) then
if (broker and broker.Minimap and not global_table.Minimap) then
DF:Msg (name, "broker.Minimap is true but no global.Minimap declared.")
DF:Msg(name, "broker.Minimap is true but no global.Minimap declared.")
end
self.db = LibStub ("AceDB-3.0"):New (global_saved, global_table or {}, true)
self.db = LibStub("AceDB-3.0"):New (global_saved, global_table or {}, true)
end
if (options_table) then
LibStub ("AceConfig-3.0"):RegisterOptionsTable (name, options_table)
addon.OptionsFrame1 = LibStub ("AceConfigDialog-3.0"):AddToBlizOptions (name, name)
LibStub("AceConfig-3.0"):RegisterOptionsTable (name, options_table)
addon.OptionsFrame1 = LibStub("AceConfigDialog-3.0"):AddToBlizOptions (name, name)
LibStub ("AceConfig-3.0"):RegisterOptionsTable (name .. "-Profiles", LibStub ("AceDBOptions-3.0"):GetOptionsTable (self.db))
addon.OptionsFrame2 = LibStub ("AceConfigDialog-3.0"):AddToBlizOptions (name .. "-Profiles", "Profiles", name)
LibStub("AceConfig-3.0"):RegisterOptionsTable (name .. "-Profiles", LibStub("AceDBOptions-3.0"):GetOptionsTable (self.db))
addon.OptionsFrame2 = LibStub("AceConfigDialog-3.0"):AddToBlizOptions (name .. "-Profiles", "Profiles", name)
end
if (broker) then
@@ -108,7 +108,7 @@ function DF:CreateAddOn (name, global_saved, global_table, options_table, broker
end
end
local databroker = LibStub ("LibDataBroker-1.1"):NewDataObject (name, {
local databroker = LibStub("LibDataBroker-1.1"):NewDataObject (name, {
type = broker.type or "launcher",
icon = broker.icon or [[Interface\PvPRankBadges\PvPRank15]],
text = broker.text or "",
@@ -117,7 +117,7 @@ function DF:CreateAddOn (name, global_saved, global_table, options_table, broker
})
if (databroker and broker.Minimap and global_table.Minimap) then
LibStub ("LibDBIcon-1.0"):Register (name, databroker, addon.db.profile.Minimap)
LibStub("LibDBIcon-1.0"):Register (name, databroker, addon.db.profile.Minimap)
end
end
+66 -66
View File
@@ -54,12 +54,12 @@ function DF:LoadAllSpells (hashMap, indexTable, allSpellsSameName)
DF.LoadingAuraAlertFrame:SetSize(340, 75)
DF.LoadingAuraAlertFrame:SetPoint("center")
DF.LoadingAuraAlertFrame:SetFrameStrata("TOOLTIP")
DF:ApplyStandardBackdrop (DF.LoadingAuraAlertFrame)
DF:ApplyStandardBackdrop(DF.LoadingAuraAlertFrame)
DF.LoadingAuraAlertFrame:SetBackdropBorderColor(1, 0.8, 0.1)
DF.LoadingAuraAlertFrame.IsLoadingLabel1 = DF:CreateLabel(DF.LoadingAuraAlertFrame, "We are currently loading spell names and spell IDs")
DF.LoadingAuraAlertFrame.IsLoadingLabel2 = DF:CreateLabel(DF.LoadingAuraAlertFrame, "This may take only a few seconds")
DF.LoadingAuraAlertFrame.IsLoadingImage1 = DF:CreateImage (DF.LoadingAuraAlertFrame, [[Interface\DialogFrame\UI-Dialog-Icon-AlertOther]], 32, 32)
DF.LoadingAuraAlertFrame.IsLoadingImage1 = DF:CreateImage(DF.LoadingAuraAlertFrame, [[Interface\DialogFrame\UI-Dialog-Icon-AlertOther]], 32, 32)
DF.LoadingAuraAlertFrame.IsLoadingLabel1.align = "center"
DF.LoadingAuraAlertFrame.IsLoadingLabel2.align = "center"
@@ -70,7 +70,7 @@ function DF:LoadAllSpells (hashMap, indexTable, allSpellsSameName)
DF.LoadingAuraAlertFrame:Show()
C_Timer.After (0, function()
C_Timer.After(0, function()
if (hashMap and not indexTable) then
for i = 1, CONST_MAX_SPELLS do
local spellName = GetSpellInfo(i)
@@ -204,11 +204,11 @@ local aura_panel_defaultoptions = {
function DF:CreateAuraConfigPanel (parent, name, db, change_callback, options, texts)
local options_text_template = DF:GetTemplate ("font", "OPTIONS_FONT_TEMPLATE")
local options_dropdown_template = DF:GetTemplate ("dropdown", "OPTIONS_DROPDOWN_TEMPLATE")
local options_switch_template = DF:GetTemplate ("switch", "OPTIONS_CHECKBOX_TEMPLATE")
local options_slider_template = DF:GetTemplate ("slider", "OPTIONS_SLIDER_TEMPLATE")
local options_button_template = DF:GetTemplate ("button", "OPTIONS_BUTTON_TEMPLATE")
local options_text_template = DF:GetTemplate("font", "OPTIONS_FONT_TEMPLATE")
local options_dropdown_template = DF:GetTemplate("dropdown", "OPTIONS_DROPDOWN_TEMPLATE")
local options_switch_template = DF:GetTemplate("switch", "OPTIONS_CHECKBOX_TEMPLATE")
local options_slider_template = DF:GetTemplate("slider", "OPTIONS_SLIDER_TEMPLATE")
local options_button_template = DF:GetTemplate("button", "OPTIONS_BUTTON_TEMPLATE")
local f = CreateFrame("frame", name, parent, "BackdropTemplate")
f.db = db
@@ -260,7 +260,7 @@ function DF:CreateAuraConfigPanel (parent, name, db, change_callback, options, t
background_method_selection:SetHeight(82)
background_method_selection:SetPoint("topleft", f, "topleft", 0, 0)
background_method_selection:SetPoint("topright", f, "topright", 0, 0)
DF:ApplyStandardBackdrop (background_method_selection)
DF:ApplyStandardBackdrop(background_method_selection)
local tracking_method_label = self:CreateLabel(background_method_selection, texts.METHOD, 12, "orange")
tracking_method_label:SetPoint("topleft", background_method_selection, "topleft", 6, -4)
@@ -269,7 +269,7 @@ function DF:CreateAuraConfigPanel (parent, name, db, change_callback, options, t
f.desc_label:SetPoint("left", background_method_selection, "left", 130, 0)
f.desc_label:SetJustifyV ("top")
local automatic_tracking_checkbox = DF:CreateSwitch (background_method_selection, on_switch_tracking_method, f.db.aura_tracker.track_method == 0x1, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, DF:GetTemplate ("switch", "OPTIONS_CHECKBOX_BRIGHT_TEMPLATE"))
local automatic_tracking_checkbox = DF:CreateSwitch(background_method_selection, on_switch_tracking_method, f.db.aura_tracker.track_method == 0x1, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, DF:GetTemplate("switch", "OPTIONS_CHECKBOX_BRIGHT_TEMPLATE"))
automatic_tracking_checkbox.Method = 0x1
automatic_tracking_checkbox:SetAsCheckBox()
automatic_tracking_checkbox:SetSize(24, 24)
@@ -278,7 +278,7 @@ function DF:CreateAuraConfigPanel (parent, name, db, change_callback, options, t
local automatic_tracking_label = DF:CreateLabel(background_method_selection, "Automatic")
automatic_tracking_label:SetPoint("left", automatic_tracking_checkbox, "right", 2, 0)
local manual_tracking_checkbox = DF:CreateSwitch (background_method_selection, on_switch_tracking_method, f.db.aura_tracker.track_method == 0x2, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, DF:GetTemplate ("switch", "OPTIONS_CHECKBOX_BRIGHT_TEMPLATE"))
local manual_tracking_checkbox = DF:CreateSwitch(background_method_selection, on_switch_tracking_method, f.db.aura_tracker.track_method == 0x2, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, DF:GetTemplate("switch", "OPTIONS_CHECKBOX_BRIGHT_TEMPLATE"))
manual_tracking_checkbox.Method = 0x2
manual_tracking_checkbox:SetAsCheckBox()
manual_tracking_checkbox:SetSize(24, 24)
@@ -344,18 +344,18 @@ function DF:CreateAuraConfigPanel (parent, name, db, change_callback, options, t
--create the background
local background_add_blacklist = CreateFrame("frame", nil, f_auto, "BackdropTemplate")
background_add_blacklist:SetSize(textEntryWidth + 10, 135)
DF:ApplyStandardBackdrop (background_add_blacklist)
background_add_blacklist.__background:SetVertexColor (0.47, 0.27, 0.27)
DF:ApplyStandardBackdrop(background_add_blacklist)
background_add_blacklist.__background:SetVertexColor(0.47, 0.27, 0.27)
local background_add_tracklist = CreateFrame("frame", nil, f_auto, "BackdropTemplate")
background_add_tracklist:SetSize(textEntryWidth + 10, 135)
DF:ApplyStandardBackdrop (background_add_tracklist)
background_add_tracklist.__background:SetVertexColor (0.27, 0.27, 0.47)
DF:ApplyStandardBackdrop(background_add_tracklist)
background_add_tracklist.__background:SetVertexColor(0.27, 0.27, 0.47)
--black list
--create labels
local buff_blacklist_label = self:CreateLabel(background_add_blacklist, texts.MANUAL_ADD_BLACKLIST_BUFF, DF:GetTemplate ("font", "OPTIONS_FONT_TEMPLATE"))
local debuff_blacklist_label = self:CreateLabel(background_add_blacklist, texts.MANUAL_ADD_BLACKLIST_DEBUFF, DF:GetTemplate ("font", "OPTIONS_FONT_TEMPLATE"))
local buff_blacklist_label = self:CreateLabel(background_add_blacklist, texts.MANUAL_ADD_BLACKLIST_BUFF, DF:GetTemplate("font", "OPTIONS_FONT_TEMPLATE"))
local debuff_blacklist_label = self:CreateLabel(background_add_blacklist, texts.MANUAL_ADD_BLACKLIST_DEBUFF, DF:GetTemplate("font", "OPTIONS_FONT_TEMPLATE"))
local buff_name_blacklist_entry = self:CreateTextEntry (background_add_blacklist, function()end, textEntryWidth, 20, "AddBuffBlacklistTextBox", _, _, options_dropdown_template)
buff_name_blacklist_entry:SetHook("OnEditFocusGained", load_all_spells)
@@ -411,7 +411,7 @@ function DF:CreateAuraConfigPanel (parent, name, db, change_callback, options, t
return spellID
end
local add_blacklist_buff_button = self:CreateButton (background_add_blacklist, function()
local add_blacklist_buff_button = self:CreateButton(background_add_blacklist, function()
local text = buff_name_blacklist_entry.text
buff_name_blacklist_entry:SetText("")
buff_name_blacklist_entry:ClearFocus()
@@ -436,9 +436,9 @@ function DF:CreateAuraConfigPanel (parent, name, db, change_callback, options, t
same_name_spells_add (spellId)
end
end, textEntryWidth/2 -3, 20, "By Name", nil, nil, nil, nil, nil, nil, DF:GetTemplate ("button", "OPTIONS_BUTTON_TEMPLATE"), DF:GetTemplate ("font", options.button_text_template))
end, textEntryWidth/2 -3, 20, "By Name", nil, nil, nil, nil, nil, nil, DF:GetTemplate("button", "OPTIONS_BUTTON_TEMPLATE"), DF:GetTemplate("font", options.button_text_template))
local add_blacklist_buff_button_id = self:CreateButton (background_add_blacklist, function()
local add_blacklist_buff_button_id = self:CreateButton(background_add_blacklist, function()
local text = buff_name_blacklist_entry.text
buff_name_blacklist_entry:SetText("")
buff_name_blacklist_entry:ClearFocus()
@@ -467,9 +467,9 @@ function DF:CreateAuraConfigPanel (parent, name, db, change_callback, options, t
same_name_spells_add (spellId)
end
end, textEntryWidth/2 -3, 20, "By ID", nil, nil, nil, nil, nil, nil, DF:GetTemplate ("button", "OPTIONS_BUTTON_TEMPLATE"), DF:GetTemplate ("font", options.button_text_template))
end, textEntryWidth/2 -3, 20, "By ID", nil, nil, nil, nil, nil, nil, DF:GetTemplate("button", "OPTIONS_BUTTON_TEMPLATE"), DF:GetTemplate("font", options.button_text_template))
local add_blacklist_debuff_button = self:CreateButton (background_add_blacklist, function()
local add_blacklist_debuff_button = self:CreateButton(background_add_blacklist, function()
local text = debuff_name_blacklist_entry.text
debuff_name_blacklist_entry:SetText("")
debuff_name_blacklist_entry:ClearFocus()
@@ -493,9 +493,9 @@ function DF:CreateAuraConfigPanel (parent, name, db, change_callback, options, t
--add to spells with the same name cache
same_name_spells_add (spellId)
end
end, textEntryWidth/2 -3, 20, "By Name", nil, nil, nil, nil, nil, nil, DF:GetTemplate ("button", "OPTIONS_BUTTON_TEMPLATE"), DF:GetTemplate ("font", options.button_text_template))
end, textEntryWidth/2 -3, 20, "By Name", nil, nil, nil, nil, nil, nil, DF:GetTemplate("button", "OPTIONS_BUTTON_TEMPLATE"), DF:GetTemplate("font", options.button_text_template))
local add_blacklist_debuff_button_id = self:CreateButton (background_add_blacklist, function()
local add_blacklist_debuff_button_id = self:CreateButton(background_add_blacklist, function()
local text = debuff_name_blacklist_entry.text
debuff_name_blacklist_entry:SetText("")
debuff_name_blacklist_entry:ClearFocus()
@@ -523,12 +523,12 @@ function DF:CreateAuraConfigPanel (parent, name, db, change_callback, options, t
--add to spells with the same name cache
same_name_spells_add (spellId)
end
end, textEntryWidth/2 -3, 20, "By ID", nil, nil, nil, nil, nil, nil, DF:GetTemplate ("button", "OPTIONS_BUTTON_TEMPLATE"), DF:GetTemplate ("font", options.button_text_template))
end, textEntryWidth/2 -3, 20, "By ID", nil, nil, nil, nil, nil, nil, DF:GetTemplate("button", "OPTIONS_BUTTON_TEMPLATE"), DF:GetTemplate("font", options.button_text_template))
--track list
local buff_tracklist_label = self:CreateLabel(background_add_tracklist, texts.MANUAL_ADD_TRACKLIST_BUFF, DF:GetTemplate ("font", "OPTIONS_FONT_TEMPLATE"))
local debuff_tracklist_label = self:CreateLabel(background_add_tracklist, texts.MANUAL_ADD_TRACKLIST_DEBUFF, DF:GetTemplate ("font", "OPTIONS_FONT_TEMPLATE"))
local buff_tracklist_label = self:CreateLabel(background_add_tracklist, texts.MANUAL_ADD_TRACKLIST_BUFF, DF:GetTemplate("font", "OPTIONS_FONT_TEMPLATE"))
local debuff_tracklist_label = self:CreateLabel(background_add_tracklist, texts.MANUAL_ADD_TRACKLIST_DEBUFF, DF:GetTemplate("font", "OPTIONS_FONT_TEMPLATE"))
local buff_name_tracklist_entry = self:CreateTextEntry (background_add_tracklist, function()end, textEntryWidth, 20, "AddBuffTracklistTextBox", _, _, options_dropdown_template)
buff_name_tracklist_entry:SetHook("OnEditFocusGained", load_all_spells)
@@ -542,7 +542,7 @@ function DF:CreateAuraConfigPanel (parent, name, db, change_callback, options, t
debuff_name_tracklist_entry.tooltip = "Enter the debuff name using lower case letters."
f_auto.AddDebuffTracklistTextBox = debuff_name_tracklist_entry
local add_tracklist_debuff_button = self:CreateButton (background_add_tracklist, function()
local add_tracklist_debuff_button = self:CreateButton(background_add_tracklist, function()
local text = debuff_name_tracklist_entry.text
debuff_name_tracklist_entry:SetText("")
debuff_name_tracklist_entry:ClearFocus()
@@ -566,9 +566,9 @@ function DF:CreateAuraConfigPanel (parent, name, db, change_callback, options, t
--add to spells with the same name cache
same_name_spells_add (spellId)
end
end, textEntryWidth/2 -3, 20, "By Name", nil, nil, nil, nil, nil, nil, DF:GetTemplate ("button", "OPTIONS_BUTTON_TEMPLATE"), DF:GetTemplate ("font", options.button_text_template))
end, textEntryWidth/2 -3, 20, "By Name", nil, nil, nil, nil, nil, nil, DF:GetTemplate("button", "OPTIONS_BUTTON_TEMPLATE"), DF:GetTemplate("font", options.button_text_template))
local add_tracklist_debuff_button_id = self:CreateButton (background_add_tracklist, function()
local add_tracklist_debuff_button_id = self:CreateButton(background_add_tracklist, function()
local text = debuff_name_tracklist_entry.text
debuff_name_tracklist_entry:SetText("")
debuff_name_tracklist_entry:ClearFocus()
@@ -595,9 +595,9 @@ function DF:CreateAuraConfigPanel (parent, name, db, change_callback, options, t
--add to spells with the same name cache
same_name_spells_add (spellId)
end
end, textEntryWidth/2 -3, 20, "By ID", nil, nil, nil, nil, nil, nil, DF:GetTemplate ("button", "OPTIONS_BUTTON_TEMPLATE"), DF:GetTemplate ("font", options.button_text_template))
end, textEntryWidth/2 -3, 20, "By ID", nil, nil, nil, nil, nil, nil, DF:GetTemplate("button", "OPTIONS_BUTTON_TEMPLATE"), DF:GetTemplate("font", options.button_text_template))
local add_tracklist_buff_button = self:CreateButton (background_add_tracklist, function()
local add_tracklist_buff_button = self:CreateButton(background_add_tracklist, function()
local text = buff_name_tracklist_entry.text
buff_name_tracklist_entry:SetText("")
buff_name_tracklist_entry:ClearFocus()
@@ -623,9 +623,9 @@ function DF:CreateAuraConfigPanel (parent, name, db, change_callback, options, t
same_name_spells_add (spellId)
end
end, textEntryWidth/2 -3, 20, "By Name", nil, nil, nil, nil, nil, nil, DF:GetTemplate ("button", "OPTIONS_BUTTON_TEMPLATE"), DF:GetTemplate ("font", options.button_text_template))
end, textEntryWidth/2 -3, 20, "By Name", nil, nil, nil, nil, nil, nil, DF:GetTemplate("button", "OPTIONS_BUTTON_TEMPLATE"), DF:GetTemplate("font", options.button_text_template))
local add_tracklist_buff_button_id = self:CreateButton (background_add_tracklist, function()
local add_tracklist_buff_button_id = self:CreateButton(background_add_tracklist, function()
local text = buff_name_tracklist_entry.text
buff_name_tracklist_entry:SetText("")
buff_name_tracklist_entry:ClearFocus()
@@ -654,7 +654,7 @@ function DF:CreateAuraConfigPanel (parent, name, db, change_callback, options, t
--add to spells with the same name cache
same_name_spells_add (spellId)
end
end, textEntryWidth/2 -3, 20, "By ID", nil, nil, nil, nil, nil, nil, DF:GetTemplate ("button", "OPTIONS_BUTTON_TEMPLATE"), DF:GetTemplate ("font", options.button_text_template))
end, textEntryWidth/2 -3, 20, "By ID", nil, nil, nil, nil, nil, nil, DF:GetTemplate("button", "OPTIONS_BUTTON_TEMPLATE"), DF:GetTemplate("font", options.button_text_template))
--anchors:
background_add_blacklist:SetPoint("topleft", f_auto, "topleft", 0, y)
@@ -697,13 +697,13 @@ function DF:CreateAuraConfigPanel (parent, name, db, change_callback, options, t
value = value or self.SpellID
if not flag then
GameCooltip2:Preset (2)
GameCooltip2:Preset(2)
GameCooltip2:SetOwner(self, "left", "right", 2, 0)
GameCooltip2:SetOption("TextSize", 10)
local spellName, _, spellIcon = GetSpellInfo(value)
if (spellName) then
GameCooltip2:AddLine (spellName .. " (" .. value .. ")")
GameCooltip2:AddLine(spellName .. " (" .. value .. ")")
GameCooltip2:AddIcon (spellIcon, 1, 1, 14, 14, .1, .9, .1, .9)
end
GameCooltip2:Show()
@@ -719,14 +719,14 @@ function DF:CreateAuraConfigPanel (parent, name, db, change_callback, options, t
end
if (spellsWithSameName) then
GameCooltip2:Preset (2)
GameCooltip2:Preset(2)
GameCooltip2:SetOwner(self, "left", "right", 2, 0)
GameCooltip2:SetOption("TextSize", 10)
for i, spellID in ipairs(spellsWithSameName) do
local spellName, _, spellIcon = GetSpellInfo(spellID)
if (spellName) then
GameCooltip2:AddLine (spellName .. " (" .. spellID .. ")")
GameCooltip2:AddLine(spellName .. " (" .. spellID .. ")")
GameCooltip2:AddIcon (spellIcon, 1, 1, 14, 14, .1, .9, .1, .9)
end
end
@@ -757,7 +757,7 @@ function DF:CreateAuraConfigPanel (parent, name, db, change_callback, options, t
local auraTable = data [index]
if (auraTable) then
local line = self:GetLine (i)
local spellID, spellName, spellIcon, lowerSpellName, flag = unpack (auraTable)
local spellID, spellName, spellIcon, lowerSpellName, flag = unpack(auraTable)
line.SpellID = spellID
line.SpellName = spellName
@@ -777,16 +777,16 @@ function DF:CreateAuraConfigPanel (parent, name, db, change_callback, options, t
end
local lineOnEnter = function(self)
self:SetBackdropColor(unpack (backdropColor_OnEnter))
self:SetBackdropColor(unpack(backdropColor_OnEnter))
--GameTooltip:SetOwner(self, "ANCHOR_CURSOR")
--GameTooltip:SetSpellByID(self.SpellID)
--GameTooltip:AddLine (" ")
--GameTooltip:AddLine(" ")
--GameTooltip:Show()
end
local lineOnLeave = function(self)
self:SetBackdropColor(unpack (backdropColor))
self:SetBackdropColor(unpack(backdropColor))
--GameTooltip:Hide()
end
@@ -810,7 +810,7 @@ function DF:CreateAuraConfigPanel (parent, name, db, change_callback, options, t
line:HookScript ("OnLeave", lineOnLeave)
line:SetBackdrop({bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], tileSize = 64, tile = true})
line:SetBackdropColor(unpack (backdropColor))
line:SetBackdropColor(unpack(backdropColor))
local icon = line:CreateTexture("$parentIcon", "overlay")
icon:SetSize(lineHeight - 2, lineHeight - 2)
@@ -822,7 +822,7 @@ function DF:CreateAuraConfigPanel (parent, name, db, change_callback, options, t
remove_button:SetSize(16, 16)
remove_button:SetScript("OnClick", onRemoveClick)
remove_button:SetPoint("topright", line, "topright")
remove_button:GetNormalTexture():SetDesaturated (true)
remove_button:GetNormalTexture():SetDesaturated(true)
icon:SetPoint("left", line, "left", 2, 0)
name:SetPoint("left", icon, "right", 3, 0)
@@ -953,18 +953,18 @@ function DF:CreateAuraConfigPanel (parent, name, db, change_callback, options, t
local backdrop_color_on_enter = {.8, .8, .8, 0.4}
local line_onenter = function(self)
self:SetBackdropColor(unpack (backdrop_color_on_enter))
local spellid = select (7, GetSpellInfo(self.value))
self:SetBackdropColor(unpack(backdrop_color_on_enter))
local spellid = select(7, GetSpellInfo(self.value))
if (spellid) then
GameTooltip:SetOwner(self, "ANCHOR_CURSOR")
GameTooltip:SetSpellByID(spellid)
GameTooltip:AddLine (" ")
GameTooltip:AddLine(" ")
GameTooltip:Show()
end
end
local line_onleave = function(self)
self:SetBackdropColor(unpack (backdrop_color))
self:SetBackdropColor(unpack(backdrop_color))
GameTooltip:Hide()
end
@@ -974,7 +974,7 @@ function DF:CreateAuraConfigPanel (parent, name, db, change_callback, options, t
for i = 1, #data do
if (data[i] == spell) then
tremove (data, i)
tremove(data, i)
break
end
end
@@ -990,7 +990,7 @@ function DF:CreateAuraConfigPanel (parent, name, db, change_callback, options, t
line:SetScript("OnLeave", line_onleave)
line:SetBackdrop({bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], tileSize = 64, tile = true})
line:SetBackdropColor(unpack (backdrop_color))
line:SetBackdropColor(unpack(backdrop_color))
local icon = line:CreateTexture("$parentIcon", "overlay")
icon:SetSize(scroll_line_height - 2, scroll_line_height - 2)
@@ -1001,7 +1001,7 @@ function DF:CreateAuraConfigPanel (parent, name, db, change_callback, options, t
remove_button:SetSize(16, 16)
remove_button:SetScript("OnClick", onclick_remove_button)
remove_button:SetPoint("topright", line, "topright")
remove_button:GetNormalTexture():SetDesaturated (true)
remove_button:GetNormalTexture():SetDesaturated(true)
icon:SetPoint("left", line, "left", 2, 0)
name:SetPoint("left", icon, "right", 2, 0)
@@ -1053,12 +1053,12 @@ function DF:CreateAuraConfigPanel (parent, name, db, change_callback, options, t
f.debuffs_added = debuffs_added
local buffs_added_name = DF:CreateLabel(buffs_added, "Buffs", 12, "silver")
buffs_added_name:SetTemplate (DF:GetTemplate ("font", "OPTIONS_FONT_TEMPLATE"))
buffs_added_name:SetTemplate(DF:GetTemplate("font", "OPTIONS_FONT_TEMPLATE"))
buffs_added_name:SetPoint("bottomleft", buffs_added, "topleft", 0, 2)
buffs_added.Title = buffs_added_name
local debuffs_added_name = DF:CreateLabel(debuffs_added, "Debuffs", 12, "silver")
debuffs_added_name:SetTemplate (DF:GetTemplate ("font", "OPTIONS_FONT_TEMPLATE"))
debuffs_added_name:SetTemplate(DF:GetTemplate("font", "OPTIONS_FONT_TEMPLATE"))
debuffs_added_name:SetPoint("bottomleft", debuffs_added, "topleft", 0, 2)
debuffs_added.Title = debuffs_added_name
@@ -1076,7 +1076,7 @@ function DF:CreateAuraConfigPanel (parent, name, db, change_callback, options, t
new_buff_entry:SetJustifyH("left")
new_debuff_entry:SetJustifyH("left")
local add_buff_button = self:CreateButton (f_manual, function()
local add_buff_button = self:CreateButton(f_manual, function()
local text = new_buff_entry.text
new_buff_entry:SetText("")
@@ -1099,14 +1099,14 @@ function DF:CreateAuraConfigPanel (parent, name, db, change_callback, options, t
end
]]--
else
print ("spellId not found for spell:", spellName)
print("spellId not found for spell:", spellName)
end
end
else
--get the spellId
local spellID = get_spellID_from_string (text)
if (not spellID) then
print ("spellIs for spell ", text, "not found")
print("spellIs for spell ", text, "not found")
return
end
@@ -1123,9 +1123,9 @@ function DF:CreateAuraConfigPanel (parent, name, db, change_callback, options, t
buffs_added:Refresh()
end
end, 100, 20, "Add Buff", nil, nil, nil, nil, nil, nil, DF:GetTemplate ("button", "OPTIONS_BUTTON_TEMPLATE"))
end, 100, 20, "Add Buff", nil, nil, nil, nil, nil, nil, DF:GetTemplate("button", "OPTIONS_BUTTON_TEMPLATE"))
local add_debuff_button = self:CreateButton (f_manual, function()
local add_debuff_button = self:CreateButton(f_manual, function()
local text = new_debuff_entry.text
new_debuff_entry:SetText("")
new_debuff_entry:ClearFocus()
@@ -1146,14 +1146,14 @@ function DF:CreateAuraConfigPanel (parent, name, db, change_callback, options, t
end
]]--
else
print ("spellId not found for spell:", spellName)
print("spellId not found for spell:", spellName)
end
end
else
--get the spellId
local spellID = get_spellID_from_string (text)
if (not spellID) then
print ("spellIs for spell ", text, "not found")
print("spellIs for spell ", text, "not found")
return
end
@@ -1171,7 +1171,7 @@ function DF:CreateAuraConfigPanel (parent, name, db, change_callback, options, t
debuffs_added:Refresh()
end
end, 100, 20, "Add Debuff", nil, nil, nil, nil, nil, nil, DF:GetTemplate ("button", "OPTIONS_BUTTON_TEMPLATE"))
end, 100, 20, "Add Debuff", nil, nil, nil, nil, nil, nil, DF:GetTemplate("button", "OPTIONS_BUTTON_TEMPLATE"))
local multiple_spells_label = DF:CreateLabel(buffs_added, "You can add multiple auras at once by separating them with ';'.\nExample: Fireball; Frostbolt; Flamestrike", 10, "gray")
multiple_spells_label:SetSize(350, 24)
@@ -1179,7 +1179,7 @@ function DF:CreateAuraConfigPanel (parent, name, db, change_callback, options, t
local export_box = self:CreateTextEntry (f_manual, function()end, 242, 20, "ExportAuraTextBox", _, _, options_dropdown_template)
local export_buff_button = self:CreateButton (f_manual, function()
local export_buff_button = self:CreateButton(f_manual, function()
local str = ""
for _, spellId in ipairs(f.db.aura_tracker.buff) do
local spellName = GetSpellInfo(spellId)
@@ -1191,9 +1191,9 @@ function DF:CreateAuraConfigPanel (parent, name, db, change_callback, options, t
export_box:SetFocus (true)
export_box:HighlightText()
end, 120, 20, "Export Buffs", nil, nil, nil, nil, nil, nil, DF:GetTemplate ("button", "OPTIONS_BUTTON_TEMPLATE"))
end, 120, 20, "Export Buffs", nil, nil, nil, nil, nil, nil, DF:GetTemplate("button", "OPTIONS_BUTTON_TEMPLATE"))
local export_debuff_button = self:CreateButton (f_manual, function()
local export_debuff_button = self:CreateButton(f_manual, function()
local str = ""
for _, spellId in ipairs(f.db.aura_tracker.debuff) do
local spellName = GetSpellInfo(spellId)
@@ -1206,7 +1206,7 @@ function DF:CreateAuraConfigPanel (parent, name, db, change_callback, options, t
export_box:SetFocus (true)
export_box:HighlightText()
end, 120, 20, "Export Debuffs", nil, nil, nil, nil, nil, nil, DF:GetTemplate ("button", "OPTIONS_BUTTON_TEMPLATE"))
end, 120, 20, "Export Debuffs", nil, nil, nil, nil, nil, nil, DF:GetTemplate("button", "OPTIONS_BUTTON_TEMPLATE"))
new_buff_entry:SetPoint("topleft", f_manual, "topleft", 480, y)
new_buff_string:SetPoint("bottomleft", new_buff_entry, "topleft", 0, 2)
+4 -4
View File
@@ -214,7 +214,7 @@ DF:Mixin(ButtonMetaFunctions, DF.FrameMixin)
--texture
local smember_texture = function(_object, _value)
if (type(_value) == "table") then
local _value1, _value2, _value3, _value4 = unpack (_value)
local _value1, _value2, _value3, _value4 = unpack(_value)
if (_value1) then
_object.button:SetNormalTexture(_value1)
end
@@ -239,10 +239,10 @@ DF:Mixin(ButtonMetaFunctions, DF.FrameMixin)
--locked
local smember_locked = function(_object, _value)
if (_value) then
_object.button:SetMovable (false)
_object.button:SetMovable(false)
return rawset(_object, "is_locked", true)
else
_object.button:SetMovable (true)
_object.button:SetMovable(true)
rawset(_object, "is_locked", false)
return
end
@@ -1010,7 +1010,7 @@ end
local setColorPickColor = function(button, ...)
local red, green, blue, alpha = DF:ParseColors(...)
button.color_texture:SetVertexColor (red, green, blue, alpha)
button.color_texture:SetVertexColor(red, green, blue, alpha)
end
local colorpickCancel = function(self)
+3 -3
View File
@@ -520,7 +520,7 @@ function DF:CreateCoolTip()
statusbar.texture:SetTexture("Interface\\PaperDollInfoFrame\\UI-Character-Skills-Bar")
statusbar.texture:SetSize(300, 14)
statusbar:SetStatusBarTexture (statusbar.texture)
statusbar:SetMinMaxValues (0, 100)
statusbar:SetMinMaxValues(0, 100)
statusbar.spark = statusbar:CreateTexture("$parent_Spark", "BACKGROUND")
statusbar.spark:Hide()
@@ -583,7 +583,7 @@ function DF:CreateCoolTip()
statusbar2.texture:SetTexture("Interface\\PaperDollInfoFrame\\UI-Character-Skills-Bar")
statusbar2.texture:SetSize(300, 14)
statusbar2:SetStatusBarTexture (statusbar2.texture)
statusbar2:SetMinMaxValues (0, 100)
statusbar2:SetMinMaxValues(0, 100)
--on load
self:RegisterForClicks("LeftButtonDown")
@@ -869,7 +869,7 @@ function DF:CreateCoolTip()
local func = gameCooltip.FunctionsTableMain[self.index]
local okay, errortext = pcall(func, gameCooltip.Host, gameCooltip.FixedValue, parameterTable[1], parameterTable[2], parameterTable[3], button)
if (not okay) then
print ("Cooltip OnClick Error:", errortext)
print("Cooltip OnClick Error:", errortext)
end
end
end
+47 -47
View File
@@ -417,14 +417,14 @@ function DF:FadeFrame(frame, t)
frame.fading_out = false
frame.fading_in = false
frame:Show()
frame:SetAlpha (1)
frame:SetAlpha(1)
elseif (t == 1) then
frame.hidden = true
frame.faded = true
frame.fading_out = false
frame.fading_in = false
frame:SetAlpha (0)
frame:SetAlpha(0)
frame:Hide()
end
end
@@ -650,7 +650,7 @@ if (symbol_1K) then
elseif (number > 999999) then
return format("%.2f", number/10000) .. symbol_10K
elseif (number > 99999) then
return floor (number/10000) .. symbol_10K
return floor(number/10000) .. symbol_10K
elseif (number > 9999) then
return format("%.1f", (number/10000)) .. symbol_10K
elseif (number > 999) then
@@ -665,7 +665,7 @@ else
elseif (number > 999999) then
return format("%.2f", number/1000000) .. "M"
elseif (number > 99999) then
return floor (number/1000) .. "K"
return floor(number/1000) .. "K"
elseif (number > 999) then
return format("%.1f", (number/1000)) .. "K"
end
@@ -2400,7 +2400,7 @@ end
error ("Details! Framework: CreateInCombatTexture invalid frame on parameter 1.")
end
local in_combat_background = DF:CreateImage (frame)
local in_combat_background = DF:CreateImage(frame)
in_combat_background:SetColorTexture (.6, 0, 0, .1)
in_combat_background:Hide()
@@ -2439,7 +2439,7 @@ end
TutorialAlertFrame:Hide()
TutorialAlertFrame:SetScript("OnMouseUp", function(self)
if (self.clickfunc and type (self.clickfunc) == "function") then
if (self.clickfunc and type(self.clickfunc) == "function") then
self.clickfunc()
end
self:Hide()
@@ -2448,7 +2448,7 @@ end
end
--
TutorialAlertFrame.label = type (maintext) == "string" and maintext or type (desctext) == "string" and desctext or ""
TutorialAlertFrame.label = type(maintext) == "string" and maintext or type(desctext) == "string" and desctext or ""
MicroButtonAlert_SetText (TutorialAlertFrame, alert.label)
--
@@ -2472,7 +2472,7 @@ end
elseif (widget.widget_type == "color") then
local default_value, g, b, a = widget._get()
if (type(default_value) == "table") then
widget:SetColor (unpack (default_value))
widget:SetColor (unpack(default_value))
else
widget:SetColor (default_value, g, b, a)
end
@@ -2542,8 +2542,8 @@ end
end
end)
options_frame:SetMovable (true)
options_frame:EnableMouse (true)
options_frame:SetMovable(true)
options_frame:EnableMouse(true)
options_frame:SetFrameStrata("DIALOG")
options_frame:SetToplevel (true)
@@ -2582,8 +2582,8 @@ end
end
end)
options_frame:SetMovable (true)
options_frame:EnableMouse (true)
options_frame:SetMovable(true)
options_frame:EnableMouse(true)
options_frame:SetFrameStrata("DIALOG")
options_frame:SetToplevel (true)
@@ -2599,7 +2599,7 @@ end
local texturetitle = options_frame:CreateTexture(nil, "artwork")
texturetitle:SetTexture([[Interface\CURSOR\Interact]])
texturetitle:SetTexCoord (0, 1, 0, 1)
texturetitle:SetVertexColor (1, 1, 1, 1)
texturetitle:SetVertexColor(1, 1, 1, 1)
texturetitle:SetPoint("topleft", options_frame, "topleft", 2, -3)
texturetitle:SetWidth(36)
texturetitle:SetHeight(36)
@@ -2612,7 +2612,7 @@ end
c:SetWidth(32)
c:SetHeight(32)
c:SetPoint("TOPRIGHT", options_frame, "TOPRIGHT", -3, -3)
c:SetFrameLevel (options_frame:GetFrameLevel()+1)
c:SetFrameLevel(options_frame:GetFrameLevel()+1)
return options_frame
end
@@ -2800,7 +2800,7 @@ function DF:InstallTemplate (widgetType, templateName, template, parentName)
return newTemplate
end
function DF:GetTemplate (widget_type, template_name)
function DF:GetTemplate(widget_type, template_name)
widget_type = string.lower (widget_type)
local template_table
@@ -2833,7 +2833,7 @@ function DF:RunHooksForWidget (event, ...)
local hooks = self.HookList [event]
if (not hooks) then
print (self.widget:GetName(), "no hooks for", event)
print(self.widget:GetName(), "no hooks for", event)
return
end
@@ -2853,7 +2853,7 @@ function DF:SetHook(hookType, func)
local isRemoval = false
for i = #self.HookList [hookType], 1, -1 do
if (self.HookList [hookType] [i] == func) then
tremove (self.HookList [hookType], i)
tremove(self.HookList [hookType], i)
isRemoval = true
break
end
@@ -2863,7 +2863,7 @@ function DF:SetHook(hookType, func)
end
else
if (DF.debug) then
print (debugstack())
print(debugstack())
error ("Details! Framework: invalid function for widget " .. self.WidgetType .. ".")
end
end
@@ -2893,7 +2893,7 @@ function DF:ClearHooks()
end
function DF:Error (errortext)
print ("|cFFFF2222Details! Framework Error|r:", errortext, self.GetName and self:GetName(), self.WidgetType, debugstack (2, 3, 0))
print("|cFFFF2222Details! Framework Error|r:", errortext, self.GetName and self:GetName(), self.WidgetType, debugstack (2, 3, 0))
end
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
@@ -2997,7 +2997,7 @@ function DF:OpenInterfaceProfile()
end
end
else
self:Msg ("Couldn't not find the profile panel.")
self:Msg("Couldn't not find the profile panel.")
break
end
end
@@ -3109,21 +3109,21 @@ local frameshake_shake_finished = function(parent, shakeObject)
--automatic anchoring and reanching needs to the reviwed in the future
if (#anchor == 1) then
local anchorTo = unpack (anchor)
local anchorTo = unpack(anchor)
parent:ClearAllPoints()
parent:SetPoint(anchorTo)
elseif (#anchor == 2) then
local anchorTo, point1 = unpack (anchor)
local anchorTo, point1 = unpack(anchor)
parent:ClearAllPoints()
parent:SetPoint(anchorTo, point1)
elseif (#anchor == 3) then
local anchorTo, point1, point2 = unpack (anchor)
local anchorTo, point1, point2 = unpack(anchor)
parent:SetPoint(anchorTo, point1, point2)
elseif (#anchor == 5) then
local anchorName1, anchorTo, anchorName2, point1, point2 = unpack (anchor)
local anchorName1, anchorTo, anchorName2, point1, point2 = unpack(anchor)
parent:SetPoint(anchorName1, anchorTo, anchorName2, point1, point2)
end
end
@@ -3137,7 +3137,7 @@ frameshake_do_update = function(parent, shakeObject, deltaTime)
deltaTime = deltaTime or 0
--update time left
shakeObject.TimeLeft = max (shakeObject.TimeLeft - deltaTime, 0)
shakeObject.TimeLeft = max(shakeObject.TimeLeft - deltaTime, 0)
if (shakeObject.TimeLeft > 0) then
--update fade in and out
@@ -3172,13 +3172,13 @@ frameshake_do_update = function(parent, shakeObject, deltaTime)
local newX, newY
if (shakeObject.AbsoluteSineX) then
--absoluting only the sine wave, passing a negative scale will reverse the absolute direction
newX = shakeObject.Amplitude * abs (math.sin (shakeObject.XSineOffset)) * scaleShake * shakeObject.ScaleX
newX = shakeObject.Amplitude * abs(math.sin (shakeObject.XSineOffset)) * scaleShake * shakeObject.ScaleX
else
newX = shakeObject.Amplitude * math.sin (shakeObject.XSineOffset) * scaleShake * shakeObject.ScaleX
end
if (shakeObject.AbsoluteSineY) then
newY = shakeObject.Amplitude * abs (math.sin (shakeObject.YSineOffset)) * scaleShake * shakeObject.ScaleY
newY = shakeObject.Amplitude * abs(math.sin (shakeObject.YSineOffset)) * scaleShake * shakeObject.ScaleY
else
newY = shakeObject.Amplitude * math.sin (shakeObject.YSineOffset) * scaleShake * shakeObject.ScaleY
end
@@ -3188,13 +3188,13 @@ frameshake_do_update = function(parent, shakeObject, deltaTime)
local anchor = shakeObject.Anchors [i]
if (#anchor == 1 or #anchor == 3) then
local anchorTo, point1, point2 = unpack (anchor)
local anchorTo, point1, point2 = unpack(anchor)
point1 = point1 or 0
point2 = point2 or 0
parent:SetPoint(anchorTo, point1 + newX, point2 + newY)
elseif (#anchor == 5) then
local anchorName1, anchorTo, anchorName2, point1, point2 = unpack (anchor)
local anchorName1, anchorTo, anchorName2, point1, point2 = unpack(anchor)
--parent:ClearAllPoints()
parent:SetPoint(anchorName1, anchorTo, anchorName2, point1 + newX, point2 + newY)
@@ -3390,7 +3390,7 @@ end
local glow_overlay_setcolor = function(self, antsColor, glowColor)
if (antsColor) then
local r, g, b, a = DF:ParseColors(antsColor)
self.ants:SetVertexColor (r, g, b, a)
self.ants:SetVertexColor(r, g, b, a)
self.AntsColor.r = r
self.AntsColor.g = g
self.AntsColor.b = b
@@ -3399,7 +3399,7 @@ local glow_overlay_setcolor = function(self, antsColor, glowColor)
if (glowColor) then
local r, g, b, a = DF:ParseColors(glowColor)
self.outerGlow:SetVertexColor (r, g, b, a)
self.outerGlow:SetVertexColor(r, g, b, a)
self.GlowColor.r = r
self.GlowColor.g = g
self.GlowColor.b = b
@@ -3438,11 +3438,11 @@ function DF:CreateGlowOverlay (parent, antsColor, glowColor)
parent.overlay:SetPoint("BOTTOMRIGHT", parent, "BOTTOMRIGHT", frameWidth * 0.32, -frameHeight * 0.36)
local r, g, b, a = DF:ParseColors(antsColor or defaultColor)
glowFrame.ants:SetVertexColor (r, g, b, a)
glowFrame.ants:SetVertexColor(r, g, b, a)
glowFrame.AntsColor = {r, g, b, a}
local r, g, b, a = DF:ParseColors(glowColor or defaultColor)
glowFrame.outerGlow:SetVertexColor (r, g, b, a)
glowFrame.outerGlow:SetVertexColor(r, g, b, a)
glowFrame.GlowColor = {r, g, b, a}
glowFrame.outerGlow:SetScale(1.2)
@@ -3478,7 +3478,7 @@ function DF:CreateAnts (parent, antTable, leftOffset, rightOffset, topOffset, bo
t:SetAllPoints()
t:SetTexture(antTable.Texture)
t:SetBlendMode(antTable.BlendMode or "ADD")
t:SetVertexColor (DF:ParseColors(antTable.Color or "white"))
t:SetVertexColor(DF:ParseColors(antTable.Color or "white"))
f.Texture = t
f.AntTable = antTable
@@ -3509,13 +3509,13 @@ local SetBorderAlpha = function(self, alpha1, alpha2, alpha3)
self.Borders.Alpha3 = alpha3 or self.Borders.Alpha3
for _, texture in ipairs(self.Borders.Layer1) do
texture:SetAlpha (self.Borders.Alpha1)
texture:SetAlpha(self.Borders.Alpha1)
end
for _, texture in ipairs(self.Borders.Layer2) do
texture:SetAlpha (self.Borders.Alpha2)
texture:SetAlpha(self.Borders.Alpha2)
end
for _, texture in ipairs(self.Borders.Layer3) do
texture:SetAlpha (self.Borders.Alpha3)
texture:SetAlpha(self.Borders.Alpha3)
end
end
@@ -3981,7 +3981,7 @@ function DF:GetClassSpecIDs (class)
end
local dispatch_error = function(context, errortext)
DF:Msg ( (context or "<no context>") .. " |cFFFF9900error|r: " .. (errortext or "<no error given>"))
DF:Msg( (context or "<no context>") .. " |cFFFF9900error|r: " .. (errortext or "<no error given>"))
end
--safe call an external func with payload and without telling who is calling
@@ -4045,7 +4045,7 @@ function DF:CoreDispatch (context, func, ...)
end
--/run local a, b =32,3; local f=function(c,d) return c+d, 2, 3;end; print (xpcall(f,geterrorhandler(),a,b))
--/run local a, b =32,3; local f=function(c,d) return c+d, 2, 3;end; print(xpcall(f,geterrorhandler(),a,b))
function DF_CALC_PERFORMANCE()
local F = CreateFrame("frame")
local T = GetTime()
@@ -4055,7 +4055,7 @@ function DF_CALC_PERFORMANCE()
J = true
return
end
print ("Elapsed Time:", deltaTime)
print("Elapsed Time:", deltaTime)
F:SetScript("OnUpdate", nil)
end)
end
@@ -4339,7 +4339,7 @@ DF.CLEncounterID = {
}
function DF:GetPlayerRole()
local assignedRole = DF.UnitGroupRolesAssigned ("player")
local assignedRole = DF.UnitGroupRolesAssigned("player")
if (assignedRole == "NONE") then
local spec = DF.GetSpecialization()
return spec and DF.GetSpecializationRole (spec) or "NONE"
@@ -4663,7 +4663,7 @@ end
local func = DF.RegisteredScriptsComm [ID]
if (func) then
DF:MakeFunctionSecure(func)
DF:Dispatch (func, commSource, select (5, unpack (data))) --this use xpcall
DF:Dispatch (func, commSource, select(5, unpack(data))) --this use xpcall
end
end
end
@@ -4685,7 +4685,7 @@ end
function DF:SendScriptComm (ID, ...)
if (DF.RegisteredScriptsComm [ID]) then
local sourceName = UnitName ("player") .. "-" .. GetRealmName()
local data = LibAceSerializer:Serialize (ID, UnitGUID ("player"), sourceName, ...)
local data = LibAceSerializer:Serialize (ID, UnitGUID("player"), sourceName, ...)
data = LibDeflate:CompressDeflate (data, {level = 9})
data = LibDeflate:EncodeForWoWAddonChannel (data)
aceComm:SendCommMessage ("_GSC", data, "PARTY")
@@ -4704,7 +4704,7 @@ DF.DebugMixin = {
debug = true,
CheckPoint = function(self, checkPointName, ...)
print (self:GetName(), checkPointName, ...)
print(self:GetName(), checkPointName, ...)
end,
CheckVisibilityState = function(self, widget)
@@ -4712,12 +4712,12 @@ DF.DebugMixin = {
self = widget or self
local width, height = self:GetSize()
width = floor (width)
height = floor (height)
width = floor(width)
height = floor(height)
local numPoints = self:GetNumPoints()
print ("shown:", self:IsShown(), "visible:", self:IsVisible(), "alpha:", self:GetAlpha(), "size:", width, height, "points:", numPoints)
print("shown:", self:IsShown(), "visible:", self:IsVisible(), "alpha:", self:GetAlpha(), "size:", width, height, "points:", numPoints)
end,
CheckStack = function(self)
+2 -2
View File
@@ -52,7 +52,7 @@ end
function HelpMetaFunctions:SetPoint(v1, v2, v3, v4, v5)
v1, v2, v3, v4, v5 = DF:CheckPoints (v1, v2, v3, v4, v5, self)
if (not v1) then
print ("Invalid parameter for SetPoint")
print("Invalid parameter for SetPoint")
return
end
return self.widget:SetPoint(v1, v2, v3, v4, v5)
@@ -116,7 +116,7 @@ function DF:NewHelp (parent, width, height, x, y, buttonWidth, buttonHeight, nam
help:ShowHelp()
end)
setmetatable (help, HelpMetaFunctions)
setmetatable(help, HelpMetaFunctions)
return help
+3 -3
View File
@@ -39,7 +39,7 @@ function DF:FindLookAtRotation (x1, y1, x2, y2)
end
--find the value scale between two given values. e.g: value of 500 in a range 0-100 result in 10 in a scale for 0-10
function DF:MapRangeClamped (inputX, inputY, outputX, outputY, value)
function DF:MapRangeClamped(inputX, inputY, outputX, outputY, value)
return DF:GetRangeValue (outputX, outputY, Clamp (DF:GetRangePercent (inputX, inputY, value), 0, 1))
end
@@ -93,13 +93,13 @@ end
--check if a number is near another number by a tolerance
function DF:IsNearlyEqual (value1, value2, tolerance)
tolerance = tolerance or SMALL_FLOAT
return abs (value1 - value2) <= tolerance
return abs(value1 - value2) <= tolerance
end
--check if a number is near zero
function DF:IsNearlyZero (value, tolerance)
tolerance = tolerance or SMALL_FLOAT
return abs (value) <= tolerance
return abs(value) <= tolerance
end
--check if a number is within a two other numbers, if isInclusive is true, it'll include the max value
+30 -30
View File
@@ -9,7 +9,7 @@ local _rawset = rawset --lua locals
local _rawget = rawget --lua locals
local _setmetatable = setmetatable --lua locals
local _unpack = unpack --lua locals
local _type = type --lua locals
local type = type --lua locals
local _math_floor = math.floor --lua locals
local SharedMedia = LibStub:GetLibrary ("LibSharedMedia-3.0")
@@ -58,7 +58,7 @@ local BarMetaFunctions = _G[DF.GlobalWidgetControlNames ["normal_bar"]]
end
BarMetaFunctions.__add = function(v1, v2)
if (_type(v1) == "table") then
if (type(v1) == "table") then
local v = v1.statusbar:GetValue()
v = v + v2
v1.statusbar:SetValue(v)
@@ -70,7 +70,7 @@ local BarMetaFunctions = _G[DF.GlobalWidgetControlNames ["normal_bar"]]
end
BarMetaFunctions.__sub = function(v1, v2)
if (_type(v1) == "table") then
if (type(v1) == "table") then
local v = v1.statusbar:GetValue()
v = v - v2
v1.statusbar:SetValue(v)
@@ -229,24 +229,24 @@ local BarMetaFunctions = _G[DF.GlobalWidgetControlNames ["normal_bar"]]
_object.statusbar:SetStatusBarColor (_value1, _value2, _value3, _value4)
_object._texture.original_colors = {_value1, _value2, _value3, _value4}
_object.timer_texture:SetVertexColor (_value1, _value2, _value3, _value4)
_object.timer_texture:SetVertexColor(_value1, _value2, _value3, _value4)
_object.timer_textureR:SetVertexColor (_value1, _value2, _value3, _value4)
_object.timer_textureR:SetVertexColor(_value1, _value2, _value3, _value4)
return _object._texture:SetVertexColor (_value1, _value2, _value3, _value4)
return _object._texture:SetVertexColor(_value1, _value2, _value3, _value4)
end
--background color
local smember_backgroundcolor = function(_object, _value)
local _value1, _value2, _value3, _value4 = DF:ParseColors(_value)
return _object.background:SetVertexColor (_value1, _value2, _value3, _value4)
return _object.background:SetVertexColor(_value1, _value2, _value3, _value4)
end
--icon
local smember_icon = function(_object, _value)
if (type(_value) == "table") then
local _value1, _value2 = _unpack (_value)
local _value1, _value2 = _unpack(_value)
_object._icon:SetTexture(_value1)
if (_value2) then
_object._icon:SetTexCoord (_unpack (_value2))
_object._icon:SetTexCoord (_unpack(_value2))
end
else
_object._icon:SetTexture(_value)
@@ -256,14 +256,14 @@ local BarMetaFunctions = _G[DF.GlobalWidgetControlNames ["normal_bar"]]
--texture
local smember_texture = function(_object, _value)
if (type(_value) == "table") then
local _value1, _value2 = _unpack (_value)
local _value1, _value2 = _unpack(_value)
_object._texture:SetTexture(_value1)
_object.timer_texture:SetTexture(_value1)
_object.timer_textureR:SetTexture(_value1)
if (_value2) then
_object._texture:SetTexCoord (_unpack (_value2))
_object.timer_texture:SetTexCoord (_unpack (_value2))
_object.timer_textureR:SetTexCoord (_unpack (_value2))
_object._texture:SetTexCoord (_unpack(_value2))
_object.timer_texture:SetTexCoord (_unpack(_value2))
_object.timer_textureR:SetTexCoord (_unpack(_value2))
end
else
if (_value:find ("\\")) then
@@ -320,7 +320,7 @@ local BarMetaFunctions = _G[DF.GlobalWidgetControlNames ["normal_bar"]]
end
--alpha
local smember_alpha= function(_object, _value)
return _object:SetAlpha (_value)
return _object:SetAlpha(_value)
end
BarMetaFunctions.SetMembers = BarMetaFunctions.SetMembers or {}
@@ -387,7 +387,7 @@ local BarMetaFunctions = _G[DF.GlobalWidgetControlNames ["normal_bar"]]
function BarMetaFunctions:SetPoint(v1, v2, v3, v4, v5)
v1, v2, v3, v4, v5 = DF:CheckPoints (v1, v2, v3, v4, v5, self)
if (not v1) then
print ("Invalid parameter for SetPoint")
print("Invalid parameter for SetPoint")
return
end
return self.widget:SetPoint(v1, v2, v3, v4, v5)
@@ -420,7 +420,7 @@ local BarMetaFunctions = _G[DF.GlobalWidgetControlNames ["normal_bar"]]
function BarMetaFunctions:SetColor (r, g, b, a)
r, g, b, a = DF:ParseColors(r, g, b, a)
self._texture:SetVertexColor (r, g, b, a)
self._texture:SetVertexColor(r, g, b, a)
self.statusbar:SetStatusBarColor (r, g, b, a)
self._texture.original_colors = {r, g, b, a}
end
@@ -429,7 +429,7 @@ local BarMetaFunctions = _G[DF.GlobalWidgetControlNames ["normal_bar"]]
function BarMetaFunctions:SetIcon (texture, ...)
self._icon:SetTexture(texture)
if (...) then
local L, R, U, D = _unpack (...)
local L, R, U, D = _unpack(...)
self._icon:SetTexCoord (L, R, U, D)
end
end
@@ -459,12 +459,12 @@ local BarMetaFunctions = _G[DF.GlobalWidgetControlNames ["normal_bar"]]
function BarMetaFunctions:GetFrameLevel()
return self.statusbar:GetFrameLevel()
end
function BarMetaFunctions:SetFrameLevel (level, frame)
function BarMetaFunctions:SetFrameLevel(level, frame)
if (not frame) then
return self.statusbar:SetFrameLevel (level)
return self.statusbar:SetFrameLevel(level)
else
local framelevel = frame:GetFrameLevel (frame) + level
return self.statusbar:SetFrameLevel (framelevel)
return self.statusbar:SetFrameLevel(framelevel)
end
end
@@ -473,7 +473,7 @@ local BarMetaFunctions = _G[DF.GlobalWidgetControlNames ["normal_bar"]]
return self.statusbar:GetFrameStrata()
end
function BarMetaFunctions:SetFrameStrata(strata)
if (_type(strata) == "table") then
if (type(strata) == "table") then
self.statusbar:SetFrameStrata(strata:GetFrameStrata())
else
self.statusbar:SetFrameStrata(strata)
@@ -499,7 +499,7 @@ local BarMetaFunctions = _G[DF.GlobalWidgetControlNames ["normal_bar"]]
if (frame.MyObject.have_tooltip) then
GameCooltip2:Reset()
GameCooltip2:AddLine (frame.MyObject.have_tooltip)
GameCooltip2:AddLine(frame.MyObject.have_tooltip)
GameCooltip2:ShowCooltip(frame, "tooltip")
end
@@ -585,7 +585,7 @@ local BarMetaFunctions = _G[DF.GlobalWidgetControlNames ["normal_bar"]]
return
end
if (self.TimerScheduled) then
DF:CancelTimer (self.TimerScheduled)
DF:CancelTimer(self.TimerScheduled)
self.TimerScheduled = nil
else
if (self.statusbar:GetScript("OnUpdate")) then
@@ -604,12 +604,12 @@ local BarMetaFunctions = _G[DF.GlobalWidgetControlNames ["normal_bar"]]
local OnUpdate = function(self, elapsed)
--percent of elapsed
local pct = abs (self.end_timer - GetTime() - self.tempo) / self.tempo
local pct = abs(self.end_timer - GetTime() - self.tempo) / self.tempo
if (self.inverse) then
self.t:SetWidth(self.total_size * pct)
else
self.t:SetWidth(self.total_size * abs (pct-1))
self.t:SetWidth(self.total_size * abs(pct-1))
end
--right text
@@ -673,7 +673,7 @@ local BarMetaFunctions = _G[DF.GlobalWidgetControlNames ["normal_bar"]]
self.timer = true
self.HasTimer = true
self.TimerScheduled = DF:ScheduleTimer ("StartTimeBarAnimation", 0.1, self)
self.TimerScheduled = DF:ScheduleTimer("StartTimeBarAnimation", 0.1, self)
end
function DF:StartTimeBarAnimation (timebar)
@@ -699,7 +699,7 @@ local build_statusbar = function(self)
self.background:Hide()
self.background:SetAllPoints()
self.background:SetTexture([[Interface\PaperDollInfoFrame\UI-Character-Skills-Bar]])
self.background:SetVertexColor (.3, .3, .3, .3)
self.background:SetVertexColor(.3, .3, .3, .3)
self.timertexture = self:CreateTexture("$parent_timerTexture", "ARTWORK")
self.timertexture:Hide()
@@ -818,8 +818,8 @@ function DF:NewBar (parent, container, name, member, w, h, value, texture_name)
BarObject.statusbar:SetHeight(h)
BarObject.statusbar:SetWidth(w)
BarObject.statusbar:SetFrameLevel (parent:GetFrameLevel()+1)
BarObject.statusbar:SetMinMaxValues (0, 100)
BarObject.statusbar:SetFrameLevel(parent:GetFrameLevel()+1)
BarObject.statusbar:SetMinMaxValues(0, 100)
BarObject.statusbar:SetValue(value or 50)
BarObject.statusbar.MyObject = BarObject
@@ -857,7 +857,7 @@ function DF:NewBar (parent, container, name, member, w, h, value, texture_name)
BarObject.statusbar:SetScript("OnMouseUp", OnMouseUp)
--set class
_setmetatable (BarObject, BarMetaFunctions)
_setmetatable(BarObject, BarMetaFunctions)
--set texture
if (texture_name) then
+333 -339
View File
File diff suppressed because it is too large Load Diff
+16 -16
View File
@@ -8,10 +8,10 @@ local _
local texCoordinates
local CreateImageEditorFrame = function()
local editorWindow = DF:NewPanel (UIParent, nil, "DetailsFrameworkImageEdit", nil, 650, 500, false)
local editorWindow = DF:NewPanel(UIParent, nil, "DetailsFrameworkImageEdit", nil, 650, 500, false)
editorWindow:SetPoint("center", UIParent, "center")
editorWindow:SetResizable(true)
editorWindow:SetMovable (true)
editorWindow:SetMovable(true)
editorWindow:SetClampedToScreen (true)
tinsert(UISpecialFrames, "DetailsFrameworkImageEdit")
editorWindow:SetFrameStrata("TOOLTIP")
@@ -37,11 +37,11 @@ local CreateImageEditorFrame = function()
local background_frame = CreateFrame("frame", "DetailsFrameworkImageEditBackground", DetailsFrameworkImageEdit, "BackdropTemplate")
background_frame:SetPoint("topleft", DetailsFrameworkImageEdit, "topleft", -10, 30)
background_frame:SetFrameStrata("TOOLTIP")
background_frame:SetFrameLevel (editorWindow:GetFrameLevel())
background_frame:SetFrameLevel(editorWindow:GetFrameLevel())
background_frame:SetSize(790, 560)
background_frame:SetResizable(true)
background_frame:SetMovable (true)
background_frame:SetMovable(true)
background_frame:SetScript("OnMouseDown", function()
editorWindow:StartMoving()
@@ -51,7 +51,7 @@ local CreateImageEditorFrame = function()
end)
DF:CreateTitleBar (background_frame, "Image Editor")
DF:ApplyStandardBackdrop (background_frame, false, 0.98)
DF:ApplyStandardBackdrop(background_frame, false, 0.98)
DF:CreateStatusBar(background_frame)
background_frame:SetBackdrop({edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1, bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], tileSize = 64, tile = true})
@@ -117,8 +117,8 @@ local CreateImageEditorFrame = function()
bottomSlider:SetThumbTexture (bottomSliderThumpTexture)
bottomSlider:SetHook("OnValueChange", function(_, _, value)
value = math.abs (value-100)
bottomCoordTexture.image:SetHeight(math.max (editorWindow.frame:GetHeight()/100*value, 1))
value = math.abs(value-100)
bottomCoordTexture.image:SetHeight(math.max(editorWindow.frame:GetHeight()/100*value, 1))
if (editorWindow.callback_func) then
editorWindow.accept(nil, nil, true)
end
@@ -180,8 +180,8 @@ local CreateImageEditorFrame = function()
rightSlider:SetThumbTexture (rightSliderThumpTexture)
--]]
rightSlider:SetHook("OnValueChange", function(_, _, value)
value = math.abs (value-100)
rightCoordTexture.image:SetWidth(math.max (editorWindow.frame:GetWidth()/100*value, 1))
value = math.abs(value-100)
rightCoordTexture.image:SetWidth(math.max(editorWindow.frame:GetWidth()/100*value, 1))
if (editorWindow.callback_func) then
editorWindow.accept(nil, nil, true)
end
@@ -191,11 +191,11 @@ local CreateImageEditorFrame = function()
--Edit Buttons
local buttonsBackground = DF:NewPanel (UIParent, nil, "DetailsFrameworkImageEditButtonsBg", nil, 115, 230)
local buttonsBackground = DF:NewPanel(UIParent, nil, "DetailsFrameworkImageEditButtonsBg", nil, 115, 230)
--buttonsBackground:SetPoint("topleft", window, "topright", 2, 0)
buttonsBackground:SetPoint("topright", background_frame, "topright", -8, -10)
buttonsBackground:Hide()
--buttonsBackground:SetMovable (true)
--buttonsBackground:SetMovable(true)
tinsert(UISpecialFrames, "DetailsFrameworkImageEditButtonsBg")
buttonsBackground:SetFrameStrata("TOOLTIP")
@@ -311,7 +311,7 @@ local CreateImageEditorFrame = function()
changeColorButton:SetPoint("topright", buttonsBackground, "topright", -8, -95 + yMod)
changeColorButton:SetTemplate(DF:GetTemplate("dropdown", "OPTIONS_DROPDOWN_TEMPLATE"))
alphaFrame = DF:NewPanel (buttonsBackground, nil, "DetailsFrameworkImageEditAlphaBg", nil, 40, 225)
alphaFrame = DF:NewPanel(buttonsBackground, nil, "DetailsFrameworkImageEditAlphaBg", nil, 40, 225)
alphaFrame:SetPoint("topleft", buttonsBackground, "topright", 2, 0)
alphaFrame:Hide()
local alphaSlider = DF:NewSlider (alphaFrame, nil, "$parentAlphaSlider", "alphaSlider", 30, 220, 1, 100, 1, edit_texture:GetAlpha()*100)
@@ -364,7 +364,7 @@ local CreateImageEditorFrame = function()
resizer:SetHeight(16)
resizer:SetPoint("BOTTOMRIGHT", editorWindow.widget, "BOTTOMRIGHT", 0, 0)
resizer:EnableMouse(true)
resizer:SetFrameLevel (editorWindow.widget:GetFrameLevel() + 2)
resizer:SetFrameLevel(editorWindow.widget:GetFrameLevel() + 2)
resizer:SetScript("OnMouseDown", function(self, button)
editorWindow.widget:StartSizing("BOTTOMRIGHT")
@@ -389,9 +389,9 @@ local CreateImageEditorFrame = function()
topSliderThumpTexture:SetWidth(editorWindow.width)
bottomSliderThumpTexture:SetWidth(editorWindow.width)
rightCoordTexture.image:SetWidth(math.max ( (editorWindow.frame:GetWidth() / 100 * math.abs (rightSlider:GetValue()-100)), 1))
rightCoordTexture.image:SetWidth(math.max( (editorWindow.frame:GetWidth() / 100 * math.abs(rightSlider:GetValue()-100)), 1))
leftCoordTexture.image:SetWidth(editorWindow.frame:GetWidth()/100*leftSlider:GetValue())
bottomCoordTexture:SetHeight(math.max ( (editorWindow.frame:GetHeight() / 100 * math.abs (bottomSlider:GetValue()-100)), 1))
bottomCoordTexture:SetHeight(math.max( (editorWindow.frame:GetHeight() / 100 * math.abs(bottomSlider:GetValue()-100)), 1))
topCoordTexture:SetHeight(editorWindow.frame:GetHeight()/100*topSlider:GetValue())
if (editorWindow.callback_func) then
@@ -500,7 +500,7 @@ local CreateImageEditorFrame = function()
dragFrame:EnableMouse(false)
dragFrame:Hide()
dragFrame:SetScript("OnUpdate", nil)
print (self.ClickedAt[1], self.ClickedAt[2], self.ReleaseAt[1], self.ReleaseAt[2])
print(self.ClickedAt[1], self.ClickedAt[2], self.ReleaseAt[1], self.ReleaseAt[2])
end
end)
+35 -35
View File
@@ -292,7 +292,7 @@ DF:Mixin(DFSliderMetaFunctions, DF.FrameMixin)
self:ClearFocus()
self.slider:Disable()
self.slider.amt:Hide()
self:SetAlpha (.4)
self:SetAlpha(.4)
if (not self.is_checkbox) then
if (not self.lock_texture) then
@@ -326,19 +326,19 @@ DF:Mixin(DFSliderMetaFunctions, DF.FrameMixin)
return
end
slider.thumb:SetAlpha (1)
slider.thumb:SetAlpha(1)
if (slider.MyObject.onenter_backdrop_border_color) then
slider:SetBackdropBorderColor(unpack (slider.MyObject.onenter_backdrop_border_color))
slider:SetBackdropBorderColor(unpack(slider.MyObject.onenter_backdrop_border_color))
end
if (slider.MyObject.have_tooltip and slider.MyObject.have_tooltip ~= "Right Click to Type the Value") then
GameCooltip2:Preset (2)
GameCooltip2:AddLine (slider.MyObject.have_tooltip)
GameCooltip2:Preset(2)
GameCooltip2:AddLine(slider.MyObject.have_tooltip)
GameCooltip2:ShowCooltip(slider, "tooltip")
else
GameCooltip2:Preset (2)
GameCooltip2:AddLine ("Right Click to Type the Value", "", 1, "", "", 10)
GameCooltip2:Preset(2)
GameCooltip2:AddLine("Right Click to Type the Value", "", 1, "", "", 10)
GameCooltip2:AddIcon ([[Interface\TUTORIALFRAME\UI-TUTORIAL-FRAME]], 1, 1, 16, 16, 0.015625, 0.15671875, 0.640625, 0.798828125)
GameCooltip2:ShowCooltip(slider, "tooltip")
end
@@ -358,10 +358,10 @@ DF:Mixin(DFSliderMetaFunctions, DF.FrameMixin)
return
end
slider.thumb:SetAlpha (.7)
slider.thumb:SetAlpha(.7)
if (slider.MyObject.onleave_backdrop_border_color) then
slider:SetBackdropBorderColor(unpack (slider.MyObject.onleave_backdrop_border_color))
slider:SetBackdropBorderColor(unpack(slider.MyObject.onleave_backdrop_border_color))
end
GameCooltip2:ShowMe(false)
@@ -391,7 +391,7 @@ DF:Mixin(DFSliderMetaFunctions, DF.FrameMixin)
f:SetPoint("bottomright", host, "topright", 5, -5)
f:SetFrameStrata("FULLSCREEN")
f:SetFrameLevel (host:GetFrameLevel() + 1000)
f:SetFrameLevel(host:GetFrameLevel() + 1000)
f:Show()
if (f.isGoingToHide) then
f:SetScript("OnUpdate", nil)
@@ -481,7 +481,7 @@ DF:Mixin(DFSliderMetaFunctions, DF.FrameMixin)
else
f.host:SetValue(current + 1)
if (editbox and DFSliderMetaFunctions.editbox_typevalue:IsShown()) then
DFSliderMetaFunctions.editbox_typevalue:SetText(tostring (math.floor (current + 1)))
DFSliderMetaFunctions.editbox_typevalue:SetText(tostring (math.floor(current + 1)))
end
end
end
@@ -533,7 +533,7 @@ DF:Mixin(DFSliderMetaFunctions, DF.FrameMixin)
else
f.host:SetValue(current - 1)
if (editbox and DFSliderMetaFunctions.editbox_typevalue:IsShown()) then
DFSliderMetaFunctions.editbox_typevalue:SetText(tostring (math.floor (current - 1)))
DFSliderMetaFunctions.editbox_typevalue:SetText(tostring (math.floor(current - 1)))
end
end
end
@@ -631,12 +631,12 @@ DF:Mixin(DFSliderMetaFunctions, DF.FrameMixin)
DFSliderMetaFunctions.editbox_typevalue:SetPoint("center", self.widget, "center")
DFSliderMetaFunctions.editbox_typevalue:SetFocus()
DFSliderMetaFunctions.editbox_typevalue:SetParent(self.widget)
DFSliderMetaFunctions.editbox_typevalue:SetFrameLevel (self.widget:GetFrameLevel()+1)
DFSliderMetaFunctions.editbox_typevalue:SetFrameLevel(self.widget:GetFrameLevel()+1)
if (self.useDecimals) then
DFSliderMetaFunctions.editbox_typevalue:SetText(tostring (string.format("%.1f", self.value)))
else
DFSliderMetaFunctions.editbox_typevalue:SetText(tostring (math.floor (self.value)))
DFSliderMetaFunctions.editbox_typevalue:SetText(tostring (math.floor(self.value)))
end
DFSliderMetaFunctions.editbox_typevalue:HighlightText()
@@ -734,7 +734,7 @@ DF:Mixin(DFSliderMetaFunctions, DF.FrameMixin)
if (slider.MyObject.useDecimals) then
slider.amt:SetText(string.format("%.2f", amt))
else
slider.amt:SetText(math.floor (amt))
slider.amt:SetText(math.floor(amt))
end
slider.MyObject.ivalue = amt
@@ -759,7 +759,7 @@ local SwitchOnClick = function(self, button, forced_value, value)
rawset (slider, "value", false)
if (slider.backdrop_disabledcolor) then
slider:SetBackdropColor(unpack (slider.backdrop_disabledcolor))
slider:SetBackdropColor(unpack(slider.backdrop_disabledcolor))
else
slider:SetBackdropColor(1, 0, 0, 0.4)
end
@@ -774,7 +774,7 @@ local SwitchOnClick = function(self, button, forced_value, value)
else
rawset (slider, "value", true)
if (slider.backdrop_enabledcolor) then
slider:SetBackdropColor(unpack (slider.backdrop_enabledcolor))
slider:SetBackdropColor(unpack(slider.backdrop_enabledcolor))
else
slider:SetBackdropColor(0, 0, 1, 0.4)
end
@@ -836,13 +836,13 @@ local switch_disable = function(self)
self._text:Hide()
if (not self.lock_texture) then
DF:NewImage (self, [[Interface\PetBattles\PetBattle-LockIcon]], 12, 12, "overlay", {0.0546875, 0.9453125, 0.0703125, 0.9453125}, "lock_texture", "$parentLockTexture")
self.lock_texture:SetDesaturated (true)
self.lock_texture:SetDesaturated(true)
self.lock_texture:SetPoint("center", self._thumb, "center")
end
self.lock_texture:Show()
end
self:SetAlpha (.4)
self:SetAlpha(.4)
rawset (self, "lockdown", true)
end
local switch_enable = function(self)
@@ -855,14 +855,14 @@ local switch_enable = function(self)
else
if (not self.lock_texture) then
DF:NewImage (self, [[Interface\PetBattles\PetBattle-LockIcon]], 12, 12, "overlay", {0.0546875, 0.9453125, 0.0703125, 0.9453125}, "lock_texture", "$parentLockTexture")
self.lock_texture:SetDesaturated (true)
self.lock_texture:SetDesaturated(true)
self.lock_texture:SetPoint("center", self._thumb, "center")
end
self.lock_texture:Hide()
self._text:Show()
end
self:SetAlpha (1)
self:SetAlpha(1)
return rawset (self, "lockdown", false)
end
@@ -887,14 +887,14 @@ local set_as_checkbok = function(self)
if (rawget (self, "value")) then
self.checked_texture:Show()
if (self.backdrop_enabledcolor) then
self:SetBackdropColor(unpack (self.backdrop_enabledcolor))
self:SetBackdropColor(unpack(self.backdrop_enabledcolor))
else
self:SetBackdropColor(0, 0, 1, 0.4)
end
else
self.checked_texture:Hide()
if (self.backdrop_disabledcolor) then
self:SetBackdropColor(unpack (self.backdrop_disabledcolor))
self:SetBackdropColor(unpack(self.backdrop_disabledcolor))
else
self:SetBackdropColor(0, 0, 1, 0.4)
end
@@ -902,7 +902,7 @@ local set_as_checkbok = function(self)
end
function DF:CreateSwitch (parent, on_switch, default_value, w, h, ltext, rtext, member, name, color_inverted, switch_func, return_func, with_label, switch_template, label_template)
function DF:CreateSwitch(parent, on_switch, default_value, w, h, ltext, rtext, member, name, color_inverted, switch_func, return_func, with_label, switch_template, label_template)
local switch, label = DF:NewSwitch (parent, parent, name, member, w or 60, h or 20, ltext, rtext, default_value, color_inverted, switch_func, return_func, with_label, switch_template, label_template)
if (on_switch) then
switch.OnSwitch = on_switch
@@ -955,7 +955,7 @@ function DF:NewSwitch (parent, container, name, member, w, h, ltext, rtext, defa
local thumb = slider:CreateTexture(nil, "artwork")
thumb:SetTexture("Interface\\Buttons\\UI-ScrollBar-Knob")
thumb:SetSize(34+(h*0.2), h*1.2)
thumb:SetAlpha (0.7)
thumb:SetAlpha(0.7)
thumb:SetPoint("left", slider.widget, "left")
local text = slider:CreateFontString (nil, "overlay", "GameFontHighlightSmall")
@@ -977,7 +977,7 @@ function DF:NewSwitch (parent, container, name, member, w, h, ltext, rtext, defa
slider.isSwitch = true
if (switch_template) then
slider:SetTemplate (switch_template)
slider:SetTemplate(switch_template)
end
if (with_label) then
@@ -987,14 +987,14 @@ function DF:NewSwitch (parent, container, name, member, w, h, ltext, rtext, defa
with_label = label
if (label_template) then
label:SetTemplate (label_template)
label:SetTemplate(label_template)
end
end
return slider, with_label
end
function DFSliderMetaFunctions:SetTemplate (template)
function DFSliderMetaFunctions:SetTemplate(template)
--slider e switch
if (template.width) then
@@ -1045,7 +1045,7 @@ function DFSliderMetaFunctions:SetTemplate (template)
if (template.thumbcolor) then
if (self.thumb) then
local r, g, b, a = DF:ParseColors(template.thumbcolor)
self.thumb:SetVertexColor (r, g, b, a)
self.thumb:SetVertexColor(r, g, b, a)
end
end
@@ -1138,7 +1138,7 @@ function DF:NewSlider (parent, container, name, member, w, h, min, max, step, de
SliderObject.slider:SetWidth(w)
SliderObject.slider:SetHeight(h)
SliderObject.slider:SetOrientation ("horizontal")
SliderObject.slider:SetMinMaxValues (min, max)
SliderObject.slider:SetMinMaxValues(min, max)
SliderObject.slider:SetValue(defaultv)
SliderObject.ivalue = defaultv
@@ -1150,7 +1150,7 @@ function DF:NewSlider (parent, container, name, member, w, h, min, max, step, de
SliderObject.thumb:SetSize(30+(h*0.2), h*1.2)
SliderObject.thumb.originalWidth = SliderObject.thumb:GetWidth()
SliderObject.thumb.originalHeight =SliderObject.thumb:GetHeight()
SliderObject.thumb:SetAlpha (0.7)
SliderObject.thumb:SetAlpha(0.7)
SliderObject.slider:SetThumbTexture (SliderObject.thumb)
SliderObject.slider.thumb = SliderObject.thumb
@@ -1168,7 +1168,7 @@ function DF:NewSlider (parent, container, name, member, w, h, min, max, step, de
if (SliderObject.useDecimals) then
SliderObject.amt:SetText(string.format("%.2f", amt))
else
SliderObject.amt:SetText(math.floor (amt))
SliderObject.amt:SetText(math.floor(amt))
end
SliderObject.amt:SetTextColor (.8, .8, .8, 1)
@@ -1198,7 +1198,7 @@ function DF:NewSlider (parent, container, name, member, w, h, min, max, step, de
SliderObject.slider:SetScript("OnMouseDown", OnMouseDown)
SliderObject.slider:SetScript("OnMouseUp", OnMouseUp)
setmetatable (SliderObject, DFSliderMetaFunctions)
setmetatable(SliderObject, DFSliderMetaFunctions)
if (with_label) then
local label = DF:CreateLabel(SliderObject.slider, with_label, nil, nil, nil, "label", nil, "overlay")
@@ -1207,12 +1207,12 @@ function DF:NewSlider (parent, container, name, member, w, h, min, max, step, de
with_label = label
if (label_template) then
label:SetTemplate (label_template)
label:SetTemplate(label_template)
end
end
if (slider_template) then
SliderObject:SetTemplate (slider_template)
SliderObject:SetTemplate(slider_template)
end
return SliderObject, with_label
+3 -3
View File
@@ -1424,7 +1424,7 @@ function DF:GetSpellsForEncounterFromJournal (instanceEJID, encounterEJID)
local name, description, encounterID, rootSectionID, link = DetailsFramework.EncounterJournal.EJ_GetEncounterInfo (encounterEJID) --taloc (primeiro boss de Uldir)
if (not name) then
print ("DetailsFramework: Encounter Info Not Found!", instanceEJID, encounterEJID)
print("DetailsFramework: Encounter Info Not Found!", instanceEJID, encounterEJID)
return {}
end
@@ -1436,11 +1436,11 @@ function DF:GetSpellsForEncounterFromJournal (instanceEJID, encounterEJID)
while (nextID [1]) do
--get the deepest section in the hierarchy
local ID = tremove (nextID)
local ID = tremove(nextID)
local sectionInfo = C_EncounterJournal.GetSectionInfo (ID)
if (sectionInfo) then
if (sectionInfo.spellID and type (sectionInfo.spellID) == "number" and sectionInfo.spellID ~= 0) then
if (sectionInfo.spellID and type(sectionInfo.spellID) == "number" and sectionInfo.spellID ~= 0) then
tinsert(spellIDs, sectionInfo.spellID)
end
+26 -26
View File
@@ -9,7 +9,7 @@ local _rawset = rawset --lua local
local _rawget = rawget --lua local
local _setmetatable = setmetatable --lua local
local _unpack = unpack --lua local
local _type = type --lua local
local type = type --lua local
local _math_floor = math.floor --lua local
local cleanfunction = function() end
@@ -57,7 +57,7 @@ local SplitBarMetaFunctions = _G[DF.GlobalWidgetControlNames ["split_bar"]]
end
SplitBarMetaFunctions.__add = function(v1, v2)
if (_type(v1) == "table") then
if (type(v1) == "table") then
local v = v1.statusbar:GetValue()
v = v + v2
v1.spark:SetPoint("left", v1.statusbar, "left", value * (v1.statusbar:GetWidth()/100) - 18, 0)
@@ -71,7 +71,7 @@ local SplitBarMetaFunctions = _G[DF.GlobalWidgetControlNames ["split_bar"]]
end
SplitBarMetaFunctions.__sub = function(v1, v2)
if (_type(v1) == "table") then
if (type(v1) == "table") then
local v = v1.statusbar:GetValue()
v = v - v2
v1.spark:SetPoint("left", v1.statusbar, "left", value * (v1.statusbar:GetWidth()/100) - 18, 0)
@@ -232,7 +232,7 @@ local SplitBarMetaFunctions = _G[DF.GlobalWidgetControlNames ["split_bar"]]
local smember_rcolor = function(_object, _value)
local _value1, _value2, _value3, _value4 = DF:ParseColors(_value)
_object.rightTexture.original_colors = {_value1, _value2, _value3, _value4}
return _object.rightTexture:SetVertexColor (_value1, _value2, _value3, _value4)
return _object.rightTexture:SetVertexColor(_value1, _value2, _value3, _value4)
end
--left color
local smember_lcolor = function(_object, _value)
@@ -240,15 +240,15 @@ local SplitBarMetaFunctions = _G[DF.GlobalWidgetControlNames ["split_bar"]]
_object.statusbar:SetStatusBarColor (_value1, _value2, _value3, _value4)
_object.texture.original_colors = {_value1, _value2, _value3, _value4}
return _object.texture:SetVertexColor (_value1, _value2, _value3, _value4)
return _object.texture:SetVertexColor(_value1, _value2, _value3, _value4)
end
--right icon
local smember_ricon = function(_object, _value)
if (type(_value) == "table") then
local _value1, _value2 = _unpack (_value)
local _value1, _value2 = _unpack(_value)
_object.iconright:SetTexture(_value1)
if (_value2) then
_object.iconright:SetTexCoord (_unpack (_value2))
_object.iconright:SetTexCoord (_unpack(_value2))
end
else
_object.iconright:SetTexture(_value)
@@ -258,10 +258,10 @@ local SplitBarMetaFunctions = _G[DF.GlobalWidgetControlNames ["split_bar"]]
--left icon
local smember_licon = function(_object, _value)
if (type(_value) == "table") then
local _value1, _value2 = _unpack (_value)
local _value1, _value2 = _unpack(_value)
_object.iconleft:SetTexture(_value1)
if (_value2) then
_object.iconleft:SetTexCoord (_unpack (_value2))
_object.iconleft:SetTexCoord (_unpack(_value2))
end
else
_object.iconleft:SetTexture(_value)
@@ -271,12 +271,12 @@ local SplitBarMetaFunctions = _G[DF.GlobalWidgetControlNames ["split_bar"]]
--texture
local smember_texture = function(_object, _value)
if (type(_value) == "table") then
local _value1, _value2 = _unpack (_value)
local _value1, _value2 = _unpack(_value)
_object.texture:SetTexture(_value1)
_object.rightTexture:SetTexture(_value1)
if (_value2) then
_object.texture:SetTexCoord (_unpack (_value2))
_object.rightTexture:SetTexCoord (_unpack (_value2))
_object.texture:SetTexCoord (_unpack(_value2))
_object.rightTexture:SetTexCoord (_unpack(_value2))
end
else
_object.texture:SetTexture(_value)
@@ -356,7 +356,7 @@ local SplitBarMetaFunctions = _G[DF.GlobalWidgetControlNames ["split_bar"]]
function SplitBarMetaFunctions:SetPoint(v1, v2, v3, v4, v5)
v1, v2, v3, v4, v5 = DF:CheckPoints (v1, v2, v3, v4, v5, self)
if (not v1) then
print ("Invalid parameter for SetPoint")
print("Invalid parameter for SetPoint")
return
end
return self.widget:SetPoint(v1, v2, v3, v4, v5)
@@ -393,18 +393,18 @@ local SplitBarMetaFunctions = _G[DF.GlobalWidgetControlNames ["split_bar"]]
-- colors
function SplitBarMetaFunctions:SetLeftColor (r, g, b, a)
r, g, b, a = DF:ParseColors(r, g, b, a)
self.texture:SetVertexColor (r, g, b, a)
self.texture:SetVertexColor(r, g, b, a)
self.texture.original_colors = {r, g, b, a}
end
function SplitBarMetaFunctions:SetRightColor (r, g, b, a)
r, g, b, a = DF:ParseColors(r, g, b, a)
self.rightTexture:SetVertexColor (r, g, b, a)
self.rightTexture:SetVertexColor(r, g, b, a)
self.rightTexture.original_colors = {r, g, b, a}
end
function SplitBarMetaFunctions:SetBackgroundColor (r, g, b, a)
r, g, b, a = DF:ParseColors(r, g, b, a)
self.background:SetVertexColor (r, g, b, a)
self.background:SetVertexColor(r, g, b, a)
self.background.original_colors = {r, g, b, a}
end
@@ -420,14 +420,14 @@ local SplitBarMetaFunctions = _G[DF.GlobalWidgetControlNames ["split_bar"]]
function SplitBarMetaFunctions:SetLeftIcon (texture, ...)
self.iconleft:SetTexture(texture)
if (...) then
local L, R, U, D = unpack (...)
local L, R, U, D = unpack(...)
self.iconleft:SetTexCoord (L, R, U, D)
end
end
function SplitBarMetaFunctions:SetRightIcon (texture, ...)
self.iconright:SetTexture(texture)
if (...) then
local L, R, U, D = unpack (...)
local L, R, U, D = unpack(...)
self.iconright:SetTexCoord (L, R, U, D)
end
end
@@ -448,18 +448,18 @@ local SplitBarMetaFunctions = _G[DF.GlobalWidgetControlNames ["split_bar"]]
function SplitBarMetaFunctions:GetFrameLevel()
return self.statusbar:GetFrameLevel()
end
function SplitBarMetaFunctions:SetFrameLevel (level, frame)
function SplitBarMetaFunctions:SetFrameLevel(level, frame)
if (not frame) then
return self.statusbar:SetFrameLevel (level)
return self.statusbar:SetFrameLevel(level)
else
local framelevel = frame:GetFrameLevel (frame) + level
return self.statusbar:SetFrameLevel (framelevel)
return self.statusbar:SetFrameLevel(framelevel)
end
end
-- frame stratas
function SplitBarMetaFunctions:SetFrameStrata(strata)
if (_type(strata) == "table") then
if (type(strata) == "table") then
self.statusbar:SetFrameStrata(strata:GetFrameStrata())
else
self.statusbar:SetFrameStrata(strata)
@@ -571,7 +571,7 @@ local SplitBarMetaFunctions = _G[DF.GlobalWidgetControlNames ["split_bar"]]
if (frame.MyObject.have_tooltip) then
GameCooltip2:Reset()
GameCooltip2:AddLine (frame.MyObject.have_tooltip)
GameCooltip2:AddLine(frame.MyObject.have_tooltip)
GameCooltip2:ShowCooltip(frame, "tooltip")
end
end
@@ -661,7 +661,7 @@ local build_statusbar = function(self)
self.background:SetPoint("topleft", self, "topleft")
self.background:SetPoint("bottomleft", self, "bottomleft")
self.background:SetTexture([[Interface\PaperDollInfoFrame\UI-Character-Skills-Bar]])
self.background:SetVertexColor (.3, .3, .3, 1)
self.background:SetVertexColor(.3, .3, .3, 1)
--this is the left texture and it grows to the right, it is embed within the bar by SetStatusBarTexture
self.texture = self:CreateTexture("$parent_StatusBarTexture", "ARTWORK", nil, 1)
@@ -703,7 +703,7 @@ local build_statusbar = function(self)
self.righttext:SetPoint("RIGHT", self.righticon, "LEFT", -3, 0)
self:SetStatusBarTexture (self.texture)
self:SetMinMaxValues (1, 100)
self:SetMinMaxValues(1, 100)
self:SetValue(50)
DetailsFrameworkSplitlBar_OnCreate (self)
end
@@ -800,7 +800,7 @@ function DF:NewSplitBar (parent, container, name, member, w, h)
SplitBarObject.statusbar:SetScript("OnMouseUp", OnMouseUp)
SplitBarObject.statusbar:SetScript("OnSizeChanged", OnSizeChanged)
_setmetatable (SplitBarObject, SplitBarMetaFunctions)
_setmetatable(SplitBarObject, SplitBarMetaFunctions)
return SplitBarObject
end
+17 -17
View File
@@ -244,9 +244,9 @@ DF.TextEntryCounter = DF.TextEntryCounter or 1
function TextEntryMetaFunctions:Enable()
if (not self.editbox:IsEnabled()) then
self.editbox:Enable()
self.editbox:SetBackdropBorderColor(unpack (self.enabled_border_color))
self.editbox:SetBackdropColor(unpack (self.enabled_backdrop_color))
self.editbox:SetTextColor (unpack (self.enabled_text_color))
self.editbox:SetBackdropBorderColor(unpack(self.enabled_border_color))
self.editbox:SetBackdropColor(unpack(self.enabled_backdrop_color))
self.editbox:SetTextColor (unpack(self.enabled_text_color))
if (self.editbox.borderframe) then
local r, g, b, a = DF:ParseColors(unpack(self.editbox.borderframe.onleave_backdrop))
self.editbox.borderframe:SetBackdropColor(r, g, b, a)
@@ -294,8 +294,8 @@ DF.TextEntryCounter = DF.TextEntryCounter or 1
end
if (capsule.have_tooltip) then
GameCooltip2:Preset (2)
GameCooltip2:AddLine (capsule.have_tooltip)
GameCooltip2:Preset(2)
GameCooltip2:AddLine(capsule.have_tooltip)
GameCooltip2:ShowCooltip(textentry, "tooltip")
end
@@ -322,7 +322,7 @@ DF.TextEntryCounter = DF.TextEntryCounter or 1
textentry.mouse_over = false
if (textentry:IsEnabled()) then
textentry:SetBackdropBorderColor(unpack (textentry.current_bordercolor))
textentry:SetBackdropBorderColor(unpack(textentry.current_bordercolor))
end
end
@@ -481,7 +481,7 @@ DF.TextEntryCounter = DF.TextEntryCounter or 1
------------------------------------------------------------------------------------------------------------
function TextEntryMetaFunctions:SetTemplate (template)
function TextEntryMetaFunctions:SetTemplate(template)
if (template.width) then
self.editbox:SetWidth(template.width)
end
@@ -512,10 +512,10 @@ end
--object constructor
function DF:CreateTextEntry (parent, func, w, h, member, name, with_label, entry_template, label_template)
return DF:NewTextEntry (parent, parent, name, member, w, h, func, nil, nil, nil, with_label, entry_template, label_template)
return DF:NewTextEntry(parent, parent, name, member, w, h, func, nil, nil, nil, with_label, entry_template, label_template)
end
function DF:NewTextEntry (parent, container, name, member, w, h, func, param1, param2, space, with_label, entry_template, label_template)
function DF:NewTextEntry(parent, container, name, member, w, h, func, param1, param2, space, with_label, entry_template, label_template)
if (not name) then
name = "DetailsFrameworkTextEntryNumber" .. DF.TextEntryCounter
@@ -596,7 +596,7 @@ function DF:NewTextEntry (parent, container, name, member, w, h, func, param1, p
w = space
elseif (w and space) then
if (DF.debug) then
--print ("warning: you are using width and space, try use only space for better results.")
--print("warning: you are using width and space, try use only space for better results.")
end
end
@@ -604,7 +604,7 @@ function DF:NewTextEntry (parent, container, name, member, w, h, func, param1, p
TextEntryObject.editbox:SetHeight(h)
TextEntryObject.editbox:SetJustifyH("center")
TextEntryObject.editbox:EnableMouse (true)
TextEntryObject.editbox:EnableMouse(true)
TextEntryObject.editbox:SetText("")
TextEntryObject.editbox:SetAutoFocus (false)
@@ -659,20 +659,20 @@ function DF:NewTextEntry (parent, container, name, member, w, h, func, param1, p
TextEntryObject.editbox:SetScript("OnTextChanged", OnTextChanged)
TextEntryObject.editbox:SetScript("OnTabPressed", OnTabPressed)
setmetatable (TextEntryObject, TextEntryMetaFunctions)
setmetatable(TextEntryObject, TextEntryMetaFunctions)
if (with_label) then
local label = DF:CreateLabel(TextEntryObject.editbox, with_label, nil, nil, nil, "label", nil, "overlay")
label.text = with_label
TextEntryObject.editbox:SetPoint("left", label.widget, "right", 2, 0)
if (label_template) then
label:SetTemplate (label_template)
label:SetTemplate(label_template)
end
with_label = label
end
if (entry_template) then
TextEntryObject:SetTemplate (entry_template)
TextEntryObject:SetTemplate(entry_template)
end
return TextEntryObject, with_label
@@ -680,7 +680,7 @@ function DF:NewTextEntry (parent, container, name, member, w, h, func, param1, p
end
function DF:NewSpellEntry (parent, func, w, h, param1, param2, member, name)
local editbox = DF:NewTextEntry (parent, parent, name, member, w, h, func, param1, param2)
local editbox = DF:NewTextEntry(parent, parent, name, member, w, h, func, param1, param2)
-- editbox:SetHook("OnEditFocusGained", SpellEntryOnEditFocusGained)
-- editbox:SetHook("OnTextChanged", SpellEntryOnTextChanged)
@@ -820,7 +820,7 @@ local get_last_word = function(self)
local character = text:sub (i, i)
if (character:match ("%a")) then
self.lastword = character .. self.lastword
--print (self.lastword)
--print(self.lastword)
else
break
end
@@ -889,7 +889,7 @@ end
local AutoComplete_OnEditFocusGained = function(editboxWidget)
local capsule = editboxWidget.MyObject or editboxWidget
capsule:GetLastWord()
--print ("last word:", editboxWidget.lastword)
--print("last word:", editboxWidget.lastword)
editboxWidget.end_selection = nil
editboxWidget.focusGained = true
capsule.characters_count = editboxWidget:GetText():len()
+1 -1
View File
@@ -2617,7 +2617,7 @@ local function Inflate(state)
elseif block_type == 2 then
status = DecompressDynamicBlock(state)
else
return nil, -1 -- invalid block type (type == 3)
return nil, -1 -- invalid block type(type == 3)
end
if status ~= 0 then
return nil, status
+4 -4
View File
@@ -202,7 +202,7 @@ elseif (isExpansion_Shadowlands()) then
-- how to get the enchantId:
-- local itemLink = GetInventoryItemLink("player", slotId)
-- local enchandId = select (3, strsplit(":", itemLink))
-- local enchandId = select(3, strsplit(":", itemLink))
-- print("enchantId:", enchandId)
LIB_OPEN_RAID_ENCHANT_IDS = {
--FEET
@@ -257,7 +257,7 @@ elseif (isExpansion_Shadowlands()) then
-- how to get the gemId:
-- local itemLink = GetInventoryItemLink("player", slotId)
-- local gemId = select (4, strsplit(":", itemLink))
-- local gemId = select(4, strsplit(":", itemLink))
-- print("gemId:", gemId)
LIB_OPEN_RAID_GEM_IDS = {
[173126] = true, --Straddling Jewel Doublet (green, +12 speed)
@@ -357,7 +357,7 @@ elseif (isExpansion_Dragonflight()) then
-- how to get the enchantId:
-- local itemLink = GetInventoryItemLink("player", slotId)
-- local enchandId = select (3, strsplit(":", itemLink))
-- local enchandId = select(3, strsplit(":", itemLink))
-- print("enchantId:", enchandId)
LIB_OPEN_RAID_ENCHANT_IDS = {
--FEET
@@ -412,7 +412,7 @@ elseif (isExpansion_Dragonflight()) then
-- how to get the gemId:
-- local itemLink = GetInventoryItemLink("player", slotId)
-- local gemId = select (4, strsplit(":", itemLink))
-- local gemId = select(4, strsplit(":", itemLink))
-- print("gemId:", gemId)
LIB_OPEN_RAID_GEM_IDS = {
[173126] = true, --Straddling Jewel Doublet (green, +12 speed)
+2 -2
View File
@@ -281,7 +281,7 @@ openRaidLib.RegisterCallback(MyAddonObject, "CooldownRemoved", "OnUnitLostCooldo
===================================================================================================================================
function MyAddonObject.OnCooldownListWipe(allUnitsCooldowns)
--print ("is nil:", next(allUnitsCooldowns))
--print("is nil:", next(allUnitsCooldowns))
end
--registering the callback:
@@ -329,7 +329,7 @@ openRaidLib.RegisterCallback(MyAddonObject, "GearDurabilityUpdate", "OnGearDurab
===================================================================================================================================
function MyAddonObject.OnGearListWiped(allUnitsGear)
--print ("is nil:", next(allUnitsGear))
--print("is nil:", next(allUnitsGear))
end
--registering the callback:
+54 -54
View File
@@ -76,9 +76,9 @@ end
return target
end
function NickTag:Msg (...)
function NickTag:Msg(...)
if (NickTag.debug) then
print ("|cFFFFFF00NickTag:|r", ...)
print("|cFFFFFF00NickTag:|r", ...)
end
end
@@ -219,15 +219,15 @@ end
return
end
local _type, serial, arg3, name, realm, version = select (2, NickTag:Deserialize (data))
local type, serial, arg3, name, realm, version = select(2, NickTag:Deserialize (data))
--0x1: received a full persona
if (_type == CONST_COMM_FULLPERSONA) then
if (type == CONST_COMM_FULLPERSONA) then
local receivedPersona = arg3
version = name
if (not receivedPersona or type (receivedPersona) ~= "table") then
NickTag:Msg ("FULLPERSONA received but it's invalid ", source)
if (not receivedPersona or type(receivedPersona) ~= "table") then
NickTag:Msg("FULLPERSONA received but it's invalid ", source)
return
end
@@ -245,14 +245,14 @@ end
if (allowNickName) then
storedPersona [CONST_INDEX_NICKNAME] = receivedPersona [CONST_INDEX_NICKNAME]
else
storedPersona [CONST_INDEX_NICKNAME] = LibStub ("AceLocale-3.0"):GetLocale ("NickTag-1.0")["STRING_INVALID_NAME"]
storedPersona [CONST_INDEX_NICKNAME] = LibStub("AceLocale-3.0"):GetLocale ("NickTag-1.0")["STRING_INVALID_NAME"]
end
storedPersona [CONST_INDEX_NICKNAME] = receivedPersona [CONST_INDEX_NICKNAME]
--update the rest
--avatar path
storedPersona [CONST_INDEX_AVATAR_PATH] = type (receivedPersona [CONST_INDEX_AVATAR_PATH]) == "string" and receivedPersona [CONST_INDEX_AVATAR_PATH] or ""
storedPersona [CONST_INDEX_AVATAR_PATH] = type(receivedPersona [CONST_INDEX_AVATAR_PATH]) == "string" and receivedPersona [CONST_INDEX_AVATAR_PATH] or ""
--avatar texcoord
if (type(receivedPersona [CONST_INDEX_AVATAR_TEXCOORD]) == "boolean") then
@@ -260,10 +260,10 @@ end
elseif (type(receivedPersona [CONST_INDEX_AVATAR_TEXCOORD]) == "table") then
storedPersona [CONST_INDEX_AVATAR_TEXCOORD] = storedPersona [CONST_INDEX_AVATAR_TEXCOORD] or {}
storedPersona [CONST_INDEX_AVATAR_TEXCOORD][1] = type (receivedPersona [CONST_INDEX_AVATAR_TEXCOORD][1]) == "number" and receivedPersona [CONST_INDEX_AVATAR_TEXCOORD][1] or 0
storedPersona [CONST_INDEX_AVATAR_TEXCOORD][2] = type (receivedPersona [CONST_INDEX_AVATAR_TEXCOORD][2]) == "number" and receivedPersona [CONST_INDEX_AVATAR_TEXCOORD][2] or 1
storedPersona [CONST_INDEX_AVATAR_TEXCOORD][3] = type (receivedPersona [CONST_INDEX_AVATAR_TEXCOORD][3]) == "number" and receivedPersona [CONST_INDEX_AVATAR_TEXCOORD][3] or 0
storedPersona [CONST_INDEX_AVATAR_TEXCOORD][4] = type (receivedPersona [CONST_INDEX_AVATAR_TEXCOORD][4]) == "number" and receivedPersona [CONST_INDEX_AVATAR_TEXCOORD][4] or 1
storedPersona [CONST_INDEX_AVATAR_TEXCOORD][1] = type(receivedPersona [CONST_INDEX_AVATAR_TEXCOORD][1]) == "number" and receivedPersona [CONST_INDEX_AVATAR_TEXCOORD][1] or 0
storedPersona [CONST_INDEX_AVATAR_TEXCOORD][2] = type(receivedPersona [CONST_INDEX_AVATAR_TEXCOORD][2]) == "number" and receivedPersona [CONST_INDEX_AVATAR_TEXCOORD][2] or 1
storedPersona [CONST_INDEX_AVATAR_TEXCOORD][3] = type(receivedPersona [CONST_INDEX_AVATAR_TEXCOORD][3]) == "number" and receivedPersona [CONST_INDEX_AVATAR_TEXCOORD][3] or 0
storedPersona [CONST_INDEX_AVATAR_TEXCOORD][4] = type(receivedPersona [CONST_INDEX_AVATAR_TEXCOORD][4]) == "number" and receivedPersona [CONST_INDEX_AVATAR_TEXCOORD][4] or 1
else
storedPersona [CONST_INDEX_AVATAR_TEXCOORD] = {0, 1, 0, 1}
end
@@ -274,29 +274,29 @@ end
elseif (type(receivedPersona [CONST_INDEX_BACKGROUND_TEXCOORD]) == "table") then
storedPersona [CONST_INDEX_BACKGROUND_TEXCOORD] = storedPersona [CONST_INDEX_BACKGROUND_TEXCOORD] or {}
storedPersona [CONST_INDEX_BACKGROUND_TEXCOORD][1] = type (receivedPersona [CONST_INDEX_BACKGROUND_TEXCOORD][1]) == "number" and receivedPersona [CONST_INDEX_BACKGROUND_TEXCOORD][1] or 0
storedPersona [CONST_INDEX_BACKGROUND_TEXCOORD][2] = type (receivedPersona [CONST_INDEX_BACKGROUND_TEXCOORD][2]) == "number" and receivedPersona [CONST_INDEX_BACKGROUND_TEXCOORD][2] or 1
storedPersona [CONST_INDEX_BACKGROUND_TEXCOORD][3] = type (receivedPersona [CONST_INDEX_BACKGROUND_TEXCOORD][3]) == "number" and receivedPersona [CONST_INDEX_BACKGROUND_TEXCOORD][3] or 0
storedPersona [CONST_INDEX_BACKGROUND_TEXCOORD][4] = type (receivedPersona [CONST_INDEX_BACKGROUND_TEXCOORD][4]) == "number" and receivedPersona [CONST_INDEX_BACKGROUND_TEXCOORD][4] or 1
storedPersona [CONST_INDEX_BACKGROUND_TEXCOORD][1] = type(receivedPersona [CONST_INDEX_BACKGROUND_TEXCOORD][1]) == "number" and receivedPersona [CONST_INDEX_BACKGROUND_TEXCOORD][1] or 0
storedPersona [CONST_INDEX_BACKGROUND_TEXCOORD][2] = type(receivedPersona [CONST_INDEX_BACKGROUND_TEXCOORD][2]) == "number" and receivedPersona [CONST_INDEX_BACKGROUND_TEXCOORD][2] or 1
storedPersona [CONST_INDEX_BACKGROUND_TEXCOORD][3] = type(receivedPersona [CONST_INDEX_BACKGROUND_TEXCOORD][3]) == "number" and receivedPersona [CONST_INDEX_BACKGROUND_TEXCOORD][3] or 0
storedPersona [CONST_INDEX_BACKGROUND_TEXCOORD][4] = type(receivedPersona [CONST_INDEX_BACKGROUND_TEXCOORD][4]) == "number" and receivedPersona [CONST_INDEX_BACKGROUND_TEXCOORD][4] or 1
else
storedPersona [CONST_INDEX_BACKGROUND_TEXCOORD] = {0, 1, 0, 1}
end
--background path
storedPersona [CONST_INDEX_BACKGROUND_PATH] = type (receivedPersona [CONST_INDEX_BACKGROUND_PATH]) == "string" and receivedPersona [CONST_INDEX_BACKGROUND_PATH] or ""
storedPersona [CONST_INDEX_BACKGROUND_PATH] = type(receivedPersona [CONST_INDEX_BACKGROUND_PATH]) == "string" and receivedPersona [CONST_INDEX_BACKGROUND_PATH] or ""
--background color
if (type(receivedPersona [CONST_INDEX_BACKGROUND_COLOR]) == "table") then
storedPersona [CONST_INDEX_BACKGROUND_COLOR] = storedPersona [CONST_INDEX_BACKGROUND_COLOR] or {}
storedPersona [CONST_INDEX_BACKGROUND_COLOR][1] = type (receivedPersona [CONST_INDEX_BACKGROUND_COLOR][1]) == "number" and receivedPersona [CONST_INDEX_BACKGROUND_COLOR][1] or 1
storedPersona [CONST_INDEX_BACKGROUND_COLOR][2] = type (receivedPersona [CONST_INDEX_BACKGROUND_COLOR][2]) == "number" and receivedPersona [CONST_INDEX_BACKGROUND_COLOR][2] or 1
storedPersona [CONST_INDEX_BACKGROUND_COLOR][3] = type (receivedPersona [CONST_INDEX_BACKGROUND_COLOR][3]) == "number" and receivedPersona [CONST_INDEX_BACKGROUND_COLOR][3] or 1
storedPersona [CONST_INDEX_BACKGROUND_COLOR][1] = type(receivedPersona [CONST_INDEX_BACKGROUND_COLOR][1]) == "number" and receivedPersona [CONST_INDEX_BACKGROUND_COLOR][1] or 1
storedPersona [CONST_INDEX_BACKGROUND_COLOR][2] = type(receivedPersona [CONST_INDEX_BACKGROUND_COLOR][2]) == "number" and receivedPersona [CONST_INDEX_BACKGROUND_COLOR][2] or 1
storedPersona [CONST_INDEX_BACKGROUND_COLOR][3] = type(receivedPersona [CONST_INDEX_BACKGROUND_COLOR][3]) == "number" and receivedPersona [CONST_INDEX_BACKGROUND_COLOR][3] or 1
else
storedPersona [CONST_INDEX_BACKGROUND_COLOR] = {1, 1, 1}
end
NickTag:SyncSiblings()
NickTag:Msg ("FULLPERSONA received and updated for character: ", source, "new nickname: ", receivedPersona [CONST_INDEX_NICKNAME])
NickTag:Msg("FULLPERSONA received and updated for character: ", source, "new nickname: ", receivedPersona [CONST_INDEX_NICKNAME])
end
end
@@ -312,7 +312,7 @@ end
function NickTag.OnEvent (self, event, ...)
if (NickTag.EventFrame.InfoSendCooldown > time()) then
if (not NickTag.EventFrame.ScheduledSend or NickTag.EventFrame.ScheduledSend._cancelled) then
NickTag.EventFrame.ScheduledSend = C_Timer.NewTimer (30, NickTag.SendPersona)
NickTag.EventFrame.ScheduledSend = C_Timer.NewTimer(30, NickTag.SendPersona)
end
else
NickTag:SendPersona()
@@ -334,7 +334,7 @@ end
if (not nickTable) then
return
end
NickTag:Msg ("SendPersona() -> broadcast")
NickTag:Msg("SendPersona() -> broadcast")
if (NickTag.EventFrame.ScheduledSend and not NickTag.EventFrame.ScheduledSend._cancelled) then
NickTag.EventFrame.ScheduledSend:Cancel()
@@ -346,7 +346,7 @@ end
NickTag.send_scheduled = false
--auto change nickname if we have an invalid nickname
if (NickTag:GetNickname (UnitName ("player")) == LibStub ("AceLocale-3.0"):GetLocale ("NickTag-1.0")["STRING_INVALID_NAME"]) then
if (NickTag:GetNickname (UnitName ("player")) == LibStub("AceLocale-3.0"):GetLocale ("NickTag-1.0")["STRING_INVALID_NAME"]) then
nickTable [CONST_INDEX_NICKNAME] = UnitName ("player")
end
@@ -378,7 +378,7 @@ end
playerPersona [CONST_INDEX_BACKGROUND_COLOR] = false
playerPersona [CONST_INDEX_REVISION] = playerPersona [CONST_INDEX_REVISION] + 1
C_Timer.After (1, NickTag.SendPersona)
C_Timer.After(1, NickTag.SendPersona)
end
end
end
@@ -405,7 +405,7 @@ end
pool.last_version = minor
else
--sometimes player guid isn't available right after logon, so, just schedule until it become available.
NickTag:ScheduleTimer ("ResetCache", 0.3)
NickTag:ScheduleTimer("ResetCache", 0.3)
end
end
@@ -489,7 +489,7 @@ end
local check_repeated = function(char)
if (char == " ") then
have_repeated = true
elseif (string.len (char) > 2) then
elseif (string.len(char) > 2) then
have_repeated = true
elseif (char == " ") then
count_spaces = count_spaces + 1
@@ -502,7 +502,7 @@ end
--as nicktag only work internally in the guild, we think that is not necessary a work filter to avoid people using bad language.
if (type(name) ~= "string") then
return false, LibStub ("AceLocale-3.0"):GetLocale ("NickTag-1.0")["STRING_ERROR_4"] --error 4 = name isn't a valid string
return false, LibStub("AceLocale-3.0"):GetLocale ("NickTag-1.0")["STRING_ERROR_4"] --error 4 = name isn't a valid string
end
name = trim (name)
@@ -532,9 +532,9 @@ end
--limit nickname to 12 characters, same as wow.
--cyrillic seems to double the len using 2 bytes
local len = string.len (name)
local len = string.len(name)
if (len > maxLength) then
return false, LibStub ("AceLocale-3.0"):GetLocale ("NickTag-1.0")["STRING_ERROR_1"] --error 1 = nickname is too long, max of 12 characters.
return false, LibStub("AceLocale-3.0"):GetLocale ("NickTag-1.0")["STRING_ERROR_1"] --error 1 = nickname is too long, max of 12 characters.
end
--check if contain any non allowed characters, by now only accpet letters, numbers and spaces.
@@ -543,13 +543,13 @@ end
-- local notallow = string.find (name, "[^a-zA-Z%s]")
-- if (notallow) then
-- return false, LibStub ("AceLocale-3.0"):GetLocale ("NickTag-1.0")["STRING_ERROR_2"] --error 2 = nickname only support letters, numbers and spaces.
-- return false, LibStub("AceLocale-3.0"):GetLocale ("NickTag-1.0")["STRING_ERROR_2"] --error 2 = nickname only support letters, numbers and spaces.
-- end
--[=[
for letter in name:gmatch(".") do
if (not allowedLetters[letter]) then
return false, LibStub ("AceLocale-3.0"):GetLocale ("NickTag-1.0")["STRING_ERROR_2"] --error 2 = nickname only support letters, numbers and spaces.
return false, LibStub("AceLocale-3.0"):GetLocale ("NickTag-1.0")["STRING_ERROR_2"] --error 2 = nickname only support letters, numbers and spaces.
end
end
--]=]
@@ -563,7 +563,7 @@ end
have_repeated = true
end
if (have_repeated) then
return false, LibStub ("AceLocale-3.0"):GetLocale ("NickTag-1.0")["STRING_ERROR_3"] --error 3 = cant use the same letter three times consecutively, 2 spaces consecutively or 3 or more spaces.
return false, LibStub("AceLocale-3.0"):GetLocale ("NickTag-1.0")["STRING_ERROR_3"] --error 3 = cant use the same letter three times consecutively, 2 spaces consecutively or 3 or more spaces.
end
return true
@@ -578,7 +578,7 @@ end
--check if the nickname is okey to allowed to use.
local okey, errortype = NickTag:CheckName (name)
if (not okey) then
NickTag:Msg ("SetNickname() invalid name ", name)
NickTag:Msg("SetNickname() invalid name ", name)
return false, errortype
end
@@ -607,11 +607,11 @@ end
--this is a kind of protection for scripts which call SetNickname, SetColor and SetAvatar one after other, so scheduling here avoid three revisions upgrades and 3 broadcasts to the guild.
if (not NickTag.send_scheduled) then
NickTag.send_scheduled = true
NickTag:ScheduleTimer ("SendPersona", 1)
NickTag:ScheduleTimer("SendPersona", 1)
end
else
NickTag:Msg ("SetNickname() name is the same on the pool ", name, nickTable [CONST_INDEX_NICKNAME])
NickTag:Msg("SetNickname() name is the same on the pool ", name, nickTable [CONST_INDEX_NICKNAME])
end
return true
@@ -622,7 +622,7 @@ end
if (l == nil) then
l, r, t, b = 0, 1, 0, 1
elseif (type(l) == "table") then
l, r, t, b = unpack (l)
l, r, t, b = unpack(l)
end
--check data before
@@ -655,7 +655,7 @@ end
if (not NickTag.send_scheduled) then
NickTag.send_scheduled = true
NickTag:ScheduleTimer ("SendPersona", 1)
NickTag:ScheduleTimer("SendPersona", 1)
end
end
@@ -713,7 +713,7 @@ end
if (not NickTag.send_scheduled) then
NickTag.send_scheduled = true
NickTag:ScheduleTimer ("SendPersona", 1)
NickTag:ScheduleTimer("SendPersona", 1)
end
end
@@ -766,7 +766,7 @@ end
if (not silent) then
assert (type(playerName) == "string", "NickTag 'GetNicknameTable' expects a string on #1 argument.")
else
if (not playerName or type (playerName) ~= "string") then
if (not playerName or type(playerName) ~= "string") then
return
end
end
@@ -851,7 +851,7 @@ do
background_texture:SetWidth(290)
background_texture:SetHeight(75)
background_texture:SetTexture(NickTag.background_pool[1][1])
background_texture:SetTexCoord (unpack (NickTag.background_pool[1][3]))
background_texture:SetTexCoord (unpack(NickTag.background_pool[1][3]))
--
local name = avatar_pick_frame:CreateFontString ("AvatarPickFrameName", "overlay", "GameFontHighlightHuge")
name:SetPoint("left", avatar_texture, "right", -11, -17)
@@ -866,7 +866,7 @@ do
elseif (button.isBackground) then
local background = NickTag.background_pool [button.IconID]
_G.AvatarPickFrameBackgroundPreview:SetTexture( background [1] )
_G.AvatarPickFrameBackgroundPreview:SetTexCoord (unpack (background [3]))
_G.AvatarPickFrameBackgroundPreview:SetTexCoord (unpack(background [3]))
avatar_pick_frame.selected_background = background [1]
avatar_pick_frame.selected_texcoord = background [3]
end
@@ -874,7 +874,7 @@ do
local selectedColor = function()
local r, g, b = ColorPickerFrame:GetColorRGB()
background_texture:SetVertexColor (r, g, b)
background_texture:SetVertexColor(r, g, b)
avatar_pick_frame.selected_color[1] = r
avatar_pick_frame.selected_color[2] = g
avatar_pick_frame.selected_color[3] = b
@@ -883,7 +883,7 @@ do
local okey = CreateFrame("button", "AvatarPickFrameAccept", avatar_pick_frame)
okey:SetPoint("bottomright", avatar_pick_frame, "bottomright", -37, 12)
okey:SetText("Accept")
okey:SetFrameLevel (avatar_pick_frame:GetFrameLevel()+2)
okey:SetFrameLevel(avatar_pick_frame:GetFrameLevel()+2)
okey:SetScript("OnClick", function(self)
avatar_pick_frame:Hide()
if (avatar_pick_frame.callback) then
@@ -893,7 +893,7 @@ do
local change_color = CreateFrame("button", "AvatarPickFrameColor", avatar_pick_frame)
change_color:SetPoint("bottomright", avatar_pick_frame, "bottomright", -205, 12)
change_color:SetText("Color")
change_color:SetFrameLevel (avatar_pick_frame:GetFrameLevel()+2)
change_color:SetFrameLevel(avatar_pick_frame:GetFrameLevel()+2)
change_color:SetScript("OnClick", function(self)
ColorPickerFrame.func = selectedColor
@@ -1019,8 +1019,8 @@ do
end
local background = NickTag.background_pool [n]
_G.AvatarPickFrameBackgroundPreview:SetTexture( background [1] )
_G.AvatarPickFrameBackgroundPreview:SetTexCoord (unpack (background [3]))
_G.AvatarPickFrameBackgroundPreview:SetVertexColor (unpack (avatar_pick_frame.selected_color))
_G.AvatarPickFrameBackgroundPreview:SetTexCoord (unpack(background [3]))
_G.AvatarPickFrameBackgroundPreview:SetVertexColor(unpack(avatar_pick_frame.selected_color))
avatar_pick_frame.selected_background = background [1]
end
function avatar_pick_frame:SetColor (r, g, b)
@@ -1033,7 +1033,7 @@ do
if (type(b) ~= "number" or b > 1) then
b = 1
end
_G.AvatarPickFrameBackgroundPreview:SetVertexColor (r, g, b)
_G.AvatarPickFrameBackgroundPreview:SetVertexColor(r, g, b)
avatar_pick_frame.selected_color[1] = r
avatar_pick_frame.selected_color[2] = g
avatar_pick_frame.selected_color[3] = b
@@ -1048,7 +1048,7 @@ do
avatar_pick_frame:SetScript("OnShow", function()
--get player avatar
local avatar = NickTag:GetNicknameTable (UnitGUID ("player"))
local avatar = NickTag:GetNicknameTable (UnitGUID("player"))
if (avatar) then
_G.AvatarPickFrameName:SetText( avatar [1] or UnitName ("player"))
@@ -1061,7 +1061,7 @@ do
avatar_pick_frame.selected_background = avatar [CONST_INDEX_BACKGROUND_PATH] or [[Interface\PetBattles\Weather-ArcaneStorm]]
if (avatar [CONST_INDEX_BACKGROUND_TEXCOORD]) then
_G.AvatarPickFrameBackgroundPreview:SetTexCoord ( unpack (avatar [CONST_INDEX_BACKGROUND_TEXCOORD]) )
_G.AvatarPickFrameBackgroundPreview:SetTexCoord ( unpack(avatar [CONST_INDEX_BACKGROUND_TEXCOORD]) )
avatar_pick_frame.selected_texcoord = avatar [CONST_INDEX_BACKGROUND_TEXCOORD]
else
_G.AvatarPickFrameBackgroundPreview:SetTexCoord ( 0.129609375, 1, 1, 0 )
@@ -1069,10 +1069,10 @@ do
end
if (avatar [CONST_INDEX_BACKGROUND_COLOR]) then
_G.AvatarPickFrameBackgroundPreview:SetVertexColor ( unpack (avatar [CONST_INDEX_BACKGROUND_COLOR]) )
_G.AvatarPickFrameBackgroundPreview:SetVertexColor( unpack(avatar [CONST_INDEX_BACKGROUND_COLOR]) )
avatar_pick_frame.selected_color = avatar [CONST_INDEX_BACKGROUND_COLOR]
else
_G.AvatarPickFrameBackgroundPreview:SetVertexColor ( 1, 1, 1 )
_G.AvatarPickFrameBackgroundPreview:SetVertexColor( 1, 1, 1 )
avatar_pick_frame.selected_color = {1, 1, 1}
end
else
@@ -1085,9 +1085,9 @@ do
if (background) then
_G.AvatarPickFrameBackgroundPreview:SetTexture( background [1] )
avatar_pick_frame.selected_background = background [1]
_G.AvatarPickFrameBackgroundPreview:SetTexCoord (unpack (background [3]))
_G.AvatarPickFrameBackgroundPreview:SetTexCoord (unpack(background [3]))
avatar_pick_frame.selected_texcoord = background [3]
_G.AvatarPickFrameBackgroundPreview:SetVertexColor (unpack (avatar_pick_frame.selected_color))
_G.AvatarPickFrameBackgroundPreview:SetVertexColor(unpack(avatar_pick_frame.selected_color))
avatar_pick_frame.selected_color = avatar_pick_frame.selected_color
end
+15 -15
View File
@@ -809,7 +809,7 @@ do
[12] = "DEMONHUNTER",
}
local Loc = LibStub ("AceLocale-3.0"):GetLocale ("Details")
local Loc = LibStub("AceLocale-3.0"):GetLocale ("Details")
_detalhes.segmentos = {
label = Loc ["STRING_SEGMENT"]..": ",
@@ -859,20 +859,20 @@ do
--frames
local _CreateFrame = CreateFrame --api locals
local _UIParent = UIParent --api locals
local UIParent = UIParent --api locals
--Info Window
_detalhes.playerDetailWindow = _CreateFrame ("Frame", "DetailsPlayerDetailsWindow", _UIParent, "BackdropTemplate")
_detalhes.playerDetailWindow = _CreateFrame ("Frame", "DetailsPlayerDetailsWindow", UIParent, "BackdropTemplate")
_detalhes.PlayerDetailsWindow = _detalhes.playerDetailWindow
--Event Frame
_detalhes.listener = _CreateFrame ("Frame", nil, _UIParent)
_detalhes.listener = _CreateFrame ("Frame", nil, UIParent)
_detalhes.listener:RegisterEvent ("ADDON_LOADED")
_detalhes.listener:SetFrameStrata("LOW")
_detalhes.listener:SetFrameLevel (9)
_detalhes.listener:SetFrameLevel(9)
_detalhes.listener.FrameTime = 0
_detalhes.overlay_frame = _CreateFrame ("Frame", nil, _UIParent)
_detalhes.overlay_frame = _CreateFrame ("Frame", nil, UIParent)
_detalhes.overlay_frame:SetFrameStrata("TOOLTIP")
--Pet Owner Finder
@@ -926,7 +926,7 @@ do
end
end)
f:SetToplevel (true)
f:SetMovable (true)
f:SetMovable(true)
end
return f
@@ -990,7 +990,7 @@ do
return
end
for a,b in pairs(t) do
print (a,b)
print(a,b)
end
end
@@ -1006,7 +1006,7 @@ do
copy = {}
for orig_key, orig_value in next, orig, nil do
--print(orig_key, orig_value)
copy [Details.CopyTable (orig_key)] = Details.CopyTable (orig_value)
copy [Details.CopyTable(orig_key)] = Details.CopyTable(orig_value)
end
else
copy = orig
@@ -1022,25 +1022,25 @@ do
function _detalhes:ShowDelayMsg()
if (_detalhes.delaymsgs and #_detalhes.delaymsgs > 0) then
for _, msg in ipairs(_detalhes.delaymsgs) do
print (msg)
print(msg)
end
end
_detalhes.delaymsgs = {}
end
--print messages
function _detalhes:Msg (_string, arg1, arg2, arg3, arg4)
function _detalhes:Msg(_string, arg1, arg2, arg3, arg4)
if (self.__name) then
--yes, we have a name!
print ("|cffffaeae" .. self.__name .. "|r |cffcc7c7c(plugin)|r: " .. (_string or ""), arg1 or "", arg2 or "", arg3 or "", arg4 or "")
print("|cffffaeae" .. self.__name .. "|r |cffcc7c7c(plugin)|r: " .. (_string or ""), arg1 or "", arg2 or "", arg3 or "", arg4 or "")
else
print (Loc ["STRING_DETAILS1"] .. (_string or ""), arg1 or "", arg2 or "", arg3 or "", arg4 or "")
print(Loc ["STRING_DETAILS1"] .. (_string or ""), arg1 or "", arg2 or "", arg3 or "", arg4 or "")
end
end
--welcome
function _detalhes:WelcomeMsgLogon()
_detalhes:Msg ("you can always reset the addon running the command |cFFFFFF00'/details reinstall'|r if it does fail to load after being updated.")
_detalhes:Msg("you can always reset the addon running the command |cFFFFFF00'/details reinstall'|r if it does fail to load after being updated.")
function _detalhes:wipe_combat_after_failed_load()
_detalhes.tabela_historico = _detalhes.historico:NovoHistorico()
@@ -1052,7 +1052,7 @@ do
_detalhes_database.tabela_overall = nil
_detalhes_database.tabela_historico = nil
_detalhes:Msg ("seems failed to load, please type /reload to try again.")
_detalhes:Msg("seems failed to load, please type /reload to try again.")
end
Details.Schedules.After(5, _detalhes.wipe_combat_after_failed_load)
+116 -121
View File
@@ -1,24 +1,21 @@
-- combat class object
local _detalhes = _G._detalhes
local Loc = LibStub ("AceLocale-3.0"):GetLocale ( "Details" )
local Loc = LibStub("AceLocale-3.0"):GetLocale ( "Details" )
local _
--[[global]] DETAILS_TOTALS_ONLYGROUP = true
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--local pointers
local _setmetatable = setmetatable -- lua local
local _ipairs = ipairs -- lua local
local ipairs = ipairs -- lua local
local _pairs = pairs -- lua local
local _bit_band = bit.band -- lua local
local _date = date -- lua local
local _table_remove = table.remove -- lua local
local _rawget = rawget
local tremove = table.remove -- lua local
local rawget = rawget
local _math_max = math.max
local _math_floor = math.floor
local _GetTime = GetTime
local floor = math.floor
local GetTime = GetTime
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--constants
@@ -29,13 +26,13 @@
local class_type_cura = _detalhes.atributos.cura
local class_type_e_energy = _detalhes.atributos.e_energy
local class_type_misc = _detalhes.atributos.misc
local REACTION_HOSTILE = 0x00000040
local CONTROL_PLAYER = 0x00000100
--local _tempo = time()
local _tempo = _GetTime()
local _tempo = GetTime()
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--api functions
@@ -52,54 +49,54 @@
function combate:GetDate()
return self.data_inicio, self.data_fim
end
--set the combat date
function combate:SetDate (started, ended)
if (started and type (started) == "string") then
if (started and type(started) == "string") then
self.data_inicio = started
end
if (ended and type (ended) == "string") then
if (ended and type(ended) == "string") then
self.data_fim = ended
end
end
end
--return data for charts
function combate:GetTimeData (name)
return self.TimeData [name]
end
function combate:GetContainer (attribute)
return self [attribute]
end
function combate:GetRoster()
return self.raid_roster
end
function combate:InstanceType()
return _rawget (self, "instance_type")
return rawget (self, "instance_type")
end
function combate:IsTrash()
return _rawget (self, "is_trash")
return rawget (self, "is_trash")
end
function combate:GetDifficulty()
return self.is_boss and self.is_boss.diff
end
function combate:GetBossInfo()
return self.is_boss
end
function combate:GetPhases()
return self.PhaseData
end
function combate:GetPvPInfo()
return self.is_pvp
end
function combate:GetMythicDungeonInfo()
return self.is_mythic_dungeon
end
@@ -107,21 +104,21 @@
function combate:GetMythicDungeonTrashInfo()
return self.is_mythic_dungeon_trash
end
function combate:IsMythicDungeon()
local is_segment = self.is_mythic_dungeon_segment
local run_id = self.is_mythic_dungeon_run_id
return is_segment, run_id
end
function combate:IsMythicDungeonOverall()
return self.is_mythic_dungeon and self.is_mythic_dungeon.OverallSegment
end
function combate:GetArenaInfo()
return self.is_arena
end
function combate:GetDeaths()
return self.last_events_tables
end
@@ -144,29 +141,29 @@
function combate:GetCombatId()
return self.combat_id
end
function combate:GetCombatNumber()
return self.combat_counter
end
function combate:GetAlteranatePower()
return self.alternate_power
end
--return the name of the encounter or enemy
function combate:GetCombatName (try_find)
function combate:GetCombatName(try_find)
if (self.is_pvp) then
return self.is_pvp.name
elseif (self.is_boss) then
return self.is_boss.encounter
elseif (self.is_mythic_dungeon_trash) then
return self.is_mythic_dungeon_trash.ZoneName .. " (" .. Loc ["STRING_SEGMENTS_LIST_TRASH"] .. ")"
elseif (_rawget (self, "is_trash")) then
elseif (rawget (self, "is_trash")) then
return Loc ["STRING_SEGMENT_TRASH"]
else
if (self.enemy) then
return self.enemy
@@ -177,27 +174,27 @@
end
return Loc ["STRING_UNKNOW"]
end
--[[global]] DETAILS_SEGMENTID_OVERALL = -1
--[[global]] DETAILS_SEGMENTID_CURRENT = 0
--enum segments type
--[[global]] DETAILS_SEGMENTTYPE_GENERIC = 0
--[[global]] DETAILS_SEGMENTTYPE_OVERALL = 1
--[[global]] DETAILS_SEGMENTTYPE_DUNGEON_TRASH = 5
--[[global]] DETAILS_SEGMENTTYPE_DUNGEON_BOSS = 6
--[[global]] DETAILS_SEGMENTTYPE_RAID_TRASH = 7
--[[global]] DETAILS_SEGMENTTYPE_RAID_BOSS = 8
--[[global]] DETAILS_SEGMENTTYPE_MYTHICDUNGEON_GENERIC = 10
--[[global]] DETAILS_SEGMENTTYPE_MYTHICDUNGEON_TRASH = 11
--[[global]] DETAILS_SEGMENTTYPE_MYTHICDUNGEON_OVERALL = 12
--[[global]] DETAILS_SEGMENTTYPE_MYTHICDUNGEON_TRASHOVERALL = 13
--[[global]] DETAILS_SEGMENTTYPE_MYTHICDUNGEON_BOSS = 14
--[[global]] DETAILS_SEGMENTTYPE_PVP_ARENA = 20
--[[global]] DETAILS_SEGMENTTYPE_PVP_BATTLEGROUND = 21
@@ -216,31 +213,31 @@
elseif (isMythicDungeonTrashOverall) then
return DETAILS_SEGMENTTYPE_MYTHICDUNGEON_TRASHOVERALL
end
local bossEncounter = self.is_boss
if (bossEncounter) then
return DETAILS_SEGMENTTYPE_MYTHICDUNGEON_BOSS
end
return DETAILS_SEGMENTTYPE_MYTHICDUNGEON_GENERIC
end
end
--arena
local arenaInfo = self.is_arena
if (arenaInfo) then
return DETAILS_SEGMENTTYPE_PVP_ARENA
end
--battleground
local battlegroundInfo = self.is_pvp
if (battlegroundInfo) then
return DETAILS_SEGMENTTYPE_PVP_BATTLEGROUND
end
--dungeon or raid
local instanceType = self.instance_type
if (instanceType == "party") then
local bossEncounter = self.is_boss
if (bossEncounter) then
@@ -248,7 +245,7 @@
else
return DETAILS_SEGMENTTYPE_DUNGEON_TRASH
end
elseif (instanceType == "raid") then
local bossEncounter = self.is_boss
if (bossEncounter) then
@@ -257,12 +254,12 @@
return DETAILS_SEGMENTTYPE_RAID_TRASH
end
end
--overall data
if (self == _detalhes.tabela_overall) then
return DETAILS_SEGMENTTYPE_OVERALL
end
return DETAILS_SEGMENTTYPE_GENERIC
end
@@ -271,38 +268,38 @@
return self [container]._ActorTable
end
function combate:GetActor (container, name)
function combate:GetActor(container, name)
local index = self [container] and self [container]._NameIndexTable [name]
if (index) then
return self [container]._ActorTable [index]
end
return nil
end
--return the combat time in seconds
function combate:GetFormatedCombatTime()
local time = self:GetCombatTime()
local m, s = _math_floor(time/60), _math_floor(time%60)
local combatTime = self:GetCombatTime()
local m, s = floor(combatTime/60), floor(combatTime%60)
return m, s
end
function combate:GetCombatTime()
if (self.end_time) then
return _math_max (self.end_time - self.start_time, 0.1)
elseif (self.start_time and _detalhes.in_combat and self ~= _detalhes.tabela_overall) then
return _math_max (_GetTime() - self.start_time, 0.1)
return _math_max (GetTime() - self.start_time, 0.1)
else
return 0.1
end
end
function combate:GetStartTime()
return self.start_time
end
function combate:SetStartTime (t)
self.start_time = t
end
function combate:GetEndTime()
return self.end_time
end
@@ -312,7 +309,7 @@
--return the total of a specific attribute
local power_table = {0, 1, 3, 6, 0, "alternatepower"}
function combate:GetTotal (attribute, subAttribute, onlyGroup)
if (attribute == 1 or attribute == 2) then
if (onlyGroup) then
@@ -320,7 +317,7 @@
else
return self.totals [attribute]
end
elseif (attribute == 3) then
if (subAttribute == 5) then --resources
return self.totals.resources or 0
@@ -330,7 +327,7 @@
else
return self.totals [attribute] [power_table [subAttribute]]
end
elseif (attribute == 4) then
local subName = _detalhes:GetInternalSubAttributeName (attribute, subAttribute)
if (onlyGroup) then
@@ -339,18 +336,16 @@
return self.totals [attribute] [subName]
end
end
return 0
end
function combate:CreateAlternatePowerTable (actorName)
local t = {last = 0, total = 0}
self.alternate_power [actorName] = t
return t
end
local tremove = _G.tremove
--delete an actor from the combat ~delete ~erase ~remove
function combate:DeleteActor(attribute, actorName, removeDamageTaken, cannotRemap)
local container = self[attribute]
@@ -369,7 +364,7 @@
for i = 1, #actorTable do
local actor = actorTable[i]
if (actor.nome == actorName) then
--print ("Details: found the actor: ", actorName, actor.nome, i)
--print("Details: found the actor: ", actorName, actor.nome, i)
indexToDelete = i
break
end
@@ -412,7 +407,7 @@
if (indexToDelete) then
local actorToDelete = self(attribute, actorName)
local actorToDelete2 = container._ActorTable[indexToDelete]
if (actorToDelete ~= actorToDelete2) then
Details:Msg("error 0xDE8745")
end
@@ -445,18 +440,18 @@
function combate:NovaTabela (iniciada, _tabela_overall, combatId, ...)
local esta_tabela = {true, true, true, true, true}
esta_tabela [1] = container_combatentes:NovoContainer (_detalhes.container_type.CONTAINER_DAMAGE_CLASS, esta_tabela, combatId) --Damage
esta_tabela [2] = container_combatentes:NovoContainer (_detalhes.container_type.CONTAINER_HEAL_CLASS, esta_tabela, combatId) --Healing
esta_tabela [3] = container_combatentes:NovoContainer (_detalhes.container_type.CONTAINER_ENERGY_CLASS, esta_tabela, combatId) --Energies
esta_tabela [4] = container_combatentes:NovoContainer (_detalhes.container_type.CONTAINER_MISC_CLASS, esta_tabela, combatId) --Misc
esta_tabela [5] = container_combatentes:NovoContainer (_detalhes.container_type.CONTAINER_DAMAGE_CLASS, esta_tabela, combatId) --place holder for customs
_setmetatable (esta_tabela, combate)
setmetatable(esta_tabela, combate)
_detalhes.combat_counter = _detalhes.combat_counter + 1
esta_tabela.combat_counter = _detalhes.combat_counter
--try discover if is a pvp combat
local who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags = ...
if (who_serial) then --aqui ir identificar o boss ou o oponente
@@ -479,45 +474,45 @@
esta_tabela.data_fim = 0
esta_tabela.data_inicio = 0
esta_tabela.tempo_start = _tempo
--record deaths
esta_tabela.last_events_tables = {}
--last events from players
esta_tabela.player_last_events = {}
--players in the raid
esta_tabela.raid_roster = {}
esta_tabela.raid_roster_indexed = {}
--frags
esta_tabela.frags = {}
esta_tabela.frags_need_refresh = false
--alternate power
esta_tabela.alternate_power = {}
--time data container
esta_tabela.TimeData = _detalhes:TimeDataCreateCombatTables()
esta_tabela.PhaseData = {{1, 1}, damage = {}, heal = {}, damage_section = {}, heal_section = {}} --[1] phase number [2] phase started
--for external plugin usage, these tables are guaranteed to be saved with the combat
esta_tabela.spells_cast_timeline = {}
esta_tabela.aura_timeline = {}
esta_tabela.cleu_timeline = {}
--cleu events
esta_tabela.cleu_events = {
n = 1 --event counter
}
--Skill cache (not used)
esta_tabela.CombatSkillCache = {}
-- a tabela sem o tempo de inicio a tabela descartavel do inicio do addon
if (iniciada) then
--esta_tabela.start_time = _tempo
esta_tabela.start_time = _GetTime()
esta_tabela.start_time = GetTime()
esta_tabela.end_time = nil
else
esta_tabela.start_time = 0
@@ -530,7 +525,7 @@
esta_tabela[3].need_refresh = true
esta_tabela[4].need_refresh = true
esta_tabela[5].need_refresh = true
if (_tabela_overall) then --link a tabela de combate do overall
esta_tabela[1].shadow = _tabela_overall[1]
esta_tabela[2].shadow = _tabela_overall[2]
@@ -558,13 +553,13 @@
buff_uptime = 0, --armazena quantos cooldowns a raid usou
debuff_uptime = 0 --armazena quantos cooldowns a raid usou
},
--avoid using this values bellow, they aren't updated by the parser, only on demand by a user interaction.
voidzone_damage = 0,
frags_total = 0,
--end
}
esta_tabela.totals_grupo = {
0, --dano
0, --cura
@@ -574,13 +569,13 @@
[3] = 0, --energy (rogues cat)
[6] = 0, --runepower (dk)
alternatepower = 0,
},
},
{--misc
cc_break = 0, --armazena quantas quebras de CC
ress = 0, --armazena quantos pessoas ele reviveu
interrupt = 0, --armazena quantos interrupt a pessoa deu
dispell = 0, --armazena quantos dispell esta pessoa recebeu
dead = 0, --armazena quantas vezes essa oessia morreu
dead = 0, --armazena quantas vezes essa oessia morreu
cooldowns_defensive = 0, --armazena quantos cooldowns a raid usou
buff_uptime = 0,
debuff_uptime = 0
@@ -606,7 +601,7 @@
--trava o tempo dos jogadores aps o trmino do combate.
function combate:TravarTempos()
if (self [1]) then
for _, jogador in _ipairs(self [1]._ActorTable) do --damage
for _, jogador in ipairs(self [1]._ActorTable) do --damage
if (jogador:Iniciar()) then -- retorna se ele esta com o dps ativo
jogador:TerminarTempo()
jogador:Iniciar (false) --trava o dps do jogador
@@ -621,7 +616,7 @@
end
end
if (self [2]) then
for _, jogador in _ipairs(self [2]._ActorTable) do --healing
for _, jogador in ipairs(self [2]._ActorTable) do --healing
if (jogador:Iniciar()) then -- retorna se ele esta com o dps ativo
jogador:TerminarTempo()
jogador:Iniciar (false) --trava o dps do jogador
@@ -647,11 +642,11 @@
function combate:seta_tempo_decorrido()
--self.end_time = _tempo
self.end_time = _GetTime()
self.end_time = GetTime()
end
function _detalhes.refresh:r_combate (tabela_combate, shadow)
_setmetatable (tabela_combate, _detalhes.combate)
setmetatable(tabela_combate, _detalhes.combate)
tabela_combate.__index = _detalhes.combate
tabela_combate.shadow = shadow
end
@@ -671,50 +666,50 @@
end
--sub dano
for index, actor_T2 in _ipairs(combate2[1]._ActorTable) do
for index, actor_T2 in ipairs(combate2[1]._ActorTable) do
local actor_T1 = combate1[1]:PegarCombatente (actor_T2.serial, actor_T2.nome, actor_T2.flag_original, true)
actor_T1 = actor_T1 - actor_T2
actor_T2:subtract_total (combate1)
end
combate1 [1].need_refresh = true
--sub heal
for index, actor_T2 in _ipairs(combate2[2]._ActorTable) do
for index, actor_T2 in ipairs(combate2[2]._ActorTable) do
local actor_T1 = combate1[2]:PegarCombatente (actor_T2.serial, actor_T2.nome, actor_T2.flag_original, true)
actor_T1 = actor_T1 - actor_T2
actor_T2:subtract_total (combate1)
end
combate1 [2].need_refresh = true
--sub energy
for index, actor_T2 in _ipairs(combate2[3]._ActorTable) do
for index, actor_T2 in ipairs(combate2[3]._ActorTable) do
local actor_T1 = combate1[3]:PegarCombatente (actor_T2.serial, actor_T2.nome, actor_T2.flag_original, true)
actor_T1 = actor_T1 - actor_T2
actor_T2:subtract_total (combate1)
end
combate1 [3].need_refresh = true
--sub misc
for index, actor_T2 in _ipairs(combate2[4]._ActorTable) do
for index, actor_T2 in ipairs(combate2[4]._ActorTable) do
local actor_T1 = combate1[4]:PegarCombatente (actor_T2.serial, actor_T2.nome, actor_T2.flag_original, true)
actor_T1 = actor_T1 - actor_T2
actor_T2:subtract_total (combate1)
end
combate1 [4].need_refresh = true
--reduz o tempo
--reduz o tempo
combate1.start_time = combate1.start_time + combate2:GetCombatTime()
--apaga as mortes da luta diminuida
local amt_mortes = #combate2.last_events_tables --quantas mortes teve nessa luta
if (amt_mortes > 0) then
for i = #combate1.last_events_tables, #combate1.last_events_tables-amt_mortes, -1 do
_table_remove (combate1.last_events_tables, #combate1.last_events_tables)
for i = #combate1.last_events_tables, #combate1.last_events_tables-amt_mortes, -1 do
tremove(combate1.last_events_tables, #combate1.last_events_tables)
end
end
--frags
for fragName, fragAmount in pairs(combate2.frags) do
for fragName, fragAmount in pairs(combate2.frags) do
if (fragAmount) then
if (combate1.frags [fragName]) then
combate1.frags [fragName] = combate1.frags [fragName] - fragAmount
@@ -724,19 +719,19 @@
end
end
combate1.frags_need_refresh = true
--alternate power
local overallPowerTable = combate1.alternate_power
for actorName, powerTable in pairs(combate2.alternate_power) do
for actorName, powerTable in pairs(combate2.alternate_power) do
local power = overallPowerTable [actorName]
if (power) then
power.total = power.total - powerTable.total
end
combate2.alternate_power [actorName].last = 0
end
return combate1
end
combate.__add = function(combate1, combate2)
@@ -746,11 +741,11 @@
if (combate1 ~= _detalhes.tabela_overall) then
custom_combat = combate1
end
for class_type, actor_container in ipairs(all_containers) do
for _, actor in ipairs(actor_container) do
local shadow
if (class_type == class_type_dano) then
shadow = _detalhes.atributo_damage:r_connect_shadow (actor, true, custom_combat)
elseif (class_type == class_type_cura) then
@@ -760,16 +755,16 @@
elseif (class_type == class_type_misc) then
shadow = _detalhes.atributo_misc:r_connect_shadow (actor, true, custom_combat)
end
shadow.boss_fight_component = actor.boss_fight_component or shadow.boss_fight_component
shadow.fight_component = actor.fight_component or shadow.fight_component
shadow.grupo = actor.grupo or shadow.grupo
end
end
--alternate power
local overallPowerTable = combate1.alternate_power
for actorName, powerTable in pairs(combate2.alternate_power) do
for actorName, powerTable in pairs(combate2.alternate_power) do
local power = overallPowerTable [actorName]
if (not power) then
power = combate1:CreateAlternatePowerTable (actorName)
+129 -129
View File
@@ -15,14 +15,14 @@
local _table_insert = table.insert --lua local
local _table_size = table.getn --lua local
local _setmetatable = setmetatable --lua local
local _ipairs = ipairs --lua local
local ipairs = ipairs --lua local
local _pairs = pairs --lua local
local _rawget= rawget --lua local
local _math_min = math.min --lua local
local _math_max = math.max --lua local
local _bit_band = bit.band --lua local
local _unpack = unpack --lua local
local _type = type --lua local
local type = type --lua local
local _pcall = pcall -- lua local
local _GetSpellInfo = _detalhes.getspellinfo -- api local
@@ -34,7 +34,7 @@
local _GetUnitName = GetUnitName -- api local
local _string_replace = _detalhes.string.replace --details api
local Loc = LibStub ("AceLocale-3.0"):GetLocale ( "Details" )
local Loc = LibStub("AceLocale-3.0"):GetLocale ( "Details" )
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--constants
@@ -116,7 +116,7 @@
DetailsFramework:SetEnvironment(func)
_detalhes.custom_function_cache [instance.customName] = func
else
_detalhes:Msg ("|cFFFF9900error compiling code for custom display " .. (instance.customName or "") .. " |r:", errortext)
_detalhes:Msg("|cFFFF9900error compiling code for custom display " .. (instance.customName or "") .. " |r:", errortext)
end
if (custom_object.tooltip) then
@@ -125,7 +125,7 @@
DetailsFramework:SetEnvironment(tooltip_script)
_detalhes.custom_function_cache [instance.customName .. "Tooltip"] = tooltip_script
else
_detalhes:Msg ("|cFFFF9900error compiling tooltip code for custom display " .. (instance.customName or "") .. " |r:", errortext)
_detalhes:Msg("|cFFFF9900error compiling tooltip code for custom display " .. (instance.customName or "") .. " |r:", errortext)
end
end
@@ -135,7 +135,7 @@
DetailsFramework:SetEnvironment(total_script)
_detalhes.custom_function_cache [instance.customName .. "Total"] = total_script
else
_detalhes:Msg ("|cFFFF9900error compiling total code for custom display " .. (instance.customName or "") .. " |r:", errortext)
_detalhes:Msg("|cFFFF9900error compiling total code for custom display " .. (instance.customName or "") .. " |r:", errortext)
end
end
@@ -145,19 +145,19 @@
DetailsFramework:SetEnvironment(percent_script)
_detalhes.custom_function_cache [instance.customName .. "Percent"] = percent_script
else
_detalhes:Msg ("|cFFFF9900error compiling percent code for custom display " .. (instance.customName or "") .. " |r:", errortext)
_detalhes:Msg("|cFFFF9900error compiling percent code for custom display " .. (instance.customName or "") .. " |r:", errortext)
end
end
end
if (not func) then
_detalhes:Msg (Loc ["STRING_CUSTOM_FUNC_INVALID"], func)
_detalhes:Msg(Loc ["STRING_CUSTOM_FUNC_INVALID"], func)
_detalhes:EndRefresh (instance, 0, combat, combat [1])
end
local okey, _total, _top, _amount = _pcall (func, combat, instance_container, instance)
if (not okey) then
_detalhes:Msg ("|cFFFF9900error on custom display function|r:", _total)
_detalhes:Msg("|cFFFF9900error on custom display function|r:", _total)
return _detalhes:EndRefresh (instance, 0, combat, combat [1])
end
@@ -216,14 +216,14 @@
local total_script = _detalhes.custom_function_cache [instance.customName .. "Total"]
local okey
for index, actor in _ipairs(instance_container._ActorTable) do
for index, actor in ipairs(instance_container._ActorTable) do
local percent, ptotal
if (percent_script) then
okey, percent = _pcall (percent_script, _math_floor(actor.value), top, total, combat, instance, actor)
if (not okey) then
_detalhes:Msg ("|cFFFF9900percent script error|r:", percent)
_detalhes:Msg("|cFFFF9900percent script error|r:", percent)
return _detalhes:EndRefresh (instance, 0, combat, combat [1])
end
else
@@ -233,7 +233,7 @@
if (total_script) then
local okey, value = _pcall (total_script, _math_floor(actor.value), top, total, combat, instance, actor)
if (not okey) then
_detalhes:Msg ("|cFFFF9900total script error|r:", value)
_detalhes:Msg("|cFFFF9900total script error|r:", value)
return _detalhes:EndRefresh (instance, 0, combat, combat [1])
end
@@ -292,7 +292,7 @@
if (source == "[all]") then
for _, actor in _ipairs(combat_container) do
for _, actor in ipairs(combat_container) do
local actortotal = func (_, actor, source, target, spellid, combat, instance_container)
if (actortotal > 0) then
total = total + actortotal
@@ -316,7 +316,7 @@
end
end
for _, actor in _ipairs(combat_container) do
for _, actor in ipairs(combat_container) do
if (actor.grupo) then
if (not func) then
Details:Msg("error on class_custom 'func' is invalid, backtrace:", debugstack())
@@ -422,8 +422,8 @@
row1.lineText4:SetText(_detalhes:ToK2 (total) .. " (" .. _detalhes:ToK (total / combat_time) .. ")")
row1:SetValue(100)
local r, g, b = unpack (instance.total_bar.color)
row1.textura:SetVertexColor (r, g, b)
local r, g, b = unpack(instance.total_bar.color)
row1.textura:SetVertexColor(r, g, b)
row1.icone_classe:SetTexture(instance.total_bar.icon)
row1.icone_classe:SetTexCoord (0.0625, 0.9375, 0.0625, 0.9375)
@@ -458,8 +458,8 @@
row1.lineText4:SetText(_detalhes:ToK2 (total) .. " (" .. _detalhes:ToK (total / combat_time) .. ")")
row1:SetValue(100)
local r, g, b = unpack (instance.total_bar.color)
row1.textura:SetVertexColor (r, g, b)
local r, g, b = unpack(instance.total_bar.color)
row1.textura:SetVertexColor(r, g, b)
row1.icone_classe:SetTexture(instance.total_bar.icon)
row1.icone_classe:SetTexCoord (0.0625, 0.9375, 0.0625, 0.9375)
@@ -511,7 +511,7 @@
--local value, top, total, combat, instance = ...
okey, percent = _pcall (percent_script, self.value, top, total, combat, instance, self)
if (not okey) then
_detalhes:Msg ("|cFFFF9900error on custom display function|r:", percent)
_detalhes:Msg("|cFFFF9900error on custom display function|r:", percent)
return _detalhes:EndRefresh (instance, 0, combat, combat [1])
end
else
@@ -530,7 +530,7 @@
if (total_script) then
local okey, value = _pcall (total_script, self.value, top, total, combat, instance, self)
if (not okey) then
_detalhes:Msg ("|cFFFF9900error on custom display function|r:", value)
_detalhes:Msg("|cFFFF9900error on custom display function|r:", value)
return _detalhes:EndRefresh (instance, 0, combat, combat [1])
end
@@ -578,10 +578,10 @@
if (not school_color) then
school_color = _detalhes.school_colors ["unknown"]
end
actor_class_color_r, actor_class_color_g, actor_class_color_b = _unpack (school_color)
actor_class_color_r, actor_class_color_g, actor_class_color_b = _unpack(school_color)
else
local color = _detalhes.school_colors ["unknown"]
actor_class_color_r, actor_class_color_g, actor_class_color_b = _unpack (color)
actor_class_color_r, actor_class_color_g, actor_class_color_b = _unpack(color)
end
else
actor_class_color_r, actor_class_color_g, actor_class_color_b = self:GetBarColor()
@@ -614,10 +614,10 @@
Details.FadeHandler.Fader(esta_barra, "out")
if (instancia.row_info.texture_class_colors) then
esta_barra.textura:SetVertexColor (actor_class_color_r, actor_class_color_g, actor_class_color_b)
esta_barra.textura:SetVertexColor(actor_class_color_r, actor_class_color_g, actor_class_color_b)
end
if (instancia.row_info.texture_background_class_color) then
esta_barra.background:SetVertexColor (actor_class_color_r, actor_class_color_g, actor_class_color_b)
esta_barra.background:SetVertexColor(actor_class_color_r, actor_class_color_g, actor_class_color_b)
end
return self:RefreshBarra (esta_barra, instancia)
@@ -674,10 +674,10 @@
if (not school_color) then
school_color = _detalhes.school_colors ["unknown"]
end
actor_class_color_r, actor_class_color_g, actor_class_color_b = _unpack (school_color)
actor_class_color_r, actor_class_color_g, actor_class_color_b = _unpack(school_color)
else
local color = _detalhes.school_colors ["unknown"]
actor_class_color_r, actor_class_color_g, actor_class_color_b = _unpack (color)
actor_class_color_r, actor_class_color_g, actor_class_color_b = _unpack(color)
end
else
actor_class_color_r, actor_class_color_g, actor_class_color_b = self:GetBarColor()
@@ -690,7 +690,7 @@
if (self.classe == "UNKNOW") then
esta_barra.icone_classe:SetTexture("Interface\\LFGFRAME\\LFGROLE_BW")
esta_barra.icone_classe:SetTexCoord (.25, .5, 0, 1)
esta_barra.icone_classe:SetVertexColor (1, 1, 1)
esta_barra.icone_classe:SetVertexColor(1, 1, 1)
elseif (self.classe == "UNGROUPPLAYER") then
if (self.enemy) then
@@ -710,12 +710,12 @@
esta_barra.icone_classe:SetTexCoord (0, 1, 0, 1)
end
end
esta_barra.icone_classe:SetVertexColor (1, 1, 1)
esta_barra.icone_classe:SetVertexColor(1, 1, 1)
elseif (self.classe == "PET") then
esta_barra.icone_classe:SetTexture(instancia.row_info.icon_file)
esta_barra.icone_classe:SetTexCoord (0.25, 0.49609375, 0.75, 1)
esta_barra.icone_classe:SetVertexColor (actor_class_color_r, actor_class_color_g, actor_class_color_b)
esta_barra.icone_classe:SetVertexColor(actor_class_color_r, actor_class_color_g, actor_class_color_b)
else
if (self.id) then
@@ -725,17 +725,17 @@
if (instancia.row_info.use_spec_icons) then
if ((self.spec and self.spec ~= 0) or (self.my_actor.spec and self.my_actor.spec ~= 0)) then
esta_barra.icone_classe:SetTexture(instancia.row_info.spec_file)
esta_barra.icone_classe:SetTexCoord (_unpack (_detalhes.class_specs_coords [self.spec or self.my_actor.spec]))
esta_barra.icone_classe:SetTexCoord (_unpack(_detalhes.class_specs_coords [self.spec or self.my_actor.spec]))
else
esta_barra.icone_classe:SetTexture([[Interface\AddOns\Details\images\classes_small]])
esta_barra.icone_classe:SetTexCoord (_unpack (CLASS_ICON_TCOORDS [self.classe]))
esta_barra.icone_classe:SetTexCoord (_unpack(CLASS_ICON_TCOORDS [self.classe]))
end
else
esta_barra.icone_classe:SetTexture(instancia.row_info.icon_file)
esta_barra.icone_classe:SetTexCoord (_unpack (CLASS_ICON_TCOORDS [self.classe]))
esta_barra.icone_classe:SetTexCoord (_unpack(CLASS_ICON_TCOORDS [self.classe]))
end
end
esta_barra.icone_classe:SetVertexColor (1, 1, 1)
esta_barra.icone_classe:SetVertexColor(1, 1, 1)
end
--left text
@@ -746,14 +746,14 @@
end
function atributo_custom:CreateCustomActorContainer()
return _setmetatable ({
return _setmetatable({
_NameIndexTable = {},
_ActorTable = {}
}, {__index = atributo_custom})
end
function atributo_custom:ResetCustomActorContainer()
for _, actor in _ipairs(self._ActorTable) do
for _, actor in ipairs(self._ActorTable) do
actor.value = actor.value - _math_floor(actor.value)
--actor.value = _detalhes:GetOrderNumber(actor.nome)
end
@@ -856,7 +856,7 @@
end
end
local newActor = _setmetatable ({
local newActor = _setmetatable({
nome = actor.nome or actor.name,
classe = class,
value = _detalhes:GetOrderNumber(),
@@ -865,7 +865,7 @@
}, atributo_custom.mt)
newActor.name_complement = name_complement
newActor.displayName = actor.displayName or (_detalhes:GetOnlyName (newActor.nome) .. (name_complement or ""))
newActor.displayName = actor.displayName or (_detalhes:GetOnlyName(newActor.nome) .. (name_complement or ""))
newActor.spec = actor.spec
newActor.enemy = actor.enemy
@@ -891,7 +891,7 @@
newActor.classe = Details:GetClass(actor.nome or actor.name) or "UNKNOW"
end
if (newActor.classe == "UNGROUPPLAYER") then
--atributo_custom:ScheduleTimer ("UpdateClass", 5, {newActor = newActor, actor = actor})
--atributo_custom:ScheduleTimer("UpdateClass", 5, {newActor = newActor, actor = actor})
Details.Schedules.NewTimer(5, atributo_custom.UpdateClass, self, {new_actor = newActor, actor = actor})
end
end
@@ -912,7 +912,7 @@
end
function atributo_custom:CreateCustomDisplayObject()
return _setmetatable ({
return _setmetatable({
name = "new custom",
icon = [[Interface\ICONS\TEMP]],
author = "unknown",
@@ -958,13 +958,13 @@
if (not school_color) then
school_color = _detalhes.school_colors ["unknown"]
end
r, g, b = _unpack (school_color)
r, g, b = _unpack(school_color)
else
r, g, b = actor:GetClassColor()
end
if (actor.id) then
_detalhes:AddTooltipSpellHeaderText (select (1, _GetSpellInfo(actor.id)), "yellow", 1, select (3, _GetSpellInfo(actor.id)), 0.90625, 0.109375, 0.15625, 0.875)
_detalhes:AddTooltipSpellHeaderText (select(1, _GetSpellInfo(actor.id)), "yellow", 1, select(3, _GetSpellInfo(actor.id)), 0.90625, 0.109375, 0.15625, 0.875)
else
_detalhes:AddTooltipSpellHeaderText (custom_object:GetName(), "yellow", 1, custom_object:GetIcon(), 0.90625, 0.109375, 0.15625, 0.875)
end
@@ -980,7 +980,7 @@
end
local okey, errortext = _pcall (func, actor, instance.showing, instance, keydown)
if (not okey) then
_detalhes:Msg ("|cFFFF9900error on custom display tooltip function|r:", errortext)
_detalhes:Msg("|cFFFF9900error on custom display tooltip function|r:", errortext)
return false
end
end
@@ -1084,7 +1084,7 @@
table.remove (_detalhes.custom, index)
for _, instance in _ipairs(_detalhes.tabela_instancias) do
for _, instance in ipairs(_detalhes.tabela_instancias) do
if (instance.atributo == 5 and instance.sub_atributo == index) then
instance:ResetAttribute()
elseif (instance.atributo == 5 and instance.sub_atributo > index) then
@@ -1121,7 +1121,7 @@
--check if there is a instance showing this custom
local showing = false
for index, instance in _ipairs(_detalhes.tabela_instancias) do
for index, instance in ipairs(_detalhes.tabela_instancias) do
if (instance.atributo == 5 and instance.sub_atributo == i) then
showing = true
end
@@ -1135,14 +1135,14 @@
end
--restore metatable and indexes
for index, custom_object in _ipairs(_detalhes.custom) do
_setmetatable (custom_object, atributo_custom)
for index, custom_object in ipairs(_detalhes.custom) do
_setmetatable(custom_object, atributo_custom)
custom_object.__index = atributo_custom
end
end
function _detalhes.clear:c_atributo_custom()
for _, custom_object in _ipairs(_detalhes.custom) do
for _, custom_object in ipairs(_detalhes.custom) do
custom_object.__index = nil
end
end
@@ -1180,7 +1180,7 @@
break
end
end
setmetatable (object, _detalhes.atributo_custom)
setmetatable(object, _detalhes.atributo_custom)
object.__index = _detalhes.atributo_custom
_detalhes.custom [#_detalhes.custom+1] = object
end
@@ -1273,7 +1273,7 @@
local focus_potion = debuff_uptime_container [DETAILS_FOCUS_POTION_ID]
if (focus_potion) then
local name, _, icon = GetSpellInfo(DETAILS_FOCUS_POTION_ID)
GameCooltip:AddLine (name, 1) --can use only 1 focus potion (can't be pre-potion)
GameCooltip:AddLine(name, 1) --can use only 1 focus potion (can't be pre-potion)
_detalhes:AddTooltipBackgroundStatusbar()
GameCooltip:AddIcon (icon, 1, 1, _detalhes.tooltip.line_height, _detalhes.tooltip.line_height)
end
@@ -1287,7 +1287,7 @@
if (potionUsed) then
local name, _, icon = GetSpellInfo(spellId)
GameCooltip:AddLine (name, potionUsed.activedamt)
GameCooltip:AddLine(name, potionUsed.activedamt)
_detalhes:AddTooltipBackgroundStatusbar()
GameCooltip:AddIcon (icon, 1, 1, _detalhes.tooltip.line_height, _detalhes.tooltip.line_height)
end
@@ -1309,7 +1309,7 @@
table.remove (self.custom, i)
end
end
setmetatable (PotionUsed, _detalhes.atributo_custom)
setmetatable(PotionUsed, _detalhes.atributo_custom)
PotionUsed.__index = _detalhes.atributo_custom
self.custom [#self.custom+1] = PotionUsed
end
@@ -1366,29 +1366,29 @@
local hs = actor:GetSpell (6262)
if (hs) then
GameCooltip:AddLine (select (1, GetSpellInfo(6262)), _detalhes:ToK(hs.total))
GameCooltip:AddIcon (select (3, GetSpellInfo(6262)), 1, 1, _detalhes.tooltip.line_height, _detalhes.tooltip.line_height)
GameCooltip:AddLine(select(1, GetSpellInfo(6262)), _detalhes:ToK(hs.total))
GameCooltip:AddIcon (select(3, GetSpellInfo(6262)), 1, 1, _detalhes.tooltip.line_height, _detalhes.tooltip.line_height)
GameCooltip:AddStatusBar (100, 1, R, G, B, A)
end
local pot = actor:GetSpell (DETAILS_HEALTH_POTION_ID)
if (pot) then
GameCooltip:AddLine (select (1, GetSpellInfo(DETAILS_HEALTH_POTION_ID)), _detalhes:ToK(pot.total))
GameCooltip:AddIcon (select (3, GetSpellInfo(DETAILS_HEALTH_POTION_ID)), 1, 1, _detalhes.tooltip.line_height, _detalhes.tooltip.line_height)
GameCooltip:AddLine(select(1, GetSpellInfo(DETAILS_HEALTH_POTION_ID)), _detalhes:ToK(pot.total))
GameCooltip:AddIcon (select(3, GetSpellInfo(DETAILS_HEALTH_POTION_ID)), 1, 1, _detalhes.tooltip.line_height, _detalhes.tooltip.line_height)
GameCooltip:AddStatusBar (100, 1, R, G, B, A)
end
local pot = actor:GetSpell (DETAILS_HEALTH_POTION2_ID)
if (pot) then
GameCooltip:AddLine (select (1, GetSpellInfo(DETAILS_HEALTH_POTION2_ID)), _detalhes:ToK(pot.total))
GameCooltip:AddIcon (select (3, GetSpellInfo(DETAILS_HEALTH_POTION2_ID)), 1, 1, _detalhes.tooltip.line_height, _detalhes.tooltip.line_height)
GameCooltip:AddLine(select(1, GetSpellInfo(DETAILS_HEALTH_POTION2_ID)), _detalhes:ToK(pot.total))
GameCooltip:AddIcon (select(3, GetSpellInfo(DETAILS_HEALTH_POTION2_ID)), 1, 1, _detalhes.tooltip.line_height, _detalhes.tooltip.line_height)
GameCooltip:AddStatusBar (100, 1, R, G, B, A)
end
local pot = actor:GetSpell (DETAILS_REJU_POTION_ID)
if (pot) then
GameCooltip:AddLine (select (1, GetSpellInfo(DETAILS_REJU_POTION_ID)), _detalhes:ToK(pot.total))
GameCooltip:AddIcon (select (3, GetSpellInfo(DETAILS_REJU_POTION_ID)), 1, 1, _detalhes.tooltip.line_height, _detalhes.tooltip.line_height)
GameCooltip:AddLine(select(1, GetSpellInfo(DETAILS_REJU_POTION_ID)), _detalhes:ToK(pot.total))
GameCooltip:AddIcon (select(3, GetSpellInfo(DETAILS_REJU_POTION_ID)), 1, 1, _detalhes.tooltip.line_height, _detalhes.tooltip.line_height)
GameCooltip:AddStatusBar (100, 1, R, G, B, A)
end
@@ -1412,7 +1412,7 @@
table.remove (self.custom, i)
end
end
setmetatable (Healthstone, _detalhes.atributo_custom)
setmetatable(Healthstone, _detalhes.atributo_custom)
Healthstone.__index = _detalhes.atributo_custom
self.custom [#self.custom+1] = Healthstone
end
@@ -1431,7 +1431,7 @@
script_version = 3,
total_script = [[
local value, top, total, combat, instance = ...
local minutos, segundos = math.floor (value/60), math.floor (value%60)
local minutos, segundos = math.floor(value/60), math.floor(value%60)
return minutos .. "m " .. segundos .. "s"
]],
percent_script = [[
@@ -1478,7 +1478,7 @@
table.remove (self.custom, i)
end
end
setmetatable (DamageActivityTime, _detalhes.atributo_custom)
setmetatable(DamageActivityTime, _detalhes.atributo_custom)
DamageActivityTime.__index = _detalhes.atributo_custom
self.custom [#self.custom+1] = DamageActivityTime
end
@@ -1495,7 +1495,7 @@
script_version = 2,
total_script = [[
local value, top, total, combat, instance = ...
local minutos, segundos = math.floor (value/60), math.floor (value%60)
local minutos, segundos = math.floor(value/60), math.floor(value%60)
return minutos .. "m " .. segundos .. "s"
]],
percent_script = [[
@@ -1542,7 +1542,7 @@
table.remove (self.custom, i)
end
end
setmetatable (HealActivityTime, _detalhes.atributo_custom)
setmetatable(HealActivityTime, _detalhes.atributo_custom)
HealActivityTime.__index = _detalhes.atributo_custom
self.custom [#self.custom+1] = HealActivityTime
end
@@ -1569,7 +1569,7 @@
for index, character in ipairs(misc_actors) do
if (character.cc_done and character:IsPlayer()) then
local cc_done = floor (character.cc_done)
local cc_done = floor(character.cc_done)
instance_container:AddValue (character, cc_done)
total = total + cc_done
if (cc_done > top) then
@@ -1592,7 +1592,7 @@
for index, spell in ipairs(spells) do
local name, _, icon = GetSpellInfo(spell [1])
GameCooltip:AddLine (name, spell [2])
GameCooltip:AddLine(name, spell [2])
_detalhes:AddTooltipBackgroundStatusbar()
GameCooltip:AddIcon (icon, 1, 1, _detalhes.tooltip.line_height, _detalhes.tooltip.line_height)
end
@@ -1609,7 +1609,7 @@
_detalhes:AddTooltipHeaderStatusbar (1, 1, 1, 0.6)
for index, target in ipairs(targets) do
GameCooltip:AddLine (target[1], target [2])
GameCooltip:AddLine(target[1], target [2])
_detalhes:AddTooltipBackgroundStatusbar()
local class, _, _, _, _, r, g, b = _detalhes:GetClass (target [1])
@@ -1624,7 +1624,7 @@
]],
total_script = [[
local value, top, total, combat, instance = ...
return floor (value)
return floor(value)
]],
}
@@ -1638,7 +1638,7 @@
end
end
if (not have) then
setmetatable (CC_Done, _detalhes.atributo_custom)
setmetatable(CC_Done, _detalhes.atributo_custom)
CC_Done.__index = _detalhes.atributo_custom
for i, custom in ipairs(self.custom) do
@@ -1734,7 +1734,7 @@
for index, spell in ipairs(spells) do
local name, _, icon = GetSpellInfo(spell [1])
GameCooltip:AddLine (name, spell [2])
GameCooltip:AddLine(name, spell [2])
_detalhes:AddTooltipBackgroundStatusbar()
GameCooltip:AddIcon (icon, 1, 1, _detalhes.tooltip.line_height, _detalhes.tooltip.line_height)
end
@@ -1743,7 +1743,7 @@
_detalhes:AddTooltipHeaderStatusbar (1, 1, 1, 0.6)
for index, t in ipairs(from) do
GameCooltip:AddLine (t[1], t[2])
GameCooltip:AddLine(t[1], t[2])
_detalhes:AddTooltipBackgroundStatusbar()
local class, _, _, _, _, r, g, b = _detalhes:GetClass (t [1])
@@ -1758,7 +1758,7 @@
]],
total_script = [[
local value, top, total, combat, instance = ...
return floor (value)
return floor(value)
]],
}
@@ -1772,7 +1772,7 @@
end
end
if (not have) then
setmetatable (CC_Received, _detalhes.atributo_custom)
setmetatable(CC_Received, _detalhes.atributo_custom)
CC_Received.__index = _detalhes.atributo_custom
for i, custom in ipairs(self.custom) do
@@ -1808,7 +1808,7 @@
local player
local pet_attribute
local role = DetailsFramework.UnitGroupRolesAssigned ("player")
local role = DetailsFramework.UnitGroupRolesAssigned("player")
local spec = DetailsFramework.GetSpecialization()
role = spec and DetailsFramework.GetSpecializationRole (spec) or role
@@ -1868,7 +1868,7 @@
local GC = GameCooltip
GC:SetOption("YSpacingMod", 0)
local role = DetailsFramework.UnitGroupRolesAssigned ("player")
local role = DetailsFramework.UnitGroupRolesAssigned("player")
if (spell.n_dmg) then
@@ -1888,7 +1888,7 @@
if (misc_actor) then
local debuff_uptime = misc_actor.debuff_uptime_spells and misc_actor.debuff_uptime_spells._ActorTable [spell.id] and misc_actor.debuff_uptime_spells._ActorTable [spell.id].uptime
if (debuff_uptime) then
debuff_uptime_total = floor (debuff_uptime / instance.showing:GetCombatTime() * 100)
debuff_uptime_total = floor(debuff_uptime / instance.showing:GetCombatTime() * 100)
end
local spell_cast = misc_actor.spell_cast and misc_actor.spell_cast [spell.id]
@@ -1909,30 +1909,30 @@
end
--Cooltip code
GC:AddLine ("Casts:", cast_string or "?")
GC:AddLine("Casts:", cast_string or "?")
GC:AddStatusBar (100, 1, R, G, B, A)
if (debuff_uptime_total ~= "") then
GC:AddLine ("Uptime:", (debuff_uptime_total or "?") .. "%")
GC:AddLine("Uptime:", (debuff_uptime_total or "?") .. "%")
GC:AddStatusBar (100, 1, R, G, B, A)
end
GC:AddLine ("Hits:", spell.counter)
GC:AddLine("Hits:", spell.counter)
GC:AddStatusBar (100, 1, R, G, B, A)
local average = spell.total / total_hits
GC:AddLine ("Average:", _detalhes:ToK (average))
GC:AddLine("Average:", _detalhes:ToK (average))
GC:AddStatusBar (100, 1, R, G, B, A)
GC:AddLine ("E-Dps:", _detalhes:ToK (spell.total / combat_time))
GC:AddLine("E-Dps:", _detalhes:ToK (spell.total / combat_time))
GC:AddStatusBar (100, 1, R, G, B, A)
GC:AddLine ("School:", schooltext)
GC:AddLine("School:", schooltext)
GC:AddStatusBar (100, 1, R, G, B, A)
--GC:AddLine (" ")
--GC:AddLine(" ")
GC:AddLine ("Normal Hits: ", spell.n_amt .. " (" ..floor ( spell.n_amt/total_hits*100) .. "%)")
GC:AddLine("Normal Hits: ", spell.n_amt .. " (" ..floor( spell.n_amt/total_hits*100) .. "%)")
GC:AddStatusBar (100, 1, R, G, B, A)
local n_average = spell.n_dmg / spell.n_amt
@@ -1940,12 +1940,12 @@
local P = average/n_average*100
T = P*T/100
GC:AddLine ("Average / E-Dps: ", _detalhes:ToK (n_average) .. " / " .. format ("%.1f",spell.n_dmg / T ))
GC:AddLine("Average / E-Dps: ", _detalhes:ToK (n_average) .. " / " .. format ("%.1f",spell.n_dmg / T ))
GC:AddStatusBar (100, 1, R, G, B, A)
--GC:AddLine (" ")
--GC:AddLine(" ")
GC:AddLine ("Critical Hits: ", spell.c_amt .. " (" ..floor ( spell.c_amt/total_hits*100) .. "%)")
GC:AddLine("Critical Hits: ", spell.c_amt .. " (" ..floor( spell.c_amt/total_hits*100) .. "%)")
GC:AddStatusBar (100, 1, R, G, B, A)
if (spell.c_amt > 0) then
@@ -1955,9 +1955,9 @@
T = P*T/100
local crit_dps = spell.c_dmg / T
GC:AddLine ("Average / E-Dps: ", _detalhes:ToK (c_average) .. " / " .. _detalhes:comma_value (crit_dps))
GC:AddLine("Average / E-Dps: ", _detalhes:ToK (c_average) .. " / " .. _detalhes:comma_value (crit_dps))
else
GC:AddLine ("Average / E-Dps: ", "0 / 0")
GC:AddLine("Average / E-Dps: ", "0 / 0")
end
GC:AddStatusBar (100, 1, R, G, B, A)
@@ -1977,22 +1977,22 @@
local combat_time = instance.showing:GetCombatTime()
--Cooltip code
GC:AddLine ("Hits:", spell.counter)
GC:AddLine("Hits:", spell.counter)
GC:AddStatusBar (100, 1, R, G, B, A)
local average = spell.total / total_hits
GC:AddLine ("Average:", _detalhes:ToK (average))
GC:AddLine("Average:", _detalhes:ToK (average))
GC:AddStatusBar (100, 1, R, G, B, A)
GC:AddLine ("E-Hps:", _detalhes:ToK (spell.total / combat_time))
GC:AddLine("E-Hps:", _detalhes:ToK (spell.total / combat_time))
GC:AddStatusBar (100, 1, R, G, B, A)
GC:AddLine ("School:", schooltext)
GC:AddLine("School:", schooltext)
GC:AddStatusBar (100, 1, R, G, B, A)
--GC:AddLine (" ")
--GC:AddLine(" ")
GC:AddLine ("Normal Hits: ", spell.n_amt .. " (" ..floor ( spell.n_amt/total_hits*100) .. "%)")
GC:AddLine("Normal Hits: ", spell.n_amt .. " (" ..floor( spell.n_amt/total_hits*100) .. "%)")
GC:AddStatusBar (100, 1, R, G, B, A)
local n_average = spell.n_curado / spell.n_amt
@@ -2000,12 +2000,12 @@
local P = average/n_average*100
T = P*T/100
GC:AddLine ("Average / E-Dps: ", _detalhes:ToK (n_average) .. " / " .. format ("%.1f",spell.n_curado / T ))
GC:AddLine("Average / E-Dps: ", _detalhes:ToK (n_average) .. " / " .. format ("%.1f",spell.n_curado / T ))
GC:AddStatusBar (100, 1, R, G, B, A)
--GC:AddLine (" ")
--GC:AddLine(" ")
GC:AddLine ("Critical Hits: ", spell.c_amt .. " (" ..floor ( spell.c_amt/total_hits*100) .. "%)")
GC:AddLine("Critical Hits: ", spell.c_amt .. " (" ..floor( spell.c_amt/total_hits*100) .. "%)")
GC:AddStatusBar (100, 1, R, G, B, A)
if (spell.c_amt > 0) then
@@ -2015,9 +2015,9 @@
T = P*T/100
local crit_dps = spell.c_curado / T
GC:AddLine ("Average / E-Hps: ", _detalhes:ToK (c_average) .. " / " .. _detalhes:comma_value (crit_dps))
GC:AddLine("Average / E-Hps: ", _detalhes:ToK (c_average) .. " / " .. _detalhes:comma_value (crit_dps))
else
GC:AddLine ("Average / E-Hps: ", "0 / 0")
GC:AddLine("Average / E-Hps: ", "0 / 0")
end
GC:AddStatusBar (100, 1, R, G, B, A)
@@ -2026,7 +2026,7 @@
percent_script = [[
local value, top, total, combat, instance = ...
local dps = _detalhes:ToK (floor (value) / combat:GetCombatTime())
local dps = _detalhes:ToK (floor(value) / combat:GetCombatTime())
local percent = string.format("%.1f", value/total*100)
return dps .. ", " .. percent
]],
@@ -2040,7 +2040,7 @@
end
end
if (not have) then
setmetatable (MySpells, _detalhes.atributo_custom)
setmetatable(MySpells, _detalhes.atributo_custom)
MySpells.__index = _detalhes.atributo_custom
for i, custom in ipairs(self.custom) do
@@ -2115,7 +2115,7 @@
local DamageOnStar = RaidTargets [128]
if (DamageOnStar) then
--RAID_TARGET_8 is the built-in localized word for 'Skull'.
GameCooltip:AddLine (RAID_TARGET_8 .. ":", format_func (_, DamageOnStar))
GameCooltip:AddLine(RAID_TARGET_8 .. ":", format_func (_, DamageOnStar))
GameCooltip:AddIcon ("Interface\\TARGETINGFRAME\\UI-RaidTargetingIcon_8", 1, 1, _detalhes.tooltip.line_height, _detalhes.tooltip.line_height)
Details:AddTooltipBackgroundStatusbar()
end
@@ -2132,7 +2132,7 @@
end
end
if (not have) then
setmetatable (DamageOnSkullTarget, _detalhes.atributo_custom)
setmetatable(DamageOnSkullTarget, _detalhes.atributo_custom)
DamageOnSkullTarget.__index = _detalhes.atributo_custom
for i, custom in ipairs(self.custom) do
@@ -2203,49 +2203,49 @@
local DamageOnStar = RaidTargets [1]
if (DamageOnStar) then
GameCooltip:AddLine (RAID_TARGET_1 .. ":", format_func (_, DamageOnStar))
GameCooltip:AddLine(RAID_TARGET_1 .. ":", format_func (_, DamageOnStar))
GameCooltip:AddIcon ("Interface\\TARGETINGFRAME\\UI-RaidTargetingIcon_1", 1, 1, _detalhes.tooltip.line_height, _detalhes.tooltip.line_height)
Details:AddTooltipBackgroundStatusbar()
end
local DamageOnCircle = RaidTargets [2]
if (DamageOnCircle) then
GameCooltip:AddLine (RAID_TARGET_2 .. ":", format_func (_, DamageOnCircle))
GameCooltip:AddLine(RAID_TARGET_2 .. ":", format_func (_, DamageOnCircle))
GameCooltip:AddIcon ("Interface\\TARGETINGFRAME\\UI-RaidTargetingIcon_2", 1, 1, _detalhes.tooltip.line_height, _detalhes.tooltip.line_height)
Details:AddTooltipBackgroundStatusbar()
end
local DamageOnDiamond = RaidTargets [4]
if (DamageOnDiamond) then
GameCooltip:AddLine (RAID_TARGET_3 .. ":", format_func (_, DamageOnDiamond))
GameCooltip:AddLine(RAID_TARGET_3 .. ":", format_func (_, DamageOnDiamond))
GameCooltip:AddIcon ("Interface\\TARGETINGFRAME\\UI-RaidTargetingIcon_3", 1, 1, _detalhes.tooltip.line_height, _detalhes.tooltip.line_height)
Details:AddTooltipBackgroundStatusbar()
end
local DamageOnTriangle = RaidTargets [8]
if (DamageOnTriangle) then
GameCooltip:AddLine (RAID_TARGET_4 .. ":", format_func (_, DamageOnTriangle))
GameCooltip:AddLine(RAID_TARGET_4 .. ":", format_func (_, DamageOnTriangle))
GameCooltip:AddIcon ("Interface\\TARGETINGFRAME\\UI-RaidTargetingIcon_4", 1, 1, _detalhes.tooltip.line_height, _detalhes.tooltip.line_height)
Details:AddTooltipBackgroundStatusbar()
end
local DamageOnMoon = RaidTargets [16]
if (DamageOnMoon) then
GameCooltip:AddLine (RAID_TARGET_5 .. ":", format_func (_, DamageOnMoon))
GameCooltip:AddLine(RAID_TARGET_5 .. ":", format_func (_, DamageOnMoon))
GameCooltip:AddIcon ("Interface\\TARGETINGFRAME\\UI-RaidTargetingIcon_5", 1, 1, _detalhes.tooltip.line_height, _detalhes.tooltip.line_height)
Details:AddTooltipBackgroundStatusbar()
end
local DamageOnSquare = RaidTargets [32]
if (DamageOnSquare) then
GameCooltip:AddLine (RAID_TARGET_6 .. ":", format_func (_, DamageOnSquare))
GameCooltip:AddLine(RAID_TARGET_6 .. ":", format_func (_, DamageOnSquare))
GameCooltip:AddIcon ("Interface\\TARGETINGFRAME\\UI-RaidTargetingIcon_6", 1, 1, _detalhes.tooltip.line_height, _detalhes.tooltip.line_height)
Details:AddTooltipBackgroundStatusbar()
end
local DamageOnCross = RaidTargets [64]
if (DamageOnCross) then
GameCooltip:AddLine (RAID_TARGET_7 .. ":", format_func (_, DamageOnCross))
GameCooltip:AddLine(RAID_TARGET_7 .. ":", format_func (_, DamageOnCross))
GameCooltip:AddIcon ("Interface\\TARGETINGFRAME\\UI-RaidTargetingIcon_7", 1, 1, _detalhes.tooltip.line_height, _detalhes.tooltip.line_height)
Details:AddTooltipBackgroundStatusbar()
end
@@ -2262,7 +2262,7 @@
end
end
if (not have) then
setmetatable (DamageOnAnyTarget, _detalhes.atributo_custom)
setmetatable(DamageOnAnyTarget, _detalhes.atributo_custom)
DamageOnAnyTarget.__index = _detalhes.atributo_custom
for i, custom in ipairs(self.custom) do
@@ -2298,9 +2298,9 @@
local total, top, amount = 0, 0, 0
--get the overall combat
local OverallCombat = Details:GetCombat (-1)
local OverallCombat = Details:GetCombat(-1)
--get the current combat
local CurrentCombat = Details:GetCombat (0)
local CurrentCombat = Details:GetCombat(0)
if (not OverallCombat.GetActorList or not CurrentCombat.GetActorList) then
return 0, 0, 0
@@ -2344,16 +2344,16 @@
--Cooltip code
--get the overall combat
local OverallCombat = Details:GetCombat (-1)
local OverallCombat = Details:GetCombat(-1)
--get the current combat
local CurrentCombat = Details:GetCombat (0)
local CurrentCombat = Details:GetCombat(0)
local AllSpells = {}
local playerTotal = 0
--overall
local player = OverallCombat [1]:GetActor (actor.nome)
local player = OverallCombat [1]:GetActor(actor.nome)
if (player) then
playerTotal = playerTotal + player.total
local playerSpells = player:GetSpellList()
@@ -2363,7 +2363,7 @@
end
--current
if (Details.in_combat) then
local player = CurrentCombat [1]:GetActor (actor.nome)
local player = CurrentCombat [1]:GetActor(actor.nome)
if (player) then
playerTotal = playerTotal + player.total
local playerSpells = player:GetSpellList()
@@ -2386,7 +2386,7 @@
local topSpellTotal = sortedList and sortedList[1] and sortedList[1][2] or 0
for i, t in ipairs(sortedList) do
local spellID, total = unpack (t)
local spellID, total = unpack(t)
if (total > 1) then
local spellName, _, spellIcon = Details.GetSpellInfo(spellID)
@@ -2397,7 +2397,7 @@
formatedSpellPercent = formatedSpellPercent .. "0"
end
GameCooltip:AddLine (spellName, format_func (_, total) .. " " .. formatedSpellPercent .. "%")
GameCooltip:AddLine(spellName, format_func (_, total) .. " " .. formatedSpellPercent .. "%")
Details:AddTooltipBackgroundStatusbar(false, total / topSpellTotal * 100)
GameCooltip:AddIcon (spellIcon, 1, 1, _detalhes.tooltip.line_height, _detalhes.tooltip.line_height, 0.078125, 0.921875, 0.078125, 0.921875)
@@ -2415,11 +2415,11 @@
local value, top, total, combat, instance = ...
--get the time of overall combat
local OverallCombatTime = Details:GetCombat (-1):GetCombatTime()
local OverallCombatTime = Details:GetCombat(-1):GetCombatTime()
--get the time of current combat if the player is in combat
if (Details.in_combat) then
local CurrentCombatTime = Details:GetCombat (0):GetCombatTime()
local CurrentCombatTime = Details:GetCombat(0):GetCombatTime()
OverallCombatTime = OverallCombatTime + CurrentCombatTime
end
@@ -2447,7 +2447,7 @@
table.remove (self.custom, i)
end
end
setmetatable (DynamicOverallDamage, _detalhes.atributo_custom)
setmetatable(DynamicOverallDamage, _detalhes.atributo_custom)
DynamicOverallDamage.__index = _detalhes.atributo_custom
self.custom [#self.custom+1] = DynamicOverallDamage
end
@@ -2479,7 +2479,7 @@
--get the damage absorbed by all the actor pets
for petIndex, petName in ipairs(actor.pets) do
local pet = Combat :GetActor (1, petName)
local pet = Combat :GetActor(1, petName)
if (pet) then
totalAbsorb = totalAbsorb + pet.totalabsorbed
end
@@ -2513,21 +2513,21 @@
--get the damage absorbed by all the actor pets
for petIndex, petName in ipairs(actor.pets) do
local pet = Combat :GetActor (1, petName)
local pet = Combat :GetActor(1, petName)
if (pet) then
totalAbsorb = totalAbsorb + pet.totalabsorbed
end
end
GameCooltip:AddLine (actor:Name(), format_func (_, actor.totalabsorbed))
GameCooltip:AddLine(actor:Name(), format_func (_, actor.totalabsorbed))
Details:AddTooltipBackgroundStatusbar()
for petIndex, petName in ipairs(actor.pets) do
local pet = Combat :GetActor (1, petName)
local pet = Combat :GetActor(1, petName)
if (pet) then
totalAbsorb = totalAbsorb + pet.totalabsorbed
GameCooltip:AddLine (petName, format_func (_, pet.totalabsorbed))
GameCooltip:AddLine(petName, format_func (_, pet.totalabsorbed))
Details:AddTooltipBackgroundStatusbar()
end
@@ -2548,7 +2548,7 @@
table.remove (self.custom, i)
end
end
setmetatable (DamageOnShields, _detalhes.atributo_custom)
setmetatable(DamageOnShields, _detalhes.atributo_custom)
DamageOnShields.__index = _detalhes.atributo_custom
self.custom [#self.custom+1] = DamageOnShields
end
+135 -135
View File
@@ -1,8 +1,8 @@
--damage object
local Details = _G.Details
local Loc = LibStub ("AceLocale-3.0"):GetLocale ( "Details" )
local Translit = LibStub ("LibTranslit-1.0")
local Loc = LibStub("AceLocale-3.0"):GetLocale ( "Details" )
local Translit = LibStub("LibTranslit-1.0")
local gump = Details.gump
local _
@@ -16,15 +16,15 @@
local _table_size = table.getn --lua local
local _setmetatable = setmetatable --lua local
local _getmetatable = getmetatable --lua local
local _ipairs = ipairs --lua local
local ipairs = ipairs --lua local
local _pairs = pairs --lua local
local _rawget= rawget --lua local
local _math_min = math.min --lua local
local _math_max = math.max --lua local
local _math_abs = math.abs --lua local
local abs = math.abs --lua local
local bitBand = bit.band --lua local
local unpack = unpack --lua local
local _type = type --lua local
local type = type --lua local
local GameTooltip = GameTooltip --api local
local _IsInRaid = IsInRaid --api local
local _IsInGroup = IsInGroup --api local
@@ -278,7 +278,7 @@ function Details:ContainerSortEnemies (container, amount, keyName2) --[[exported
local total = 0
for index, player in _ipairs(container) do
for index, player in ipairs(container) do
local npcid1 = Details:GetNpcIdFromGuid(player.serial)
--p rint (player.nome, npcid1, ignored_enemy_npcs [npcid1])
if (bitBand(player.flag_original, 0x00000060) ~= 0 and not ignoredEnemyNpcsTable [npcid1]) then -- um inimigo
@@ -293,7 +293,7 @@ function Details:ContainerSortEnemies (container, amount, keyName2) --[[exported
end
function Details:TooltipForCustom (barra) --[[exported]]
GameCooltip:AddLine (Loc ["STRING_LEFT_CLICK_SHARE"])
GameCooltip:AddLine(Loc ["STRING_LEFT_CLICK_SHARE"])
return true
end
@@ -366,7 +366,7 @@ function Details:GetBarColor(actor) --[[exported]]
end
function Details:GetSpellLink(spellid) --[[exported]]
if (_type(spellid) ~= "number") then
if (type(spellid) ~= "number") then
return spellid
end
@@ -440,7 +440,7 @@ end
spells = container_habilidades:NovoContainer (container_damage)
}
_setmetatable (_new_damageActor, atributo_damage)
_setmetatable(_new_damageActor, atributo_damage)
return _new_damageActor
end
@@ -455,7 +455,7 @@ end
local total = 0
if (Details.time_type == 2 or not Details:CaptureGet ("damage")) then
for _, actor in _ipairs(container) do
for _, actor in ipairs(container) do
if (actor.grupo) then
actor.last_dps = actor.total / combat_time
else
@@ -464,7 +464,7 @@ end
total = total + actor.last_dps
end
else
for _, actor in _ipairs(container) do
for _, actor in ipairs(container) do
actor.last_dps = actor.total / actor:Tempo()
total = total + actor.last_dps
end
@@ -485,7 +485,7 @@ end
local from_spell = tabela [1] --spellid
local from_spellname
if (from_spell) then
from_spellname = select (1, GetSpellInfo(from_spell))
from_spellname = select(1, GetSpellInfo(from_spell))
end
--get a list of all damage actors
@@ -540,7 +540,7 @@ end
else
for playername, ff_table in pairs(character.friendlyfire) do
for spellid, amount in pairs(ff_table.spells) do
local spellname = select (1, GetSpellInfo(spellid))
local spellname = select(1, GetSpellInfo(spellid))
if (spellname == from_spellname) then
local damage_actor = combat (1, playername)
local heal_actor = combat (2, playername)
@@ -608,7 +608,7 @@ end
if (not is_custom_spell) then
for spellid, spell in pairs(character.spells._ActorTable) do
if (spellid ~= from_spell) then
local spellname = select (1, GetSpellInfo(spellid))
local spellname = select(1, GetSpellInfo(spellid))
if (spellname == from_spellname) then
for targetname, amount in pairs(spell.targets) do
@@ -650,8 +650,8 @@ end
GameCooltip:SetOption("StatusBarTexture", "Interface\\AddOns\\Details\\images\\bar_serenity")
local spellname, _, spellicon = select (1, _GetSpellInfo(from_spell))
GameCooltip:AddLine (spellname .. " " .. Loc ["STRING_CUSTOM_ATTRIBUTE_DAMAGE"], nil, nil, headerColor, nil, 10)
local spellname, _, spellicon = select(1, _GetSpellInfo(from_spell))
GameCooltip:AddLine(spellname .. " " .. Loc ["STRING_CUSTOM_ATTRIBUTE_DAMAGE"], nil, nil, headerColor, nil, 10)
GameCooltip:AddIcon (spellicon, 1, 1, 14, 14, 0.078125, 0.921875, 0.078125, 0.921875)
GameCooltip:AddIcon ([[Interface\AddOns\Details\images\key_shift]], 1, 2, Details.tooltip_key_size_width, Details.tooltip_key_size_height, 0, 1, 0, 0.640625, Details.tooltip_key_overlay2)
Details:AddTooltipHeaderStatusbar (1, 1, 1, 0.5)
@@ -661,7 +661,7 @@ end
local lineHeight = Details.tooltip.line_height
for index, t in ipairs(Targets) do
GameCooltip:AddLine (Details:GetOnlyName(t[1]), Details:ToK(t[2]) .. " (" .. format ("%.1f", t[2]/total*100) .. "%)")
GameCooltip:AddLine(Details:GetOnlyName(t[1]), Details:ToK(t[2]) .. " (" .. format ("%.1f", t[2]/total*100) .. "%)")
local class, _, _, _, _, r, g, b = Details:GetClass (t[1])
GameCooltip:AddStatusBar (t[2]/top*100, 1, r, g, b, 0.8, false, byspell_tooltip_background)
@@ -681,7 +681,7 @@ end
end
end
GameCooltip:AddLine (" ")
GameCooltip:AddLine(" ")
Details:AddTooltipReportLineText()
GameCooltip:SetOption("YSpacingMod", 0)
@@ -710,7 +710,7 @@ end
local from_spell = @SPELLID@
local from_spellname
if (from_spell) then
from_spellname = select (1, GetSpellInfo(from_spell))
from_spellname = select(1, GetSpellInfo(from_spell))
end
--get a list of all damage actors
@@ -759,7 +759,7 @@ end
for playername, ff_table in pairs(character.friendlyfire) do
for spellid, amount in pairs(ff_table.spells) do
local spellname = select (1, GetSpellInfo(spellid))
local spellname = select(1, GetSpellInfo(spellid))
if (spellname == from_spellname) then
local damage_actor = combat (1, playername)
local heal_actor = combat (2, playername)
@@ -823,7 +823,7 @@ end
if (not is_custom_spell) then
for spellid, spell in pairs(character.spells._ActorTable) do
if (spellid ~= from_spell) then
local spellname = select (1, GetSpellInfo(spellid))
local spellname = select(1, GetSpellInfo(spellid))
if (spellname == from_spellname) then
for targetname, amount in pairs(spell.targets) do
@@ -876,7 +876,7 @@ end
local custom_name = spellname .. " - " .. Loc ["STRING_CUSTOM_DTBS"] .. ""
--check if already exists
for index, CustomObject in _ipairs(Details.custom) do
for index, CustomObject in ipairs(Details.custom) do
if (CustomObject:GetName() == custom_name) then
--fix for not saving funcs on logout
if (not CustomObject.OnSwitchShow) then
@@ -907,13 +907,13 @@ end
new_custom_object.script = new_code
tinsert(Details.custom, new_custom_object)
setmetatable (new_custom_object, Details.atributo_custom)
setmetatable(new_custom_object, Details.atributo_custom)
new_custom_object.__index = Details.atributo_custom
return instance:TrocaTabela(instance.segmento, 5, #Details.custom)
end
local DTBS_format_name = function(player_name) return Details:GetOnlyName (player_name) end
local DTBS_format_name = function(player_name) return Details:GetOnlyName(player_name) end
local DTBS_format_amount = function(amount) return Details:ToK(amount) .. " (" .. format ("%.1f", amount / bs_tooltip_table.damage_total * 100) .. "%)" end
function atributo_damage:ReportSingleDTBSLine (spell, instance, ShiftKeyDown, ControlKeyDown)
@@ -937,7 +937,7 @@ end
local thisLine = instance.barras [whichRowLine] --pega a referncia da barra na janela
if (not thisLine) then
print ("DEBUG: problema com <instance.thisLine> "..whichRowLine .. " " .. colocacao)
print("DEBUG: problema com <instance.thisLine> "..whichRowLine .. " " .. colocacao)
return
end
@@ -950,7 +950,7 @@ end
thisLine.colocacao = colocacao
if (not _getmetatable (tabela)) then
_setmetatable (tabela, {__call = RefreshBarraBySpell})
_setmetatable(tabela, {__call = RefreshBarraBySpell})
tabela._custom = true
end
@@ -1081,7 +1081,7 @@ end
for i = 1, math.min (min, #damage_taken_table) do
local t = damage_taken_table [i]
GameCooltip:AddLine (Details:GetOnlyName (t[1]), FormatTooltipNumber (_, t[2]) .. " (" .. format ("%.1f", t[2] / total * 100) .. "%)")
GameCooltip:AddLine(Details:GetOnlyName(t[1]), FormatTooltipNumber (_, t[2]) .. " (" .. format ("%.1f", t[2] / total * 100) .. "%)")
local classe = t[3]
if (not classe) then
classe = "UNKNOW"
@@ -1104,11 +1104,11 @@ end
GameCooltip:AddStatusBar (t[2] / top * 100, 1, r, g, b, 1, false, enemies_background)
end
else
GameCooltip:AddLine (Loc ["STRING_NO_DATA"], nil, 1, "white")
GameCooltip:AddLine(Loc ["STRING_NO_DATA"], nil, 1, "white")
GameCooltip:AddIcon (instancia.row_info.icon_file, nil, nil, 14, 14, unpack(Details.class_coords ["UNKNOW"]))
end
GameCooltip:AddLine (" ")
GameCooltip:AddLine(" ")
Details:AddTooltipReportLineText()
GameCooltip:SetOption("StatusBarTexture", "Interface\\AddOns\\Details\\images\\bar_serenity")
@@ -1126,7 +1126,7 @@ end
local thisLine = instancia.barras [whichRowLine] --pega a referncia da barra na janela
if (not thisLine) then
print ("DEBUG: problema com <instancia.thisLine> "..whichRowLine.." "..rank)
print("DEBUG: problema com <instancia.thisLine> "..whichRowLine.." "..rank)
return
end
@@ -1139,7 +1139,7 @@ end
thisLine.colocacao = colocacao
if (not _getmetatable (tabela)) then
_setmetatable (tabela, {__call = RefreshBarraFrags})
_setmetatable(tabela, {__call = RefreshBarraFrags})
tabela._custom = true
end
@@ -1295,7 +1295,7 @@ end
local value, top, total, combat, instance, custom_actor = ...
local uptime = custom_actor.uptime or 0
local minutos, segundos = floor (uptime / 60), floor (uptime % 60)
local minutos, segundos = floor(uptime / 60), floor(uptime % 60)
if (minutos > 0) then
uptime = "" .. minutos .. "m " .. segundos .. "s" .. ""
else
@@ -1313,7 +1313,7 @@ end
local custom_name = spellname .. " - " .. Loc ["STRING_ATTRIBUTE_DAMAGE_DEBUFFS_REPORT"] .. ""
--check if already exists
for index, CustomObject in _ipairs(Details.custom) do
for index, CustomObject in ipairs(Details.custom) do
if (CustomObject:GetName() == custom_name) then
--fix for not saving funcs on logout
if (not CustomObject.OnSwitchShow) then
@@ -1349,7 +1349,7 @@ end
new_custom_object.total_script = new_total_code
tinsert(Details.custom, new_custom_object)
setmetatable (new_custom_object, Details.atributo_custom)
setmetatable(new_custom_object, Details.atributo_custom)
new_custom_object.__index = Details.atributo_custom
return instance:TrocaTabela(instance.segmento, 5, #Details.custom)
@@ -1372,8 +1372,8 @@ end
local t = {}
for index, void_table in ipairs(tooltip_void_zone_temp) do
--ir reportar dano zero tambm
if (void_table[1] and type (void_table[1]) == "string" and void_table[2] and void_table[3] and type (void_table[3]) == "table") then
local actor_table = {Details:GetOnlyName (void_table[1])}
if (void_table[1] and type(void_table[1]) == "string" and void_table[2] and void_table[3] and type(void_table[3]) == "table") then
local actor_table = {Details:GetOnlyName(void_table[1])}
local m, s = _math_floor(void_table[3].uptime / 60), _math_floor(void_table[3].uptime % 60)
if (m > 0) then
actor_table [2] = FormatTooltipNumber (_, void_table[3].damage) .. " (" .. m .. "m " .. s .. "s" .. ")"
@@ -1480,7 +1480,7 @@ end
local lineHeight = Details.tooltip.line_height
for index, t in _ipairs(tooltip_void_zone_temp) do
for index, t in ipairs(tooltip_void_zone_temp) do
if (t[3] == 0) then
break
@@ -1490,9 +1490,9 @@ end
local minutos, segundos = _math_floor(debuff_table.uptime / 60), _math_floor(debuff_table.uptime % 60)
if (minutos > 0) then
GameCooltip:AddLine (Details:GetOnlyName (t[1]), FormatTooltipNumber (_, debuff_table.damage) .. " (" .. minutos .. "m " .. segundos .. "s" .. ")")
GameCooltip:AddLine(Details:GetOnlyName(t[1]), FormatTooltipNumber (_, debuff_table.damage) .. " (" .. minutos .. "m " .. segundos .. "s" .. ")")
else
GameCooltip:AddLine (Details:GetOnlyName (t[1]), FormatTooltipNumber (_, debuff_table.damage) .. " (" .. segundos .. "s" .. ")")
GameCooltip:AddLine(Details:GetOnlyName(t[1]), FormatTooltipNumber (_, debuff_table.damage) .. " (" .. segundos .. "s" .. ")")
end
local classe = Details:GetClass (t[1])
@@ -1517,7 +1517,7 @@ end
end
GameCooltip:AddLine (" ")
GameCooltip:AddLine(" ")
Details:AddTooltipReportLineText()
GameCooltip:SetOption("StatusBarTexture", "Interface\\AddOns\\Details\\images\\bar_serenity")
@@ -1536,7 +1536,7 @@ end
local thisLine = instancia.barras [whichRowLine]
if (not thisLine) then
print ("DEBUG: problema com <instancia.thisLine> "..whichRowLine.." "..rank)
print("DEBUG: problema com <instancia.thisLine> "..whichRowLine.." "..rank)
return
end
@@ -1560,10 +1560,10 @@ end
local porcentagem
if (instancia.row_info.percent_type == 1) then
total = max (total, 0.0001)
total = max(total, 0.0001)
porcentagem = format ("%.1f", self.damage / total * 100)
elseif (instancia.row_info.percent_type == 2) then
local top = max (instancia.top, 0.0001)
local top = max(instancia.top, 0.0001)
porcentagem = format ("%.1f", self.damage / top * 100)
end
@@ -1657,7 +1657,7 @@ function atributo_damage:RefreshWindow (instancia, combatObject, forcar, exporta
--pega qual a sub key que ser usada --sub keys
if (exportar) then
if (_type(exportar) == "boolean") then
if (type(exportar) == "boolean") then
if (subAttribute == 1) then --DAMAGE DONE
keyName = "total"
@@ -1839,10 +1839,10 @@ function atributo_damage:RefreshWindow (instancia, combatObject, forcar, exporta
if (this_spell) then
this_spell [1] = spellid
this_spell [2] = 0
this_spell [3] = spell.spellschool or Details.spell_school_cache [select (1, GetSpellInfo(spellid))] or 1
this_spell [3] = spell.spellschool or Details.spell_school_cache [select(1, GetSpellInfo(spellid))] or 1
bs_index_table [spellname] = bs_index
else
this_spell = {spellid, 0, spell.spellschool or Details.spell_school_cache [select (1, GetSpellInfo(spellid))] or 1}
this_spell = {spellid, 0, spell.spellschool or Details.spell_school_cache [select(1, GetSpellInfo(spellid))] or 1}
bs_table [bs_index] = this_spell
bs_index_table [spellname] = bs_index
end
@@ -1874,10 +1874,10 @@ function atributo_damage:RefreshWindow (instancia, combatObject, forcar, exporta
if (this_spell) then
this_spell [1] = spellid
this_spell [2] = 0
this_spell [3] = Details.spell_school_cache [select (1, GetSpellInfo(spellid))] or 1
this_spell [3] = Details.spell_school_cache [select(1, GetSpellInfo(spellid))] or 1
bs_index_table [spellname] = bs_index
else
this_spell = {spellid, 0, Details.spell_school_cache [select (1, GetSpellInfo(spellid))] or 1}
this_spell = {spellid, 0, Details.spell_school_cache [select(1, GetSpellInfo(spellid))] or 1}
bs_table [bs_index] = this_spell
bs_index_table [spellname] = bs_index
end
@@ -1932,7 +1932,7 @@ function atributo_damage:RefreshWindow (instancia, combatObject, forcar, exporta
local whichRowLine = 1
local lineContainer = instancia.barras
--print (bs_index, #bs_table, instancia.barraS[1], instancia.barraS[2])
--print(bs_index, #bs_table, instancia.barraS[1], instancia.barraS[2])
for i = instancia.barraS[1], instancia.barraS[2], 1 do
atributo_damage:AtualizarBySpell (bs_table[i], whichRowLine, i, instancia)
@@ -1947,7 +1947,7 @@ function atributo_damage:RefreshWindow (instancia, combatObject, forcar, exporta
local misc_container = combatObject [4]
local voidzone_damage_total = 0
for _, actor in _ipairs(misc_container._ActorTable) do
for _, actor in ipairs(misc_container._ActorTable) do
if (actor.boss_debuff) then
index = index + 1
@@ -2076,7 +2076,7 @@ function atributo_damage:RefreshWindow (instancia, combatObject, forcar, exporta
elseif (windowMode == modo_ALL) then --mostrando ALL
--faz o sort da categoria e retorna o amount corrigido
--print (keyName)
--print(keyName)
if (subAttribute == 2) then
local combat_time = instancia.showing:GetCombatTime()
total = atributo_damage:ContainerRefreshDps (actorTableContent, combat_time)
@@ -2141,7 +2141,7 @@ function atributo_damage:RefreshWindow (instancia, combatObject, forcar, exporta
end
--
if (not isUsingCache) then
for index, player in _ipairs(actorTableContent) do
for index, player in ipairs(actorTableContent) do
if (player.grupo) then -- um player e esta em grupo
if (player[keyName] < 1) then --dano menor que 1, interromper o loop
amount = index - 1
@@ -2212,7 +2212,7 @@ function atributo_damage:RefreshWindow (instancia, combatObject, forcar, exporta
if (following) then
if (isUsingCache) then
local pname = Details.playername
for i, actor in _ipairs(actorTableContent) do
for i, actor in ipairs(actorTableContent) do
if (actor.nome == pname) then
myPos = i
break
@@ -2376,7 +2376,7 @@ function atributo_damage:RefreshWindow (instancia, combatObject, forcar, exporta
end
end
else
-- /run print (Details:GetInstance(1).barraS[2]) -- vai do 5 ao 1 -- qual barra comea no 1 -- i = 5 at 1 -- player 5 atualiza na barra 1 / player 1 atualiza na barra 5
-- /run print(Details:GetInstance(1).barraS[2]) -- vai do 5 ao 1 -- qual barra comea no 1 -- i = 5 at 1 -- player 5 atualiza na barra 1 / player 1 atualiza na barra 5
for i = instancia.barraS[2], instancia.barraS[1], -1 do
if (actorTableContent[i]) then
actorTableContent[i]:RefreshLine(instancia, lineContainer, whichRowLine, i, total, subAttribute, forcar, keyName, combatTime, percentageType, useAnimations, barsShowData, barsBrackets, barsSeparator)
@@ -2582,7 +2582,7 @@ function atributo_damage:RefreshLine(instance, lineContainer, whichRowLine, rank
local thisLine = lineContainer[whichRowLine]
if (not thisLine) then
print ("DEBUG: problema com <instance.thisLine> "..whichRowLine.." "..rank)
print("DEBUG: problema com <instance.thisLine> "..whichRowLine.." "..rank)
return
end
@@ -2687,7 +2687,7 @@ function atributo_damage:RefreshLine(instance, lineContainer, whichRowLine, rank
if (diff_from_topdps) then
local threshold = diff_from_topdps / instance.player_top_dps_threshold * 100
if (threshold < 100) then
threshold = _math_abs (threshold - 100)
threshold = abs(threshold - 100)
else
threshold = 5
end
@@ -3153,7 +3153,7 @@ function atributo_damage:ToolTip_DamageDone (instancia, numero, barra, keydown)
r, g, b = unpack(Details.class_colors [owner.classe])
else
if (not Details.class_colors [self.classe]) then
return print ("Details!: error class not found:", self.classe, "for", self.nome)
return print("Details!: error class not found:", self.classe, "for", self.nome)
end
r, g, b = unpack(Details.class_colors [self.classe])
end
@@ -3194,7 +3194,7 @@ function atributo_damage:ToolTip_DamageDone (instancia, numero, barra, keydown)
end
--add actor pets
for petIndex, petName in _ipairs(self:Pets()) do
for petIndex, petName in ipairs(self:Pets()) do
local petActor = instancia.showing[class_type]:PegarCombatente (nil, petName)
if (petActor) then
for _spellid, _skill in _pairs(petActor:GetActorSpells()) do
@@ -3265,16 +3265,16 @@ function atributo_damage:ToolTip_DamageDone (instancia, numero, barra, keydown)
end
if (instancia.sub_atributo == 1 or instancia.sub_atributo == 6) then
GameCooltip:AddLine (nome_magia, FormatTooltipNumber (_, totalDamage) .." ("..percent.."%)")
GameCooltip:AddLine(nome_magia, FormatTooltipNumber (_, totalDamage) .." ("..percent.."%)")
else
GameCooltip:AddLine (nome_magia, FormatTooltipNumber (_, _math_floor(totalDPS)) .." ("..percent.."%)")
GameCooltip:AddLine(nome_magia, FormatTooltipNumber (_, _math_floor(totalDPS)) .." ("..percent.."%)")
end
GameCooltip:AddIcon (icone_magia, nil, nil, icon_size.W + 4, icon_size.H + 4, icon_border.L, icon_border.R, icon_border.T, icon_border.B)
Details:AddTooltipBackgroundStatusbar (false, totalDamage/topAbility*100)
end
else
GameCooltip:AddLine (Loc ["STRING_NO_SPELL"])
GameCooltip:AddLine(Loc ["STRING_NO_SPELL"])
end
--spell reflected
@@ -3291,7 +3291,7 @@ function atributo_damage:ToolTip_DamageDone (instancia, numero, barra, keydown)
local spellName, _, spellIcon = _GetSpellInfo(spellId)
if (spellName) then
GameCooltip:AddLine (spellName, FormatTooltipNumber (_, damageDone) .. " (" .. _math_floor(damageDone / self.total * 100) .. "%)")
GameCooltip:AddLine(spellName, FormatTooltipNumber (_, damageDone) .. " (" .. _math_floor(damageDone / self.total * 100) .. "%)")
Details:AddTooltipBackgroundStatusbar (false, damageDone / self.total * 100)
GameCooltip:AddIcon (spellIcon, 1, 1, icon_size.W, icon_size.H, 0.1, 0.9, 0.1, 0.9)
end
@@ -3326,7 +3326,7 @@ function atributo_damage:ToolTip_DamageDone (instancia, numero, barra, keydown)
for i = 1, _math_min(max_targets, #ActorTargetsSortTable) do
local este_inimigo = ActorTargetsSortTable [i]
GameCooltip:AddLine (este_inimigo[1], FormatTooltipNumber (_, este_inimigo[2]) .." ("..format("%.1f", este_inimigo[2]/ActorDamageWithPet*100).."%)")
GameCooltip:AddLine(este_inimigo[1], FormatTooltipNumber (_, este_inimigo[2]) .." ("..format("%.1f", este_inimigo[2]/ActorDamageWithPet*100).."%)")
GameCooltip:AddIcon ([[Interface\PetBattles\PetBattle-StatIcons]], nil, nil, icon_size.W, icon_size.H, 0, 0.5, 0, 0.5, {.7, .7, .7, 1}, nil, true)
Details:AddTooltipBackgroundStatusbar (false, este_inimigo[2] / topEnemy * 100)
end
@@ -3345,7 +3345,7 @@ function atributo_damage:ToolTip_DamageDone (instancia, numero, barra, keydown)
--small blank space
Details:AddTooltipSpellHeaderText ("", headerColor, 1, false, 0.1, 0.9, 0.1, 0.9, true)
for index, nome in _ipairs(meus_pets) do
for index, nome in ipairs(meus_pets) do
if (not quantidade [nome]) then
quantidade [nome] = 1
@@ -3385,8 +3385,8 @@ function atributo_damage:ToolTip_DamageDone (instancia, numero, barra, keydown)
end
end
--GameTooltip:AddLine (" ")
--GameCooltip:AddLine (" ")
--GameTooltip:AddLine(" ")
--GameCooltip:AddLine(" ")
local _quantidade = 0
local added_logo = false
@@ -3399,7 +3399,7 @@ function atributo_damage:ToolTip_DamageDone (instancia, numero, barra, keydown)
end
local topPet = totais [1] and totais [1][2] or 0
for index, _table in _ipairs(totais) do
for index, _table in ipairs(totais) do
if (_table [2] > 0 and (index <= Details.tooltip.tooltip_max_pets or ismaximized)) then
@@ -3420,9 +3420,9 @@ function atributo_damage:ToolTip_DamageDone (instancia, numero, barra, keydown)
local n = _table [1]:gsub (("%s%<.*"), "")
if (instancia.sub_atributo == 1) then
GameCooltip:AddLine (n, FormatTooltipNumber (_, _table [2]) .. " (" .. _math_floor(_table [2]/self.total*100) .. "%)")
GameCooltip:AddLine(n, FormatTooltipNumber (_, _table [2]) .. " (" .. _math_floor(_table [2]/self.total*100) .. "%)")
else
GameCooltip:AddLine (n, FormatTooltipNumber (_, _math_floor(_table [3])) .. " (" .. _math_floor(_table [2]/self.total*100) .. "%)")
GameCooltip:AddLine(n, FormatTooltipNumber (_, _math_floor(_table [3])) .. " (" .. _math_floor(_table [2]/self.total*100) .. "%)")
end
Details:AddTooltipBackgroundStatusbar (false, _table [2] / topPet * 100)
@@ -3474,7 +3474,7 @@ function atributo_damage:ToolTip_DamageDone (instancia, numero, barra, keydown)
for i = 1, #playerPhases do
--[1] Phase Number [2] Amount Done [3] Rank [4] Percent
GameCooltip:AddLine ("|cFFF0F0F0Phase|r " .. playerPhases [i][1], FormatTooltipNumber (_, playerPhases [i][2]) .. " (|cFFFFFF00#" .. playerPhases [i][3] .. "|r, " .. format ("%.1f", playerPhases [i][4]) .. "%)")
GameCooltip:AddLine("|cFFF0F0F0Phase|r " .. playerPhases [i][1], FormatTooltipNumber (_, playerPhases [i][2]) .. " (|cFFFFFF00#" .. playerPhases [i][3] .. "|r, " .. format ("%.1f", playerPhases [i][4]) .. "%)")
GameCooltip:AddIcon ([[Interface\Garrison\orderhall-missions-mechanic9]], 1, 1, 14, 14, 11/64, 53/64, 11/64, 53/64)
Details:AddTooltipBackgroundStatusbar()
end
@@ -3495,7 +3495,7 @@ local on_switch_show_frags = function(instance)
return true
end
local ENEMIES_format_name = function(player) if (player == 0) then return false end return Details:GetOnlyName (player.nome) end
local ENEMIES_format_name = function(player) if (player == 0) then return false end return Details:GetOnlyName(player.nome) end
local ENEMIES_format_amount = function(amount) if (amount <= 0) then return false end return Details:ToK(amount) .. " (" .. format ("%.1f", amount / tooltip_temp_table.damage_total * 100) .. "%)" end
function atributo_damage:ReportEnemyDamageTaken (actor, instance, ShiftKeyDown, ControlKeyDown, fromFrags)
@@ -3504,7 +3504,7 @@ function atributo_damage:ReportEnemyDamageTaken (actor, instance, ShiftKeyDown,
local custom_name = inimigo .. " -" .. Loc ["STRING_CUSTOM_ENEMY_DT"]
--procura se j tem um custom:
for index, CustomObject in _ipairs(Details.custom) do
for index, CustomObject in ipairs(Details.custom) do
if (CustomObject:GetName() == custom_name) then
--fix for not saving funcs on logout
if (not CustomObject.OnSwitchShow) then
@@ -3530,7 +3530,7 @@ function atributo_damage:ReportEnemyDamageTaken (actor, instance, ShiftKeyDown,
}
tinsert(Details.custom, new_custom_object)
setmetatable (new_custom_object, Details.atributo_custom)
setmetatable(new_custom_object, Details.atributo_custom)
new_custom_object.__index = Details.atributo_custom
return instance:TrocaTabela(instance.segmento, 5, #Details.custom)
@@ -3543,7 +3543,7 @@ function atributo_damage:ReportEnemyDamageTaken (actor, instance, ShiftKeyDown,
return Details:Reportar (report_table, {_no_current = true, _no_inverse = true, _custom = true})
end
local FRAGS_format_name = function(player_name) return Details:GetOnlyName (player_name) end
local FRAGS_format_name = function(player_name) return Details:GetOnlyName(player_name) end
local FRAGS_format_amount = function(amount) return Details:ToK(amount) .. " (" .. format ("%.1f", amount / frags_tooltip_table.damage_total * 100) .. "%)" end
function atributo_damage:ReportSingleFragsLine (frag, instance, ShiftKeyDown, ControlKeyDown)
@@ -3574,7 +3574,7 @@ function atributo_damage:ToolTip_Enemies (instancia, numero, barra, keydown)
--enemy damage taken
local i = 1
local damage_taken = 0
for _, actor in _ipairs(combat[1]._ActorTable) do
for _, actor in ipairs(combat[1]._ActorTable) do
if (actor.grupo and actor.targets [self.nome]) then
local t = tooltip_temp_table [i]
if (not t) then
@@ -3612,9 +3612,9 @@ function atributo_damage:ToolTip_Enemies (instancia, numero, barra, keydown)
local player = tooltip_temp_table [o][1]
local total = tooltip_temp_table [o][2]
local player_name = Details:GetOnlyName (player:name())
local player_name = Details:GetOnlyName(player:name())
GameCooltip:AddLine (player_name .. " ", FormatTooltipNumber (_, total) .." (" .. format ("%.1f", (total / damage_taken) * 100) .. "%)")
GameCooltip:AddLine(player_name .. " ", FormatTooltipNumber (_, total) .." (" .. format ("%.1f", (total / damage_taken) * 100) .. "%)")
local classe = player:class()
if (not classe) then
@@ -3640,22 +3640,22 @@ function atributo_damage:ToolTip_Enemies (instancia, numero, barra, keydown)
GameCooltip:SetOption("StatusBarTexture", "Interface\\AddOns\\Details\\images\\bar_serenity")
--damage done and heal
GameCooltip:AddLine (" ")
GameCooltip:AddLine (Loc ["STRING_ATTRIBUTE_DAMAGE_ENEMIES_DONE"], FormatTooltipNumber (_, _math_floor(self.total)))
GameCooltip:AddLine(" ")
GameCooltip:AddLine(Loc ["STRING_ATTRIBUTE_DAMAGE_ENEMIES_DONE"], FormatTooltipNumber (_, _math_floor(self.total)))
local half = 0.00048828125
GameCooltip:AddIcon (instancia:GetSkinTexture(), 1, 1, 14, 14, 0.005859375 + half, 0.025390625 - half, 0.3623046875, 0.3818359375)
GameCooltip:AddStatusBar (0, 1, r, g, b, 1, false, enemies_background)
local heal_actor = instancia.showing (2, self.nome)
if (heal_actor) then
GameCooltip:AddLine (Loc ["STRING_ATTRIBUTE_HEAL_ENEMY"], FormatTooltipNumber (_, _math_floor(heal_actor.heal_enemy_amt)))
GameCooltip:AddLine(Loc ["STRING_ATTRIBUTE_HEAL_ENEMY"], FormatTooltipNumber (_, _math_floor(heal_actor.heal_enemy_amt)))
else
GameCooltip:AddLine (Loc ["STRING_ATTRIBUTE_HEAL_ENEMY"], 0)
GameCooltip:AddLine(Loc ["STRING_ATTRIBUTE_HEAL_ENEMY"], 0)
end
GameCooltip:AddIcon (instancia:GetSkinTexture(), 1, 1, 14, 14, 0.037109375 + half, 0.056640625 - half, 0.3623046875, 0.3818359375)
GameCooltip:AddStatusBar (0, 1, r, g, b, 1, false, enemies_background)
GameCooltip:AddLine (" ")
GameCooltip:AddLine(" ")
Details:AddTooltipReportLineText()
GameCooltip:SetOption("YSpacingMod", 0)
@@ -3682,7 +3682,7 @@ function atributo_damage:ToolTip_DamageTaken (instancia, numero, barra, keydown)
local meus_agressores = {}
if (instancia.sub_atributo == 6) then
for _, actor in _ipairs(showing._ActorTable) do
for _, actor in ipairs(showing._ActorTable) do
if (actor.grupo and actor.targets [self.nome]) then
meus_agressores [#meus_agressores+1] = {actor.nome, actor.targets [self.nome], actor.classe, actor}
end
@@ -3790,19 +3790,19 @@ function atributo_damage:ToolTip_DamageTaken (instancia, numero, barra, keydown)
end
end
for _, spell in _ipairs(all_spells) do
for _, spell in ipairs(all_spells) do
local spellname, _, spellicon = _GetSpellInfo(spell [1])
GameCooltip:AddLine (spellname .. " (|cFFFFFF00" .. spell [3] .. "|r)", FormatTooltipNumber (_, spell [2]).." (" .. format ("%.1f", (spell [2] / damage_taken) * 100).."%)")
GameCooltip:AddLine(spellname .. " (|cFFFFFF00" .. spell [3] .. "|r)", FormatTooltipNumber (_, spell [2]).." (" .. format ("%.1f", (spell [2] / damage_taken) * 100).."%)")
GameCooltip:AddIcon (spellicon, 1, 1, icon_size.W, icon_size.H, icon_border.L, icon_border.R, icon_border.T, icon_border.B)
Details:AddTooltipBackgroundStatusbar()
end
else
local aggressorName = Details:GetOnlyName (meus_agressores[i][1])
local aggressorName = Details:GetOnlyName(meus_agressores[i][1])
if (ismaximized and meus_agressores[i][1]:find (Details.playername)) then
GameCooltip:AddLine (aggressorName, FormatTooltipNumber (_, meus_agressores[i][2]).." ("..format("%.1f", (meus_agressores[i][2]/damage_taken) * 100).."%)", nil, "yellow")
GameCooltip:AddLine(aggressorName, FormatTooltipNumber (_, meus_agressores[i][2]).." ("..format("%.1f", (meus_agressores[i][2]/damage_taken) * 100).."%)", nil, "yellow")
else
GameCooltip:AddLine (aggressorName, FormatTooltipNumber (_, meus_agressores[i][2]).." ("..format("%.1f", (meus_agressores[i][2]/damage_taken) * 100).."%)")
GameCooltip:AddLine(aggressorName, FormatTooltipNumber (_, meus_agressores[i][2]).." ("..format("%.1f", (meus_agressores[i][2]/damage_taken) * 100).."%)")
end
local classe = meus_agressores[i][3]
@@ -3821,17 +3821,17 @@ function atributo_damage:ToolTip_DamageTaken (instancia, numero, barra, keydown)
if (instancia.sub_atributo == 6) then
GameCooltip:AddLine (" ")
GameCooltip:AddLine (Loc ["STRING_ATTRIBUTE_DAMAGE_DONE"], FormatTooltipNumber (_, _math_floor(self.total)))
GameCooltip:AddLine(" ")
GameCooltip:AddLine(Loc ["STRING_ATTRIBUTE_DAMAGE_DONE"], FormatTooltipNumber (_, _math_floor(self.total)))
local half = 0.00048828125
GameCooltip:AddIcon (instancia:GetSkinTexture(), 1, 1, icon_size.W, icon_size.H, 0.005859375 + half, 0.025390625 - half, 0.3623046875, 0.3818359375)
Details:AddTooltipBackgroundStatusbar()
local heal_actor = instancia.showing (2, self.nome)
if (heal_actor) then
GameCooltip:AddLine (Loc ["STRING_ATTRIBUTE_HEAL_DONE"], FormatTooltipNumber (_, _math_floor(heal_actor.heal_enemy_amt)))
GameCooltip:AddLine(Loc ["STRING_ATTRIBUTE_HEAL_DONE"], FormatTooltipNumber (_, _math_floor(heal_actor.heal_enemy_amt)))
else
GameCooltip:AddLine (Loc ["STRING_ATTRIBUTE_HEAL_DONE"], 0)
GameCooltip:AddLine(Loc ["STRING_ATTRIBUTE_HEAL_DONE"], 0)
end
GameCooltip:AddIcon (instancia:GetSkinTexture(), 1, 1, icon_size.W, icon_size.H, 0.037109375 + half, 0.056640625 - half, 0.3623046875, 0.3818359375)
Details:AddTooltipBackgroundStatusbar()
@@ -3900,7 +3900,7 @@ function atributo_damage:ToolTip_FriendlyFire (instancia, numero, barra, keydown
classe = "UNKNOW"
end
GameCooltip:AddLine (Details:GetOnlyName (DamagedPlayers[i][1]), FormatTooltipNumber (_, DamagedPlayers[i][2]).." ("..format("%.1f", DamagedPlayers[i][2]/FriendlyFireTotal*100).."%)")
GameCooltip:AddLine(Details:GetOnlyName(DamagedPlayers[i][1]), FormatTooltipNumber (_, DamagedPlayers[i][2]).." ("..format("%.1f", DamagedPlayers[i][2]/FriendlyFireTotal*100).."%)")
GameCooltip:AddIcon ("Interface\\AddOns\\Details\\images\\espadas", nil, nil, lineHeight, lineHeight)
Details:AddTooltipBackgroundStatusbar()
@@ -3944,7 +3944,7 @@ function atributo_damage:ToolTip_FriendlyFire (instancia, numero, barra, keydown
for i = 1, _math_min(max_abilities2, #SpellsInOrder) do
local nome, _, icone = _GetSpellInfo(SpellsInOrder[i][1])
GameCooltip:AddLine (nome, FormatTooltipNumber (_, SpellsInOrder[i][2]).." ("..format("%.1f", SpellsInOrder[i][2]/FriendlyFireTotal*100).."%)")
GameCooltip:AddLine(nome, FormatTooltipNumber (_, SpellsInOrder[i][2]).." ("..format("%.1f", SpellsInOrder[i][2]/FriendlyFireTotal*100).."%)")
GameCooltip:AddIcon (icone, nil, nil, icon_size.W, icon_size.H, icon_border.L, icon_border.R, icon_border.T, icon_border.B)
Details:AddTooltipBackgroundStatusbar()
end
@@ -4018,7 +4018,7 @@ function atributo_damage:MontaInfoFriendlyFire()
local FirstPlaceDamage = DamagedPlayers [1] and DamagedPlayers [1][2] or 0
for index, tabela in _ipairs(DamagedPlayers) do
for index, tabela in ipairs(DamagedPlayers) do
local barra = barras [index]
if (not barra) then
@@ -4039,7 +4039,7 @@ function atributo_damage:MontaInfoFriendlyFire()
else
if (barra.on_focus) then
barra.textura:SetStatusBarColor (1, 1, 1, 1) --volta a cor antiga
barra:SetAlpha (.9) --volta a alfa antiga
barra:SetAlpha(.9) --volta a alfa antiga
barra.on_focus = false
end
end
@@ -4051,7 +4051,7 @@ function atributo_damage:MontaInfoFriendlyFire()
barra.textura:SetValue(tabela[2]/FirstPlaceDamage*100)
end
barra.lineText1:SetText(index .. instancia.divisores.colocacao .. Details:GetOnlyName (tabela[1])) --seta o texto da esqueda
barra.lineText1:SetText(index .. instancia.divisores.colocacao .. Details:GetOnlyName(tabela[1])) --seta o texto da esqueda
barra.lineText4:SetText(Details:comma_value (tabela[2]) .. " (" .. format ("%.1f", tabela[3]) .."%)") --seta o texto da direita
local classe = tabela[4]
@@ -4100,7 +4100,7 @@ function atributo_damage:MontaInfoFriendlyFire()
FirstPlaceDamage = SkillTable [1] and SkillTable [1][2] or 0
for index, tabela in _ipairs(SkillTable) do
for index, tabela in ipairs(SkillTable) do
local barra = barras2 [index]
if (not barra) then
@@ -4162,7 +4162,7 @@ function atributo_damage:MontaInfoDamageTaken()
local max_ = meus_agressores [1] and meus_agressores [1][2] or 0
local barra
for index, tabela in _ipairs(meus_agressores) do
for index, tabela in ipairs(meus_agressores) do
barra = barras [index]
if (not barra) then
barra = gump:CriaNovaBarraInfo1 (instancia, index)
@@ -4280,7 +4280,7 @@ end
else
if (row.on_focus) then
row.textura:SetStatusBarColor (1, 1, 1, 1) --volta a cor antiga
row:SetAlpha (.9) --volta a alfa antiga
row:SetAlpha(.9) --volta a alfa antiga
row.on_focus = false
end
end
@@ -4343,7 +4343,7 @@ function atributo_damage:MontaInfoDamageDone()
--local class_color = RAID_CLASS_COLORS [self.classe] and RAID_CLASS_COLORS [self.classe].colorStr
local class_color = "FFCCBBBB"
--local class_color = "FFDDDD44"
for _, PetName in _ipairs(ActorPets) do
for _, PetName in ipairs(ActorPets) do
local PetActor = instancia.showing (class_type, PetName)
if (PetActor) then
local PetSkillsContainer = PetActor.spells._ActorTable
@@ -4376,7 +4376,7 @@ function atributo_damage:MontaInfoDamageDone()
end
--spell bars
for index, tabela in _ipairs(ActorSkillsSortTable) do
for index, tabela in ipairs(ActorSkillsSortTable) do
--index = index + 1 --with the aura bar
index = index
@@ -4435,7 +4435,7 @@ function atributo_damage:MontaInfoDamageDone()
local max_ = meus_agressores[1] and meus_agressores[1][2] or 0 --dano que a primeiro magia vez
local barra
for index, tabela in _ipairs(meus_agressores) do
for index, tabela in ipairs(meus_agressores) do
barra = barras [index]
if (not barra) then --se a barra no existir, criar ela ento
@@ -4449,7 +4449,7 @@ function atributo_damage:MontaInfoDamageDone()
barra.textura:SetValue(tabela[2]/max_*100)
end
barra.lineText1:SetText(index .. ". " .. Details:GetOnlyName (tabela[1])) --seta o texto da esqueda
barra.lineText1:SetText(index .. ". " .. Details:GetOnlyName(tabela[1])) --seta o texto da esqueda
barra.lineText4:SetText(Details:comma_value (tabela[2]) .. " (" .. format ("%.1f", tabela[3]) .. "%)") --seta o texto da direita
barra.icone:SetTexture([[Interface\AddOns\Details\images\classes_small_alpha]]) --CLASSE
@@ -4510,7 +4510,7 @@ function atributo_damage:MontaInfoDamageDone()
local max_inimigos = meus_inimigos[1] and meus_inimigos[1][2] or 0
local barra
for index, tabela in _ipairs(meus_inimigos) do
for index, tabela in ipairs(meus_inimigos) do
barra = info.barras2 [index]
@@ -4537,7 +4537,7 @@ function atributo_damage:MontaInfoDamageDone()
barra.textura:SetStatusBarColor (1, 0.8, 0.8)
barra.textura:SetStatusBarColor (1, 1, 1, 1)
barra.lineText1:SetText(index .. ". " .. Details:GetOnlyName (tabela[1]))
barra.lineText1:SetText(index .. ". " .. Details:GetOnlyName(tabela[1]))
if (info.sub_atributo == 2) then
barra.lineText4:SetText(Details:comma_value ( _math_floor(tabela[2]/meu_tempo)) .. " (" .. format ("%.1f", tabela[3]) .. "%)")
@@ -4570,7 +4570,7 @@ end
------ Detalhe Info Friendly Fire
function atributo_damage:MontaDetalhesFriendlyFire (nome, barra)
for _, barra in _ipairs(info.barras3) do
for _, barra in ipairs(info.barras3) do
barra:Hide()
end
@@ -4600,7 +4600,7 @@ function atributo_damage:MontaDetalhesFriendlyFire (nome, barra)
local max_ = minhas_magias[1] and minhas_magias[1][2] or 0 --dano que a primeiro magia vez
local barra
for index, tabela in _ipairs(minhas_magias) do
for index, tabela in ipairs(minhas_magias) do
barra = barras [index]
if (not barra) then --se a barra no existir, criar ela ento
@@ -4632,7 +4632,7 @@ end
-- detalhes info enemies
function atributo_damage:MontaDetalhesEnemy (spellid, barra)
for _, barra in _ipairs(info.barras3) do
for _, barra in ipairs(info.barras3) do
barra:Hide()
end
@@ -4648,7 +4648,7 @@ function atributo_damage:MontaDetalhesEnemy (spellid, barra)
if (barra.lineText1:IsTruncated()) then
Details:CooltipPreset(2)
GameCooltip:SetOption("FixedWidth", nil)
GameCooltip:AddLine (barra.lineText1.text)
GameCooltip:AddLine(barra.lineText1.text)
GameCooltip:SetOwner(barra, "bottomleft", "topleft", 5, -10)
GameCooltip:ShowCooltip()
end
@@ -4675,7 +4675,7 @@ function atributo_damage:MontaDetalhesEnemy (spellid, barra)
local max_ = target_pool [1] and target_pool [1][2] or 0
local barra
for index, tabela in _ipairs(target_pool) do
for index, tabela in ipairs(target_pool) do
barra = barras [index]
if (not barra) then --se a barra no existir, criar ela ento
@@ -4689,7 +4689,7 @@ function atributo_damage:MontaDetalhesEnemy (spellid, barra)
barra.textura:SetValue(tabela[2]/max_*100) --muito mais rapido...
end
barra.lineText1:SetText(index .. ". " .. Details:GetOnlyName (tabela [1])) --seta o texto da esqueda
barra.lineText1:SetText(index .. ". " .. Details:GetOnlyName(tabela [1])) --seta o texto da esqueda
Details:name_space_info (barra)
if (spell.total > 0) then
@@ -4725,7 +4725,7 @@ end
------ Detalhe Info Damage Taken
function atributo_damage:MontaDetalhesDamageTaken (nome, barra)
for _, barra in _ipairs(info.barras3) do
for _, barra in ipairs(info.barras3) do
barra:Hide()
end
@@ -4765,7 +4765,7 @@ function atributo_damage:MontaDetalhesDamageTaken (nome, barra)
local max_ = minhas_magias[1] and minhas_magias[1][2] or 0 --dano que a primeiro magia vez
local barra
for index, tabela in _ipairs(minhas_magias) do
for index, tabela in ipairs(minhas_magias) do
barra = barras [index]
if (not barra) then --se a barra no existir, criar ela ento
@@ -4824,7 +4824,7 @@ local MontaDetalhesBuffProcs = function(actor, row, instance)
if (spec) then
local mainAuras = Details.important_auras [spec]
if (mainAuras) then
local miscActor = instance:GetShowingCombat():GetActor (4, actor:name())
local miscActor = instance:GetShowingCombat():GetActor(4, actor:name())
if (miscActor and miscActor.buff_uptime_spells) then
--get the auras
local added = 0
@@ -5044,7 +5044,7 @@ function atributo_damage:MontaDetalhesDamageDone (spellid, barra, instancia)
_table_sort(data, Details.Sort1)
for index, tabela in _ipairs(data) do
for index, tabela in ipairs(data) do
gump:SetaDetalheInfoTexto (index+1, tabela[2], tabela[3], tabela[4], tabela[5], tabela[6], tabela[7], tabela[8])
end
@@ -5060,7 +5060,7 @@ function Details:BuildPlayerDetailsSpellChart()
if (not playerDetailSmallChart) then
playerDetailSmallChart = CreateFrame("frame", "DetailsPlayerDetailSmallChart", info,"BackdropTemplate")
DetailsFramework:ApplyStandardBackdrop (playerDetailSmallChart)
DetailsFramework:ApplyStandardBackdrop(playerDetailSmallChart)
playerDetailSmallChart.Lines = {}
for i = 1, 200 do
@@ -5075,8 +5075,8 @@ function Details:BuildPlayerDetailsSpellChart()
local eventList = {}
--build the list of tokens
for i = 1, select ("#", ... ) do
local tokenId = select (i, ...)
for i = 1, select("#", ... ) do
local tokenId = select(i, ...)
tokenIdList [tokenId] = true
end
@@ -5156,11 +5156,11 @@ function atributo_damage:MontaTooltipDamageTaken (thisLine, index)
_table_sort(habilidades, Details.Sort2)
GameTooltip:AddLine (index..". "..thisLine.nome_inimigo)
GameTooltip:AddLine (Loc ["STRING_DAMAGE_TAKEN_FROM2"]..":")
GameTooltip:AddLine (" ")
GameTooltip:AddLine(index..". "..thisLine.nome_inimigo)
GameTooltip:AddLine(Loc ["STRING_DAMAGE_TAKEN_FROM2"]..":")
GameTooltip:AddLine(" ")
for index, tabela in _ipairs(habilidades) do
for index, tabela in ipairs(habilidades) do
local nome, _, icone = _GetSpellInfo(tabela[1])
if (index < 8) then
GameTooltip:AddDoubleLine (index..". |T"..icone..":0|t "..nome, Details:comma_value (tabela[2]).." ("..format("%.1f", tabela[2]/total*100).."%)", 1, 1, 1, 1, 1, 1)
@@ -5221,7 +5221,7 @@ function atributo_damage:MontaTooltipAlvos (thisLine, index, instancia)
end
--add pets
for _, PetName in _ipairs(self.pets) do
for _, PetName in ipairs(self.pets) do
local PetActor = instancia.showing (class_type, PetName)
if (PetActor) then
local PetSkillsContainer = PetActor.spells._ActorTable
@@ -5274,17 +5274,17 @@ function atributo_damage:MontaTooltipAlvos (thisLine, index, instancia)
local topSpellDamage = habilidades[1] and habilidades[1][2]
if (topSpellDamage) then
for index, tabela in _ipairs(habilidades) do
for index, tabela in ipairs(habilidades) do
if (tabela [2] < 1) then
break
end
if (is_dps) then
--GameCooltip:AddDoubleLine (index..". |T"..tabela[3]..":0|t "..tabela[1], Details:comma_value ( _math_floor(tabela[2] / meu_tempo) ).." (".._cstr("%.1f", tabela[2]/total*100).."%)", 1, 1, 1, 1, 1, 1)
GameCooltip:AddLine (tabela[1], Details:comma_value ( _math_floor(tabela[2] / meu_tempo) ).." ("..format("%.1f", tabela[2]/total*100).."%)")
GameCooltip:AddLine(tabela[1], Details:comma_value ( _math_floor(tabela[2] / meu_tempo) ).." ("..format("%.1f", tabela[2]/total*100).."%)")
else
--GameCooltip:AddDoubleLine (index..". |T"..tabela[3]..":0|t " .. tabela[1], SelectedToKFunction(_, tabela[2]) .. " (".._cstr("%.1f", tabela[2]/total*100).."%)", 1, 1, 1, 1, 1, 1)
GameCooltip:AddLine (tabela[1], SelectedToKFunction(_, tabela[2]) .. " ("..format("%.1f", tabela[2]/total*100).."%)")
GameCooltip:AddLine(tabela[1], SelectedToKFunction(_, tabela[2]) .. " ("..format("%.1f", tabela[2]/total*100).."%)")
end
GameCooltip:AddIcon (tabela[3], nil, nil, icon_size.W + 4, icon_size.H + 4, icon_border.L, icon_border.R, icon_border.T, icon_border.B)
@@ -5480,7 +5480,7 @@ end
shadow.start_time = shadow.start_time - tempo
--pets (add unique pet names)
for _, petName in _ipairs(actor.pets) do
for _, petName in ipairs(actor.pets) do
local hasPet = false
for i = 1, #shadow.pets do
if (shadow.pets[i] == petName) then
@@ -5543,7 +5543,7 @@ end
--soma todos os demais valores
for key, value in _pairs(habilidade) do
if (_type(value) == "number") then
if (type(value) == "number") then
if (key ~= "id" and key ~= "spellschool") then
if (not habilidade_shadow [key]) then
habilidade_shadow [key] = 0
@@ -5695,7 +5695,7 @@ atributo_damage.__add = function(tabela1, tabela2)
end
--pets (add unique pet names)
for _, petName in _ipairs(tabela2.pets) do
for _, petName in ipairs(tabela2.pets) do
local hasPet = false
for i = 1, #tabela1.pets do
if (tabela1.pets[i] == petName) then
@@ -5736,7 +5736,7 @@ atributo_damage.__add = function(tabela1, tabela2)
--soma os valores da habilidade
for key, value in _pairs(habilidade) do
if (_type(value) == "number") then
if (type(value) == "number") then
if (key ~= "id" and key ~= "spellschool") then
if (not habilidade_tabela1 [key]) then
habilidade_tabela1 [key] = 0
@@ -5830,7 +5830,7 @@ atributo_damage.__sub = function(tabela1, tabela2)
--subtrai os valores da habilidade
for key, value in _pairs(habilidade) do
if (_type(value) == "number") then
if (type(value) == "number") then
if (key ~= "id" and key ~= "spellschool") then
if (not habilidade_tabela1 [key]) then
habilidade_tabela1 [key] = 0
@@ -5870,7 +5870,7 @@ end
function Details.refresh:r_atributo_damage (este_jogador, shadow)
--restaura metas do ator
_setmetatable (este_jogador, Details.atributo_damage)
_setmetatable(este_jogador, Details.atributo_damage)
este_jogador.__index = Details.atributo_damage
--restaura as metas dos containers
Details.refresh:r_container_habilidades (este_jogador.spells, shadow and shadow.spells)
@@ -5933,9 +5933,9 @@ end
local player_name = player:name()
if (player_name:find (Details.playername)) then
GameCooltip:AddLine (player_name .. ": ", FormatTooltipNumber (_, total) .. " (" .. _cstr ("%.1f", (total / damage_done) * 100) .. "%)", 2, "yellow")
GameCooltip:AddLine(player_name .. ": ", FormatTooltipNumber (_, total) .. " (" .. _cstr ("%.1f", (total / damage_done) * 100) .. "%)", 2, "yellow")
else
GameCooltip:AddLine (player_name .. ": ", FormatTooltipNumber (_, total) .." (" .. _cstr ("%.1f", (total / damage_done) * 100) .. "%)", 2)
GameCooltip:AddLine(player_name .. ": ", FormatTooltipNumber (_, total) .." (" .. _cstr ("%.1f", (total / damage_done) * 100) .. "%)", 2)
end
local classe = player:class()
+2 -2
View File
@@ -14,13 +14,13 @@ do
return _error.errortext
end
_error.__call = function(_this)
print (_this.errortext)
print(_this.errortext)
end
function _detalhes:NewError (_msg)
local this_error = {}
this_error.errortext = _msg
setmetatable (this_error, _error)
setmetatable(this_error, _error)
return this_error
end
+159 -160
View File
File diff suppressed because it is too large Load Diff
+143 -156
View File
File diff suppressed because it is too large Load Diff
+64 -64
View File
@@ -5,14 +5,14 @@ local _math_floor = math.floor
local _table_sort = table.sort
local _table_insert = table.insert
local _setmetatable = setmetatable
local _ipairs = ipairs
local ipairs = ipairs
local _pairs = pairs
local _rawget= rawget
local _math_min = math.min
local _math_max = math.max
local _bit_band = bit.band
local _unpack = unpack
local _type = type
local type = type
--api locals
local _GetSpellInfo = _detalhes.getspellinfo
local GameTooltip = GameTooltip
@@ -22,7 +22,7 @@ local _IsInGroup = IsInGroup
local _string_replace = _detalhes.string.replace --details api
local _detalhes = _G._detalhes
local AceLocale = LibStub ("AceLocale-3.0")
local AceLocale = LibStub("AceLocale-3.0")
local Loc = AceLocale:GetLocale ( "Details" )
local _
@@ -87,7 +87,7 @@ function atributo_energy:NovaTabela (serial, nome, link)
spells = container_habilidades:NovoContainer (container_energy),
}
_setmetatable (_new_energyActor, atributo_energy)
_setmetatable(_new_energyActor, atributo_energy)
return _new_energyActor
end
@@ -200,7 +200,7 @@ function atributo_energy:AtualizarResources (whichRowLine, colocacao, instancia)
local esta_barra = instancia.barras [whichRowLine]
if (not esta_barra) then
print ("DEBUG: problema com <instancia.esta_barra> "..whichRowLine.." "..colocacao)
print("DEBUG: problema com <instancia.esta_barra> "..whichRowLine.." "..colocacao)
return
end
@@ -298,7 +298,7 @@ function atributo_energy:RefreshWindow (instancia, tabela_do_combate, forcar, ex
amount = _detalhes:ContainerSortResources (conteudo, amount, "resource")
instancia.top = conteudo[1].resource
for index, player in _ipairs(conteudo) do
for index, player in ipairs(conteudo) do
if (player.resource >= 1) then
total = total + player.resource
else
@@ -309,7 +309,7 @@ function atributo_energy:RefreshWindow (instancia, tabela_do_combate, forcar, ex
elseif (modo == modo_GROUP) then
_table_sort (conteudo, _detalhes.SortKeyGroupResources)
for index, player in _ipairs(conteudo) do
for index, player in ipairs(conteudo) do
if (player.grupo) then -- um player e esta em grupo
if (player.resource < 1) then --dano menor que 1, interromper o loop
amount = index - 1
@@ -371,7 +371,7 @@ function atributo_energy:RefreshWindow (instancia, tabela_do_combate, forcar, ex
end
if (exportar) then
if (_type(exportar) == "boolean") then
if (type(exportar) == "boolean") then
--keyName = "received"
else
keyName = exportar.key
@@ -416,7 +416,7 @@ function atributo_energy:RefreshWindow (instancia, tabela_do_combate, forcar, ex
_table_sort (conteudo, sort_alternateenergy_group)
for index, player in _ipairs(conteudo) do
for index, player in ipairs(conteudo) do
if (player.grupo) then
if (player.alternatepower < 1) then
amount = index - 1
@@ -435,7 +435,7 @@ function atributo_energy:RefreshWindow (instancia, tabela_do_combate, forcar, ex
_table_sort (conteudo, sort_energy_group)
for index, player in _ipairs(conteudo) do
for index, player in ipairs(conteudo) do
if (player.grupo) then
if (player.received < 1) then
amount = index - 1
@@ -488,7 +488,7 @@ function atributo_energy:RefreshWindow (instancia, tabela_do_combate, forcar, ex
if (following) then
if (using_cache) then
local pname = _detalhes.playername
for i, actor in _ipairs(conteudo) do
for i, actor in ipairs(conteudo) do
if (actor.nome == pname) then
myPos = i
break
@@ -532,8 +532,8 @@ function atributo_energy:RefreshWindow (instancia, tabela_do_combate, forcar, ex
end
row1:SetValue(100)
local r, g, b = unpack (instancia.total_bar.color)
row1.textura:SetVertexColor (r, g, b)
local r, g, b = unpack(instancia.total_bar.color)
row1.textura:SetVertexColor(r, g, b)
row1.icone_classe:SetTexture(instancia.total_bar.icon)
row1.icone_classe:SetTexCoord (0.0625, 0.9375, 0.0625, 0.9375)
@@ -593,8 +593,8 @@ function atributo_energy:RefreshWindow (instancia, tabela_do_combate, forcar, ex
end
row1:SetValue(100)
local r, g, b = unpack (instancia.total_bar.color)
row1.textura:SetVertexColor (r, g, b)
local r, g, b = unpack(instancia.total_bar.color)
row1.textura:SetVertexColor(r, g, b)
row1.icone_classe:SetTexture(instancia.total_bar.icon)
row1.icone_classe:SetTexCoord (0.0625, 0.9375, 0.0625, 0.9375)
@@ -653,7 +653,7 @@ function atributo_energy:RefreshLine(instancia, barras_container, whichRowLine,
local esta_barra = instancia.barras[whichRowLine] --pega a referncia da barra na janela
if (not esta_barra) then
print ("DEBUG: problema com <instancia.esta_barra> "..whichRowLine.." "..lugar)
print("DEBUG: problema com <instancia.esta_barra> "..whichRowLine.." "..lugar)
return
end
@@ -737,10 +737,10 @@ function atributo_energy:RefreshBarra2 (esta_barra, instancia, tabela_anterior,
Details.FadeHandler.Fader(esta_barra, "out")
if (instancia.row_info.texture_class_colors) then
esta_barra.textura:SetVertexColor (actor_class_color_r, actor_class_color_g, actor_class_color_b)
esta_barra.textura:SetVertexColor(actor_class_color_r, actor_class_color_g, actor_class_color_b)
end
if (instancia.row_info.texture_background_class_color) then
esta_barra.background:SetVertexColor (actor_class_color_r, actor_class_color_g, actor_class_color_b)
esta_barra.background:SetVertexColor(actor_class_color_r, actor_class_color_g, actor_class_color_b)
end
return self:RefreshBarra (esta_barra, instancia)
@@ -816,8 +816,8 @@ function atributo_energy:ToolTip (instancia, numero, barra, keydown)
if (resource_string) then
local icon = _detalhes.resource_icons [self.resource_type]
GameCooltip:AddLine (resource_string, floor (self.resource) .. " (" .. _cstr ("%.2f", self.resource / instancia.showing:GetCombatTime()) .. " per second)", 1, "white")
GameCooltip:AddIcon (icon.file, 1, 1, 16, 16, unpack (icon.coords))
GameCooltip:AddLine(resource_string, floor(self.resource) .. " (" .. _cstr ("%.2f", self.resource / instancia.showing:GetCombatTime()) .. " per second)", 1, "white")
GameCooltip:AddIcon (icon.file, 1, 1, 16, 16, unpack(icon.coords))
GameCooltip:SetWallpaper (1, [[Interface\SPELLBOOK\Spellbook-Page-1]], resource_bg_coords, resource_bg_color, true)
return true
@@ -839,7 +839,7 @@ local reset_tooltips_table = function()
t[1], t[2], t[3] = "", 0, ""
end
for k, v in _pairs (energy_tooltips_hash) do
for k, v in _pairs(energy_tooltips_hash) do
energy_tooltips_hash [k] = nil
end
end
@@ -850,9 +850,9 @@ function atributo_energy:ToolTipRegenRecebido (instancia, numero, barra, keydown
local owner = self.owner
if (owner and owner.classe) then
r, g, b = unpack (_detalhes.class_colors [owner.classe])
r, g, b = unpack(_detalhes.class_colors [owner.classe])
else
r, g, b = unpack (_detalhes.class_colors [self.classe])
r, g, b = unpack(_detalhes.class_colors [self.classe])
end
local powertype = self.powertype
@@ -864,10 +864,10 @@ function atributo_energy:ToolTipRegenRecebido (instancia, numero, barra, keydown
--spells:
local i = 1
for index, actor in _ipairs(container._ActorTable) do
for index, actor in ipairs(container._ActorTable) do
if (actor.powertype == powertype) then
for spellid, spell in _pairs (actor.spells._ActorTable) do
for spellid, spell in _pairs(actor.spells._ActorTable) do
local on_self = spell.targets [name]
if (on_self) then
local already_tracked = energy_tooltips_hash [spellid]
@@ -925,7 +925,7 @@ function atributo_energy:ToolTipRegenRecebido (instancia, numero, barra, keydown
end
local nome_magia, _, icone_magia = _GetSpellInfo(spell [1])
GameCooltip:AddLine (nome_magia, FormatTooltipNumber (_, spell [2]).." (".._cstr("%.1f", (spell [2]/total_regenerado) * 100).."%)")
GameCooltip:AddLine(nome_magia, FormatTooltipNumber (_, spell [2]).." (".._cstr("%.1f", (spell [2]/total_regenerado) * 100).."%)")
GameCooltip:AddIcon (icone_magia, nil, nil, icon_size.W, icon_size.H, icon_border.L, icon_border.R, icon_border.T, icon_border.B)
_detalhes:AddTooltipBackgroundStatusbar (false, spell [2] / energy_tooltips_table [1][2] * 100)
end
@@ -934,7 +934,7 @@ function atributo_energy:ToolTipRegenRecebido (instancia, numero, barra, keydown
reset_tooltips_table()
i = 1
for index, actor in _ipairs(container._ActorTable) do
for index, actor in ipairs(container._ActorTable) do
if (actor.powertype == powertype) then
local on_self = actor.targets [name]
@@ -983,7 +983,7 @@ function atributo_energy:ToolTipRegenRecebido (instancia, numero, barra, keydown
break
end
GameCooltip:AddLine (source [1], FormatTooltipNumber (_, source [2]).." (".._cstr("%.1f", (source [2] / total_regenerado) * 100).."%)")
GameCooltip:AddLine(source [1], FormatTooltipNumber (_, source [2]).." (".._cstr("%.1f", (source [2] / total_regenerado) * 100).."%)")
_detalhes:AddTooltipBackgroundStatusbar()
local classe = source [3]
@@ -993,7 +993,7 @@ function atributo_energy:ToolTipRegenRecebido (instancia, numero, barra, keydown
if (classe == "UNKNOW") then
GameCooltip:AddIcon ("Interface\\LFGFRAME\\LFGROLE_BW", nil, nil, icon_size.W, icon_size.H, .25, .5, 0, 1)
else
GameCooltip:AddIcon ("Interface\\AddOns\\Details\\images\\classes_small", nil, nil, icon_size.W, icon_size.H, _unpack (_detalhes.class_coords [classe]))
GameCooltip:AddIcon ("Interface\\AddOns\\Details\\images\\classes_small", nil, nil, icon_size.W, icon_size.H, _unpack(_detalhes.class_coords [classe]))
end
end
@@ -1001,7 +1001,7 @@ function atributo_energy:ToolTipRegenRecebido (instancia, numero, barra, keydown
--player generators
local allGeneratorSpells = {}
local allGenerated = 0
for spellid, spellObject in _pairs (self.spells._ActorTable) do
for spellid, spellObject in _pairs(self.spells._ActorTable) do
tinsert(allGeneratorSpells, {spellObject, spellObject.total, spellObject.totalover})
allGenerated = allGenerated + spellObject.total
end
@@ -1014,7 +1014,7 @@ function atributo_energy:ToolTipRegenRecebido (instancia, numero, barra, keydown
for i = 1, #allGeneratorSpells do
local thisGenerator = allGeneratorSpells [i]
local spellName, _, spellIcon = GetSpellInfo(thisGenerator[1].id)
GameCooltip:AddLine (spellName, FormatTooltipNumber (_, thisGenerator[2]) .. " (|cFFFF5555overflow: " .. FormatTooltipNumber (_, thisGenerator[3]) .. "|r | " .. _cstr ("%.1f", (thisGenerator[2] / allGenerated) * 100).."%)")
GameCooltip:AddLine(spellName, FormatTooltipNumber (_, thisGenerator[2]) .. " (|cFFFF5555overflow: " .. FormatTooltipNumber (_, thisGenerator[3]) .. "|r | " .. _cstr ("%.1f", (thisGenerator[2] / allGenerated) * 100).."%)")
GameCooltip:AddIcon (spellIcon, nil, nil, icon_size.W, icon_size.H, .1, .9, .1, .9)
_detalhes:AddTooltipBackgroundStatusbar()
end
@@ -1023,7 +1023,7 @@ function atributo_energy:ToolTipRegenRecebido (instancia, numero, barra, keydown
_detalhes:AddTooltipSpellHeaderText (self.nome .. " Auto Regen Overflow", headerColor, 1, [[Interface\CHARACTERFRAME\Disconnect-Icon]], 0.3, 0.7, 0.3, 0.7)
_detalhes:AddTooltipHeaderStatusbar (r, g, b, 1)
GameCooltip:AddLine ("Auto Regen Overflow", FormatTooltipNumber (_, self.passiveover) .. " ( " .. _cstr ("%.1f", self.passiveover / (self.passiveover + self.total) * 100) .. "%)")
GameCooltip:AddLine("Auto Regen Overflow", FormatTooltipNumber (_, self.passiveover) .. " ( " .. _cstr ("%.1f", self.passiveover / (self.passiveover + self.total) * 100) .. "%)")
GameCooltip:AddIcon ([[Interface\COMMON\Indicator-Red]], nil, nil, icon_size.W, icon_size.H)
_detalhes:AddTooltipBackgroundStatusbar()
@@ -1066,10 +1066,10 @@ function atributo_energy:MontaInfoRegenRecebido()
--spells:
local i = 1
for index, actor in _ipairs(container._ActorTable) do
for index, actor in ipairs(container._ActorTable) do
if (actor.powertype == powertype) then
for spellid, spell in _pairs (actor.spells._ActorTable) do
for spellid, spell in _pairs(actor.spells._ActorTable) do
local on_self = spell.targets [my_name]
if (on_self) then
@@ -1106,7 +1106,7 @@ function atributo_energy:MontaInfoRegenRecebido()
gump:JI_AtualizaContainerBarras (amt)
local max_ = energy_tooltips_table [1][2]
for index, tabela in _ipairs(energy_tooltips_table) do
for index, tabela in ipairs(energy_tooltips_table) do
if (tabela [2] < 1) then
break
@@ -1142,7 +1142,7 @@ function atributo_energy:MontaInfoRegenRecebido()
reset_tooltips_table()
i = 1
for index, actor in _ipairs(container._ActorTable) do
for index, actor in ipairs(container._ActorTable) do
if (actor.powertype == powertype) then
local on_self = actor.targets [my_name]
@@ -1168,7 +1168,7 @@ function atributo_energy:MontaInfoRegenRecebido()
local max_fontes = energy_tooltips_table[1][2]
local barra
for index, tabela in _ipairs(energy_tooltips_table) do
for index, tabela in ipairs(energy_tooltips_table) do
if (tabela [2] < 1) then
break
@@ -1203,7 +1203,7 @@ function atributo_energy:MontaInfoRegenRecebido()
barra.minha_tabela = self
--print ("nome_inimigo = ", tabela [1])
--print("nome_inimigo = ", tabela [1])
barra.nome_inimigo = tabela [1]
barra:Show()
@@ -1213,7 +1213,7 @@ end
function atributo_energy:MontaDetalhesRegenRecebido (nome, barra)
for _, barra in _ipairs(info.barras3) do
for _, barra in ipairs(info.barras3) do
barra:Hide()
end
@@ -1235,7 +1235,7 @@ function atributo_energy:MontaDetalhesRegenRecebido (nome, barra)
--spells:
local i = 1
for index, actor in _ipairs(container._ActorTable) do
for index, actor in ipairs(container._ActorTable) do
if (actor.powertype == powertype) then
local spell = actor.spells._ActorTable [spellid]
if (spell) then
@@ -1264,7 +1264,7 @@ function atributo_energy:MontaDetalhesRegenRecebido (nome, barra)
local max_ = energy_tooltips_table [1][2]
local barra
for index, tabela in _ipairs(from) do
for index, tabela in ipairs(from) do
if (tabela [2] < 1) then
break
@@ -1286,10 +1286,10 @@ function atributo_energy:MontaDetalhesRegenRecebido (nome, barra)
barra.lineText1:SetText(index .. "." .. tabela [1])
barra.lineText4:SetText(_detalhes:comma_value (tabela[2]) .." (" .. _cstr("%.1f", tabela[2] / total_regenerado * 100) .."%)")
barra.textura:SetStatusBarColor (_unpack (_detalhes.class_colors [tabela[3]]))
barra.textura:SetStatusBarColor (_unpack(_detalhes.class_colors [tabela[3]]))
barra.icone:SetTexture("Interface\\AddOns\\Details\\images\\classes_small")
barra.icone:SetTexCoord (_unpack (_detalhes.class_coords [tabela[3]]))
barra.icone:SetTexCoord (_unpack(_detalhes.class_coords [tabela[3]]))
barra:Show() --mostra a barra
@@ -1314,13 +1314,13 @@ function atributo_energy:MontaTooltipAlvos (esta_barra, index)
local actor = container._ActorTable [container._NameIndexTable [esta_barra.nome_inimigo]]
--print ("Mouse Over", actor, esta_barra.nome_inimigo, self.tipo)
--print("Mouse Over", actor, esta_barra.nome_inimigo, self.tipo)
if (actor) then
--spells:
local i = 1
for spellid, spell in _pairs (actor.spells._ActorTable) do
for spellid, spell in _pairs(actor.spells._ActorTable) do
local on_self = spell.targets [my_name]
if (on_self) then
local t = energy_tooltips_table [i]
@@ -1336,9 +1336,9 @@ function atributo_energy:MontaTooltipAlvos (esta_barra, index)
i = i - 1
_table_sort (energy_tooltips_table, _detalhes.Sort2)
--print (i, #energy_tooltips_table)
--print(i, #energy_tooltips_table)
for index, spell in _ipairs(energy_tooltips_table) do
for index, spell in ipairs(energy_tooltips_table) do
if (spell [2] < 1) then
break
end
@@ -1371,7 +1371,7 @@ end
--subtract total from a combat table
function atributo_energy:subtract_total (combat_table)
--print ("reduce total:", combat_table.totals [class_type] [self.powertype], self.total, self.powertype, self.nome)
--print("reduce total:", combat_table.totals [class_type] [self.powertype], self.total, self.powertype, self.nome)
if (self.powertype and combat_table.totals [class_type] [self.powertype]) then
combat_table.totals [class_type] [self.powertype] = combat_table.totals [class_type] [self.powertype] - self.total
if (self.grupo) then
@@ -1381,7 +1381,7 @@ end
end
function atributo_energy:add_total (combat_table)
--print ("add total:", combat_table.totals [class_type] [self.powertype], self.total)
--print("add total:", combat_table.totals [class_type] [self.powertype], self.total)
if (self.powertype and combat_table.totals [class_type] [self.powertype]) then
combat_table.totals [class_type] [self.powertype] = combat_table.totals [class_type] [self.powertype] + self.total
@@ -1423,15 +1423,15 @@ end
end
--targets
for target_name, amount in _pairs (actor.targets) do
for target_name, amount in _pairs(actor.targets) do
shadow.targets [target_name] = 0
end
--spells
for spellid, habilidade in _pairs (actor.spells._ActorTable) do
for spellid, habilidade in _pairs(actor.spells._ActorTable) do
local habilidade_shadow = shadow.spells:PegaHabilidade (spellid, true, "SPELL_ENERGY", false)
--spell targets
for target_name, amount in _pairs (habilidade.targets) do
for target_name, amount in _pairs(habilidade.targets) do
habilidade_shadow.targets [target_name] = 0
end
end
@@ -1467,7 +1467,7 @@ end
end
--pets (add unique pet names)
for _, petName in _ipairs(actor.pets) do
for _, petName in ipairs(actor.pets) do
DetailsFramework.table.addunique (shadow.pets, petName)
end
@@ -1477,7 +1477,7 @@ end
shadow.alternatepower = shadow.alternatepower + actor.alternatepower
if (not actor.powertype) then
--print ("actor without powertype", actor.nome, actor.powertype)
--print("actor without powertype", actor.nome, actor.powertype)
actor.powertype = 1
end
@@ -1496,12 +1496,12 @@ end
end
--targets
for target_name, amount in _pairs (actor.targets) do
for target_name, amount in _pairs(actor.targets) do
shadow.targets [target_name] = (shadow.targets [target_name] or 0) + amount
end
--spells
for spellid, habilidade in _pairs (actor.spells._ActorTable) do
for spellid, habilidade in _pairs(actor.spells._ActorTable) do
local habilidade_shadow = shadow.spells:PegaHabilidade (spellid, true, "SPELL_ENERGY", false)
@@ -1509,7 +1509,7 @@ end
habilidade_shadow.counter = habilidade_shadow.counter + habilidade.counter
--spell targets
for target_name, amount in _pairs (habilidade.targets) do
for target_name, amount in _pairs(habilidade.targets) do
habilidade_shadow.targets [target_name] = (habilidade_shadow.targets [target_name] or 0) + amount
end
@@ -1523,7 +1523,7 @@ function atributo_energy:ColetarLixo (lastevent)
end
function _detalhes.refresh:r_atributo_energy (este_jogador, shadow)
_setmetatable (este_jogador, _detalhes.atributo_energy)
_setmetatable(este_jogador, _detalhes.atributo_energy)
este_jogador.__index = _detalhes.atributo_energy
_detalhes.refresh:r_container_habilidades (este_jogador.spells, shadow and shadow.spells)
@@ -1558,12 +1558,12 @@ atributo_energy.__add = function(tabela1, tabela2)
tabela1.alternatepower = tabela1.alternatepower + tabela2.alternatepower
--targets
for target_name, amount in _pairs (tabela2.targets) do
for target_name, amount in _pairs(tabela2.targets) do
tabela1.targets [target_name] = (tabela1.targets [target_name] or 0) + amount
end
--spells
for spellid, habilidade in _pairs (tabela2.spells._ActorTable) do
for spellid, habilidade in _pairs(tabela2.spells._ActorTable) do
local habilidade_tabela1 = tabela1.spells:PegaHabilidade (spellid, true, "SPELL_ENERGY", false)
@@ -1571,7 +1571,7 @@ atributo_energy.__add = function(tabela1, tabela2)
habilidade_tabela1.counter = habilidade_tabela1.counter + habilidade.counter
--spell targets
for target_name, amount in _pairs (habilidade.targets) do
for target_name, amount in _pairs(habilidade.targets) do
habilidade_tabela1.targets [target_name] = (habilidade_tabela1.targets [target_name] or 0) + amount
end
@@ -1596,14 +1596,14 @@ atributo_energy.__sub = function(tabela1, tabela2)
tabela1.alternatepower = tabela1.alternatepower - tabela2.alternatepower
--targets
for target_name, amount in _pairs (tabela2.targets) do
for target_name, amount in _pairs(tabela2.targets) do
if (tabela1.targets [target_name]) then
tabela1.targets [target_name] = tabela1.targets [target_name] - amount
end
end
--spells
for spellid, habilidade in _pairs (tabela2.spells._ActorTable) do
for spellid, habilidade in _pairs(tabela2.spells._ActorTable) do
local habilidade_tabela1 = tabela1.spells:PegaHabilidade (spellid, true, "SPELL_ENERGY", false)
@@ -1611,7 +1611,7 @@ atributo_energy.__sub = function(tabela1, tabela2)
habilidade_tabela1.counter = habilidade_tabela1.counter - habilidade.counter
--spell targets
for target_name, amount in _pairs (habilidade.targets) do
for target_name, amount in _pairs(habilidade.targets) do
if (habilidade_tabela1.targets [target_name]) then
habilidade_tabela1.targets [target_name] = habilidade_tabela1.targets [target_name] - amount
end
+3 -3
View File
@@ -5,7 +5,7 @@
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--local pointers
local _ipairs = ipairs--lua local
local ipairs = ipairs--lua local
local _pairs = pairs--lua local
local _UnitAura = UnitAura--api local
@@ -152,7 +152,7 @@
if (ThisDebuff) then
local ThisDebuffOnTarget = ThisDebuff [serial]
if (ThisDebuffOnTarget) then
for index, buff_name in _ipairs(ThisDebuffOnTarget.buffs) do
for index, buff_name in ipairs(ThisDebuffOnTarget.buffs) do
local buff_info = SpellBuffDetails [buff_name] or {["counter"] = 0, ["total"] = 0, ["critico"] = 0, ["critico_dano"] = 0}
buff_info.counter = buff_info.counter+1
buff_info.total = buff_info.total+amount
@@ -168,7 +168,7 @@
else
for BuffName, _ in _pairs (_detalhes.Buffs.BuffsTable) do
for BuffName, _ in _pairs(_detalhes.Buffs.BuffsTable) do
local name = _UnitAura ("player", BuffName)
if (name ~= nil) then
local buff_info = SpellBuffDetails [name] or {["counter"] = 0, ["total"] = 0, ["critico"] = 0, ["critico_dano"] = 0}
+1 -1
View File
@@ -7,7 +7,7 @@
--local pointers
local _setmetatable = setmetatable --lua local
local _ipairs = ipairs --lua local
local ipairs = ipairs --lua local
local _UnitAura = UnitAura --api local
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+2 -2
View File
@@ -6,7 +6,7 @@
--local pointers
local _setmetatable = setmetatable --lua local
local _ipairs = ipairs --lua local
local ipairs = ipairs --lua local
local _UnitAura = UnitAura --api local
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
@@ -52,7 +52,7 @@
function habilidade_misc:Add (serial, nome, flag, who_nome, token, spellID, spellName)
--print (self.id, GetSpellInfo(self.id))
--print(self.id, GetSpellInfo(self.id))
if (spellID == "BUFF_OR_DEBUFF") then
+100 -100
View File
@@ -8,10 +8,10 @@ local pairs = pairs
local _rawget= rawget
local min = math.min
local _math_max = math.max
local _math_abs = math.abs
local abs = math.abs
local _bit_band = bit.band
local unpack = unpack
local _type = type
local type = type
--api locals
local _GetSpellInfo = _detalhes.getspellinfo
local GameTooltip = GameTooltip
@@ -30,7 +30,7 @@ local _string_replace = _detalhes.string.replace --details api
local _detalhes = _G._detalhes
local Details = _detalhes
local AceLocale = LibStub ("AceLocale-3.0")
local AceLocale = LibStub("AceLocale-3.0")
local Loc = AceLocale:GetLocale ( "Details" )
local gump = _detalhes.gump
@@ -153,7 +153,7 @@ function _detalhes:ContainerSortMisc(container, amount, keyName2)
end
--[[exported]] function _detalhes:GetSpellCastAmount (combat, actorName, spellId)
local misc_actor = combat:GetActor (4, actorName)
local misc_actor = combat:GetActor(4, actorName)
if (misc_actor) then
local spell_cast = misc_actor.spell_cast and misc_actor.spell_cast [spellId]
@@ -228,10 +228,10 @@ function Details:ShowDeathTooltip(combatObject, deathTable)
local evType = event[1]
local spellName, _, spellIcon = _GetSpellInfo(event[2])
local amount = event[3]
local time = event[4]
local eventTime = event[4]
local source = event[6]
if (time + 12 > timeOfDeath) then
if (eventTime + 12 > timeOfDeath) then
if (type(evType) == "boolean") then
--is damage or heal?
if (evType) then --bool true
@@ -252,10 +252,10 @@ function Details:ShowDeathTooltip(combatObject, deathTable)
--end
overkill = " (" .. Details:ToK(overkill) .. " |cFFFF8800overkill|r)"
gameCooltip:AddLine("" .. format("%.1f", time - timeOfDeath) .. "s |cFFFFFF00" .. spellName .. "|r (|cFFC6B0D9" .. source .. "|r)", "-" .. Details:ToK(amount) .. critOrCrush .. overkill .. " (" .. healthPercent .. "%)", 1, "white", "white")
gameCooltip:AddLine("" .. format("%.1f", eventTime - timeOfDeath) .. "s |cFFFFFF00" .. spellName .. "|r (|cFFC6B0D9" .. source .. "|r)", "-" .. Details:ToK(amount) .. critOrCrush .. overkill .. " (" .. healthPercent .. "%)", 1, "white", "white")
else
overkill = ""
gameCooltip:AddLine("" .. format("%.1f", time - timeOfDeath) .. "s " .. spellName .. " (|cFFC6B0D9" .. source .. "|r)", "-" .. Details:ToK(amount) .. critOrCrush .. overkill .. " (" .. healthPercent .. "%)", 1, "white", "white")
gameCooltip:AddLine("" .. format("%.1f", eventTime - timeOfDeath) .. "s " .. spellName .. " (|cFFC6B0D9" .. source .. "|r)", "-" .. Details:ToK(amount) .. critOrCrush .. overkill .. " (" .. healthPercent .. "%)", 1, "white", "white")
end
gameCooltip:AddIcon(spellIcon, nil, nil, nil, nil, .1, .9, .1, .9)
@@ -272,12 +272,12 @@ function Details:ShowDeathTooltip(combatObject, deathTable)
if (amount > Details.deathlog_healingdone_min) then
if (combatObject.is_arena) then
if (amount > Details.deathlog_healingdone_min_arena) then
gameCooltip:AddLine("" .. format("%.1f", time - timeOfDeath) .. "s " .. spellName .. " (|cFFC6B0D9" .. source .. "|r)", "+" .. Details:ToK(amount) .. " (" .. healthPercent .. "%)", 1, "white", "white")
gameCooltip:AddLine("" .. format("%.1f", eventTime - timeOfDeath) .. "s " .. spellName .. " (|cFFC6B0D9" .. source .. "|r)", "+" .. Details:ToK(amount) .. " (" .. healthPercent .. "%)", 1, "white", "white")
gameCooltip:AddIcon(spellIcon, nil, nil, nil, nil, .1, .9, .1, .9)
gameCooltip:AddStatusBar(healthPercent, 1, barTypeColors.heal, true)
end
else
gameCooltip:AddLine("" .. format("%.1f", time - timeOfDeath) .. "s " .. spellName .. " (|cFFC6B0D9" .. source .. "|r)", "+" .. Details:ToK(amount) .. " (" .. healthPercent .. "%)", 1, "white", "white")
gameCooltip:AddLine("" .. format("%.1f", eventTime - timeOfDeath) .. "s " .. spellName .. " (|cFFC6B0D9" .. source .. "|r)", "+" .. Details:ToK(amount) .. " (" .. healthPercent .. "%)", 1, "white", "white")
gameCooltip:AddIcon(spellIcon, nil, nil, nil, nil, .1, .9, .1, .9)
gameCooltip:AddStatusBar(healthPercent, 1, barTypeColors.heal, true)
end
@@ -287,7 +287,7 @@ function Details:ShowDeathTooltip(combatObject, deathTable)
elseif (type(evType) == "number") then
if (evType == 1) then
--cooldown
gameCooltip:AddLine("" .. format("%.1f", time - timeOfDeath) .. "s " .. spellName .. " (" .. source .. ")", "cooldown (" .. healthPercent .. "%)", 1, "white", "white")
gameCooltip:AddLine("" .. format("%.1f", eventTime - timeOfDeath) .. "s " .. spellName .. " (" .. source .. ")", "cooldown (" .. healthPercent .. "%)", 1, "white", "white")
gameCooltip:AddIcon(spellIcon, nil, nil, nil, nil, .1, .9, .1, .9)
gameCooltip:AddStatusBar(100, 1, barTypeColors.cooldown, true)
@@ -301,7 +301,7 @@ function Details:ShowDeathTooltip(combatObject, deathTable)
elseif (evType == 4) then
--debuff
gameCooltip:AddLine("" .. format("%.1f", time - timeOfDeath) .. "s [x" .. amount .. "] " .. spellName .. " (" .. source .. ")", "debuff (" .. healthPercent .. "%)", 1, "white", "white")
gameCooltip:AddLine("" .. format("%.1f", eventTime - timeOfDeath) .. "s [x" .. amount .. "] " .. spellName .. " (" .. source .. ")", "debuff (" .. healthPercent .. "%)", 1, "white", "white")
gameCooltip:AddIcon(spellIcon)
gameCooltip:AddStatusBar(100, 1, barTypeColors.debuff, true)
@@ -389,7 +389,7 @@ local ReportSingleDeathFunc = function(IsCurrent, IsReverse, AmtLines)
t [#t+1] = table [1] .. table [4] .. table [2] .. table [3]
end
local title = tremove (t, 1)
local title = tremove(t, 1)
t = _detalhes.table.reverse (t)
tinsert(t, 1, title)
@@ -423,7 +423,7 @@ function atributo_misc:ReportSingleDeadLine (morte, instancia)
report_array[1] = {"Details! " .. Loc ["STRING_REPORT_SINGLE_DEATH"] .. " " .. morte [3] .. " " .. Loc ["STRING_ACTORFRAME_REPORTAT"] .. " " .. morte [6], "", "", ""}
for index, evento in ipairs(_detalhes.table.reverse (morte [1])) do
if (evento [1] and type (evento [1]) == "boolean") then --damage
if (evento [1] and type(evento [1]) == "boolean") then --damage
if (evento [3]) then
local elapsed = _cstr ("%.1f", evento [4] - time_of_death) .."s"
local spellname, _, spellicon = _GetSpellInfo(evento [2])
@@ -437,7 +437,7 @@ function atributo_misc:ReportSingleDeadLine (morte, instancia)
spelllink = spellname
end
local source = _detalhes:GetOnlyName (evento [6])
local source = _detalhes:GetOnlyName(evento [6])
local amount = evento [3]
local hp = _math_floor(evento [5] / max_health * 100)
if (hp > 100) then
@@ -447,14 +447,14 @@ function atributo_misc:ReportSingleDeadLine (morte, instancia)
tinsert(report_array, {elapsed .. " ", spelllink, " (" .. source .. ")", "-" .. _detalhes:ToK (amount) .. " (" .. hp .. "%) "})
end
elseif (not evento [1] and type (evento [1]) == "boolean") then --heal
elseif (not evento [1] and type(evento [1]) == "boolean") then --heal
local amount = evento [3]
if (amount > _detalhes.deathlog_healingdone_min) then
local elapsed = _cstr ("%.1f", evento [4] - time_of_death) .."s"
local spelllink = GetSpellLink(evento [2])
local source = _detalhes:GetOnlyName (evento [6])
local source = _detalhes:GetOnlyName(evento [6])
local spellname, _, spellicon = _GetSpellInfo(evento [2])
local hp = _math_floor(evento [5] / max_health * 100)
@@ -473,7 +473,7 @@ function atributo_misc:ReportSingleDeadLine (morte, instancia)
local elapsed = _cstr ("%.1f", evento [4] - time_of_death) .."s"
local spelllink = GetSpellLink(evento [2])
local source = _detalhes:GetOnlyName (evento [6])
local source = _detalhes:GetOnlyName(evento [6])
local spellname, _, spellicon = _GetSpellInfo(evento [2])
local stacks = evento [3]
local hp = _math_floor(evento [5] / max_health * 100)
@@ -524,13 +524,13 @@ function atributo_misc:ReportSingleCooldownLine (misc_actor, instancia)
end
local buff_format_name = function(spellid)
if (_type(spellid) == "string") then
if (type(spellid) == "string") then
return spellid
end
return _detalhes:GetSpellLink(spellid)
end
local buff_format_amount = function(t)
local total, percent = unpack (t)
local total, percent = unpack(t)
local m, s = _math_floor(total / 60), _math_floor(total % 60)
return _cstr ("%.1f", percent) .. "% (" .. m .. "m " .. s .. "s)"
end
@@ -579,7 +579,7 @@ function atributo_misc:DeadAtualizarBarra (morte, whichRowLine, colocacao, insta
local esta_barra = instancia.barras[whichRowLine] --pega a referncia da barra na janela
if (not esta_barra) then
print ("DEBUG: problema com <instancia.esta_barra> "..whichRowLine.." "..lugar)
print("DEBUG: problema com <instancia.esta_barra> "..whichRowLine.." "..lugar)
return
end
@@ -592,7 +592,7 @@ function atributo_misc:DeadAtualizarBarra (morte, whichRowLine, colocacao, insta
esta_barra.colocacao = colocacao
if (not getmetatable (morte)) then
setmetatable (morte, {__call = RefreshBarraMorte})
setmetatable(morte, {__call = RefreshBarraMorte})
morte._custom = true
end
@@ -607,7 +607,7 @@ function atributo_misc:DeadAtualizarBarra (morte, whichRowLine, colocacao, insta
end
--seta a cor da barra e a cor do texto caso eles esteja mostrando com a cor da classe
local r, g, b, a = unpack (_detalhes.class_colors [morte[4]])
local r, g, b, a = unpack(_detalhes.class_colors [morte[4]])
_detalhes:SetBarColors (esta_barra, instancia, r, g, b, a)
if (instancia.row_info.use_spec_icons) then
@@ -615,11 +615,11 @@ function atributo_misc:DeadAtualizarBarra (morte, whichRowLine, colocacao, insta
local spec = instancia.showing (1, nome) and instancia.showing (1, nome).spec or (instancia.showing (2, nome) and instancia.showing (2, nome).spec)
if (spec and spec ~= 0) then
esta_barra.icone_classe:SetTexture(instancia.row_info.spec_file)
esta_barra.icone_classe:SetTexCoord (unpack (_detalhes.class_specs_coords[spec]))
esta_barra.icone_classe:SetTexCoord (unpack(_detalhes.class_specs_coords[spec]))
else
if (CLASS_ICON_TCOORDS [morte[4]]) then
esta_barra.icone_classe:SetTexture(instancia.row_info.icon_file)
esta_barra.icone_classe:SetTexCoord (unpack (CLASS_ICON_TCOORDS [morte[4]]))
esta_barra.icone_classe:SetTexCoord (unpack(CLASS_ICON_TCOORDS [morte[4]]))
else
local texture, l, r, t, b = Details:GetUnknownClassIcon()
esta_barra.icone_classe:SetTexture(texture)
@@ -629,7 +629,7 @@ function atributo_misc:DeadAtualizarBarra (morte, whichRowLine, colocacao, insta
else
if (CLASS_ICON_TCOORDS [morte[4]]) then
esta_barra.icone_classe:SetTexture(instancia.row_info.icon_file)
esta_barra.icone_classe:SetTexCoord (unpack (CLASS_ICON_TCOORDS [morte[4]]))
esta_barra.icone_classe:SetTexCoord (unpack(CLASS_ICON_TCOORDS [morte[4]]))
else
local texture, l, r, t, b = Details:GetUnknownClassIcon()
esta_barra.icone_classe:SetTexture(texture)
@@ -637,7 +637,7 @@ function atributo_misc:DeadAtualizarBarra (morte, whichRowLine, colocacao, insta
end
end
esta_barra.icone_classe:SetVertexColor (1, 1, 1)
esta_barra.icone_classe:SetVertexColor(1, 1, 1)
if (esta_barra.mouse_over and not instancia.baseframe.isMoving) then --precisa atualizar o tooltip
gump:UpdateTooltip (whichRowLine, esta_barra, instancia)
@@ -664,7 +664,7 @@ function atributo_misc:RefreshWindow (instancia, tabela_do_combate, forcar, expo
local modo = instancia.modo
if (exportar) then
if (_type(exportar) == "boolean") then
if (type(exportar) == "boolean") then
if (sub_atributo == 1) then --CC BREAKS
keyName = "cc_break"
elseif (sub_atributo == 2) then --RESS
@@ -891,7 +891,7 @@ function atributo_misc:RefreshLine(instancia, barras_container, whichRowLine, lu
local esta_barra = instancia.barras[whichRowLine] --pega a referncia da barra na janela
if (not esta_barra) then
print ("DEBUG: problema com <instancia.esta_barra> "..whichRowLine.." "..lugar)
print("DEBUG: problema com <instancia.esta_barra> "..whichRowLine.." "..lugar)
return
end
@@ -975,10 +975,10 @@ function atributo_misc:RefreshBarra2 (esta_barra, instancia, tabela_anterior, fo
Details.FadeHandler.Fader(esta_barra, "out")
if (instancia.row_info.texture_class_colors) then
esta_barra.textura:SetVertexColor (actor_class_color_r, actor_class_color_g, actor_class_color_b)
esta_barra.textura:SetVertexColor(actor_class_color_r, actor_class_color_g, actor_class_color_b)
end
if (instancia.row_info.texture_background_class_color) then
esta_barra.background:SetVertexColor (actor_class_color_r, actor_class_color_g, actor_class_color_b)
esta_barra.background:SetVertexColor(actor_class_color_r, actor_class_color_g, actor_class_color_b)
end
return self:RefreshBarra (esta_barra, instancia)
@@ -1079,9 +1079,9 @@ function atributo_misc:ToolTipCC (instancia, numero, barra)
local owner = self.owner
if (owner and owner.classe) then
r, g, b = unpack (_detalhes.class_colors [owner.classe])
r, g, b = unpack(_detalhes.class_colors [owner.classe])
else
r, g, b = unpack (_detalhes.class_colors [self.classe])
r, g, b = unpack(_detalhes.class_colors [self.classe])
end
local meu_total = self ["cc_break"]
@@ -1097,7 +1097,7 @@ function atributo_misc:ToolTipCC (instancia, numero, barra)
--quantidade
local nome_magia, _, icone_magia = _GetSpellInfo(_spellid)
GameCooltip:AddLine (nome_magia, _tabela.cc_break .. " (" .. _cstr ("%.1f", _tabela.cc_break / meu_total * 100) .. "%)")
GameCooltip:AddLine(nome_magia, _tabela.cc_break .. " (" .. _cstr ("%.1f", _tabela.cc_break / meu_total * 100) .. "%)")
GameCooltip:AddIcon (icone_magia, nil, nil, lineHeight, lineHeight, icon_border.L, icon_border.R, icon_border.T, icon_border.B)
_detalhes:AddTooltipHeaderStatusbar (r, g, b, barAlha)
@@ -1105,7 +1105,7 @@ function atributo_misc:ToolTipCC (instancia, numero, barra)
local quebrou_oque = _tabela.cc_break_oque
for spellid_quebrada, amt_quebrada in pairs(_tabela.cc_break_oque) do
local nome_magia, _, icone_magia = _GetSpellInfo(spellid_quebrada)
GameCooltip:AddLine (nome_magia, amt_quebrada .. " ")
GameCooltip:AddLine(nome_magia, amt_quebrada .. " ")
GameCooltip:AddIcon ([[Interface\Buttons\UI-GroupLoot-Pass-Down]], nil, 1, 14, 14)
GameCooltip:AddIcon (icone_magia, nil, 2, icon_size.W, icon_size.H, icon_border.L, icon_border.R, icon_border.T, icon_border.B)
GameCooltip:AddStatusBar (100, 1, 1, 0, 0, .2)
@@ -1113,12 +1113,12 @@ function atributo_misc:ToolTipCC (instancia, numero, barra)
--em quem quebrou
for target_name, amount in pairs(_tabela.targets) do
GameCooltip:AddLine (target_name .. ": ", amount .. " ")
GameCooltip:AddLine(target_name .. ": ", amount .. " ")
local classe = _detalhes:GetClass (target_name)
GameCooltip:AddIcon ([[Interface\AddOns\Details\images\espadas]], nil, 1, lineHeight, lineHeight)
if (classe) then
GameCooltip:AddIcon ([[Interface\AddOns\Details\images\classes_small]], nil, 2, lineHeight, lineHeight, unpack (_detalhes.class_coords [classe]))
GameCooltip:AddIcon ([[Interface\AddOns\Details\images\classes_small]], nil, 2, lineHeight, lineHeight, unpack(_detalhes.class_coords [classe]))
else
GameCooltip:AddIcon ("Interface\\LFGFRAME\\LFGROLE_BW", nil, 2, lineHeight, lineHeight, .25, .5, 0, 1)
end
@@ -1135,9 +1135,9 @@ function atributo_misc:ToolTipDispell (instancia, numero, barra)
local owner = self.owner
if (owner and owner.classe) then
r, g, b = unpack (_detalhes.class_colors [owner.classe])
r, g, b = unpack(_detalhes.class_colors [owner.classe])
else
r, g, b = unpack (_detalhes.class_colors [self.classe])
r, g, b = unpack(_detalhes.class_colors [self.classe])
end
local meu_total = _math_floor(self ["dispell"])
@@ -1164,12 +1164,12 @@ function atributo_misc:ToolTipDispell (instancia, numero, barra)
for i = 1, min (25, #meus_dispells) do
local esta_habilidade = meus_dispells[i]
local nome_magia, _, icone_magia = _GetSpellInfo(esta_habilidade[1])
GameCooltip:AddLine (nome_magia, esta_habilidade[2].." (".._cstr("%.1f", esta_habilidade[2]/meu_total*100).."%)")
GameCooltip:AddLine(nome_magia, esta_habilidade[2].." (".._cstr("%.1f", esta_habilidade[2]/meu_total*100).."%)")
GameCooltip:AddIcon (icone_magia, nil, nil, icon_size.W, icon_size.H, icon_border.L, icon_border.R, icon_border.T, icon_border.B)
_detalhes:AddTooltipBackgroundStatusbar()
end
else
GameTooltip:AddLine (Loc ["STRING_NO_SPELL"])
GameTooltip:AddLine(Loc ["STRING_NO_SPELL"])
end
--quais habilidades foram dispaladas
@@ -1186,7 +1186,7 @@ function atributo_misc:ToolTipDispell (instancia, numero, barra)
for i = 1, min (25, #buffs_dispelados) do
local esta_habilidade = buffs_dispelados[i]
local nome_magia, _, icone_magia = _GetSpellInfo(esta_habilidade[1])
GameCooltip:AddLine (nome_magia, esta_habilidade[2].." (".._cstr("%.1f", esta_habilidade[2]/meu_total*100).."%)")
GameCooltip:AddLine(nome_magia, esta_habilidade[2].." (".._cstr("%.1f", esta_habilidade[2]/meu_total*100).."%)")
GameCooltip:AddIcon (icone_magia, nil, nil, icon_size.W, icon_size.H, icon_border.L, icon_border.R, icon_border.T, icon_border.B)
_detalhes:AddTooltipBackgroundStatusbar()
end
@@ -1208,7 +1208,7 @@ function atributo_misc:ToolTipDispell (instancia, numero, barra)
break
end
GameCooltip:AddLine (alvos_dispelados[i][1], _detalhes:comma_value (alvos_dispelados[i][2]) .." (".._cstr ("%.1f", alvos_dispelados[i][3]).."%)")
GameCooltip:AddLine(alvos_dispelados[i][1], _detalhes:comma_value (alvos_dispelados[i][2]) .." (".._cstr ("%.1f", alvos_dispelados[i][3]).."%)")
_detalhes:AddTooltipBackgroundStatusbar()
local targetActor = instancia.showing[4]:PegarCombatente (_, alvos_dispelados[i][1])
@@ -1221,7 +1221,7 @@ function atributo_misc:ToolTipDispell (instancia, numero, barra)
if (classe == "UNKNOW") then
GameCooltip:AddIcon ("Interface\\LFGFRAME\\LFGROLE_BW", nil, nil, 14, 14, .25, .5, 0, 1)
else
GameCooltip:AddIcon ("Interface\\AddOns\\Details\\images\\classes_small", nil, nil, 14, 14, unpack (_detalhes.class_coords [classe]))
GameCooltip:AddIcon ("Interface\\AddOns\\Details\\images\\classes_small", nil, nil, 14, 14, unpack(_detalhes.class_coords [classe]))
end
end
end
@@ -1270,7 +1270,7 @@ function atributo_misc:ToolTipDispell (instancia, numero, barra)
end
local n = _table [1]:gsub (("%s%<.*"), "")
GameCooltip:AddLine (n, _table [2] .. " (" .. _math_floor(_table [2]/self.dispell*100) .. "%)")
GameCooltip:AddLine(n, _table [2] .. " (" .. _math_floor(_table [2]/self.dispell*100) .. "%)")
_detalhes:AddTooltipBackgroundStatusbar()
GameCooltip:AddIcon ([[Interface\AddOns\Details\images\classes_small]], 1, 1, 14, 14, 0.25, 0.49609375, 0.75, 1)
end
@@ -1335,7 +1335,7 @@ function _detalhes:CatchRaidDebuffUptime (in_or_out) -- "DEBUFF_UPTIME_IN"
for raidIndex = 1, _GetNumGroupMembers() do
local target = "raid"..raidIndex.."target"
local his_target = _UnitGUID (target)
local his_target = _UnitGUID(target)
if (his_target and not checked [his_target]) then
local rect = UnitReaction (target, "player")
@@ -1346,7 +1346,7 @@ function _detalhes:CatchRaidDebuffUptime (in_or_out) -- "DEBUFF_UPTIME_IN"
for debuffIndex = 1, 41 do
local name, _, _, _, _, _, _, unitCaster, _, _, spellid = UnitDebuff (target, debuffIndex)
if (name and unitCaster) then
local playerGUID = _UnitGUID (unitCaster)
local playerGUID = _UnitGUID(unitCaster)
if (playerGUID) then
local playerName, realmName = _UnitName (unitCaster)
@@ -1367,7 +1367,7 @@ function _detalhes:CatchRaidDebuffUptime (in_or_out) -- "DEBUFF_UPTIME_IN"
local checked = {}
for raidIndex = 1, _GetNumGroupMembers()-1 do
local his_target = _UnitGUID ("party"..raidIndex.."target")
local his_target = _UnitGUID("party"..raidIndex.."target")
local rect = UnitReaction ("party"..raidIndex.."target", "player")
if (his_target and not checked [his_target] and rect and rect <= 4) then
@@ -1377,7 +1377,7 @@ function _detalhes:CatchRaidDebuffUptime (in_or_out) -- "DEBUFF_UPTIME_IN"
local name, _, _, _, _, _, _, unitCaster, _, _, spellid = UnitDebuff ("party"..raidIndex.."target", debuffIndex)
if (name and unitCaster) then
local playerName, realmName = _UnitName (unitCaster)
local playerGUID = _UnitGUID (unitCaster)
local playerGUID = _UnitGUID(unitCaster)
if (playerGUID) then
if (realmName and realmName ~= "") then
playerName = playerName .. "-" .. realmName
@@ -1390,14 +1390,14 @@ function _detalhes:CatchRaidDebuffUptime (in_or_out) -- "DEBUFF_UPTIME_IN"
end
end
local his_target = _UnitGUID ("playertarget")
local his_target = _UnitGUID("playertarget")
local rect = UnitReaction ("playertarget", "player")
if (his_target and not checked [his_target] and rect and rect <= 4) then
for debuffIndex = 1, 40 do
local name, _, _, _, _, _, _, unitCaster, _, _, spellid = UnitDebuff ("playertarget", debuffIndex)
if (name and unitCaster) then
local playerName, realmName = _UnitName (unitCaster)
local playerGUID = _UnitGUID (unitCaster)
local playerGUID = _UnitGUID(unitCaster)
if (playerGUID) then
if (realmName and realmName ~= "") then
playerName = playerName .. "-" .. realmName
@@ -1409,7 +1409,7 @@ function _detalhes:CatchRaidDebuffUptime (in_or_out) -- "DEBUFF_UPTIME_IN"
end
else
local his_target = _UnitGUID ("playertarget")
local his_target = _UnitGUID("playertarget")
if (his_target) then
local reaction = UnitReaction ("playertarget", "player")
if (reaction and reaction <= 4) then
@@ -1417,7 +1417,7 @@ function _detalhes:CatchRaidDebuffUptime (in_or_out) -- "DEBUFF_UPTIME_IN"
local name, _, _, _, _, _, _, unitCaster, _, _, spellid = UnitDebuff ("playertarget", debuffIndex)
if (name and unitCaster) then
local playerName, realmName = _UnitName (unitCaster)
local playerGUID = _UnitGUID (unitCaster)
local playerGUID = _UnitGUID(unitCaster)
if (playerGUID) then
if (realmName and realmName ~= "") then
playerName = playerName .. "-" .. realmName
@@ -1451,7 +1451,7 @@ function _detalhes:CatchRaidBuffUptime (in_or_out)
for raidIndex = 1, _GetNumGroupMembers() do
local RaidIndex = "raid" .. raidIndex
local playerGUID = _UnitGUID (RaidIndex)
local playerGUID = _UnitGUID(RaidIndex)
if (playerGUID) then
@@ -1508,7 +1508,7 @@ function _detalhes:CatchRaidBuffUptime (in_or_out)
if (name and unitCaster and UnitExists (unitCaster) and UnitExists ("party" .. groupIndex) and UnitIsUnit (unitCaster, "party" .. groupIndex)) then
local playerName, realmName = _UnitName ("party"..groupIndex)
local playerGUID = _UnitGUID ("party"..groupIndex)
local playerGUID = _UnitGUID("party"..groupIndex)
if (playerGUID) then
if (realmName and realmName ~= "") then
@@ -1535,7 +1535,7 @@ function _detalhes:CatchRaidBuffUptime (in_or_out)
local name, _, _, _, _, _, unitCaster, _, _, spellid = _UnitAura ("player", buffIndex, nil, "HELPFUL")
if (name and unitCaster and UnitExists (unitCaster) and UnitIsUnit (unitCaster, "player")) then
local playerName = _UnitName ("player")
local playerGUID = _UnitGUID ("player")
local playerGUID = _UnitGUID("player")
if (playerGUID) then
if (in_or_out == "BUFF_UPTIME_IN") then
if (_detalhes.PotionList [spellid]) then
@@ -1576,7 +1576,7 @@ function _detalhes:CatchRaidBuffUptime (in_or_out)
local name, _, _, _, _, _, unitCaster, _, _, spellid = _UnitAura ("player", buffIndex, nil, "HELPFUL")
if (name and unitCaster and UnitExists (unitCaster) and UnitIsUnit (unitCaster, "player")) then
local playerName = _UnitName ("player")
local playerGUID = _UnitGUID ("player")
local playerGUID = _UnitGUID("player")
if (playerGUID) then
if (in_or_out == "BUFF_UPTIME_IN") then
@@ -1609,7 +1609,7 @@ function _detalhes:CatchRaidBuffUptime (in_or_out)
end
--]]
-- _detalhes:Msg (string_output)
-- _detalhes:Msg(string_output)
end
end
@@ -1622,9 +1622,9 @@ function atributo_misc:ToolTipDebuffUptime (instancia, numero, barra)
local owner = self.owner
if (owner and owner.classe) then
r, g, b = unpack (_detalhes.class_colors [owner.classe])
r, g, b = unpack(_detalhes.class_colors [owner.classe])
else
r, g, b = unpack (_detalhes.class_colors [self.classe])
r, g, b = unpack(_detalhes.class_colors [self.classe])
end
local meu_total = self ["debuff_uptime"]
@@ -1640,7 +1640,7 @@ function atributo_misc:ToolTipDebuffUptime (instancia, numero, barra)
end
table.sort (debuffs_usados, _detalhes.Sort2)
_detalhes:AddTooltipSpellHeaderText (Loc ["STRING_SPELLS"], headerColor, #debuffs_usados, _detalhes.tooltip_spell_icon.file, unpack (_detalhes.tooltip_spell_icon.coords))
_detalhes:AddTooltipSpellHeaderText (Loc ["STRING_SPELLS"], headerColor, #debuffs_usados, _detalhes.tooltip_spell_icon.file, unpack(_detalhes.tooltip_spell_icon.coords))
_detalhes:AddTooltipHeaderStatusbar (r, g, b, barAlha)
local icon_size = _detalhes.tooltip.icon_size
@@ -1655,13 +1655,13 @@ function atributo_misc:ToolTipDebuffUptime (instancia, numero, barra)
local minutos, segundos = _math_floor(esta_habilidade[2]/60), _math_floor(esta_habilidade[2]%60)
if (esta_habilidade[2] >= _combat_time) then
--GameCooltip:AddLine (nome_magia, minutos .. "m " .. segundos .. "s" .. " (" .. _cstr ("%.1f", esta_habilidade[2] / _combat_time * 100) .. "%)", nil, "gray", "gray")
--GameCooltip:AddLine(nome_magia, minutos .. "m " .. segundos .. "s" .. " (" .. _cstr ("%.1f", esta_habilidade[2] / _combat_time * 100) .. "%)", nil, "gray", "gray")
--GameCooltip:AddStatusBar (100, nil, 1, 0, 1, .3, false)
elseif (minutos > 0) then
GameCooltip:AddLine (nome_magia, minutos .. "m " .. segundos .. "s" .. " (" .. _cstr ("%.1f", esta_habilidade[2] / _combat_time * 100) .. "%)")
GameCooltip:AddLine(nome_magia, minutos .. "m " .. segundos .. "s" .. " (" .. _cstr ("%.1f", esta_habilidade[2] / _combat_time * 100) .. "%)")
_detalhes:AddTooltipBackgroundStatusbar (false, esta_habilidade[2] / _combat_time * 100)
else
GameCooltip:AddLine (nome_magia, segundos .. "s" .. " (" .. _cstr ("%.1f", esta_habilidade[2] / _combat_time * 100) .. "%)")
GameCooltip:AddLine(nome_magia, segundos .. "s" .. " (" .. _cstr ("%.1f", esta_habilidade[2] / _combat_time * 100) .. "%)")
_detalhes:AddTooltipBackgroundStatusbar (false, esta_habilidade[2] / _combat_time * 100)
end
@@ -1669,7 +1669,7 @@ function atributo_misc:ToolTipDebuffUptime (instancia, numero, barra)
end
end
else
GameCooltip:AddLine (Loc ["STRING_NO_SPELL"])
GameCooltip:AddLine(Loc ["STRING_NO_SPELL"])
end
return true
@@ -1710,7 +1710,7 @@ function atributo_misc:ToolTipBuffUptime(instance, barFrame)
local minutes, seconds = floor(spellTable[2] / 60), floor(spellTable[2] % 60)
if (spellTable[2] >= combatTime) then
--GameCooltip:AddLine (nome_magia, minutos .. "m " .. segundos .. "s" .. " (" .. _cstr ("%.1f", esta_habilidade[2] / _combat_time * 100) .. "%)", nil, "gray", "gray")
--GameCooltip:AddLine(nome_magia, minutos .. "m " .. segundos .. "s" .. " (" .. _cstr ("%.1f", esta_habilidade[2] / _combat_time * 100) .. "%)", nil, "gray", "gray")
--GameCooltip:AddStatusBar (100, nil, 1, 0, 1, .3, false)
elseif (minutes > 0) then
@@ -1736,9 +1736,9 @@ function atributo_misc:ToolTipDefensiveCooldowns (instancia, numero, barra)
local owner = self.owner
if (owner and owner.classe) then
r, g, b = unpack (_detalhes.class_colors [owner.classe])
r, g, b = unpack(_detalhes.class_colors [owner.classe])
else
r, g, b = unpack (_detalhes.class_colors [self.classe])
r, g, b = unpack(_detalhes.class_colors [self.classe])
end
local meu_total = _math_floor(self ["cooldowns_defensive"])
@@ -1752,7 +1752,7 @@ function atributo_misc:ToolTipDefensiveCooldowns (instancia, numero, barra)
end
table.sort (cooldowns_usados, _detalhes.Sort2)
_detalhes:AddTooltipSpellHeaderText (Loc ["STRING_SPELLS"], headerColor, #cooldowns_usados, _detalhes.tooltip_spell_icon.file, unpack (_detalhes.tooltip_spell_icon.coords))
_detalhes:AddTooltipSpellHeaderText (Loc ["STRING_SPELLS"], headerColor, #cooldowns_usados, _detalhes.tooltip_spell_icon.file, unpack(_detalhes.tooltip_spell_icon.coords))
_detalhes:AddTooltipHeaderStatusbar (r, g, b, barAlha)
local icon_size = _detalhes.tooltip.icon_size
@@ -1763,12 +1763,12 @@ function atributo_misc:ToolTipDefensiveCooldowns (instancia, numero, barra)
for i = 1, min (25, #cooldowns_usados) do
local esta_habilidade = cooldowns_usados[i]
local nome_magia, _, icone_magia = _GetSpellInfo(esta_habilidade[1])
GameCooltip:AddLine (nome_magia, esta_habilidade[2].." (".._cstr("%.1f", esta_habilidade[2]/meu_total*100).."%)")
GameCooltip:AddLine(nome_magia, esta_habilidade[2].." (".._cstr("%.1f", esta_habilidade[2]/meu_total*100).."%)")
GameCooltip:AddIcon (icone_magia, nil, nil, icon_size.W, icon_size.H, icon_border.L, icon_border.R, icon_border.T, icon_border.B)
_detalhes:AddTooltipBackgroundStatusbar()
end
else
GameCooltip:AddLine (Loc ["STRING_NO_SPELL"])
GameCooltip:AddLine(Loc ["STRING_NO_SPELL"])
end
--targets
@@ -1780,12 +1780,12 @@ function atributo_misc:ToolTipDefensiveCooldowns (instancia, numero, barra)
end
table.sort (alvos, _detalhes.Sort2)
_detalhes:AddTooltipSpellHeaderText (Loc ["STRING_TARGETS"], headerColor, #alvos, _detalhes.tooltip_target_icon.file, unpack (_detalhes.tooltip_target_icon.coords))
_detalhes:AddTooltipSpellHeaderText (Loc ["STRING_TARGETS"], headerColor, #alvos, _detalhes.tooltip_target_icon.file, unpack(_detalhes.tooltip_target_icon.coords))
_detalhes:AddTooltipHeaderStatusbar (r, g, b, barAlha)
if (#alvos > 0) then
for i = 1, min (25, #alvos) do
GameCooltip:AddLine (_detalhes:GetOnlyName (alvos[i][1]) .. ": ", alvos[i][2], 1, "white", "white")
GameCooltip:AddLine(_detalhes:GetOnlyName(alvos[i][1]) .. ": ", alvos[i][2], 1, "white", "white")
_detalhes:AddTooltipBackgroundStatusbar()
GameCooltip:AddIcon ("Interface\\Icons\\PALADIN_HOLY", nil, nil, icon_size.W, icon_size.H, icon_border.L, icon_border.R, icon_border.T, icon_border.B)
@@ -1804,7 +1804,7 @@ function atributo_misc:ToolTipDefensiveCooldowns (instancia, numero, barra)
local texture, l, r, t, b = _detalhes:GetSpecIcon (specID, false)
GameCooltip:AddIcon (texture, 1, 1, lineHeight, lineHeight, l, r, t, b)
else
GameCooltip:AddIcon ("Interface\\AddOns\\Details\\images\\classes_small", nil, nil, 14, 14, unpack (_detalhes.class_coords [classe]))
GameCooltip:AddIcon ("Interface\\AddOns\\Details\\images\\classes_small", nil, nil, 14, 14, unpack(_detalhes.class_coords [classe]))
end
end
end
@@ -1820,9 +1820,9 @@ function atributo_misc:ToolTipRess (instancia, numero, barra)
local owner = self.owner
if (owner and owner.classe) then
r, g, b = unpack (_detalhes.class_colors [owner.classe])
r, g, b = unpack(_detalhes.class_colors [owner.classe])
else
r, g, b = unpack (_detalhes.class_colors [self.classe])
r, g, b = unpack(_detalhes.class_colors [self.classe])
end
local meu_total = self ["ress"]
@@ -1838,19 +1838,19 @@ function atributo_misc:ToolTipRess (instancia, numero, barra)
end
table.sort (meus_ress, _detalhes.Sort2)
_detalhes:AddTooltipSpellHeaderText (Loc ["STRING_SPELLS"], headerColor, #meus_ress, _detalhes.tooltip_spell_icon.file, unpack (_detalhes.tooltip_spell_icon.coords))
_detalhes:AddTooltipSpellHeaderText (Loc ["STRING_SPELLS"], headerColor, #meus_ress, _detalhes.tooltip_spell_icon.file, unpack(_detalhes.tooltip_spell_icon.coords))
_detalhes:AddTooltipHeaderStatusbar (r, g, b, barAlha)
if (#meus_ress > 0) then
for i = 1, min (3, #meus_ress) do
local esta_habilidade = meus_ress[i]
local nome_magia, _, icone_magia = _GetSpellInfo(esta_habilidade[1])
GameCooltip:AddLine (nome_magia, esta_habilidade[2] .. " (" .. _cstr ("%.1f", floor (esta_habilidade[2]) / floor (meu_total) * 100).."%)")
GameCooltip:AddLine(nome_magia, esta_habilidade[2] .. " (" .. _cstr ("%.1f", floor(esta_habilidade[2]) / floor(meu_total) * 100).."%)")
GameCooltip:AddIcon (icone_magia, nil, nil, lineHeight, lineHeight, icon_border.L, icon_border.R, icon_border.T, icon_border.B)
_detalhes:AddTooltipBackgroundStatusbar()
end
else
GameCooltip:AddLine (Loc ["STRING_NO_SPELL"])
GameCooltip:AddLine(Loc ["STRING_NO_SPELL"])
end
--quem foi que o cara reviveu
@@ -1862,12 +1862,12 @@ function atributo_misc:ToolTipRess (instancia, numero, barra)
end
table.sort (alvos, _detalhes.Sort2)
_detalhes:AddTooltipSpellHeaderText (Loc ["STRING_TARGETS"], headerColor, #alvos, _detalhes.tooltip_target_icon.file, unpack (_detalhes.tooltip_target_icon.coords))
_detalhes:AddTooltipSpellHeaderText (Loc ["STRING_TARGETS"], headerColor, #alvos, _detalhes.tooltip_target_icon.file, unpack(_detalhes.tooltip_target_icon.coords))
_detalhes:AddTooltipHeaderStatusbar (r, g, b, barAlha)
if (#alvos > 0) then
for i = 1, min (3, #alvos) do
GameCooltip:AddLine (alvos[i][1], alvos[i][2])
GameCooltip:AddLine(alvos[i][1], alvos[i][2])
_detalhes:AddTooltipBackgroundStatusbar()
local targetActor = instancia.showing[4]:PegarCombatente (_, alvos[i][1])
@@ -1884,7 +1884,7 @@ function atributo_misc:ToolTipRess (instancia, numero, barra)
local texture, l, r, t, b = _detalhes:GetSpecIcon (specID, false)
GameCooltip:AddIcon (texture, 1, 1, lineHeight, lineHeight, l, r, t, b)
else
GameCooltip:AddIcon ("Interface\\AddOns\\Details\\images\\classes_small", nil, nil, lineHeight, lineHeight, unpack (_detalhes.class_coords [classe]))
GameCooltip:AddIcon ("Interface\\AddOns\\Details\\images\\classes_small", nil, nil, lineHeight, lineHeight, unpack(_detalhes.class_coords [classe]))
end
end
end
@@ -1900,9 +1900,9 @@ function atributo_misc:ToolTipInterrupt (instancia, numero, barra)
local owner = self.owner
if (owner and owner.classe) then
r, g, b = unpack (_detalhes.class_colors [owner.classe])
r, g, b = unpack(_detalhes.class_colors [owner.classe])
else
r, g, b = unpack (_detalhes.class_colors [self.classe])
r, g, b = unpack(_detalhes.class_colors [self.classe])
end
local meu_total = self ["interrupt"]
@@ -1920,19 +1920,19 @@ function atributo_misc:ToolTipInterrupt (instancia, numero, barra)
end
table.sort (meus_interrupts, _detalhes.Sort2)
_detalhes:AddTooltipSpellHeaderText (Loc ["STRING_SPELLS"], headerColor, #meus_interrupts, _detalhes.tooltip_spell_icon.file, unpack (_detalhes.tooltip_spell_icon.coords))
_detalhes:AddTooltipSpellHeaderText (Loc ["STRING_SPELLS"], headerColor, #meus_interrupts, _detalhes.tooltip_spell_icon.file, unpack(_detalhes.tooltip_spell_icon.coords))
_detalhes:AddTooltipHeaderStatusbar (r, g, b, barAlha)
if (#meus_interrupts > 0) then
for i = 1, min (25, #meus_interrupts) do
local esta_habilidade = meus_interrupts[i]
local nome_magia, _, icone_magia = _GetSpellInfo(esta_habilidade[1])
GameCooltip:AddLine (nome_magia, esta_habilidade[2].." (".._cstr("%.1f", floor (esta_habilidade[2])/floor (meu_total)*100).."%)")
GameCooltip:AddLine(nome_magia, esta_habilidade[2].." (".._cstr("%.1f", floor(esta_habilidade[2])/floor(meu_total)*100).."%)")
GameCooltip:AddIcon (icone_magia, nil, nil, icon_size.W, icon_size.H, icon_border.L, icon_border.R, icon_border.T, icon_border.B)
_detalhes:AddTooltipBackgroundStatusbar()
end
else
GameTooltip:AddLine (Loc ["STRING_NO_SPELL"])
GameTooltip:AddLine(Loc ["STRING_NO_SPELL"])
end
--quais habilidades foram interrompidas
@@ -1943,14 +1943,14 @@ function atributo_misc:ToolTipInterrupt (instancia, numero, barra)
end
table.sort (habilidades_interrompidas, _detalhes.Sort2)
_detalhes:AddTooltipSpellHeaderText (Loc ["STRING_SPELL_INTERRUPTED"] .. ":", headerColor, #habilidades_interrompidas, _detalhes.tooltip_target_icon.file, unpack (_detalhes.tooltip_target_icon.coords))
_detalhes:AddTooltipSpellHeaderText (Loc ["STRING_SPELL_INTERRUPTED"] .. ":", headerColor, #habilidades_interrompidas, _detalhes.tooltip_target_icon.file, unpack(_detalhes.tooltip_target_icon.coords))
_detalhes:AddTooltipHeaderStatusbar (r, g, b, barAlha)
if (#habilidades_interrompidas > 0) then
for i = 1, min (25, #habilidades_interrompidas) do
local esta_habilidade = habilidades_interrompidas[i]
local nome_magia, _, icone_magia = _GetSpellInfo(esta_habilidade[1])
GameCooltip:AddLine (nome_magia, esta_habilidade[2].." (".._cstr("%.1f", floor (esta_habilidade[2])/floor (meu_total)*100).."%)")
GameCooltip:AddLine(nome_magia, esta_habilidade[2].." (".._cstr("%.1f", floor(esta_habilidade[2])/floor(meu_total)*100).."%)")
GameCooltip:AddIcon (icone_magia, nil, nil, icon_size.W, icon_size.H, icon_border.L, icon_border.R, icon_border.T, icon_border.B)
_detalhes:AddTooltipBackgroundStatusbar()
end
@@ -2000,7 +2000,7 @@ function atributo_misc:ToolTipInterrupt (instancia, numero, barra)
end
local n = _table [1]:gsub (("%s%<.*"), "")
GameCooltip:AddLine (n, _table [2] .. " (" .. _math_floor(_table [2]/self.interrupt*100) .. "%)")
GameCooltip:AddLine(n, _table [2] .. " (" .. _math_floor(_table [2]/self.interrupt*100) .. "%)")
_detalhes:AddTooltipBackgroundStatusbar()
GameCooltip:AddIcon ([[Interface\AddOns\Details\images\classes_small]], 1, 1, 14, 14, 0.25, 0.49609375, 0.75, 1)
end
@@ -2097,7 +2097,7 @@ function atributo_misc:MontaInfoInterrupt()
else
if (barra.on_focus) then
barra.textura:SetStatusBarColor (1, 1, 1, 1) --volta a cor antiga
barra:SetAlpha (.9) --volta a alfa antiga
barra:SetAlpha(.9) --volta a alfa antiga
barra.on_focus = false
end
end
@@ -2269,9 +2269,9 @@ function atributo_misc:MontaTooltipAlvos (esta_barra, index)
table.sort (habilidades, _detalhes.Sort2)
GameTooltip:AddLine (index..". "..inimigo)
GameTooltip:AddLine (Loc ["STRING_SPELL_INTERRUPTED"] .. ":")
GameTooltip:AddLine (" ")
GameTooltip:AddLine(index..". "..inimigo)
GameTooltip:AddLine(Loc ["STRING_SPELL_INTERRUPTED"] .. ":")
GameTooltip:AddLine(" ")
for index, tabela in ipairs(habilidades) do
local nome, rank, icone = _GetSpellInfo(tabela[1])
@@ -2445,7 +2445,7 @@ end
local somar_keys = function(habilidade, habilidade_tabela1)
for key, value in pairs(habilidade) do
if (_type(value) == "number") then
if (type(value) == "number") then
if (key ~= "id" and key ~= "spellschool") then
habilidade_tabela1 [key] = (habilidade_tabela1 [key] or 0) + value
end
@@ -2573,7 +2573,7 @@ function atributo_misc:r_connect_shadow (actor, no_refresh, combat_object)
shadow.debuff_uptime = shadow.debuff_uptime + actor.debuff_uptime
for target_name, amount in pairs(actor.debuff_uptime_targets) do
if (_type(amount) == "table") then --boss debuff
if (type(amount) == "table") then --boss debuff
local t = shadow.debuff_uptime_targets [target_name]
if (not t) then
shadow.debuff_uptime_targets [target_name] = atributo_misc:CreateBuffTargetObject()
@@ -2710,7 +2710,7 @@ function atributo_misc:ColetarLixo (lastevent)
end
function _detalhes.refresh:r_atributo_misc (este_jogador, shadow)
setmetatable (este_jogador, _detalhes.atributo_misc)
setmetatable(este_jogador, _detalhes.atributo_misc)
este_jogador.__index = _detalhes.atributo_misc
--refresh spell cast
@@ -2961,7 +2961,7 @@ atributo_misc.__add = function(tabela1, tabela2)
tabela1.debuff_uptime = tabela1.debuff_uptime + tabela2.debuff_uptime
for target_name, amount in pairs(tabela2.debuff_uptime_targets) do
if (_type(amount) == "table") then --boss debuff
if (type(amount) == "table") then --boss debuff
local t = tabela1.debuff_uptime_targets [target_name]
if (not t) then
tabela1.debuff_uptime_targets [target_name] = atributo_misc:CreateBuffTargetObject()
@@ -3112,7 +3112,7 @@ end
local subtrair_keys = function(habilidade, habilidade_tabela1)
for key, value in pairs(habilidade) do
if (_type(value) == "number") then
if (type(value) == "number") then
if (key ~= "id" and key ~= "spellschool") then
habilidade_tabela1 [key] = (habilidade_tabela1 [key] or 0) - value
end
@@ -3197,7 +3197,7 @@ atributo_misc.__sub = function(tabela1, tabela2)
tabela1.debuff_uptime = tabela1.debuff_uptime - tabela2.debuff_uptime
for target_name, amount in pairs(tabela2.debuff_uptime_targets) do
if (_type(amount) == "table") then --boss debuff
if (type(amount) == "table") then --boss debuff
local t = tabela1.debuff_uptime_targets [target_name]
if (not t) then
tabela1.debuff_uptime_targets [target_name] = atributo_misc:CreateBuffTargetObject()
+30 -30
View File
@@ -19,7 +19,7 @@
local _getmetatable = getmetatable --lua local
local _bit_band = bit.band --lua local
local _table_sort = table.sort --lua local
local _ipairs = ipairs --lua local
local ipairs = ipairs --lua local
local _pairs = pairs --lua local
local AddUnique = DetailsFramework.table.addunique --framework
@@ -90,7 +90,7 @@
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--api functions
function container_combatentes:GetActor (actorName)
function container_combatentes:GetActor(actorName)
local index = self._NameIndexTable [actorName]
if (index) then
return self._ActorTable [index]
@@ -99,7 +99,7 @@
function container_combatentes:GetSpellSource (spellid)
local t = self._ActorTable
--print ("getting the source", spellid, #t)
--print("getting the source", spellid, #t)
for i = 1, #t do
if (t[i].spells._ActorTable [spellid]) then
return t[i].nome
@@ -120,7 +120,7 @@
function container_combatentes:GetTotal (key)
local total = 0
key = key or "total"
for _, actor in _ipairs(self._ActorTable) do
for _, actor in ipairs(self._ActorTable) do
total = total + (actor [key] or 0)
end
@@ -131,7 +131,7 @@
local total = 0
key = key or "total"
local roster = combat.raid_roster
for _, actor in _ipairs(self._ActorTable) do
for _, actor in ipairs(self._ActorTable) do
if (roster [actor.nome]) then
total = total + (actor [key] or 0)
end
@@ -141,7 +141,7 @@
end
function container_combatentes:ListActors()
return _ipairs(self._ActorTable)
return ipairs(self._ActorTable)
end
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
@@ -160,7 +160,7 @@
_NameIndexTable = {}
}
_setmetatable (_newContainer, container_combatentes)
_setmetatable(_newContainer, container_combatentes)
return _newContainer
end
@@ -180,7 +180,7 @@
_detalhes:ScheduleTimer("ReGuessSpec", 6, {novo_objeto})
end
_detalhes:ScheduleTimer("ReGuessSpec", 15, {novo_objeto})
--print (nome, "spec em cache:", have_cached)
--print(nome, "spec em cache:", have_cached)
else
if (_detalhes.streamer_config.quick_detection) then
--shoot detection early if in quick detection
@@ -283,10 +283,10 @@
end
end
if ((_bit_band (flag, IS_GROUP_OBJECT) ~= 0 and actorObject.classe ~= "UNKNOW" and actorObject.classe ~= "UNGROUPPLAYER") or _detalhes:IsInCache (serial)) then
if ((_bit_band (flag, IS_GROUP_OBJECT) ~= 0 and actorObject.classe ~= "UNKNOW" and actorObject.classe ~= "UNGROUPPLAYER") or _detalhes:IsInCache(serial)) then
actorObject.grupo = true
if (_detalhes:IsATank (serial)) then
if (_detalhes:IsATank(serial)) then
actorObject.isTank = true
end
else
@@ -336,7 +336,7 @@
local oponentes = GetNumArenaOpponentSpecs and GetNumArenaOpponentSpecs() or 5
local found = false
for i = 1, oponentes do
local name = GetUnitName ("arena" .. i, true)
local name = GetUnitName("arena" .. i, true)
if (name == nome) then
local spec = GetArenaOpponentSpec and GetArenaOpponentSpec (i)
if (spec) then
@@ -350,14 +350,14 @@
end
end
local role = UnitGroupRolesAssigned and UnitGroupRolesAssigned (nome)
local role = UnitGroupRolesAssigned and UnitGroupRolesAssigned(nome)
if (role and role ~= "NONE") then
actorObject.role = role
found = true
end
if (not found and nome == _detalhes.playername) then
local role = UnitGroupRolesAssigned ("player")
local role = UnitGroupRolesAssigned("player")
if (role and role ~= "NONE") then
actorObject.role = role
end
@@ -398,7 +398,7 @@
--[=[
--Chromie - From 'The Deaths of Chromie'
if (serial and type (serial) == "string") then
if (serial and type(serial) == "string") then
if (serial:match ("^Creature%-0%-%d+%-%d+%-%d+%-122663%-%w+$")) then
actorObject.grupo = true
end
@@ -417,9 +417,9 @@
actorObject.monster = true
end
if (serial and type (serial) == "string") then
if (serial and type(serial) == "string") then
local npcID = _detalhes:GetNpcIdFromGuid (serial)
if (npcID and not _detalhes.npcid_pool [npcID] and type (npcID) == "number") then
if (npcID and not _detalhes.npcid_pool [npcID] and type(npcID) == "number") then
_detalhes.npcid_pool [npcID] = nome
end
end
@@ -437,7 +437,7 @@
local follower_text_object = _G ["DetailsPetOwnerFinderTextLeft3"] --not in use
local find_pet_found_owner = function(ownerName, serial, nome, flag, self)
local ownerGuid = _UnitGUID (ownerName)
local ownerGuid = _UnitGUID(ownerName)
if (ownerGuid) then
_detalhes.tabela_pets:Adicionar (serial, nome, flag, ownerGuid, ownerName, 0x00000417)
local nome_dele, dono_nome, dono_serial, dono_flag = _detalhes.tabela_pets:PegaDono (serial, nome, flag)
@@ -483,7 +483,7 @@
local text1 = line1 and line1:GetText()
if (text1 and text1 ~= "") then
--for _, playerName in ipairs(Details.tabela_vigente.raid_roster_indexed) do
for playerName, _ in _pairs (_detalhes.tabela_vigente.raid_roster) do
for playerName, _ in _pairs(_detalhes.tabela_vigente.raid_roster) do
local pName = playerName
playerName = playerName:gsub ("%-.*", "") --remove realm name
@@ -510,7 +510,7 @@
local line2 = _G ["DetailsPetOwnerFinderTextLeft3"]
local text2 = line2 and line2:GetText()
if (text2 and text2 ~= "") then
for playerName, _ in _pairs (_detalhes.tabela_vigente.raid_roster) do
for playerName, _ in _pairs(_detalhes.tabela_vigente.raid_roster) do
--for _, playerName in ipairs(Details.tabela_vigente.raid_roster_indexed) do
local pName = playerName
playerName = playerName:gsub ("%-.*", "") --remove realm name
@@ -542,10 +542,10 @@
--[[statistics]]-- _detalhes.statistics.container_calls = _detalhes.statistics.container_calls + 1
--if (flag and nome:find ("Kastfall") and bit.band (flag, 0x2000) ~= 0) then
--print ("PET:", nome, _detalhes.tabela_pets.pets [serial], container_pets [serial])
--if (flag and nome:find ("Kastfall") and bit.band(flag, 0x2000) ~= 0) then
--print("PET:", nome, _detalhes.tabela_pets.pets [serial], container_pets [serial])
--else
--print (nome, flag)
--print(nome, flag)
--end
--verifica se um pet, se for confere se tem o nome do dono, se no tiver, precisa por
@@ -648,7 +648,7 @@
--try to guess his class
if (self.shadow) then --no executar 2x
_detalhes:ScheduleTimer ("GuessClass", 1, {novo_objeto, self, 1})
_detalhes:ScheduleTimer("GuessClass", 1, {novo_objeto, self, 1})
end
elseif (shouldScanOnce) then
@@ -677,12 +677,12 @@
if (novo_objeto.classe == "UNGROUPPLAYER") then --is a player
if (_bit_band (flag, REACTION_HOSTILE ) ~= 0) then --is hostile
novo_objeto.enemy = true --print (nome.." EH UM INIMIGO -> " .. engRace)
novo_objeto.enemy = true --print(nome.." EH UM INIMIGO -> " .. engRace)
end
--try to guess his class
if (self.shadow) then --no executar 2x
_detalhes:ScheduleTimer ("GuessClass", 1, {novo_objeto, self, 1})
_detalhes:ScheduleTimer("GuessClass", 1, {novo_objeto, self, 1})
end
end
@@ -703,7 +703,7 @@
--try to guess his class
if (self.shadow) then --no executar 2x
_detalhes:ScheduleTimer ("GuessClass", 1, {novo_objeto, self, 1})
_detalhes:ScheduleTimer("GuessClass", 1, {novo_objeto, self, 1})
end
end
@@ -723,7 +723,7 @@
--try to guess his class
if (self.shadow) then --no executar 2x
_detalhes:ScheduleTimer ("GuessClass", 1, {novo_objeto, self, 1})
_detalhes:ScheduleTimer("GuessClass", 1, {novo_objeto, self, 1})
end
end
@@ -769,7 +769,7 @@
if (_detalhes.debug) then
if (_detalhes.debug_chr and nome:find (_detalhes.debug_chr) and self.tipo == 1) then
local logLine = ""
local when = "[" .. date ("%H:%M:%S") .. format (".%4f", GetTime()-floor (GetTime())) .. "]"
local when = "[" .. date ("%H:%M:%S") .. format (".%4f", GetTime()-floor(GetTime())) .. "]"
local log = "actor created - class: " .. (novo_objeto.classe or "noclass")
local from = debugstack (2, 1, 0)
logLine = logLine .. when .. " " .. log .. " " .. from .. "\n"
@@ -845,7 +845,7 @@
--chama a funo para ser executada em todos os atores
function container_combatentes:ActorCallFunction (funcao, ...)
for index, actor in _ipairs(self._ActorTable) do
for index, actor in ipairs(self._ActorTable) do
funcao (nil, actor, ...)
end
end
@@ -876,7 +876,7 @@
function _detalhes.refresh:r_container_combatentes (container, shadow)
--reconstri meta e indexes
_setmetatable (container, _detalhes.container_combatentes)
_setmetatable(container, _detalhes.container_combatentes)
container.__index = _detalhes.container_combatentes
container.funcao_de_criacao = container_combatentes:FuncaoDeCriacao (container.tipo)
+24 -24
View File
@@ -14,7 +14,7 @@ local _GetNumGroupMembers = _G.GetNumGroupMembers
local _setmetatable = setmetatable
local _bit_band = bit.band --lua local
local _pairs = pairs
local _ipairs = ipairs
local ipairs = ipairs
local _table_wipe = table.wipe
--details locals
@@ -22,7 +22,7 @@ local is_ignored = _detalhes.pets_ignored
function container_pets:NovoContainer()
local esta_tabela = {}
_setmetatable (esta_tabela, _detalhes.container_pets)
_setmetatable(esta_tabela, _detalhes.container_pets)
esta_tabela.pets = {} --armazena a pool -> uma dictionary com o [serial do pet] -> nome do dono
esta_tabela._ActorTable = {} --armazena os 15 ultimos pets do jogador -> [jogador nome] -> {nil, nil, nil, ...}
return esta_tabela
@@ -61,8 +61,8 @@ function container_pets:PegaDono (pet_serial, pet_nome, pet_flags)
if (_IsInRaid()) then
for i = 1, _GetNumGroupMembers() do
if (pet_serial == _UnitGUID ("raidpet"..i)) then
dono_serial = _UnitGUID ("raid"..i)
if (pet_serial == _UnitGUID("raidpet"..i)) then
dono_serial = _UnitGUID("raid"..i)
dono_flags = 0x00000417 --emulate sourceflag flag
local nome, realm = _UnitName ("raid"..i)
@@ -75,8 +75,8 @@ function container_pets:PegaDono (pet_serial, pet_nome, pet_flags)
elseif (_IsInGroup()) then
for i = 1, _GetNumGroupMembers()-1 do
if (pet_serial == _UnitGUID ("partypet"..i)) then
dono_serial = _UnitGUID ("party"..i)
if (pet_serial == _UnitGUID("partypet"..i)) then
dono_serial = _UnitGUID("party"..i)
dono_flags = 0x00000417 --emulate sourceflag flag
local nome, realm = _UnitName ("party"..i)
@@ -90,9 +90,9 @@ function container_pets:PegaDono (pet_serial, pet_nome, pet_flags)
end
if (not dono_nome) then
if (pet_serial == _UnitGUID ("pet")) then
if (pet_serial == _UnitGUID("pet")) then
dono_nome = _GetUnitName ("player")
dono_serial = _UnitGUID ("player")
dono_serial = _UnitGUID("player")
if (_IsInGroup() or _IsInRaid()) then
dono_flags = 0x00000417 --emulate sourceflag flag
else
@@ -114,7 +114,7 @@ function container_pets:PegaDono (pet_serial, pet_nome, pet_flags)
if (pet_flags and _bit_band (pet_flags, OBJECT_TYPE_PET) ~= 0) then -- um pet
if (not _detalhes.pets_no_owner [pet_serial] and _bit_band (pet_flags, EM_GRUPO) ~= 0) then
_detalhes.pets_no_owner [pet_serial] = {pet_nome, pet_flags}
_detalhes:Msg ("couldn't find the owner of the pet:", pet_nome)
_detalhes:Msg("couldn't find the owner of the pet:", pet_nome)
end
else
is_ignored [pet_serial] = true
@@ -126,7 +126,7 @@ end
function container_pets:Unpet (...)
local unitid = ...
local owner_serial = _UnitGUID (unitid)
local owner_serial = _UnitGUID(unitid)
if (owner_serial) then
--tira o pet existente da tabela de pets e do cache do core
@@ -137,7 +137,7 @@ function container_pets:Unpet (...)
_detalhes.pets_players [owner_serial] = nil
end
--verifica se h um pet novo deste jogador
local pet_serial = _UnitGUID (unitid .. "pet")
local pet_serial = _UnitGUID(unitid .. "pet")
if (pet_serial) then
if (not _detalhes.tabela_pets.pets [pet_serial]) then
local nome, realm = _UnitName (unitid)
@@ -159,14 +159,14 @@ end
function container_pets:BuscarPets()
if (_IsInRaid()) then
for i = 1, _GetNumGroupMembers(), 1 do
local pet_serial = _UnitGUID ("raidpet"..i)
local pet_serial = _UnitGUID("raidpet"..i)
if (pet_serial) then
if (not _detalhes.tabela_pets.pets [pet_serial]) then
local nome, realm = _UnitName ("raid"..i)
if (realm and realm ~= "") then
nome = nome.."-"..realm
end
local owner_serial = _UnitGUID ("raid"..i)
local owner_serial = _UnitGUID("raid"..i)
_detalhes.tabela_pets:Adicionar (pet_serial, _UnitName ("raidpet"..i), 0x1114, owner_serial, nome, 0x514)
_detalhes.parser:RevomeActorFromCache (pet_serial)
container_pets:PlayerPet (owner_serial, pet_serial)
@@ -176,7 +176,7 @@ function container_pets:BuscarPets()
elseif (_IsInGroup()) then
for i = 1, _GetNumGroupMembers()-1, 1 do
local pet_serial = _UnitGUID ("partypet"..i)
local pet_serial = _UnitGUID("partypet"..i)
if (pet_serial) then
if (not _detalhes.tabela_pets.pets [pet_serial]) then
local nome, realm = _UnitName ("party"..i)
@@ -184,24 +184,24 @@ function container_pets:BuscarPets()
if (realm and realm ~= "") then
nome = nome.."-"..realm
end
_detalhes.tabela_pets:Adicionar (pet_serial, _UnitName ("partypet"..i), 0x1114, _UnitGUID ("party"..i), nome, 0x514)
_detalhes.tabela_pets:Adicionar (pet_serial, _UnitName ("partypet"..i), 0x1114, _UnitGUID("party"..i), nome, 0x514)
end
end
end
local pet_serial = _UnitGUID ("pet")
local pet_serial = _UnitGUID("pet")
if (pet_serial) then
if (not _detalhes.tabela_pets.pets [pet_serial]) then
_detalhes.tabela_pets:Adicionar (pet_serial, _UnitName ("pet"), 0x1114, _UnitGUID ("player"), _detalhes.playername, 0x514)
_detalhes.tabela_pets:Adicionar (pet_serial, _UnitName ("pet"), 0x1114, _UnitGUID("player"), _detalhes.playername, 0x514)
end
end
else
local pet_serial = _UnitGUID ("pet")
local pet_serial = _UnitGUID("pet")
if (pet_serial) then
if (not _detalhes.tabela_pets.pets [pet_serial]) then
_detalhes.tabela_pets:Adicionar (pet_serial, _UnitName ("pet"), 0x1114, _UnitGUID ("player"), _detalhes.playername, 0x514)
_detalhes.tabela_pets:Adicionar (pet_serial, _UnitName ("pet"), 0x1114, _UnitGUID("player"), _detalhes.playername, 0x514)
end
end
end
@@ -223,14 +223,14 @@ function container_pets:Adicionar (pet_serial, pet_nome, pet_flags, dono_serial,
end
function _detalhes:WipePets()
return _table_wipe (_detalhes.tabela_pets.pets)
return _table_wipe(_detalhes.tabela_pets.pets)
end
function _detalhes:LimparPets()
--erase old pet table by creating a new one
local newPetTable = {}
--minimum of 90 minutes to clean a pet from the pet table data
for PetSerial, PetTable in _pairs (_detalhes.tabela_pets.pets) do
for PetSerial, PetTable in _pairs(_detalhes.tabela_pets.pets) do
if ( (PetTable[4] + 5400 > _detalhes._tempo + 1) or (PetTable[5] and PetTable[4] + 43200 > _detalhes._tempo) ) then
newPetTable [PetSerial] = PetTable
end
@@ -245,17 +245,17 @@ function _detalhes:UpdatePets()
have_schedule = false
return container_pets:BuscarPets()
end
function _detalhes:SchedulePetUpdate (seconds)
function _detalhes:SchedulePetUpdate(seconds)
if (have_schedule) then
return
end
have_schedule = true
--_detalhes:ScheduleTimer ("UpdatePets", seconds or 5)
--_detalhes:ScheduleTimer("UpdatePets", seconds or 5)
Details.Schedules.NewTimer(seconds or 5, Details.UpdatePets, Details)
end
function _detalhes.refresh:r_container_pets (container)
_setmetatable (container, container_pets)
_setmetatable(container, container_pets)
end
+223 -230
View File
@@ -1,135 +1,130 @@
local Loc = LibStub ("AceLocale-3.0"):GetLocale ( "Details" )
local Loc = LibStub("AceLocale-3.0"):GetLocale( "Details" )
--lua api
local _table_remove = table.remove
local _table_insert = table.insert
local _setmetatable = setmetatable
local _table_wipe = table.wipe
local tremove = table.remove
local tinsert = table.insert
local wipe = table.wipe
local _detalhes = _G._detalhes
local gump = _detalhes.gump
local combate = _detalhes.combate
local historico = _detalhes.historico
local barra_total = _detalhes.barra_total
local container_pets = _detalhes.container_pets
local timeMachine = _detalhes.timeMachine
local Details = _G._detalhes
local combatClass = Details.combate
local segmentClass = Details.historico
local timeMachine = Details.timeMachine
------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--API
--reset only the overall data
function _detalhes:ResetSegmentOverallData()
return historico:resetar_overall()
function Details:ResetSegmentOverallData()
return segmentClass:resetar_overall()
end
--reset segments and overall data
function _detalhes:ResetSegmentData()
return historico:resetar()
function Details:ResetSegmentData()
return segmentClass:resetar()
end
--returns the current active segment
function _detalhes:GetCurrentCombat()
return _detalhes.tabela_vigente
function Details:GetCurrentCombat()
return Details.tabela_vigente
end
--returns a private table containing all stored segments
function _detalhes:GetCombatSegments()
return _detalhes.tabela_historico.tabelas
function Details:GetCombatSegments()
return Details.tabela_historico.tabelas
end
------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--internal
function historico:NovoHistorico()
function segmentClass:NovoHistorico()
local esta_tabela = {tabelas = {}}
_setmetatable (esta_tabela, historico)
setmetatable(esta_tabela, segmentClass)
return esta_tabela
end
function historico:adicionar_overall (tabela)
function segmentClass:adicionar_overall (tabela)
local zoneName, zoneType = GetInstanceInfo()
if (zoneType ~= "none" and tabela:GetCombatTime() <= _detalhes.minimum_overall_combat_time) then
if (zoneType ~= "none" and tabela:GetCombatTime() <= Details.minimum_overall_combat_time) then
return
end
if (_detalhes.overall_clear_newboss) then
if (Details.overall_clear_newboss) then
--only for raids
if (tabela.instance_type == "raid" and tabela.is_boss) then
if (_detalhes.last_encounter ~= _detalhes.last_encounter2) then
if (_detalhes.debug) then
_detalhes:Msg ("(debug) new boss detected 'overall_clear_newboss' is true, cleaning overall data.")
if (Details.last_encounter ~= Details.last_encounter2) then
if (Details.debug) then
Details:Msg("(debug) new boss detected 'overall_clear_newboss' is true, cleaning overall data.")
end
for index, combat in ipairs(_detalhes.tabela_historico.tabelas) do
for index, combat in ipairs(Details.tabela_historico.tabelas) do
combat.overall_added = false
end
historico:resetar_overall()
segmentClass:resetar_overall()
end
end
end
if (tabela.overall_added) then
_detalhes:Msg ("error > attempt to add a segment already added > func historico:adicionar_overall()")
Details:Msg("error > attempt to add a segment already added > func historico:adicionar_overall()")
return
end
local mythicInfo = tabela.is_mythic_dungeon
if (mythicInfo) then
--do not add overall mythic+ dungeon segments
if (mythicInfo.TrashOverallSegment) then
_detalhes:Msg ("error > attempt to add a TrashOverallSegment > func historico:adicionar_overall()")
Details:Msg("error > attempt to add a TrashOverallSegment > func historico:adicionar_overall()")
return
elseif (mythicInfo.OverallSegment) then
_detalhes:Msg ("error > attempt to add a OverallSegment > func historico:adicionar_overall()")
Details:Msg("error > attempt to add a OverallSegment > func historico:adicionar_overall()")
return
end
end
--store the segments added to the overall data
_detalhes.tabela_overall.segments_added = _detalhes.tabela_overall.segments_added or {}
Details.tabela_overall.segments_added = Details.tabela_overall.segments_added or {}
local this_clock = tabela.data_inicio
local combatName = tabela:GetCombatName (true)
local combatName = tabela:GetCombatName(true)
local combatTime = tabela:GetCombatTime()
local combatType = tabela:GetCombatType()
tinsert(_detalhes.tabela_overall.segments_added, 1, {name = combatName, elapsed = combatTime, clock = this_clock, type = combatType})
if (#_detalhes.tabela_overall.segments_added > 40) then
tremove (_detalhes.tabela_overall.segments_added, 41)
tinsert(Details.tabela_overall.segments_added, 1, {name = combatName, elapsed = combatTime, clock = this_clock, type = combatType})
if (#Details.tabela_overall.segments_added > 40) then
tremove(Details.tabela_overall.segments_added, 41)
end
if (_detalhes.debug) then
_detalhes:Msg ("(debug) adding the segment to overall data: " .. (tabela:GetCombatName (true) or "no name") .. " with time of: " .. (tabela:GetCombatTime() or "no time"))
if (Details.debug) then
Details:Msg("(debug) adding the segment to overall data: " .. (tabela:GetCombatName(true) or "no name") .. " with time of: " .. (tabela:GetCombatTime() or "no time"))
end
_detalhes.tabela_overall = _detalhes.tabela_overall + tabela
Details.tabela_overall = Details.tabela_overall + tabela
tabela.overall_added = true
if (not _detalhes.tabela_overall.overall_enemy_name) then
_detalhes.tabela_overall.overall_enemy_name = tabela.is_boss and tabela.is_boss.name or tabela.enemy
if (not Details.tabela_overall.overall_enemy_name) then
Details.tabela_overall.overall_enemy_name = tabela.is_boss and tabela.is_boss.name or tabela.enemy
else
if (_detalhes.tabela_overall.overall_enemy_name ~= (tabela.is_boss and tabela.is_boss.name or tabela.enemy)) then
_detalhes.tabela_overall.overall_enemy_name = "-- x -- x --"
if (Details.tabela_overall.overall_enemy_name ~= (tabela.is_boss and tabela.is_boss.name or tabela.enemy)) then
Details.tabela_overall.overall_enemy_name = "-- x -- x --"
end
end
if (_detalhes.tabela_overall.start_time == 0) then
_detalhes.tabela_overall:SetStartTime (tabela.start_time)
_detalhes.tabela_overall:SetEndTime (tabela.end_time)
if (Details.tabela_overall.start_time == 0) then
Details.tabela_overall:SetStartTime (tabela.start_time)
Details.tabela_overall:SetEndTime (tabela.end_time)
else
_detalhes.tabela_overall:SetStartTime (tabela.start_time - _detalhes.tabela_overall:GetCombatTime())
_detalhes.tabela_overall:SetEndTime (tabela.end_time)
Details.tabela_overall:SetStartTime (tabela.start_time - Details.tabela_overall:GetCombatTime())
Details.tabela_overall:SetEndTime (tabela.end_time)
end
if (_detalhes.tabela_overall.data_inicio == 0) then
_detalhes.tabela_overall.data_inicio = _detalhes.tabela_vigente.data_inicio or 0
if (Details.tabela_overall.data_inicio == 0) then
Details.tabela_overall.data_inicio = Details.tabela_vigente.data_inicio or 0
end
_detalhes.tabela_overall:seta_data (_detalhes._detalhes_props.DATA_TYPE_END)
_detalhes:ClockPluginTickOnSegment()
Details.tabela_overall:seta_data (Details._detalhes_props.DATA_TYPE_END)
Details:ClockPluginTickOnSegment()
for id, instance in _detalhes:ListInstances() do
for id, instance in Details:ListInstances() do
if (instance:IsEnabled()) then
if (instance:GetSegment() == -1) then
instance:ForceRefresh()
@@ -138,24 +133,23 @@ function historico:adicionar_overall (tabela)
end
end
function _detalhes:ScheduleAddCombatToOverall (combat) --deprecated (15/03/2019)
local canAdd = _detalhes:CanAddCombatToOverall (combat)
function Details:ScheduleAddCombatToOverall (combat) --deprecated (15/03/2019)
local canAdd = Details:CanAddCombatToOverall (combat)
if (canAdd) then
_detalhes.schedule_add_to_overall = _detalhes.schedule_add_to_overall or {}
tinsert(_detalhes.schedule_add_to_overall, combat)
Details.schedule_add_to_overall = Details.schedule_add_to_overall or {}
tinsert(Details.schedule_add_to_overall, combat)
end
end
function _detalhes:CanAddCombatToOverall (tabela)
function Details:CanAddCombatToOverall (tabela)
--already added
if (tabela.overall_added) then
return false
end
--already scheduled to add
if (_detalhes.schedule_add_to_overall) then --deprecated
for _, combat in ipairs(_detalhes.schedule_add_to_overall) do
if (Details.schedule_add_to_overall) then --deprecated
for _, combat in ipairs(Details.schedule_add_to_overall) do
if (combat == tabela) then
return false
end
@@ -168,77 +162,78 @@ function _detalhes:CanAddCombatToOverall (tabela)
--do not add overall mythic+ dungeon segments
if (mythicInfo.TrashOverallSegment) then
return false
elseif (mythicInfo.OverallSegment) then
return false
end
end
--raid boss - flag 0x1
if (bit.band (_detalhes.overall_flag, 0x1) ~= 0) then
if (bit.band(Details.overall_flag, 0x1) ~= 0) then
if (tabela.is_boss and tabela.instance_type == "raid" and not tabela.is_pvp) then
if (tabela:GetCombatTime() >= 30) then
return true
end
end
end
--raid trash - flag 0x2
if (bit.band (_detalhes.overall_flag, 0x2) ~= 0) then
if (bit.band(Details.overall_flag, 0x2) ~= 0) then
if (tabela.is_trash and tabela.instance_type == "raid") then
return true
end
end
--dungeon boss - flag 0x4
if (bit.band (_detalhes.overall_flag, 0x4) ~= 0) then
if (bit.band(Details.overall_flag, 0x4) ~= 0) then
if (tabela.is_boss and tabela.instance_type == "party" and not tabela.is_pvp) then
return true
end
end
--dungeon trash - flag 0x8
if (bit.band (_detalhes.overall_flag, 0x8) ~= 0) then
if (bit.band(Details.overall_flag, 0x8) ~= 0) then
if ((tabela.is_trash or tabela.is_mythic_dungeon_trash) and tabela.instance_type == "party") then
return true
end
end
--any combat
if (bit.band (_detalhes.overall_flag, 0x10) ~= 0) then
if (bit.band(Details.overall_flag, 0x10) ~= 0) then
return true
end
--is a PvP combat
if (tabela.is_pvp or tabela.is_arena) then
if (tabela.is_pvp or tabela.is_arena) then
return true
end
return false
end
--sai do combate, chamou adicionar a tabela ao histrico
function historico:adicionar (tabela)
function segmentClass:adicionar (tabela)
local tamanho = #self.tabelas
--verifica se precisa dar UnFreeze()
if (tamanho < _detalhes.segments_amount) then --vai preencher um novo index vazio
if (tamanho < Details.segments_amount) then --vai preencher um novo index vazio
local ultima_tabela = self.tabelas[tamanho]
if (not ultima_tabela) then --no ha tabelas no historico, esta ser a #1
--pega a tabela do combate atual
ultima_tabela = tabela
end
_detalhes:InstanciaCallFunction (_detalhes.CheckFreeze, tamanho+1, ultima_tabela)
Details:InstanciaCallFunction(Details.CheckFreeze, tamanho+1, ultima_tabela)
end
--add to history table
_table_insert (self.tabelas, 1, tabela)
tinsert(self.tabelas, 1, tabela)
--count boss tries
local boss = tabela.is_boss and tabela.is_boss.name
if (boss) then
local try_number = _detalhes.encounter_counter [boss]
local try_number = Details.encounter_counter [boss]
if (not try_number) then
local previous_combat
for i = 2, #self.tabelas do
@@ -248,43 +243,43 @@ function historico:adicionar (tabela)
break
end
end
if (not try_number) then
try_number = 1
end
else
try_number = _detalhes.encounter_counter [boss] + 1
try_number = Details.encounter_counter [boss] + 1
end
_detalhes.encounter_counter [boss] = try_number
Details.encounter_counter [boss] = try_number
tabela.is_boss.try_number = try_number
end
--see if can add the encounter to overall data
local canAddToOverall = _detalhes:CanAddCombatToOverall (tabela)
local canAddToOverall = Details:CanAddCombatToOverall (tabela)
if (canAddToOverall) then
--if (InCombatLockdown()) then
-- _detalhes:ScheduleAddCombatToOverall (tabela)
-- if (_detalhes.debug) then
-- _detalhes:Msg ("(debug) overall data flag match > in combat scheduling overall addition.")
-- _detalhes:Msg("(debug) overall data flag match > in combat scheduling overall addition.")
-- end
--else
if (_detalhes.debug) then
_detalhes:Msg ("(debug) overall data flag match addind the combat to overall data.")
if (Details.debug) then
Details:Msg("(debug) overall data flag match addind the combat to overall data.")
end
historico:adicionar_overall (tabela)
segmentClass:adicionar_overall (tabela)
--end
end
--erase trash segments
if (self.tabelas[2]) then
local _segundo_combate = self.tabelas[2]
local container_damage = _segundo_combate [1]
local container_heal = _segundo_combate [2]
--regular cleanup
for _, jogador in ipairs(container_damage._ActorTable) do
for _, jogador in ipairs(container_damage._ActorTable) do
--remover a tabela de last events
jogador.last_events_table = nil
--verifica se ele ainda esta registrado na time machine
@@ -292,7 +287,7 @@ function historico:adicionar (tabela)
jogador:DesregistrarNaTimeMachine()
end
end
for _, jogador in ipairs(container_heal._ActorTable) do
for _, jogador in ipairs(container_heal._ActorTable) do
--remover a tabela de last events
jogador.last_events_table = nil
--verifica se ele ainda esta registrado na time machine
@@ -300,12 +295,12 @@ function historico:adicionar (tabela)
jogador:DesregistrarNaTimeMachine()
end
end
if (_detalhes.trash_auto_remove) then
if (Details.trash_auto_remove) then
local _terceiro_combate = self.tabelas[3]
if (_terceiro_combate and not _terceiro_combate.is_mythic_dungeon_segment) then
if ((_terceiro_combate.is_trash and not _terceiro_combate.is_boss) or (_terceiro_combate.is_temporary)) then
--verificar novamente a time machine
for _, jogador in ipairs(_terceiro_combate [1]._ActorTable) do --damage
@@ -319,33 +314,33 @@ function historico:adicionar (tabela)
end
end
--remover
_table_remove (self.tabelas, 3)
_detalhes:SendEvent("DETAILS_DATA_SEGMENTREMOVED", nil, nil)
tremove(self.tabelas, 3)
Details:SendEvent("DETAILS_DATA_SEGMENTREMOVED", nil, nil)
end
end
end
end
--verifica se precisa apagar a ltima tabela do histrico
if (#self.tabelas > _detalhes.segments_amount) then
if (#self.tabelas > Details.segments_amount) then
local combat_removed, combat_index
--verifica se esto dando try em um boss e remove o combate menos relevante
local bossid = tabela.is_boss and tabela.is_boss.id
local last_segment = self.tabelas [#self.tabelas]
local last_bossid = last_segment.is_boss and last_segment.is_boss.id
if (_detalhes.zone_type == "raid" and bossid and last_bossid and bossid == last_bossid) then
if (Details.zone_type == "raid" and bossid and last_bossid and bossid == last_bossid) then
local shorter_combat
local shorter_id
local min_time = 99999
for i = 4, #self.tabelas do
local combat = self.tabelas [i]
if (combat.is_boss and combat.is_boss.id == bossid and combat:GetCombatTime() < min_time and not combat.is_boss.killed) then
@@ -354,13 +349,13 @@ function historico:adicionar (tabela)
min_time = combat:GetCombatTime()
end
end
if (shorter_combat) then
combat_removed = shorter_combat
combat_index = shorter_id
end
end
if (not combat_removed) then
combat_removed = self.tabelas [#self.tabelas]
combat_index = #self.tabelas
@@ -377,19 +372,19 @@ function historico:adicionar (tabela)
jogador:DesregistrarNaTimeMachine()
end
end
--remover
_table_remove (self.tabelas, combat_index)
_detalhes:SendEvent("DETAILS_DATA_SEGMENTREMOVED")
tremove(self.tabelas, combat_index)
Details:SendEvent("DETAILS_DATA_SEGMENTREMOVED")
end
--chama a funo que ir atualizar as instncias com segmentos no histrico
_detalhes:InstanciaCallFunction (_detalhes.AtualizaSegmentos_AfterCombat, self)
--_detalhes:InstanciaCallFunction (_detalhes.AtualizarJanela)
Details:InstanciaCallFunction(Details.AtualizaSegmentos_AfterCombat, self)
--_detalhes:InstanciaCallFunction(_detalhes.AtualizarJanela)
end
--verifica se tem alguma instancia congelada mostrando o segmento recm liberado
function _detalhes:CheckFreeze (instancia, index_liberado, tabela)
function Details:CheckFreeze (instancia, index_liberado, tabela)
if (instancia.freezed) then --esta congelada
if (instancia.segmento == index_liberado) then
instancia.showing = tabela
@@ -398,127 +393,126 @@ function _detalhes:CheckFreeze (instancia, index_liberado, tabela)
end
end
function _detalhes:SetOverallResetOptions (reset_new_boss, reset_new_challenge, reset_on_logoff, reset_new_pvp)
function Details:SetOverallResetOptions (reset_new_boss, reset_new_challenge, reset_on_logoff, reset_new_pvp)
if (reset_new_boss == nil) then
reset_new_boss = _detalhes.overall_clear_newboss
reset_new_boss = Details.overall_clear_newboss
end
if (reset_new_challenge == nil) then
reset_new_challenge = _detalhes.overall_clear_newchallenge
reset_new_challenge = Details.overall_clear_newchallenge
end
if (reset_on_logoff == nil) then
reset_on_logoff = _detalhes.overall_clear_logout
reset_on_logoff = Details.overall_clear_logout
end
if (reset_new_pvp == nil) then
reset_new_pvp = _detalhes.overall_clear_pvp
reset_new_pvp = Details.overall_clear_pvp
end
_detalhes.overall_clear_newboss = reset_new_boss
_detalhes.overall_clear_newchallenge = reset_new_challenge
_detalhes.overall_clear_logout = reset_on_logoff
_detalhes.overall_clear_pvp = reset_new_pvp
Details.overall_clear_newboss = reset_new_boss
Details.overall_clear_newchallenge = reset_new_challenge
Details.overall_clear_logout = reset_on_logoff
Details.overall_clear_pvp = reset_new_pvp
end
function historico:resetar_overall()
function segmentClass:resetar_overall()
--if (InCombatLockdown()) then
-- _detalhes:Msg (Loc ["STRING_ERASE_IN_COMBAT"])
-- _detalhes:Msg(Loc ["STRING_ERASE_IN_COMBAT"])
-- _detalhes.schedule_remove_overall = true
--else
--fecha a janela de informaes do jogador
_detalhes:FechaJanelaInfo()
_detalhes.tabela_overall = combate:NovaTabela()
for index, instancia in ipairs(_detalhes.tabela_instancias) do
Details:FechaJanelaInfo()
Details.tabela_overall = combatClass:NovaTabela()
for index, instancia in ipairs(Details.tabela_instancias) do
if (instancia.ativa and instancia.segmento == -1) then
instancia:InstanceReset()
instancia:ReajustaGump()
end
end
if (_detalhes.schedule_add_to_overall) then --deprecated
wipe (_detalhes.schedule_add_to_overall)
if (Details.schedule_add_to_overall) then --deprecated
wipe (Details.schedule_add_to_overall)
end
--end
--stop bar testing if any
_detalhes:StopTestBarUpdate()
_detalhes:ClockPluginTickOnSegment()
Details:StopTestBarUpdate()
Details:ClockPluginTickOnSegment()
end
function historico:resetar()
function segmentClass:resetar()
if (Details.bosswindow) then
Details.bosswindow:Reset()
end
if (_detalhes.bosswindow) then
_detalhes.bosswindow:Reset()
end
--stop bar testing if any
_detalhes:StopTestBarUpdate()
if (_detalhes.tabela_vigente.verifica_combate) then --finaliza a checagem se esta ou no no combate
_detalhes:CancelTimer (_detalhes.tabela_vigente.verifica_combate)
Details:StopTestBarUpdate()
if (Details.tabela_vigente.verifica_combate) then --finaliza a checagem se esta ou no no combate
Details:CancelTimer(Details.tabela_vigente.verifica_combate)
end
_detalhes.last_closed_combat = nil
Details.last_closed_combat = nil
--remove mythic dungeon schedules if any
_detalhes.schedule_mythicdungeon_trash_merge = nil
_detalhes.schedule_mythicdungeon_endtrash_merge = nil
_detalhes.schedule_mythicdungeon_overallrun_merge = nil
Details.schedule_mythicdungeon_trash_merge = nil
Details.schedule_mythicdungeon_endtrash_merge = nil
Details.schedule_mythicdungeon_overallrun_merge = nil
--clear other schedules
_detalhes.schedule_flag_boss_components = nil
_detalhes.schedule_store_boss_encounter = nil
Details.schedule_flag_boss_components = nil
Details.schedule_store_boss_encounter = nil
--_detalhes.schedule_remove_overall = nil
--fecha a janela de informaes do jogador
_detalhes:FechaJanelaInfo()
Details:FechaJanelaInfo()
--empty temporary tables
_detalhes.atributo_damage:ClearTempTables()
for _, combate in ipairs(_detalhes.tabela_historico.tabelas) do
_table_wipe (combate)
Details.atributo_damage:ClearTempTables()
for _, combate in ipairs(Details.tabela_historico.tabelas) do
wipe(combate)
end
_table_wipe (_detalhes.tabela_vigente)
_table_wipe (_detalhes.tabela_overall)
_table_wipe (_detalhes.spellcache)
if (_detalhes.schedule_add_to_overall) then --deprecated
wipe (_detalhes.schedule_add_to_overall)
wipe(Details.tabela_vigente)
wipe(Details.tabela_overall)
wipe(Details.spellcache)
if (Details.schedule_add_to_overall) then --deprecated
wipe (Details.schedule_add_to_overall)
end
_detalhes:LimparPets()
_detalhes:ResetSpecCache (true) --forar
Details:LimparPets()
Details:ResetSpecCache (true) --forar
-- novo container de historico
_detalhes.tabela_historico = historico:NovoHistorico() --joga fora a tabela antiga e cria uma nova
Details.tabela_historico = segmentClass:NovoHistorico() --joga fora a tabela antiga e cria uma nova
--novo container para armazenar pets
_detalhes.tabela_pets = _detalhes.container_pets:NovoContainer()
_detalhes:UpdateContainerCombatentes()
_detalhes.container_pets:BuscarPets()
Details.tabela_pets = Details.container_pets:NovoContainer()
Details:UpdateContainerCombatentes()
Details.container_pets:BuscarPets()
-- nova tabela do overall e current
_detalhes.tabela_overall = combate:NovaTabela() --joga fora a tabela antiga e cria uma nova
Details.tabela_overall = combatClass:NovaTabela() --joga fora a tabela antiga e cria uma nova
-- cria nova tabela do combate atual
_detalhes.tabela_vigente = combate:NovaTabela (nil, _detalhes.tabela_overall)
Details.tabela_vigente = combatClass:NovaTabela (nil, Details.tabela_overall)
--marca o addon como fora de combate
_detalhes.in_combat = false
Details.in_combat = false
--zera o contador de combates
_detalhes:NumeroCombate (0)
Details:NumeroCombate (0)
--limpa o cache de magias
_detalhes:ClearSpellCache()
Details:ClearSpellCache()
--limpa a tabela de escudos
_table_wipe (_detalhes.escudos)
wipe(Details.escudos)
--reinicia a time machine
timeMachine:Reiniciar()
_table_wipe (_detalhes.cache_damage_group)
_table_wipe (_detalhes.cache_healing_group)
_detalhes:UpdateParserGears()
wipe(Details.cache_damage_group)
wipe(Details.cache_healing_group)
Details:UpdateParserGears()
if (not InCombatLockdown() and not UnitAffectingCombat ("player")) then
--workarround for the "script run too long" issue while outside the combat lockdown
@@ -527,45 +521,44 @@ function historico:resetar()
end
local successful, errortext = pcall (cleargarbage)
if (not successful) then
_detalhes:Msg ("couldn't call collectgarbage()")
Details:Msg("couldn't call collectgarbage()")
end
else
_detalhes.schedule_hard_garbage_collect = true
Details.schedule_hard_garbage_collect = true
end
_detalhes:InstanciaCallFunction(_detalhes.AtualizaSegmentos) -- atualiza o instancia.showing para as novas tabelas criadas
_detalhes:InstanciaCallFunction(_detalhes.AtualizaSoloMode_AfertReset) -- verifica se precisa zerar as tabela da janela solo mode
_detalhes:InstanciaCallFunction(_detalhes.ResetaGump) --_detalhes:ResetaGump ("de todas as instancias")
_detalhes:InstanciaCallFunction(Details.FadeHandler.Fader, "IN", nil, "barras")
_detalhes:RefreshMainWindow(-1) --atualiza todas as instancias
_detalhes:SendEvent("DETAILS_DATA_RESET", nil, nil)
Details:InstanciaCallFunction(Details.AtualizaSegmentos) -- atualiza o instancia.showing para as novas tabelas criadas
Details:InstanciaCallFunction(Details.AtualizaSoloMode_AfertReset) -- verifica se precisa zerar as tabela da janela solo mode
Details:InstanciaCallFunction(Details.ResetaGump) --_detalhes:ResetaGump ("de todas as instancias")
Details:InstanciaCallFunction(Details.FadeHandler.Fader, "IN", nil, "barras")
Details:RefreshMainWindow(-1) --atualiza todas as instancias
Details:SendEvent("DETAILS_DATA_RESET", nil, nil)
end
function _detalhes.refresh:r_historico (este_historico)
_setmetatable (este_historico, historico)
function Details.refresh:r_historico (este_historico)
setmetatable(este_historico, segmentClass)
--este_historico.__index = historico
end
--[[
elseif (_detalhes.trash_concatenate) then
if (true) then
return
end
if (_terceiro_combate) then
if (_terceiro_combate.is_trash and _segundo_combate.is_trash and not _terceiro_combate.is_boss and not _segundo_combate.is_boss) then
--tabela 2 deve ser deletada e somada a tabela 1
if (_detalhes.debug) then
detalhes:Msg ("(debug) concatenating two trash segments.")
detalhes:Msg("(debug) concatenating two trash segments.")
end
_segundo_combate = _segundo_combate + _terceiro_combate
_detalhes.tabela_overall = _detalhes.tabela_overall - _terceiro_combate
_segundo_combate.is_trash = true
--verificar novamente a time machine
@@ -580,7 +573,7 @@ end
end
end
--remover
_table_remove (self.tabelas, 3)
_table_remove(self.tabelas, 3)
_detalhes:SendEvent("DETAILS_DATA_SEGMENTREMOVED", nil, nil)
end
end
+2 -2
View File
@@ -39,7 +39,7 @@ local _
_ActorTable = {}
}
_setmetatable (_newContainer, container_habilidades)
_setmetatable(_newContainer, container_habilidades)
return _newContainer
end
@@ -101,7 +101,7 @@ local _
function _detalhes.refresh:r_container_habilidades (container, shadow)
--reconstri meta e indexes
_setmetatable (container, _detalhes.container_habilidades)
_setmetatable(container, _detalhes.container_habilidades)
container.__index = _detalhes.container_habilidades
local func_criacao = container_habilidades:FuncaoDeCriacao (container.tipo)
container.funcao_de_criacao = func_criacao
+18 -18
View File
@@ -22,14 +22,14 @@ local _table_sort = table.sort --lua local
local _table_insert = table.insert --lua local
local _table_size = table.getn --lua local
local _setmetatable = setmetatable --lua local
local _ipairs = ipairs --lua local
local ipairs = ipairs --lua local
local _pairs = pairs --lua local
local _rawget= rawget --lua local
local _math_min = math.min --lua local
local _math_max = math.max --lua local
local _bit_band = bit.band --lua local
local _unpack = unpack --lua local
local _type = type --lua local
local type = type --lua local
local _GetSpellInfo = _detalhes.getspellinfo -- api local
local _IsInRaid = IsInRaid -- api local
@@ -59,7 +59,7 @@ local temp_table = {}
local target_func = function(main_table)
local i = 1
for name, amount in _pairs (main_table) do
for name, amount in _pairs(main_table) do
local t = temp_table [i]
if (not t) then
t = {"", 0}
@@ -75,7 +75,7 @@ end
local spells_used_func = function(main_table, target)
local i = 1
for spellid, spell_table in _pairs (main_table) do
for spellid, spell_table in _pairs(main_table) do
local target_amount = spell_table.targets [target]
if (target_amount) then
local t = temp_table [i]
@@ -117,14 +117,14 @@ function atributo_custom:damagedoneTooltip (actor, target, spellid, combat, inst
local this_actor = combat (1, targetname)
if (this_actor) then
for name, _ in _pairs (this_actor.damage_from) do
for name, _ in _pairs(this_actor.damage_from) do
local aggressor = combat (1, name)
if (aggressor) then
local spell = aggressor.spells._ActorTable [spellid]
if (spell) then
local on_me = spell.targets [targetname]
if (on_me) then
GameCooltip:AddLine (aggressor.nome, FormatTooltipNumber (_, on_me))
GameCooltip:AddLine(aggressor.nome, FormatTooltipNumber (_, on_me))
_detalhes:AddTooltipBackgroundStatusbar()
end
end
@@ -135,12 +135,12 @@ function atributo_custom:damagedoneTooltip (actor, target, spellid, combat, inst
return
else
local name, _, icon = _GetSpellInfo(spellid)
GameCooltip:AddLine (name)
GameCooltip:AddLine(name)
GameCooltip:AddIcon (icon, 1, 1, 14, 14)
GameCooltip:AddLine (Loc ["STRING_DAMAGE"] .. ": ", spell.total)
GameCooltip:AddLine (Loc ["STRING_HITS"] .. ": ", spell.counter)
GameCooltip:AddLine (Loc ["STRING_CRITICAL_HITS"] .. ": ", spell.c_amt)
GameCooltip:AddLine(Loc ["STRING_DAMAGE"] .. ": ", spell.total)
GameCooltip:AddLine(Loc ["STRING_HITS"] .. ": ", spell.counter)
GameCooltip:AddLine(Loc ["STRING_CRITICAL_HITS"] .. ": ", spell.c_amt)
end
elseif (target) then
@@ -154,7 +154,7 @@ function atributo_custom:damagedoneTooltip (actor, target, spellid, combat, inst
break
end
GameCooltip:AddLine (t[1], FormatTooltipNumber (_, t[2]))
GameCooltip:AddLine(t[1], FormatTooltipNumber (_, t[2]))
_detalhes:AddTooltipBackgroundStatusbar()
GameCooltip:AddIcon ([[Interface\FriendsFrame\StatusIcon-Offline]], 1, 1, 14, 14)
end
@@ -172,7 +172,7 @@ function atributo_custom:damagedoneTooltip (actor, target, spellid, combat, inst
end
if (roster [t[1]]) then
GameCooltip:AddLine (t[1], FormatTooltipNumber (_, t[2]))
GameCooltip:AddLine(t[1], FormatTooltipNumber (_, t[2]))
_detalhes:AddTooltipBackgroundStatusbar()
end
end
@@ -180,7 +180,7 @@ function atributo_custom:damagedoneTooltip (actor, target, spellid, combat, inst
elseif (target == "[player]") then
local target_amount = actor.targets [_detalhes.playername]
if (target_amount) then
GameCooltip:AddLine (targetactor.nome, FormatTooltipNumber (_, target_amount))
GameCooltip:AddLine(targetactor.nome, FormatTooltipNumber (_, target_amount))
_detalhes:AddTooltipBackgroundStatusbar()
end
else
@@ -194,7 +194,7 @@ function atributo_custom:damagedoneTooltip (actor, target, spellid, combat, inst
end
local name, _, icon = _GetSpellInfo(t[1])
GameCooltip:AddLine (name, FormatTooltipNumber (_, t[2]))
GameCooltip:AddLine(name, FormatTooltipNumber (_, t[2]))
_detalhes:AddTooltipBackgroundStatusbar()
GameCooltip:AddIcon (icon, 1, 1, 14, 14)
end
@@ -219,7 +219,7 @@ function atributo_custom:damagedone (actor, source, target, spellid, combat, ins
if (spell) then
if (target) then
if (target == "[all]") then
for target_name, amount in _pairs (spell.targets) do
for target_name, amount in _pairs(spell.targets) do
--add amount
--we need to pass a object here in order to get name and class, so we just get the main damage actor from the combat
@@ -236,7 +236,7 @@ function atributo_custom:damagedone (actor, source, target, spellid, combat, ins
elseif (target == "[raid]") then
local roster = combat.raid_roster
for target_name, amount in _pairs (spell.targets) do
for target_name, amount in _pairs(spell.targets) do
if (roster [target_name]) then
--add amount
instance_container:AddValue (combat (1, target_name), amount, true)
@@ -289,14 +289,14 @@ function atributo_custom:damagedone (actor, source, target, spellid, combat, ins
if (target == "[all]") then
local total = 0
for target_name, amount in _pairs (actor.targets) do
for target_name, amount in _pairs(actor.targets) do
total = total + amount
end
return total
elseif (target == "[raid]") then
local total = 0
for target_name, amount in _pairs (actor.targets) do
for target_name, amount in _pairs(actor.targets) do
if (combat.raid_roster [target_name]) then
total = total + amount
end
+18 -18
View File
@@ -15,14 +15,14 @@
local _table_insert = table.insert --lua local
local _table_size = table.getn --lua local
local _setmetatable = setmetatable --lua local
local _ipairs = ipairs --lua local
local ipairs = ipairs --lua local
local _pairs = pairs --lua local
local _rawget= rawget --lua local
local _math_min = math.min --lua local
local _math_max = math.max --lua local
local _bit_band = bit.band --lua local
local _unpack = unpack --lua local
local _type = type --lua local
local type = type --lua local
local _GetSpellInfo = _detalhes.getspellinfo -- api local
local _IsInRaid = IsInRaid -- api local
@@ -52,7 +52,7 @@
local target_func = function(main_table)
local i = 1
for name, amount in _pairs (main_table) do
for name, amount in _pairs(main_table) do
local t = temp_table [i]
if (not t) then
t = {"", 0}
@@ -68,7 +68,7 @@
local spells_used_func = function(main_table, target)
local i = 1
for spellid, spell_table in _pairs (main_table) do
for spellid, spell_table in _pairs(main_table) do
local target_amount = spell_table.targets [target]
if (target_amount) then
local t = temp_table [i]
@@ -111,14 +111,14 @@
local this_actor = combat (2, targetname)
if (this_actor) then
for name, _ in _pairs (this_actor.healing_from) do
for name, _ in _pairs(this_actor.healing_from) do
local healer = combat (2, name)
if (healer) then
local spell = healer.spells._ActorTable [spellid]
if (spell) then
local on_me = spell.targets [targetname]
if (on_me) then
GameCooltip:AddLine (healer.nome, FormatTooltipNumber (_, on_me))
GameCooltip:AddLine(healer.nome, FormatTooltipNumber (_, on_me))
end
end
end
@@ -128,12 +128,12 @@
return
else
local name, _, icon = _GetSpellInfo(spellid)
GameCooltip:AddLine (name)
GameCooltip:AddLine(name)
GameCooltip:AddIcon (icon, 1, 1, 14, 14)
GameCooltip:AddLine (Loc ["STRING_HEAL"] .. ": ", spell.total)
GameCooltip:AddLine (Loc ["STRING_HITS"] .. ": ", spell.counter)
GameCooltip:AddLine (Loc ["STRING_CRITICAL_HITS"] .. ": ", spell.c_amt)
GameCooltip:AddLine(Loc ["STRING_HEAL"] .. ": ", spell.total)
GameCooltip:AddLine(Loc ["STRING_HITS"] .. ": ", spell.counter)
GameCooltip:AddLine(Loc ["STRING_CRITICAL_HITS"] .. ": ", spell.c_amt)
end
elseif (target) then
@@ -147,7 +147,7 @@
break
end
GameCooltip:AddLine (t[1], FormatTooltipNumber (_, t[2]))
GameCooltip:AddLine(t[1], FormatTooltipNumber (_, t[2]))
_detalhes:AddTooltipBackgroundStatusbar()
GameCooltip:AddIcon ([[Interface\FriendsFrame\StatusIcon-Offline]], 1, 1, 14, 14)
end
@@ -165,14 +165,14 @@
end
if (roster [t[1]]) then
GameCooltip:AddLine (t[1], FormatTooltipNumber (_, t[2]))
GameCooltip:AddLine(t[1], FormatTooltipNumber (_, t[2]))
end
end
elseif (target == "[player]") then
local target_amount = actor.targets [_detalhes.playername]
if (target_amount) then
GameCooltip:AddLine (targetactor.nome, FormatTooltipNumber (_, target_amount))
GameCooltip:AddLine(targetactor.nome, FormatTooltipNumber (_, target_amount))
end
else
@@ -187,7 +187,7 @@
end
local name, _, icon = _GetSpellInfo(t[1])
GameCooltip:AddLine (name, FormatTooltipNumber (_, t[2]))
GameCooltip:AddLine(name, FormatTooltipNumber (_, t[2]))
GameCooltip:AddIcon (icon, 1, 1, 14, 14)
end
end
@@ -208,7 +208,7 @@
if (spell) then
if (target) then
if (target == "[all]") then
for target_name, amount in _pairs (spell.targets) do
for target_name, amount in _pairs(spell.targets) do
--add amount
--we need to pass a object here in order to get name and class, so we just get the main heal actor from the combat
@@ -225,7 +225,7 @@
elseif (target == "[raid]") then
local roster = combat.raid_roster
for target_name, amount in _pairs (spell.targets) do
for target_name, amount in _pairs(spell.targets) do
if (roster [target_name]) then
--add amount
instance_container:AddValue (combat (1, target_name), amount, true)
@@ -278,14 +278,14 @@
if (target == "[all]") then
local total = 0
for target_name, amount in _pairs (actor.targets) do
for target_name, amount in _pairs(actor.targets) do
total = total + amount
end
return total
elseif (target == "[raid]") then
local total = 0
for target_name, amount in _pairs (actor.targets) do
for target_name, amount in _pairs(actor.targets) do
if (combat.raid_roster [target_name]) then
total = total + amount
end
+4 -4
View File
@@ -13,7 +13,7 @@ local SharedMedia = LibStub:GetLibrary("LibSharedMedia-3.0")
function _detalhes:ResetInstanceConfig (maintainsnap)
for key, value in pairs(_detalhes.instance_defaults) do
if (type(value) == "table") then
self [key] = Details.CopyTable (value)
self [key] = Details.CopyTable(value)
else
self [key] = value
end
@@ -60,7 +60,7 @@ function _detalhes:ResetInstanceConfigKeepingValues (maintainsnap)
for key, value in pairs(_detalhes.instance_defaults) do
if (not _detalhes.instance_skin_ignored_values [key]) then
if (type(value) == "table") then
self [key] = Details.CopyTable (value)
self [key] = Details.CopyTable(value)
else
self [key] = value
end
@@ -78,7 +78,7 @@ function _detalhes:LoadInstanceConfig()
for key, value in pairs(_detalhes.instance_defaults) do
if (self [key] == nil) then
if (type(value) == "table") then
self [key] = Details.CopyTable (_detalhes.instance_defaults [key])
self [key] = Details.CopyTable(_detalhes.instance_defaults [key])
else
self [key] = value
end
@@ -87,7 +87,7 @@ function _detalhes:LoadInstanceConfig()
for key2, value2 in pairs(value) do
if (self [key] [key2] == nil) then
if (type(value2) == "table") then
self [key] [key2] = Details.CopyTable (_detalhes.instance_defaults [key] [key2])
self [key] [key2] = Details.CopyTable(_detalhes.instance_defaults [key] [key2])
else
self [key] [key2] = value2
end
+391 -396
View File
File diff suppressed because it is too large Load Diff
+103 -103
View File
@@ -1,5 +1,5 @@
local _detalhes = _G._detalhes
local Loc = LibStub ("AceLocale-3.0"):GetLocale ( "Details" )
local Loc = LibStub("AceLocale-3.0"):GetLocale ( "Details" )
local UnitName = UnitName
local UnitGUID = UnitGUID
@@ -137,7 +137,7 @@ end
end
end
if (is_startup) then
return _detalhes.chat_embed:ScheduleTimer ("DelayedChatEmbed", 5)
return _detalhes.chat_embed:ScheduleTimer("DelayedChatEmbed", 5)
end
local tabname = _detalhes.chat_tab_embed.tab_name
@@ -330,7 +330,7 @@ end
function _detalhes:SetDeathLogLimit (limit)
if (limit and type (limit) == "number" and limit >= 8) then
if (limit and type(limit) == "number" and limit >= 8) then
_detalhes.deadlog_events = limit
local combat = _detalhes.tabela_vigente
@@ -432,7 +432,7 @@ function _detalhes:ResetSpecCache (forced)
if (type(my_spec) == "number") then
local spec_number = DetailsFramework.GetSpecializationInfo (my_spec)
if (type(spec_number) == "number") then
local pguid = UnitGUID (_detalhes.playername)
local pguid = UnitGUID(_detalhes.playername)
if (pguid) then
_detalhes.cached_specs [pguid] = spec_number
end
@@ -448,7 +448,7 @@ function _detalhes:ResetSpecCache (forced)
local c_combat_dmg = _detalhes.tabela_vigente [1]
local c_combat_heal = _detalhes.tabela_vigente [2]
for i = 1, GetNumGroupMembers(), 1 do
local name = GetUnitName ("raid" .. i, true)
local name = GetUnitName("raid" .. i, true)
local index = c_combat_dmg._NameIndexTable [name]
if (index) then
local actor = c_combat_dmg._ActorTable [index]
@@ -532,9 +532,9 @@ _detalhes.PerformanceIcons = {
function _detalhes:CheckForPerformanceProfile()
local type = _detalhes:GetPerformanceRaidType()
local performanceType = _detalhes:GetPerformanceRaidType()
local profile = _detalhes.performance_profiles [type]
local profile = _detalhes.performance_profiles [performanceType]
if (profile and profile.enabled) then
_detalhes:SetWindowUpdateSpeed(profile.update_speed, true)
@@ -545,12 +545,12 @@ function _detalhes:CheckForPerformanceProfile()
_detalhes:CaptureSet(profile.miscdata, "miscdata")
_detalhes:CaptureSet(profile.aura, "aura")
if (not _detalhes.performance_profile_lastenabled or _detalhes.performance_profile_lastenabled ~= type) then
_detalhes:InstanceAlert (Loc ["STRING_OPTIONS_PERFORMANCE_PROFILE_LOAD"] .. type, {_detalhes.PerformanceIcons [type].icon, 14, 14, false, 0, 1, 0, 1, unpack (_detalhes.PerformanceIcons [type].color)} , 5, {_detalhes.empty_function})
if (not _detalhes.performance_profile_lastenabled or _detalhes.performance_profile_lastenabled ~= performanceType) then
_detalhes:InstanceAlert (Loc ["STRING_OPTIONS_PERFORMANCE_PROFILE_LOAD"] .. performanceType, {_detalhes.PerformanceIcons [performanceType].icon, 14, 14, false, 0, 1, 0, 1, unpack(_detalhes.PerformanceIcons [performanceType].color)} , 5, {_detalhes.empty_function})
end
_detalhes.performance_profile_enabled = type
_detalhes.performance_profile_lastenabled = type
_detalhes.performance_profile_enabled = performanceType
_detalhes.performance_profile_lastenabled = performanceType
else
_detalhes:SetWindowUpdateSpeed(_detalhes.update_speed)
_detalhes:SetUseAnimations(_detalhes.use_row_animations)
@@ -653,11 +653,11 @@ function _detalhes:RegisterBackgroundTask (name, func, priority, ...)
background_tasks [name].func = func
background_tasks [name].priority = priority
background_tasks [name].args = {...}
background_tasks [name].args_amt = select ("#", ...)
background_tasks [name].args_amt = select("#", ...)
background_tasks [name].object = self
return
else
background_tasks [name] = {func = func, lastexec = time(), priority = priority, nextexec = time() + task_timers [priority] * 60, args = {...}, args_amt = select ("#", ...), object = self}
background_tasks [name] = {func = func, lastexec = time(), priority = priority, nextexec = time() + task_timers [priority] * 60, args = {...}, args_amt = select("#", ...), object = self}
end
end
@@ -675,9 +675,9 @@ function _detalhes:DoBackgroundTasks()
for taskName, taskTable in pairs(background_tasks) do
if (t > taskTable.nextexec) then
if (type(taskTable.func) == "string") then
taskTable.object [taskTable.func] (taskTable.object, unpack (taskTable.args, 1, taskTable.args_amt))
taskTable.object [taskTable.func] (taskTable.object, unpack(taskTable.args, 1, taskTable.args_amt))
else
taskTable.func (unpack (taskTable.args, 1, taskTable.args_amt))
taskTable.func (unpack(taskTable.args, 1, taskTable.args_amt))
end
taskTable.nextexec = random (30, 120) + t + (task_timers [taskTable.priority] * 60)
@@ -725,7 +725,7 @@ function _detalhes.storage:HaveDataForEncounter (diff, encounter_id, guild_name)
return
end
if (guild_name and type (guild_name) == "boolean") then
if (guild_name and type(guild_name) == "boolean") then
guild_name = GetGuildInfo ("player")
end
@@ -761,7 +761,7 @@ function _detalhes.storage:GetBestFromGuild (diff, encounter_id, role, dps, guil
if (not guild_name) then
if (_detalhes.debug) then
_detalhes:Msg ("(debug) GetBestFromGuild() guild name invalid.")
_detalhes:Msg("(debug) GetBestFromGuild() guild name invalid.")
end
return
end
@@ -831,7 +831,7 @@ function _detalhes.storage:GetPlayerGuildRank (diff, encounter_id, role, playern
if (not guild_name) then
if (_detalhes.debug) then
_detalhes:Msg ("(debug) GetBestFromGuild() guild name invalid.")
_detalhes:Msg("(debug) GetBestFromGuild() guild name invalid.")
end
return
end
@@ -1046,7 +1046,7 @@ function _detalhes.storage:GetIDsToGuildSync()
end
if (_detalhes.debug) then
_detalhes:Msg ("(debug) [RoS-EncounterSync] sending " .. #IDs .. " IDs.")
_detalhes:Msg("(debug) [RoS-EncounterSync] sending " .. #IDs .. " IDs.")
end
return IDs
@@ -1063,7 +1063,7 @@ function _detalhes.storage:CheckMissingIDsToGuildSync (IDsList)
if (type(IDsList) ~= "table") then
if (_detalhes.debug) then
_detalhes:Msg ("(debug) [RoS-EncounterSync] RoC IDsList isn't a table.")
_detalhes:Msg("(debug) [RoS-EncounterSync] RoC IDsList isn't a table.")
end
return
end
@@ -1085,7 +1085,7 @@ function _detalhes.storage:CheckMissingIDsToGuildSync (IDsList)
end
if (_detalhes.debug) then
_detalhes:Msg ("(debug) [RoC-EncounterSync] RoS found " .. #RequestIDs .. " encounters out dated.")
_detalhes:Msg("(debug) [RoC-EncounterSync] RoS found " .. #RequestIDs .. " encounters out dated.")
end
return RequestIDs
@@ -1101,7 +1101,7 @@ function _detalhes.storage:BuildEncounterDataToGuildSync (IDsList)
if (type(IDsList) ~= "table") then
if (_detalhes.debug) then
_detalhes:Msg ("(debug) [RoS-EncounterSync] IDsList isn't a table.")
_detalhes:Msg("(debug) [RoS-EncounterSync] IDsList isn't a table.")
end
return
end
@@ -1114,7 +1114,7 @@ function _detalhes.storage:BuildEncounterDataToGuildSync (IDsList)
local MaxAmount = 0
if (_detalhes.debug) then
_detalhes:Msg ("(debug) [RoS-EncounterSync] the client requested " .. #IDsList .. " encounters.")
_detalhes:Msg("(debug) [RoS-EncounterSync] the client requested " .. #IDsList .. " encounters.")
end
for index, ID in ipairs(IDsList) do
@@ -1148,7 +1148,7 @@ function _detalhes.storage:BuildEncounterDataToGuildSync (IDsList)
end
if (_detalhes.debug) then
_detalhes:Msg ("(debug) [RoS-EncounterSync] sending " .. AmtToSend .. " encounters.")
_detalhes:Msg("(debug) [RoS-EncounterSync] sending " .. AmtToSend .. " encounters.")
end
return EncounterList
@@ -1167,12 +1167,12 @@ function _detalhes.storage:AddGuildSyncData (data, source)
_detalhes.LastGuildSyncReceived = GetTime()
for diff, diffTable in pairs(data) do
if (type(diff) == "number" and type (diffTable) == "table") then
if (type(diff) == "number" and type(diffTable) == "table") then
for encounterID, encounterTable in pairs(diffTable) do
if (type(encounterID) == "number" and type (encounterTable) == "table") then
if (type(encounterID) == "number" and type(encounterTable) == "table") then
for index, encounter in ipairs(encounterTable) do
--validate the encounter
if (type(encounter.servertime) == "number" and type (encounter.time) == "number" and type (encounter.guild) == "string" and type (encounter.date) == "string" and type (encounter.healing) == "table" and type (encounter.elapsed) == "number" and type (encounter.damage) == "table") then
if (type(encounter.servertime) == "number" and type(encounter.time) == "number" and type(encounter.guild) == "string" and type(encounter.date) == "string" and type(encounter.healing) == "table" and type(encounter.elapsed) == "number" and type(encounter.damage) == "table") then
--check if the encounter is from the current raiding tier
if (encounter_is_current_tier (encounterID)) then
--check if this encounter already has been added from another sync
@@ -1189,17 +1189,17 @@ function _detalhes.storage:AddGuildSyncData (data, source)
AddedAmount = AddedAmount + 1
else
if (_detalhes.debug) then
_detalhes:Msg ("(debug) [RoS-EncounterSync] received a duplicated encounter table.")
_detalhes:Msg("(debug) [RoS-EncounterSync] received a duplicated encounter table.")
end
end
else
if (_detalhes.debug) then
_detalhes:Msg ("(debug) [RoS-EncounterSync] received an old tier encounter.")
_detalhes:Msg("(debug) [RoS-EncounterSync] received an old tier encounter.")
end
end
else
if (_detalhes.debug) then
_detalhes:Msg ("(debug) [RoS-EncounterSync] received an invalid encounter table.")
_detalhes:Msg("(debug) [RoS-EncounterSync] received an invalid encounter table.")
end
end
end
@@ -1209,7 +1209,7 @@ function _detalhes.storage:AddGuildSyncData (data, source)
end
if (_detalhes.debug) then
_detalhes:Msg ("(debug) [RoS-EncounterSync] added " .. AddedAmount .. " to database.")
_detalhes:Msg("(debug) [RoS-EncounterSync] added " .. AddedAmount .. " to database.")
end
if (_G.DetailsRaidHistoryWindow and _G.DetailsRaidHistoryWindow:IsShown()) then
@@ -1379,7 +1379,7 @@ end
function _detalhes.ScheduleLoadStorage()
if (InCombatLockdown() or UnitAffectingCombat ("player")) then
if (_detalhes.debug) then
print ("|cFFFFFF00Details! storage scheduled to load (player in combat).")
print("|cFFFFFF00Details! storage scheduled to load (player in combat).")
end
_detalhes.schedule_storage_load = true
return
@@ -1388,7 +1388,7 @@ function _detalhes.ScheduleLoadStorage()
local loaded, reason = LoadAddOn ("Details_DataStorage")
if (not loaded) then
if (_detalhes.debug) then
print ("|cFFFFFF00Details! Storage|r: can't load storage, may be the addon is disabled.")
print("|cFFFFFF00Details! Storage|r: can't load storage, may be the addon is disabled.")
end
return
end
@@ -1401,11 +1401,11 @@ function _detalhes.ScheduleLoadStorage()
_detalhes.schedule_storage_load = nil
_detalhes.StorageLoaded = true
if (_detalhes.debug) then
print ("|cFFFFFF00Details! storage loaded.")
print("|cFFFFFF00Details! storage loaded.")
end
else
if (_detalhes.debug) then
print ("|cFFFFFF00Details! fail to load storage, scheduled once again.")
print("|cFFFFFF00Details! fail to load storage, scheduled once again.")
end
_detalhes.schedule_storage_load = true
end
@@ -1423,7 +1423,7 @@ function _detalhes.OpenStorage()
--can't open it during combat
if (InCombatLockdown() or UnitAffectingCombat ("player")) then
if (_detalhes.debug) then
print ("|cFFFFFF00Details! Storage|r: can't load storage due to combat.")
print("|cFFFFFF00Details! Storage|r: can't load storage due to combat.")
end
return false
end
@@ -1431,7 +1431,7 @@ function _detalhes.OpenStorage()
local loaded, reason = LoadAddOn ("Details_DataStorage")
if (not loaded) then
if (_detalhes.debug) then
print ("|cFFFFFF00Details! Storage|r: can't load storage, may be the addon is disabled.")
print("|cFFFFFF00Details! Storage|r: can't load storage, may be the addon is disabled.")
end
return
end
@@ -1456,7 +1456,7 @@ function Details.Database.LoadDB()
local loaded, reason = LoadAddOn("Details_DataStorage")
if (not loaded) then
if (_detalhes.debug) then
print ("|cFFFFFF00Details! Storage|r: can't save the encounter, couldn't load DataStorage, may be the addon is disabled.")
print("|cFFFFFF00Details! Storage|r: can't save the encounter, couldn't load DataStorage, may be the addon is disabled.")
end
return
end
@@ -1469,13 +1469,13 @@ function Details.Database.LoadDB()
db = _detalhes:CreateStorageDB()
if (not db) then
if (_detalhes.debug) then
print ("|cFFFFFF00Details! Storage|r: can't save the encounter, couldn't load DataStorage, may be the addon is disabled.")
print("|cFFFFFF00Details! Storage|r: can't save the encounter, couldn't load DataStorage, may be the addon is disabled.")
end
return
end
elseif (not db) then
if (_detalhes.debug) then
print ("|cFFFFFF00Details! Storage|r: can't save the encounter, couldn't load DataStorage, may be the addon is disabled.")
print("|cFFFFFF00Details! Storage|r: can't save the encounter, couldn't load DataStorage, may be the addon is disabled.")
end
return
end
@@ -1500,7 +1500,7 @@ function Details.Database.StoreWipe(combat)
if (not combat) then
if (_detalhes.debug) then
print ("|cFFFFFF00Details! Storage|r: combat not found.")
print("|cFFFFFF00Details! Storage|r: combat not found.")
end
return
end
@@ -1511,7 +1511,7 @@ function Details.Database.StoreWipe(combat)
if (not store_instances [mapID]) then
if (_detalhes.debug) then
print ("|cFFFFFF00Details! Storage|r: instance not allowed.")
print("|cFFFFFF00Details! Storage|r: instance not allowed.")
end
return
end
@@ -1521,7 +1521,7 @@ function Details.Database.StoreWipe(combat)
if (not encounter_id) then
if (_detalhes.debug) then
print ("|cFFFFFF00Details! Storage|r: encounter ID not found.")
print("|cFFFFFF00Details! Storage|r: encounter ID not found.")
end
return
end
@@ -1571,7 +1571,7 @@ function Details.Database.StoreEncounter(combat)
if (not combat) then
if (_detalhes.debug) then
print ("|cFFFFFF00Details! Storage|r: combat not found.")
print("|cFFFFFF00Details! Storage|r: combat not found.")
end
return
end
@@ -1582,7 +1582,7 @@ function Details.Database.StoreEncounter(combat)
if (not store_instances [mapID]) then
if (_detalhes.debug) then
print ("|cFFFFFF00Details! Storage|r: instance not allowed.")
print("|cFFFFFF00Details! Storage|r: instance not allowed.")
end
return
end
@@ -1592,7 +1592,7 @@ function Details.Database.StoreEncounter(combat)
if (not encounter_id) then
if (_detalhes.debug) then
print ("|cFFFFFF00Details! Storage|r: encounter ID not found.")
print("|cFFFFFF00Details! Storage|r: encounter ID not found.")
end
return
end
@@ -1682,13 +1682,13 @@ function Details.Database.StoreEncounter(combat)
if (match < raidSize * 0.75 and not storageDebug) then
if (_detalhes.debug) then
print ("|cFFFFFF00Details! Storage|r: can't save the encounter, need at least 75% of players be from your guild.")
print("|cFFFFFF00Details! Storage|r: can't save the encounter, need at least 75% of players be from your guild.")
end
return
end
else
if (_detalhes.debug) then
print ("|cFFFFFF00Details! Storage|r: player isn't in a guild.")
print("|cFFFFFF00Details! Storage|r: player isn't in a guild.")
end
return
end
@@ -1714,7 +1714,7 @@ function Details.Database.StoreEncounter(combat)
for i = 1, GetNumGroupMembers() do
local role = UnitGroupRolesAssigned ("raid" .. i)
local role = UnitGroupRolesAssigned("raid" .. i)
if (UnitIsInMyGuild ("raid" .. i)) then
if (role == "DAMAGER" or role == "TANK") then
@@ -1727,8 +1727,8 @@ function Details.Database.StoreEncounter(combat)
local damage_actor = damage_container_pool [damage_container_hash [player_name]]
if (damage_actor) then
local guid = UnitGUID (player_name) or UnitGUID (UnitName ("raid" .. i))
this_combat_data.damage [player_name] = {floor (damage_actor.total), _detalhes.item_level_pool [guid] and _detalhes.item_level_pool [guid].ilvl or 0, class or 0}
local guid = UnitGUID(player_name) or UnitGUID(UnitName ("raid" .. i))
this_combat_data.damage [player_name] = {floor(damage_actor.total), _detalhes.item_level_pool [guid] and _detalhes.item_level_pool [guid].ilvl or 0, class or 0}
end
elseif (role == "HEALER") then
local player_name, player_realm = UnitName ("raid" .. i)
@@ -1740,8 +1740,8 @@ function Details.Database.StoreEncounter(combat)
local heal_actor = healing_container_pool [healing_container_hash [player_name]]
if (heal_actor) then
local guid = UnitGUID (player_name) or UnitGUID (UnitName ("raid" .. i))
this_combat_data.healing [player_name] = {floor (heal_actor.total), _detalhes.item_level_pool [guid] and _detalhes.item_level_pool [guid].ilvl or 0, class or 0}
local guid = UnitGUID(player_name) or UnitGUID(UnitName ("raid" .. i))
this_combat_data.healing [player_name] = {floor(heal_actor.total), _detalhes.item_level_pool [guid] and _detalhes.item_level_pool [guid].ilvl or 0, class or 0}
end
end
end
@@ -1750,10 +1750,10 @@ function Details.Database.StoreEncounter(combat)
--add the encounter data
tinsert(encounter_database, this_combat_data)
if (_detalhes.debug) then
print ("|cFFFFFF00Details! Storage|r: combat data added to encounter database.")
print("|cFFFFFF00Details! Storage|r: combat data added to encounter database.")
end
local myrole = UnitGroupRolesAssigned ("player")
local myrole = UnitGroupRolesAssigned("player")
local mybest, onencounter = _detalhes.storage:GetBestFromPlayer (diff, encounter_id, myrole, _detalhes.playername, true) --get dps or hps
local mybest2 = mybest and mybest[1] or 0
@@ -1769,11 +1769,11 @@ function Details.Database.StoreEncounter(combat)
if (myBestDps > d_one) then
if (not _detalhes.deny_score_messages) then
print (Loc ["STRING_DETAILS1"] .. format (Loc ["STRING_SCORE_NOTBEST"], _detalhes:ToK2 (d_one), _detalhes:ToK2 (myBestDps), onencounter.date, mybest[2]))
print(Loc ["STRING_DETAILS1"] .. format (Loc ["STRING_SCORE_NOTBEST"], _detalhes:ToK2 (d_one), _detalhes:ToK2 (myBestDps), onencounter.date, mybest[2]))
end
else
if (not _detalhes.deny_score_messages) then
print (Loc ["STRING_DETAILS1"] .. format (Loc ["STRING_SCORE_BEST"], _detalhes:ToK2 (d_one)))
print(Loc ["STRING_DETAILS1"] .. format (Loc ["STRING_SCORE_BEST"], _detalhes:ToK2 (d_one)))
end
end
end
@@ -1782,7 +1782,7 @@ function Details.Database.StoreEncounter(combat)
if (lower_instance) then
local instance = _detalhes:GetInstance(lower_instance)
if (instance) then
local my_role = UnitGroupRolesAssigned ("player")
local my_role = UnitGroupRolesAssigned("player")
if (my_role == "TANK") then
my_role = "DAMAGER"
end
@@ -1798,7 +1798,7 @@ function Details.Database.StoreEncounter(combat)
end
else
if (_detalhes.debug) then
print ("|cFFFFFF00Details! Storage|r: raid difficulty must be heroic or mythic.")
print("|cFFFFFF00Details! Storage|r: raid difficulty must be heroic or mythic.")
end
end
end
@@ -1821,7 +1821,7 @@ local inspecting = {}
ilvl_core.forced_inspects = {}
function ilvl_core:HasQueuedInspec (unitName)
local guid = UnitGUID (unitName)
local guid = UnitGUID(unitName)
if (guid) then
return ilvl_core.forced_inspects [guid]
end
@@ -1849,7 +1849,7 @@ function _detalhes:IlvlFromNetwork (player, realm, core, serialNumber, itemLevel
talents = talents .. talentsSelected [i] .. ","
end
end
_detalhes:Msg ("(debug) Received PlayerInfo Data: " .. (player or "Invalid Player Name") .. " | " .. (itemLevel or "Invalid Item Level") .. " | " .. (currentSpec or "Invalid Spec") .. " | " .. talents .. " | " .. (serialNumber or "Invalid Serial"))
_detalhes:Msg("(debug) Received PlayerInfo Data: " .. (player or "Invalid Player Name") .. " | " .. (itemLevel or "Invalid Item Level") .. " | " .. (currentSpec or "Invalid Spec") .. " | " .. talents .. " | " .. (serialNumber or "Invalid Serial"))
end
if (not player) then
@@ -1931,16 +1931,16 @@ function ilvl_core:CalcItemLevel (unitid, guid, shout)
end
local average = item_level / item_amount
--print (UnitName (unitid), "ILVL:", average, unitid, "items:", item_amount)
--print(UnitName (unitid), "ILVL:", average, unitid, "items:", item_amount)
--register
if (average > 0) then
if (shout) then
_detalhes:Msg (UnitName(unitid) .. " item level: " .. average)
_detalhes:Msg(UnitName(unitid) .. " item level: " .. average)
end
if (average > MIN_ILEVEL_TO_STORE) then
local name = _detalhes:GetCLName (unitid)
local name = _detalhes:GetCLName(unitid)
_detalhes.item_level_pool [guid] = {name = name, ilvl = average, time = time()}
end
end
@@ -1971,7 +1971,7 @@ function ilvl_core:CalcItemLevel (unitid, guid, shout)
if (talents [1]) then
_detalhes.cached_talents [guid] = talents
Details:SendEvent("UNIT_TALENTS", nil, unitid, talents, guid)
--print (UnitName (unitid), "talents:", unpack (talents))
--print(UnitName (unitid), "talents:", unpack(talents))
end
end
--------------------------------------------------------------------------------------------------------
@@ -1980,7 +1980,7 @@ function ilvl_core:CalcItemLevel (unitid, guid, shout)
if (type(ilvl_core.forced_inspects [guid].callback) == "function") then
local okey, errortext = pcall (ilvl_core.forced_inspects[guid].callback, guid, unitid, ilvl_core.forced_inspects[guid].param1, ilvl_core.forced_inspects[guid].param2)
if (not okey) then
_detalhes:Msg ("Error on QueryInspect callback: " .. errortext)
_detalhes:Msg("Error on QueryInspect callback: " .. errortext)
end
end
ilvl_core.forced_inspects [guid] = nil
@@ -1993,33 +1993,33 @@ end
_detalhes.ilevel.CalcItemLevel = ilvl_core.CalcItemLevel
inspect_frame:SetScript("OnEvent", function(self, event, ...)
local guid = select (1, ...)
local guid = select(1, ...)
if (inspecting [guid]) then
local unitid, cancel_tread = inspecting [guid] [1], inspecting [guid] [2]
inspecting [guid] = nil
ilvl_core.amt_inspecting = ilvl_core.amt_inspecting - 1
ilvl_core:CancelTimer (cancel_tread)
ilvl_core:CancelTimer(cancel_tread)
--do inspect stuff
if (unitid) then
local t = {unitid, guid}
--ilvl_core:ScheduleTimer ("CalcItemLevel", 0.5, t)
ilvl_core:ScheduleTimer ("CalcItemLevel", 0.5, t)
ilvl_core:ScheduleTimer ("CalcItemLevel", 2, t)
ilvl_core:ScheduleTimer ("CalcItemLevel", 4, t)
ilvl_core:ScheduleTimer ("CalcItemLevel", 8, t)
--ilvl_core:ScheduleTimer("CalcItemLevel", 0.5, t)
ilvl_core:ScheduleTimer("CalcItemLevel", 0.5, t)
ilvl_core:ScheduleTimer("CalcItemLevel", 2, t)
ilvl_core:ScheduleTimer("CalcItemLevel", 4, t)
ilvl_core:ScheduleTimer("CalcItemLevel", 8, t)
end
else
if (IsInRaid()) then
--get the unitID
local serial = ...
if (serial and type (serial) == "string") then
if (serial and type(serial) == "string") then
for i = 1, GetNumGroupMembers() do
if (UnitGUID ("raid" .. i) == serial) then
ilvl_core:ScheduleTimer ("CalcItemLevel", 2, {"raid" .. i, serial})
ilvl_core:ScheduleTimer ("CalcItemLevel", 4, {"raid" .. i, serial})
if (UnitGUID("raid" .. i) == serial) then
ilvl_core:ScheduleTimer("CalcItemLevel", 2, {"raid" .. i, serial})
ilvl_core:ScheduleTimer("CalcItemLevel", 4, {"raid" .. i, serial})
end
end
end
@@ -2033,7 +2033,7 @@ function ilvl_core:InspectTimeOut (guid)
end
function ilvl_core:ReGetItemLevel (t)
local unitid, guid, is_forced, try_number = unpack (t)
local unitid, guid, is_forced, try_number = unpack(t)
return ilvl_core:GetItemLevel (unitid, guid, is_forced, try_number)
end
@@ -2057,12 +2057,12 @@ function ilvl_core:GetItemLevel (unitid, guid, is_forced, try_number)
else
try_number = try_number + 1
end
ilvl_core:ScheduleTimer ("ReGetItemLevel", 3, {unitid, guid, is_forced, try_number})
ilvl_core:ScheduleTimer("ReGetItemLevel", 3, {unitid, guid, is_forced, try_number})
end
return
end
inspecting [guid] = {unitid, ilvl_core:ScheduleTimer ("InspectTimeOut", 12, guid)}
inspecting [guid] = {unitid, ilvl_core:ScheduleTimer("InspectTimeOut", 12, guid)}
ilvl_core.amt_inspecting = ilvl_core.amt_inspecting + 1
--NotifyInspect (unitid)
@@ -2072,17 +2072,17 @@ local NotifyInspectHook = function(unitid)
local unit = unitid:gsub ("%d+", "")
if ((IsInRaid() or IsInGroup()) and (_detalhes:GetZoneType() == "raid" or _detalhes:GetZoneType() == "party")) then
local guid = UnitGUID (unitid)
local name = _detalhes:GetCLName (unitid)
local guid = UnitGUID(unitid)
local name = _detalhes:GetCLName(unitid)
if (guid and name and not inspecting [guid]) then
for i = 1, GetNumGroupMembers() do
if (name == _detalhes:GetCLName (unit .. i)) then
if (name == _detalhes:GetCLName(unit .. i)) then
unitid = unit .. i
break
end
end
inspecting [guid] = {unitid, ilvl_core:ScheduleTimer ("InspectTimeOut", 12, guid)}
inspecting [guid] = {unitid, ilvl_core:ScheduleTimer("InspectTimeOut", 12, guid)}
ilvl_core.amt_inspecting = ilvl_core.amt_inspecting + 1
end
end
@@ -2094,7 +2094,7 @@ function ilvl_core:Reset()
ilvl_core.amt_inspecting = 0
for guid, t in pairs(inspecting) do
ilvl_core:CancelTimer (t[2])
ilvl_core:CancelTimer(t[2])
inspecting [guid] = nil
end
end
@@ -2109,14 +2109,14 @@ function ilvl_core:QueryInspect (unitName, callback, param1)
if (IsInRaid()) then
for i = 1, GetNumGroupMembers() do
if (GetUnitName ("raid" .. i, true) == unitName) then
if (GetUnitName("raid" .. i, true) == unitName) then
unitid = "raid" .. i
break
end
end
elseif (IsInGroup()) then
for i = 1, GetNumGroupMembers()-1 do
if (GetUnitName ("party" .. i, true) == unitName) then
if (GetUnitName("party" .. i, true) == unitName) then
unitid = "party" .. i
break
end
@@ -2129,7 +2129,7 @@ function ilvl_core:QueryInspect (unitName, callback, param1)
return false
end
local guid = UnitGUID (unitid)
local guid = UnitGUID(unitid)
if (not guid) then
return false
elseif (ilvl_core.forced_inspects [guid]) then
@@ -2144,9 +2144,9 @@ function ilvl_core:QueryInspect (unitName, callback, param1)
ilvl_core:GetItemLevel (unitid, guid, true)
if (ilvl_core.clear_queued_list) then
ilvl_core:CancelTimer (ilvl_core.clear_queued_list)
ilvl_core:CancelTimer(ilvl_core.clear_queued_list)
end
ilvl_core.clear_queued_list = ilvl_core:ScheduleTimer ("ClearQueryInspectQueue", 60)
ilvl_core.clear_queued_list = ilvl_core:ScheduleTimer("ClearQueryInspectQueue", 60)
return true
end
@@ -2180,7 +2180,7 @@ function ilvl_core:Loop()
return
end
local guid = UnitGUID (unitid)
local guid = UnitGUID(unitid)
if (not guid) then
ilvl_core.raid_id = ilvl_core.raid_id + 1
return
@@ -2203,7 +2203,7 @@ end
function ilvl_core:EnterCombat()
if (ilvl_core.loop_process) then
ilvl_core:CancelTimer (ilvl_core.loop_process)
ilvl_core:CancelTimer(ilvl_core.loop_process)
ilvl_core.loop_process = nil
end
end
@@ -2247,7 +2247,7 @@ end
function ilvl_core:OnLeave()
if (ilvl_core.loop_process) then
ilvl_core:CancelTimer (ilvl_core.loop_process)
ilvl_core:CancelTimer(ilvl_core.loop_process)
ilvl_core.loop_process = nil
end
end
@@ -2267,7 +2267,7 @@ function _detalhes.ilevel:TrackItemLevel (bool)
else
_detalhes.track_item_level = false
if (ilvl_core.loop_process) then
ilvl_core:CancelTimer (ilvl_core.loop_process)
ilvl_core:CancelTimer(ilvl_core.loop_process)
ilvl_core.loop_process = nil
end
end
@@ -2387,7 +2387,7 @@ if (DetailsFramework.IsWotLKWow()) then
talentWatchClassic.cooldown = 0
C_Timer.NewTicker (600, function()
C_Timer.NewTicker(600, function()
Details:GetOldSchoolTalentInformation()
end)
@@ -2428,7 +2428,7 @@ if (DetailsFramework.IsWotLKWow()) then
for talentIndex = 1, MAX_NUM_TALENTS do
if (talentIndex <= numTalents) then
local name, iconTexture, tier, column, rank, maxRank, isExceptional, available = GetTalentInfo (i, talentIndex)
if (name and rank and type (rank) == "number") then
if (name and rank and type(rank) == "number") then
--send the specID instead of the specName
local specID = Details.textureToSpec [fileName]
tinsert(talentsSelected, {iconTexture, rank, tier, column, i, specID, maxRank})
@@ -2454,20 +2454,20 @@ if (DetailsFramework.IsWotLKWow()) then
Details.playerClassicSpec.talents = talentsSelected
--cache the player specId
_detalhes.cached_specs [UnitGUID ("player")] = Details.playerClassicSpec.specs
_detalhes.cached_specs [UnitGUID("player")] = Details.playerClassicSpec.specs
--cache the player talents
_detalhes.cached_talents [UnitGUID ("player")] = talentsSelected
_detalhes.cached_talents [UnitGUID("player")] = talentsSelected
local role = Details:GetRoleFromSpec(Details.playerClassicSpec.specs, UnitGUID("player"))
if (Details.playerClassicSpec.specs == 103) then
if (role == "TANK") then
Details.playerClassicSpec.specs = 104
_detalhes.cached_specs [UnitGUID ("player")] = Details.playerClassicSpec.specs
_detalhes.cached_specs [UnitGUID("player")] = Details.playerClassicSpec.specs
end
end
_detalhes.cached_roles[UnitGUID ("player")] = role
_detalhes.cached_roles[UnitGUID("player")] = role
--gear status
local item_amount = 16
@@ -2512,13 +2512,13 @@ if (DetailsFramework.IsWotLKWow()) then
if (IsInRaid()) then
_detalhes:SendRaidData(DETAILS_PREFIX_TBC_DATA, compressedData)
if (_detalhes.debug) then
_detalhes:Msg ("(debug) sent talents data to Raid")
_detalhes:Msg("(debug) sent talents data to Raid")
end
elseif (IsInGroup()) then
_detalhes:SendPartyData(DETAILS_PREFIX_TBC_DATA, compressedData)
if (_detalhes.debug) then
_detalhes:Msg ("(debug) sent talents data to Party")
_detalhes:Msg("(debug) sent talents data to Party")
end
end
end
@@ -2583,7 +2583,7 @@ if (DetailsFramework.IsWotLKWow()) then
if (talents) then
local tankTalents = 0
for i = 1, #talents do
local iconTexture, rank, tier, column = unpack (talents [i])
local iconTexture, rank, tier, column = unpack(talents [i])
if (tier == 2) then
if (column == 1 and rank == 5) then
tankTalents = tankTalents + 5
+54 -54
View File
@@ -7,7 +7,7 @@
--local pointers
local _
local _pairs = pairs --lua local
local _ipairs = ipairs --lua local
local ipairs = ipairs --lua local
local _rawget = rawget --lua local
local _setmetatable = setmetatable --lua local
local _table_remove = table.remove --lua local
@@ -52,7 +52,7 @@
--reaplica as tabelas no overall
function _detalhes:RestauraOverallMetaTables()
local is_in_instance = select (1, IsInInstance())
local is_in_instance = select(1, IsInInstance())
local combate = _detalhes.tabela_overall
combate.overall_refreshed = true
@@ -71,8 +71,8 @@
local todos_atributos = {combate [class_type_dano]._ActorTable, combate [class_type_cura]._ActorTable, combate [class_type_e_energy]._ActorTable, combate [class_type_misc]._ActorTable}
for class_type, atributo in _ipairs(todos_atributos) do
for _, esta_classe in _ipairs(atributo) do
for class_type, atributo in ipairs(todos_atributos) do
for _, esta_classe in ipairs(atributo) do
local nome = esta_classe.nome
@@ -101,8 +101,8 @@
end
end
for class_type, atributo in _ipairs(todos_atributos) do
for _, esta_classe in _ipairs(atributo) do
for class_type, atributo in ipairs(todos_atributos) do
for _, esta_classe in ipairs(atributo) do
if (esta_classe.ownerName) then --nome do owner
esta_classe.owner = combate (class_type, esta_classe.ownerName)
end
@@ -130,7 +130,7 @@
local tabelas_do_historico = _detalhes.tabela_historico.tabelas --atalho
--recupera meta function
for _, combat_table in _ipairs(tabelas_do_historico) do
for _, combat_table in ipairs(tabelas_do_historico) do
combat_table.__call = _detalhes.call_combate
end
@@ -148,11 +148,11 @@
combate_overall.end_time = GetTime()
end
local is_in_instance = select (1, IsInInstance())
local is_in_instance = select(1, IsInInstance())
--inicia a recuperao das tabelas e montagem do overall
if (#tabelas_do_historico > 0) then
for index, combate in _ipairs(tabelas_do_historico) do
for index, combate in ipairs(tabelas_do_historico) do
combate.hasSaved = true
@@ -181,7 +181,7 @@
combate_overall.segments_added =combate_overall.segments_added or {}
local date_start, date_end = combate:GetDate()
tinsert(combate_overall.segments_added, {name = combate:GetCombatName (true), elapsed = combate:GetCombatTime(), clock = date_start})
tinsert(combate_overall.segments_added, {name = combate:GetCombatName(true), elapsed = combate:GetCombatTime(), clock = date_start})
end
@@ -199,8 +199,8 @@
--tabela com os 4 tabelas de jogadores
local todos_atributos = {combate [class_type_dano]._ActorTable, combate [class_type_cura]._ActorTable, combate [class_type_e_energy]._ActorTable, combate [class_type_misc]._ActorTable}
for class_type, atributo in _ipairs(todos_atributos) do
for _, esta_classe in _ipairs(atributo) do
for class_type, atributo in ipairs(todos_atributos) do
for _, esta_classe in ipairs(atributo) do
local nome = esta_classe.nome
@@ -247,8 +247,8 @@
end
--reconstri a tabela dos pets
for class_type, atributo in _ipairs(todos_atributos) do
for _, esta_classe in _ipairs(atributo) do
for class_type, atributo in ipairs(todos_atributos) do
for _, esta_classe in ipairs(atributo) do
if (esta_classe.ownerName) then --nome do owner
esta_classe.owner = combate (class_type, esta_classe.ownerName)
end
@@ -277,7 +277,7 @@
function _detalhes:DoInstanceCleanup()
--normal instances
for _, esta_instancia in _ipairs(_detalhes.tabela_instancias) do
for _, esta_instancia in ipairs(_detalhes.tabela_instancias) do
if (esta_instancia.StatusBar.left) then
esta_instancia.StatusBarSaved = {
@@ -330,7 +330,7 @@
end
--unused instances
for _, esta_instancia in _ipairs(_detalhes.unused_instances) do
for _, esta_instancia in ipairs(_detalhes.unused_instances) do
if (esta_instancia.StatusBar.left) then
esta_instancia.StatusBarSaved = {
@@ -389,16 +389,16 @@
overall_added = true
end
for index, combat in _ipairs(combats) do
for index, container in _ipairs(combat) do
for index, esta_classe in _ipairs(container._ActorTable) do
for index, combat in ipairs(combats) do
for index, container in ipairs(combat) do
for index, esta_classe in ipairs(container._ActorTable) do
esta_classe.owner = nil
end
end
end
if (overall_added) then
tremove (combats, #combats)
tremove(combats, #combats)
end
end
@@ -410,9 +410,9 @@
overall_added = true
end
for index, combat in _ipairs(combats) do
for class_type, container in _ipairs(combat) do
for index, esta_classe in _ipairs(container._ActorTable) do
for index, combat in ipairs(combats) 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
@@ -432,7 +432,7 @@
end
if (overall_added) then
tremove (combats, #combats)
tremove(combats, #combats)
end
end
@@ -444,15 +444,15 @@
overall_added = true
end
for index, combat in _ipairs(combats) do
for index, combat in ipairs(combats) do
_detalhes.clear:c_combate (combat)
for index, container in _ipairs(combat) do
for index, container in ipairs(combat) do
_detalhes.clear:c_container_combatentes (container)
end
end
if (overall_added) then
tremove (combats, #combats)
tremove(combats, #combats)
end
end
@@ -464,14 +464,14 @@
overall_added = true
end
for index, combat in _ipairs(combats) do
for index, container in _ipairs(combat) do
for index, combat in ipairs(combats) do
for index, container in ipairs(combat) do
_detalhes.clear:c_container_combatentes_index (container)
end
end
if (overall_added) then
tremove (combats, #combats)
tremove(combats, #combats)
end
end
@@ -519,7 +519,7 @@
_combate.previous_combat = nil
local todos_atributos = {_combate [class_type_dano] or {}, _combate [class_type_cura] or {}, _combate [class_type_e_energy] or {}, _combate [class_type_misc] or {}}
for class_type, _tabela in _ipairs(todos_atributos) do
for class_type, _tabela in ipairs(todos_atributos) do
local conteudo = _tabela._ActorTable
--Limpa tabelas que no estejam em grupo
@@ -550,7 +550,7 @@
end
if (can_erase) then
_table_remove (conteudo, _iter.index)
_table_remove(conteudo, _iter.index)
_iter.cleaned = _iter.cleaned + 1
_iter.data = conteudo [_iter.index]
else
@@ -567,11 +567,11 @@
end
end
for _, _tabela in _ipairs(historico_tabelas) do
for _, _tabela in ipairs(historico_tabelas) do
tabelas_de_combate [#tabelas_de_combate+1] = _tabela
end
for tabela_index, _combate in _ipairs(tabelas_de_combate) do
for tabela_index, _combate in ipairs(tabelas_de_combate) do
--limpa a tabela do grafico
if (_detalhes.clear_graphic) then
@@ -596,7 +596,7 @@
end
if (not _combate.is_mythic_dungeon_segment) then
for class_type, _tabela in _ipairs(todos_atributos) do
for class_type, _tabela in ipairs(todos_atributos) do
local conteudo = _tabela._ActorTable
@@ -687,7 +687,7 @@
end
end
_table_remove (conteudo, _iter.index)
_table_remove(conteudo, _iter.index)
_iter.cleaned = _iter.cleaned + 1
_iter.data = conteudo [_iter.index]
else
@@ -759,7 +759,7 @@
UpdateAddOnMemoryUsage()
local memory = GetAddOnMemoryUsage ("Details")
if (_detalhes.debug) then
_detalhes:Msg ("(debug) checking memory periodically. Using: ",math.floor (memory))
_detalhes:Msg("(debug) checking memory periodically. Using: ",math.floor(memory))
end
if (memory > _detalhes.memory_ram * 1000) then
_detalhes:IniciarColetaDeLixo (1, 60) --sending 1 only check for combat and ignore garbage collect cooldown
@@ -773,14 +773,14 @@
if (_detalhes.ultima_coleta + _detalhes.intervalo_coleta > _detalhes._tempo + 1) then
return
elseif (_detalhes.in_combat or _InCombatLockdown() or _detalhes:IsInInstance()) then
_detalhes:ScheduleTimer ("IniciarColetaDeLixo", 5)
_detalhes:ScheduleTimer("IniciarColetaDeLixo", 5)
return
end
else
if (type(forcar) ~= "boolean") then
if (forcar == 1) then
if (_detalhes.in_combat or _InCombatLockdown()) then
_detalhes:ScheduleTimer ("IniciarColetaDeLixo", 5, forcar)
_detalhes:ScheduleTimer("IniciarColetaDeLixo", 5, forcar)
return
end
end
@@ -789,9 +789,9 @@
if (_detalhes.debug) then
if (forcar) then
_detalhes:Msg ("(debug) collecting garbage with forced state: ", forcar)
_detalhes:Msg("(debug) collecting garbage with forced state: ", forcar)
else
_detalhes:Msg ("(debug) collecting garbage.")
_detalhes:Msg("(debug) collecting garbage.")
end
end
@@ -801,9 +801,9 @@
_detalhes:ClearParserCache()
--limpa barras que no esto sendo usadas nas instncias.
for index, instancia in _ipairs(_detalhes.tabela_instancias) do
for index, instancia in ipairs(_detalhes.tabela_instancias) do
if (instancia.barras and instancia.barras [1]) then
for i, barra in _ipairs(instancia.barras) do
for i, barra in ipairs(instancia.barras) do
if (not barra:IsShown()) then
barra.minha_tabela = nil
end
@@ -821,14 +821,14 @@
--refresh nas janelas
if (limpados > 0) then
_detalhes:InstanciaCallFunction (_detalhes.reset_window)
_detalhes:InstanciaCallFunction(_detalhes.reset_window)
end
_detalhes:ManutencaoTimeMachine()
--print cache states
--if (_detalhes.debug) then
-- _detalhes:Msg ("(debug) removed: damage "..damage.." heal "..heal.." energy "..energy.." misc "..misc)
-- _detalhes:Msg("(debug) removed: damage "..damage.." heal "..heal.." energy "..energy.." misc "..misc)
--end
--elimina pets antigos
@@ -841,7 +841,7 @@
_detalhes:ResetSpecCache()
--wipa container de escudos
_table_wipe (_detalhes.escudos)
_table_wipe(_detalhes.escudos)
_detalhes.ultima_coleta = _detalhes._tempo
@@ -849,7 +849,7 @@
collectgarbage()
UpdateAddOnMemoryUsage()
--local memory2 = GetAddOnMemoryUsage ("Details")
--_detalhes:Msg ("(debug) memory before: "..memory.." memory after: "..memory2)
--_detalhes:Msg("(debug) memory before: "..memory.." memory after: "..memory2)
end
end
@@ -903,7 +903,7 @@
_actor:DesregistrarNaTimeMachine()
end
_table_remove (conteudo, _iter.index)
_table_remove(conteudo, _iter.index)
_iter.data = conteudo [_iter.index]
else
_iter.index = _iter.index + 1
@@ -913,7 +913,7 @@
end
--if (_detalhes.debug) then
-- _detalhes:Msg ("- garbage collect:", tipo, "actors removed:",_iter.cleaned)
-- _detalhes:Msg("- garbage collect:", tipo, "actors removed:",_iter.cleaned)
--end
if (_iter.cleaned > 0) then
@@ -927,14 +927,14 @@
--Combate overall
function _detalhes:ColetarLixo (tipo, lastevent)
--print ("fazendo coleta...")
--print("fazendo coleta...")
local _tempo = _time()
local limpados = 0
--monta a lista de combates
local tabelas_de_combate = {}
for _, _tabela in _ipairs(_detalhes.tabela_historico.tabelas) do
for _, _tabela in ipairs(_detalhes.tabela_historico.tabelas) do
if (_tabela ~= _detalhes.tabela_vigente) then
tabelas_de_combate [#tabelas_de_combate+1] = _tabela
end
@@ -942,7 +942,7 @@
tabelas_de_combate [#tabelas_de_combate+1] = _detalhes.tabela_vigente
--faz a coleta em todos os combates para este atributo
for _, _combate in _ipairs(tabelas_de_combate) do
for _, _combate in ipairs(tabelas_de_combate) do
limpados = limpados + FazColeta (_combate, tipo, lastevent)
end
@@ -969,7 +969,7 @@
--apaga a referncia deste jogador na tabela overall
_iter.cleaned = _iter.cleaned+1
_table_remove (conteudo, _iter.index)
_table_remove(conteudo, _iter.index)
_iter.data = conteudo [_iter.index]
else
@@ -987,7 +987,7 @@
end
if (limpados > 0) then
_detalhes:InstanciaCallFunction (_detalhes.ScheduleUpdate)
_detalhes:InstanciaCallFunction(_detalhes.ScheduleUpdate)
_detalhes:RefreshMainWindow(-1)
end
+1119 -1119
View File
File diff suppressed because it is too large Load Diff
+50 -51
View File
@@ -1,7 +1,7 @@
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
local Loc = LibStub ("AceLocale-3.0"):GetLocale ( "Details" )
local Loc = LibStub("AceLocale-3.0"):GetLocale ( "Details" )
local _detalhes = _G._detalhes
local PixelUtil = PixelUtil or DFPixelUtil
@@ -94,14 +94,14 @@
for key, value in pairs(default) do
if (type(value) == "table") then
if (type(current [key]) ~= "table") then
current [key] = Details.CopyTable (value)
current [key] = Details.CopyTable(value)
else
_detalhes:CheckDefaultTable (current [key], value)
end
else
if (current [key] == nil) then
current [key] = value
--elseif (type(current [key]) ~= type (value)) then
--elseif (type(current [key]) ~= type(value)) then
-- current [key] = value
end
end
@@ -111,7 +111,7 @@
function _detalhes:InstallPlugin (PluginType, PluginName, PluginIcon, PluginObject, PluginAbsoluteName, MinVersion, Author, Version, DefaultSavedTable)
if (MinVersion and MinVersion > _detalhes.realversion) then
print (PluginName, Loc ["STRING_TOOOLD"])
print(PluginName, Loc ["STRING_TOOOLD"])
return _detalhes:NewError ("Details version is out of date.")
end
@@ -136,7 +136,7 @@
end
if (_G [PluginAbsoluteName]) then
print (Loc ["STRING_PLUGIN_NAMEALREADYTAKEN"] .. ": " .. PluginName .. " name: " .. PluginAbsoluteName)
print(Loc ["STRING_PLUGIN_NAMEALREADYTAKEN"] .. ": " .. PluginName .. " name: " .. PluginAbsoluteName)
return
else
_G [PluginAbsoluteName] = PluginObject
@@ -192,7 +192,7 @@
_detalhes.PluginCount.RAID = _detalhes.PluginCount.RAID + 1
_detalhes:InstanceCall ("RaidPluginInstalled", PluginAbsoluteName)
_detalhes:InstanceCall("RaidPluginInstalled", PluginAbsoluteName)
elseif (PluginType == "TOOLBAR") then
@@ -249,7 +249,7 @@
local OnDisableFunction = function(self)
_detalhes:SendEvent("HIDE", self.__parent)
if (bit.band (self.__parent.__options, DETAILSPLUGIN_ALWAYSENABLED) == 0) then
if (bit.band(self.__parent.__options, DETAILSPLUGIN_ALWAYSENABLED) == 0) then
self.__parent.Enabled = false
end
end
@@ -263,13 +263,13 @@
end
local temp_event_function = function()
print ("=====================")
print ("Hello There plugin developer!")
print ("Please make sure you are declaring")
print ("A member called 'OnDetailsEvent' on your plugin object")
print ("With a function to receive the events like bellow:")
print ("function PluginObject:OnDetailsEvent (event, ...) end")
print ("Thank You Sir!===================")
print("=====================")
print("Hello There plugin developer!")
print("Please make sure you are declaring")
print("A member called 'OnDetailsEvent' on your plugin object")
print("With a function to receive the events like bellow:")
print("function PluginObject:OnDetailsEvent (event, ...) end")
print("Thank You Sir!===================")
end
local register_event_func = function(self, event)
@@ -300,12 +300,12 @@
end)
Frame:SetFrameStrata("HIGH")
Frame:SetFrameLevel (6)
Frame:SetFrameLevel(6)
Frame:Hide()
Frame.__parent = NewPlugin
if (bit.band (PluginOptions, DETAILSPLUGIN_ALWAYSENABLED) ~= 0) then
if (bit.band(PluginOptions, DETAILSPLUGIN_ALWAYSENABLED) ~= 0) then
NewPlugin.Enabled = true
else
NewPlugin.Enabled = false
@@ -324,7 +324,7 @@
--temporary details event function
NewPlugin.OnDetailsEvent = temp_event_function
setmetatable (NewPlugin, _detalhes)
setmetatable(NewPlugin, _detalhes)
return NewPlugin
end
@@ -357,8 +357,8 @@
end
end)
options_frame:SetMovable (true)
options_frame:EnableMouse (true)
options_frame:SetMovable(true)
options_frame:EnableMouse(true)
options_frame:SetFrameStrata("DIALOG")
options_frame:SetToplevel (true)
@@ -395,8 +395,8 @@
end
end)
options_frame:SetMovable (true)
options_frame:EnableMouse (true)
options_frame:SetMovable(true)
options_frame:EnableMouse(true)
options_frame:SetFrameStrata("DIALOG")
options_frame:SetToplevel (true)
@@ -409,12 +409,12 @@
insets = {left = 1, right = 1, top = 1, bottom = 1}})
options_frame:SetBackdropColor(0, 0, 0, .7)
Details.gump:ApplyStandardBackdrop (options_frame)
Details.gump:ApplyStandardBackdrop(options_frame)
Details.gump:CreateTitleBar (options_frame, title)
local bigdog = _detalhes.gump:NewImage (options_frame, [[Interface\MainMenuBar\UI-MainMenuBar-EndCap-Human]], 110, 120, nil, {1, 0, 0, 1}, "backgroundBigDog", "$parentBackgroundBigDog")
bigdog:SetPoint("bottomright", options_frame, "bottomright", -3, 0)
bigdog:SetAlpha (.25)
bigdog:SetAlpha(.25)
return options_frame
end
@@ -423,8 +423,8 @@
function _detalhes:CreatePluginWindowContainer()
local f = CreateFrame("frame", "DetailsPluginContainerWindow", UIParent,"BackdropTemplate")
f:EnableMouse (true)
f:SetMovable (true)
f:EnableMouse(true)
f:SetMovable(true)
f:SetPoint("center", UIParent, "center")
f:SetBackdrop(_detalhes.PluginDefaults and _detalhes.PluginDefaults.Backdrop or {bgFile = "Interface\\Tooltips\\UI-Tooltip-Background", tile = true, tileSize = 16, edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1})
f:SetBackdropColor(0, 0, 0, 0.3)
@@ -452,27 +452,26 @@
--lib window
f:SetSize(f.FrameWidth, f.FrameHeight)
local LibWindow = LibStub ("LibWindow-1.1")
LibWindow.RegisterConfig (f, _detalhes.plugin_window_pos)
LibWindow.RestorePosition (f)
LibWindow.MakeDraggable (f)
LibWindow.SavePosition (f)
local LibWindow = LibStub("LibWindow-1.1")
LibWindow.RegisterConfig(f, _detalhes.plugin_window_pos)
LibWindow.RestorePosition(f)
LibWindow.MakeDraggable(f)
LibWindow.SavePosition(f)
--menu background
local menuBackground = CreateFrame("frame", "$parentMenuFrame", f,"BackdropTemplate")
_detalhes:FormatBackground (menuBackground)
local menuBackgroundTexture = menuBackground:CreateTexture("$parentBackgroundTexture", "background", nil, -2)
menuBackgroundTexture:SetAllPoints()
menuBackgroundTexture:SetColorTexture(0.2, 0.2, 0.2, .5)
local menuBackground = CreateFrame("frame", "$parentMenuFrame", f, "BackdropTemplate")
DetailsFramework:ApplyStandardBackdrop(menuBackground)
--statusbar
local statusBar = CreateFrame("frame", nil, menuBackground,"BackdropTemplate")
statusBar:SetPoint("topleft", menuBackground, "bottomleft", 0, 1)
statusBar:SetPoint("topright", f, "bottomright", 0, 1)
statusBar:SetHeight(20)
statusBar:SetAlpha (1)
DetailsFramework:BuildStatusbarAuthorInfo (statusBar)
DetailsFramework:ApplyStandardBackdrop (statusBar)
statusBar:SetAlpha(1)
DetailsFramework:BuildStatusbarAuthorInfo(statusBar)
DetailsFramework:ApplyStandardBackdrop(statusBar)
local extraDarkTexture = statusBar:CreateTexture(nil, "background")
extraDarkTexture:SetAllPoints()
extraDarkTexture:SetColorTexture(.2, .2, .2, .8)
@@ -480,7 +479,7 @@
--
local right_click_to_back = _detalhes.gump:CreateLabel(statusBar, "right click to close", 10, "gray")
right_click_to_back:SetPoint("bottomright", statusBar, "bottomright", -1, 5)
right_click_to_back:SetAlpha (.4)
right_click_to_back:SetAlpha(.4)
--point
menuBackground:SetPoint("topright", f, "topleft", -2, 0)
@@ -489,7 +488,7 @@
local bigdog = _detalhes.gump:NewImage (menuBackground, [[Interface\MainMenuBar\UI-MainMenuBar-EndCap-Human]], 180*0.7, 200*0.7, "overlay", {0, 1, 0, 1}, "backgroundBigDog", "$parentBackgroundBigDog")
bigdog:SetPoint("bottomleft", custom_window, "bottomleft", 0, 1)
bigdog:SetAlpha (0.3)
bigdog:SetAlpha(0.3)
local gradientBelowTheLine = DetailsFramework:CreateTexture(menuBackground, {gradient = "vertical", fromColor = {0, 0, 0, 0.45}, toColor = "transparent"}, 1, 95, "artwork", {0, 1, 0, 1}, "dogGradient")
gradientBelowTheLine:SetPoint("bottoms")
@@ -529,13 +528,13 @@
--scripts
f:SetScript("OnShow", function()
--check if the window isn't out of screen
C_Timer.After (1, function()
C_Timer.After(1, function()
local right = f:GetRight()
if (right and right > GetScreenWidth() + 500) then
f:ClearAllPoints()
f:SetPoint("center", UIParent, "center", 0, 0)
LibWindow.SavePosition (f)
_detalhes:Msg ("detected options panel out of screen, position has reset")
LibWindow.SavePosition(f)
_detalhes:Msg("detected options panel out of screen, position has reset")
end
end)
end)
@@ -553,7 +552,7 @@
f.Debug = false
function f.DebugMsg (...)
if (f.Debug) then
print ("[Details! Debug]", ...)
print("[Details! Debug]", ...)
end
end
@@ -588,7 +587,7 @@
--re set the point of the frame within the main plugin window
f.RefreshFrame (pluginObject.__var_Frame)
C_Timer.After (0.016, function()
C_Timer.After(0.016, function()
f.RefreshFrame (pluginObject.__var_Frame)
end)
@@ -603,10 +602,10 @@
if (button.PluginAbsName == pluginAbsName) then
--emphatizate this button
button:SetTemplate (_detalhes.gump:GetTemplate ("button", "DETAILS_PLUGINPANEL_BUTTONSELECTED_TEMPLATE"))
button:SetTemplate(_detalhes.gump:GetTemplate("button", "DETAILS_PLUGINPANEL_BUTTONSELECTED_TEMPLATE"))
else
--make this button regular
button:SetTemplate (_detalhes.gump:GetTemplate ("button", "DETAILS_PLUGINPANEL_BUTTON_TEMPLATE"))
button:SetTemplate(_detalhes.gump:GetTemplate("button", "DETAILS_PLUGINPANEL_BUTTON_TEMPLATE"))
end
end
@@ -618,13 +617,13 @@
function f.CreatePluginMenuButton (pluginObject, isUtility)
--create the button
local newButton = _detalhes.gump:CreateButton (f, f.OnMenuClick, f.MenuButtonWidth, f.MenuButtonHeight, pluginObject.__name, pluginObject.real_name, true)
local newButton = _detalhes.gump:CreateButton(f, f.OnMenuClick, f.MenuButtonWidth, f.MenuButtonHeight, pluginObject.__name, pluginObject.real_name, true)
newButton.PluginAbsName = pluginObject.real_name
newButton.PluginName = pluginObject.__name
newButton.IsUtility = isUtility
--add a template
newButton:SetTemplate (_detalhes.gump:GetTemplate ("button", "DETAILS_PLUGINPANEL_BUTTON_TEMPLATE"))
newButton:SetTemplate(_detalhes.gump:GetTemplate("button", "DETAILS_PLUGINPANEL_BUTTON_TEMPLATE"))
newButton:SetText(pluginObject.__name)
newButton.textsize = 10
@@ -642,7 +641,7 @@
end
function f.RefreshFrame (frame)
frame:EnableMouse (false)
frame:EnableMouse(false)
frame:SetSize(f.FrameWidth, f.FrameHeight)
frame:SetScript("OnMouseDown", nil)
frame:SetScript("OnMouseUp", nil)
+12 -12
View File
@@ -2,7 +2,7 @@
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
local _detalhes = _G._detalhes
local Loc = LibStub ("AceLocale-3.0"):GetLocale ( "Details" )
local Loc = LibStub("AceLocale-3.0"):GetLocale ( "Details" )
local _
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
@@ -40,10 +40,10 @@
function _detalhes:RaidPluginInstalled (plugin_name)
if (self.waiting_raid_plugin) then
--print (self.meu_id, 2, self.last_raid_plugin, " == ", plugin_name)
--print(self.meu_id, 2, self.last_raid_plugin, " == ", plugin_name)
if (self.last_raid_plugin == plugin_name) then
if (self.waiting_pid) then
self:CancelTimer (self.waiting_pid, true)
self:CancelTimer(self.waiting_pid, true)
end
self:CancelWaitForPlugin()
_detalhes.RaidTables:EnableRaidMode (self, plugin_name)
@@ -107,7 +107,7 @@
--last check if the name is okey
if (self:IsAvailable (plugin_name, instance)) then
self:switch (nil, plugin_name, instance)
self:switch(nil, plugin_name, instance)
if (from_mode_menu) then
--refresh
@@ -161,7 +161,7 @@
----------------
function _detalhes.RaidTables:switch (_, plugin_name, instance)
function _detalhes.RaidTables:switch(_, plugin_name, instance)
local update_menu = false
if (not self) then --came from cooltip
@@ -214,7 +214,7 @@
plugin_object.instance_id = instance:GetId()
plugin_object.Frame:SetPoint("TOPLEFT", instance.bgframe)
plugin_object.Frame:Show()
instance:ChangeIcon (plugin_object.__icon)--; print (instance:GetId(),"icon",plugin_object.__icon)
instance:ChangeIcon (plugin_object.__icon)--; print(instance:GetId(),"icon",plugin_object.__icon)
_detalhes:SendEvent("DETAILS_INSTANCE_CHANGEATTRIBUTE", nil, instance, instance.atributo, instance.sub_atributo)
if (update_menu) then
@@ -270,7 +270,7 @@
SendChatMessage (msg, channel, nil, towho)
elseif (channel == "PRINT") then
print (msg)
print(msg)
else --say channel?
if (IsInInstance()) then --patch 80205 cannot use 'say' channel outside instances
@@ -366,7 +366,7 @@
if (second < 10) then
second = "0" .. second
end
local msg = "|cFFFFFF00[|r".. minute .. ":" .. second .. "|cFFFFFF00]|r Interrupt: " .. spellname .. " (" .. class_color .. _detalhes:GetOnlyName (who_name) .. "|r)"
local msg = "|cFFFFFF00[|r".. minute .. ":" .. second .. "|cFFFFFF00]|r Interrupt: " .. spellname .. " (" .. class_color .. _detalhes:GetOnlyName(who_name) .. "|r)"
_detalhes:SendMsgToChannel (msg, "PRINT")
end
@@ -471,7 +471,7 @@
if (class2) then
local coords = CLASS_ICON_TCOORDS [class2]
class_color2 = " -> |TInterface\\AddOns\\Details\\images\\classes_small_alpha:12:12:0:0:128:128:" .. coords[1]*128 .. ":" .. coords[2]*128 .. ":" .. coords[3]*128 .. ":" .. coords[4]*128 .. "|t |c" .. RAID_CLASS_COLORS [class2].colorStr
alvo_name = _detalhes:GetOnlyName (alvo_name)
alvo_name = _detalhes:GetOnlyName(alvo_name)
else
alvo_name = ""
end
@@ -486,7 +486,7 @@
if (second < 10) then
second = "0" .. second
end
msg = "|cFF8F8FFF[|r".. minute .. ":" .. second .. "|cFF8F8FFF]|r Cooldown: " .. spellname .. " (" .. class_color .. _detalhes:GetOnlyName (who_name) .. "|r" .. class_color2 .. alvo_name .. "|r)"
msg = "|cFF8F8FFF[|r".. minute .. ":" .. second .. "|cFF8F8FFF]|r Cooldown: " .. spellname .. " (" .. class_color .. _detalhes:GetOnlyName(who_name) .. "|r" .. class_color2 .. alvo_name .. "|r)"
_detalhes:SendMsgToChannel (msg, "PRINT")
@@ -544,7 +544,7 @@
end
local only_first = _detalhes.announce_deaths.only_first
--_detalhes:GetCombat ("current"):GetDeaths() is the same thing, but, it's faster without using the API.
--_detalhes:GetCombat("current"):GetDeaths() is the same thing, but, it's faster without using the API.
if (zone == "raid" and not _detalhes.tabela_vigente.is_boss) then
return
end
@@ -552,7 +552,7 @@
return
end
alvo_name = _detalhes:GetOnlyName (alvo_name)
alvo_name = _detalhes:GetOnlyName(alvo_name)
local msg
if (where == 4) then --observer
+15 -15
View File
@@ -2,7 +2,7 @@
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
local _detalhes = _G._detalhes
local Loc = LibStub ("AceLocale-3.0"):GetLocale ( "Details" )
local Loc = LibStub("AceLocale-3.0"):GetLocale ( "Details" )
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--local pointers
@@ -39,7 +39,7 @@
button:SetScript("OnClick", function()
if (not button.close_confirmation) then
button.close_confirmation = gump:CreateSimplePanel (button, 296, 60, "", plugin.real_name .. "CloseConfirmation")
button.close_confirmation = gump:CreateSimplePanel(button, 296, 60, "", plugin.real_name .. "CloseConfirmation")
button.close_confirmation:SetPoint("center", frame, 0, 0)
_G [button.close_confirmation:GetName() .. "TitleBar"]:Hide()
local fade_background = button.close_confirmation:CreateTexture(nil, "background")
@@ -60,8 +60,8 @@
instance.baseframe.cabecalho.modo_selecao:GetScript("OnEnter")(instance.baseframe.cabecalho.modo_selecao)
end
local close_window = gump:NewButton(button.close_confirmation, nil, "$parentCloseWindowButton", "CloseWindowButton", 140, 20, close_func, nil, nil, nil, Loc ["STRING_MENU_CLOSE_INSTANCE"], 1, gump:GetTemplate ("dropdown", "OPTIONS_DROPDOWN_TEMPLATE"))
local back_to_group_and_raid = gump:NewButton(button.close_confirmation, nil, "$parentBackToGroupButton", "BackToGroupButton", 140, 20, group_func, nil, nil, nil, Loc ["STRING_SWITCH_TO"] .. ": " .. Loc ["STRING_MODE_GROUP"], 2, gump:GetTemplate ("dropdown", "OPTIONS_DROPDOWN_TEMPLATE"))
local close_window = gump:NewButton(button.close_confirmation, nil, "$parentCloseWindowButton", "CloseWindowButton", 140, 20, close_func, nil, nil, nil, Loc ["STRING_MENU_CLOSE_INSTANCE"], 1, gump:GetTemplate("dropdown", "OPTIONS_DROPDOWN_TEMPLATE"))
local back_to_group_and_raid = gump:NewButton(button.close_confirmation, nil, "$parentBackToGroupButton", "BackToGroupButton", 140, 20, group_func, nil, nil, nil, Loc ["STRING_SWITCH_TO"] .. ": " .. Loc ["STRING_MODE_GROUP"], 2, gump:GetTemplate("dropdown", "OPTIONS_DROPDOWN_TEMPLATE"))
close_window:SetIcon ([[Interface\Buttons\UI-Panel-MinimizeButton-Up]], nil, nil, nil, {0.143125, 0.8653125, 0.1446875, 0.8653125}, nil, nil, 2)
back_to_group_and_raid:SetIcon ([[Interface\AddOns\Details\images\modo_icones]], nil, nil, nil, {32/256, 32/256*2, 0, 1}, nil, nil, 2)
@@ -77,7 +77,7 @@
button:SetWidth(20)
button:SetHeight(20)
--button:GetNormalTexture():SetDesaturated (true)
--button:GetNormalTexture():SetDesaturated(true)
return button
end
@@ -138,13 +138,13 @@
if (not _detalhes.SoloTables.Plugins [_detalhes.SoloTables.Mode]) then
_detalhes.SoloTables.Mode = first_enabled_plugin_index
end
_detalhes.SoloTables:switch (nil, _detalhes.SoloTables.Mode)
_detalhes.SoloTables:switch(nil, _detalhes.SoloTables.Mode)
end
else
--print ("--------------------------------")
--print (debugstack())
--print("--------------------------------")
--print(debugstack())
if (_detalhes.PluginCount.SOLO > 0) then
local solo_frame = _detalhes.SoloTables.Plugins [_detalhes.SoloTables.Mode].Frame
@@ -198,7 +198,7 @@
instance:SoloMode (true)
_detalhes.SoloTables:switch (nil, plugin_name)
_detalhes.SoloTables:switch(nil, plugin_name)
end
--Build Solo Mode Tables and Functions
@@ -215,7 +215,7 @@
return _detalhes.SoloTables.Mode
end
function _detalhes.SoloTables:switch (_, _switchTo)
function _detalhes.SoloTables:switch(_, _switchTo)
--just hide all
if (not _switchTo) then
@@ -257,7 +257,7 @@
_detalhes.SoloTables.Plugins [_detalhes.SoloTables.Mode].Frame:Show()
_detalhes.SoloTables.Plugins [_detalhes.SoloTables.Mode].Frame:SetPoint("TOPLEFT",_detalhes.SoloTables.instancia.bgframe)
_detalhes.SoloTables.Plugins [_detalhes.SoloTables.Mode].Frame:SetFrameLevel (20)
_detalhes.SoloTables.Plugins [_detalhes.SoloTables.Mode].Frame:SetFrameLevel(20)
_detalhes.SoloTables.instancia:ChangeIcon (_detalhes.SoloTables.Menu [_detalhes.SoloTables.Mode] [2])
@@ -276,7 +276,7 @@
return
end
for SpellId, DebuffTable in _pairs (SoloDebuffUptime) do
for SpellId, DebuffTable in _pairs(SoloDebuffUptime) do
if (DebuffTable.start) then
DebuffTable.duration = DebuffTable.duration + (_detalhes._tempo - DebuffTable.start) --time do parser ser igual ao time()?
DebuffTable.start = nil
@@ -290,7 +290,7 @@
--reset bufftables
_detalhes.SoloTables.SoloBuffUptime = _detalhes.SoloTables.SoloBuffUptime or {}
for spellname, BuffTable in _pairs (_detalhes.SoloTables.SoloBuffUptime) do
for spellname, BuffTable in _pairs(_detalhes.SoloTables.SoloBuffUptime) do
--local BuffEntryTable = _detalhes.SoloTables.BuffTextEntry [BuffTable.tableIndex]
if (BuffTable.Active) then
@@ -314,7 +314,7 @@
for buffIndex = 1, 41 do
local name = _UnitAura ("player", buffIndex)
if (name) then
for index, BuffName in _pairs (_detalhes.SoloTables.BuffsTableNameCache) do
for index, BuffName in _pairs(_detalhes.SoloTables.BuffsTableNameCache) do
if (BuffName == name) then
local BuffObject = _detalhes.SoloTables.SoloBuffUptime [name]
if (not BuffObject) then
@@ -334,7 +334,7 @@
if (instancia.modo == modo_alone) then
--print ("arrumando a instancia "..instancia.meu_id)
--print("arrumando a instancia "..instancia.meu_id)
if (instancia.iniciada) then
_detalhes:AlteraModo (instancia, modo_grupo)
instancia:SoloMode (false)
+67 -67
View File
@@ -2,7 +2,7 @@
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
local _detalhes = _G._detalhes
local Loc = LibStub ("AceLocale-3.0"):GetLocale ( "Details" )
local Loc = LibStub("AceLocale-3.0"):GetLocale ( "Details" )
local SharedMedia = LibStub:GetLibrary ("LibSharedMedia-3.0")
local DEFAULT_CHILD_WIDTH = 60
@@ -16,7 +16,7 @@
--local pointers
local _math_floor = math.floor --api local
local _ipairs = ipairs --api local
local ipairs = ipairs --api local
local UnitGroupRolesAssigned = DetailsFramework.UnitGroupRolesAssigned
@@ -47,13 +47,13 @@
function _detalhes.StatusBar:LockDisplays (instance, locked)
if (instance.StatusBar.center and instance.StatusBar.left and instance.StatusBar.right) then
if (locked) then
instance.StatusBar.center.frame:EnableMouse (false)
instance.StatusBar.left.frame:EnableMouse (false)
instance.StatusBar.right.frame:EnableMouse (false)
instance.StatusBar.center.frame:EnableMouse(false)
instance.StatusBar.left.frame:EnableMouse(false)
instance.StatusBar.right.frame:EnableMouse(false)
else
instance.StatusBar.center.frame:EnableMouse (true)
instance.StatusBar.left.frame:EnableMouse (true)
instance.StatusBar.right.frame:EnableMouse (true)
instance.StatusBar.center.frame:EnableMouse(true)
instance.StatusBar.left.frame:EnableMouse(true)
instance.StatusBar.right.frame:EnableMouse(true)
end
end
end
@@ -176,7 +176,7 @@
--disable all plugin childs attached to an specified instance and reactive the childs taking the instance statusbar anchors
function _detalhes.StatusBar:ReloadAnchors (instance)
for _, child in _ipairs(instance.StatusBar) do
for _, child in ipairs(instance.StatusBar) do
child.frame:ClearAllPoints()
child.frame:Hide()
child.anchor = nil
@@ -211,7 +211,7 @@
local byuser = false
if (type(index) == "table") then
index, current_child, anchor = unpack (index)
index, current_child, anchor = unpack(index)
byuser = true
end
@@ -242,7 +242,7 @@
local chosenChild = nil
--procura pra ver se ja tem uma criada
for _, child_created in _ipairs(instance.StatusBar) do
for _, child_created in ipairs(instance.StatusBar) do
if (child_created.mainPlugin == pluginMestre) then
chosenChild = child_created
break
@@ -256,13 +256,13 @@
instance.StatusBar [anchor] = chosenChild
--copia os atributos do current para o chosen
local options_current = Details.CopyTable (current_child.options)
local options_current = Details.CopyTable(current_child.options)
if (chosenChild.anchor) then
--o widget escolhido ja estava sendo mostrado...
-- copia os atributos do chosen para o current
current_child.options = Details.CopyTable (chosenChild.options)
current_child.options = Details.CopyTable(chosenChild.options)
instance.StatusBar [chosenChild.anchor] = current_child
end
@@ -337,7 +337,7 @@
if (mouse == "LeftButton") then
if (not frame.child.Setup) then
print (Loc ["STRING_STATUSBAR_NOOPTIONS"])
print(Loc ["STRING_STATUSBAR_NOOPTIONS"])
return
end
frame.child:Setup()
@@ -349,7 +349,7 @@
local current
for index, _name_and_icon in _ipairs(_detalhes.StatusBar.Menu) do
for index, _name_and_icon in ipairs(_detalhes.StatusBar.Menu) do
GameCooltip:AddMenu (1, ChoosePlugin, {index, frame.child, frame.child.anchor}, nil, nil, _name_and_icon [1], _name_and_icon [2], true)
local pluginMestre = _detalhes.StatusBar.Plugins [index]
@@ -435,13 +435,13 @@
ChoosePlugin (nil, nil, right_index, instance.StatusBar.right, "right")
if (instance.StatusBarSaved.options and instance.StatusBarSaved.options [left]) then
instance.StatusBar.left.options = Details.CopyTable (instance.StatusBarSaved.options [left])
instance.StatusBar.left.options = Details.CopyTable(instance.StatusBarSaved.options [left])
end
if (instance.StatusBarSaved.options and instance.StatusBarSaved.options [center]) then
instance.StatusBar.center.options = Details.CopyTable (instance.StatusBarSaved.options [center])
instance.StatusBar.center.options = Details.CopyTable(instance.StatusBarSaved.options [center])
end
if (instance.StatusBarSaved.options and instance.StatusBarSaved.options [right]) then
instance.StatusBar.right.options = Details.CopyTable (instance.StatusBarSaved.options [right])
instance.StatusBar.right.options = Details.CopyTable(instance.StatusBarSaved.options [right])
end
_detalhes.StatusBar:ApplyOptions (instance.StatusBar.left, "textcolor")
@@ -469,9 +469,9 @@
--build-in function for create a frame for an plugin child
function _detalhes.StatusBar:CreateChildFrame (instance, name, w, h)
--local frame = _detalhes.gump:NewPanel (instance.baseframe.cabecalho.fechar, nil, name..instance:GetInstanceId(), nil, w or DEFAULT_CHILD_WIDTH, h or DEFAULT_CHILD_HEIGHT, false)
local frame = _detalhes.gump:NewPanel (instance.baseframe, nil, name..instance:GetInstanceId(), nil, w or DEFAULT_CHILD_WIDTH, h or DEFAULT_CHILD_HEIGHT, false)
frame:SetFrameLevel (instance.baseframe:GetFrameLevel()+4)
--local frame = _detalhes.gump:NewPanel(instance.baseframe.cabecalho.fechar, nil, name..instance:GetInstanceId(), nil, w or DEFAULT_CHILD_WIDTH, h or DEFAULT_CHILD_HEIGHT, false)
local frame = _detalhes.gump:NewPanel(instance.baseframe, nil, name..instance:GetInstanceId(), nil, w or DEFAULT_CHILD_WIDTH, h or DEFAULT_CHILD_HEIGHT, false)
frame:SetFrameLevel(instance.baseframe:GetFrameLevel()+4)
--create widgets
local text = _detalhes.gump:NewLabel(frame, nil, "$parentText", "text", "0")
@@ -491,7 +491,7 @@
local _table = {}
--treat as a class
setmetatable (_table, mainObject)
setmetatable(_table, mainObject)
--default members
_table.instance = instance
@@ -504,7 +504,7 @@
if (not _table.options) then
_table.options = {
textStyle = 2,
textColor = {unpack (DEFAULT_CHILD_FONTCOLOR)},
textColor = {unpack(DEFAULT_CHILD_FONTCOLOR)},
textSize = DEFAULT_CHILD_FONTSIZE,
textAlign = 0,
textXMod = 0,
@@ -598,7 +598,7 @@
end
end
else
if (child [option] and type (child [option]) == "function") then
if (child [option] and type(child [option]) == "function") then
child [option] (nil, child, value)
end
end
@@ -615,7 +615,7 @@ do
-- handle event "COMBAT_PLAYER_ENTER"
function PDps:PlayerEnterCombat()
for index, child in _ipairs(PDps.childs) do
for index, child in ipairs(PDps.childs) do
if (child.enabled and child.instance:GetSegment() == 0) then
child.tick = _detalhes:ScheduleRepeatingTimer ("PluginDpsUpdate", 1, child)
end
@@ -624,9 +624,9 @@ do
-- handle event "COMBAT_PLAYER_LEAVE"
function PDps:PlayerLeaveCombat()
for index, child in _ipairs(PDps.childs) do
for index, child in ipairs(PDps.childs) do
if (child.tick) then
_detalhes:CancelTimer (child.tick)
_detalhes:CancelTimer(child.tick)
child.tick = nil
end
end
@@ -634,7 +634,7 @@ do
-- handle event "DETAILS_INSTANCE_CHANGESEGMENT"
function PDps:ChangeSegment (instance, segment)
for index, child in _ipairs(PDps.childs) do
for index, child in ipairs(PDps.childs) do
if (child.enabled and child.instance == instance) then
_detalhes:PluginDpsUpdate (child)
end
@@ -643,7 +643,7 @@ do
--handle event "DETAILS_DATA_RESET"
function PDps:DataReset()
for index, child in _ipairs(PDps.childs) do
for index, child in ipairs(PDps.childs) do
if (child.enabled) then
child.text:SetText("0")
end
@@ -701,7 +701,7 @@ do
-- _detalhes:InstallPlugin ( Plugin Type | Plugin Display Name | Plugin Icon | Plugin Object | Plugin Real Name )
local install = _detalhes:InstallPlugin ("STATUSBAR", Loc ["STRING_PLUGIN_PDPSNAME"], "Interface\\Icons\\Achievement_brewery_3", PDps, "DETAILS_STATUSBAR_PLUGIN_PDPS")
if (type(install) == "table" and install.error) then
print (install.errortext)
print(install.errortext)
return
end
@@ -741,7 +741,7 @@ do
function PSegment:Change()
for index, child in _ipairs(PSegment.childs) do
for index, child in ipairs(PSegment.childs) do
if (child.enabled and child.instance:IsEnabled()) then
@@ -759,7 +759,7 @@ do
if (child.options.segmentType == 1) then
child.text:SetText(Loc ["STRING_CURRENT"])
else
local name = _detalhes.tabela_vigente:GetCombatName (true)
local name = _detalhes.tabela_vigente:GetCombatName(true)
if (name and name ~= Loc ["STRING_UNKNOW"]) then
if (child.options.segmentType == 2) then
@@ -770,7 +770,7 @@ do
else
child.text:SetText(Loc ["STRING_CURRENT"])
if (_detalhes.in_combat and PSegment.can_schedule <= 2) then
PSegment:ScheduleTimer ("SchduleGetName", 2)
PSegment:ScheduleTimer("SchduleGetName", 2)
PSegment.can_schedule = PSegment.can_schedule + 1
return
end
@@ -783,7 +783,7 @@ do
child.text:SetText(Loc ["STRING_FIGHTNUMBER"] .. child.instance.segmento)
else
local name = child.instance.showing:GetCombatName (true)
local name = child.instance.showing:GetCombatName(true)
if (name ~= Loc ["STRING_UNKNOW"]) then
if (child.options.segmentType == 2) then
child.text:SetText(name)
@@ -855,7 +855,7 @@ do
--Install
local install = _detalhes:InstallPlugin ("STATUSBAR", Loc ["STRING_PLUGIN_PSEGMENTNAME"], "Interface\\Icons\\inv_misc_enchantedscroll", PSegment, "DETAILS_STATUSBAR_PLUGIN_PSEGMENT")
if (type(install) == "table" and install.error) then
print (install.errortext)
print(install.errortext)
return
end
@@ -881,7 +881,7 @@ do
instance, attribute, subAttribute = self.instance, self.instance.atributo, self.instance.sub_atributo
end
for index, child in _ipairs(PAttribute.childs) do
for index, child in ipairs(PAttribute.childs) do
if (child.instance == instance and child.enabled and child.instance:IsEnabled()) then
local sName = child.instance:GetInstanceAttributeText()
child.text:SetText(sName)
@@ -903,7 +903,7 @@ do
--Install
local install = _detalhes:InstallPlugin ("STATUSBAR", Loc ["STRING_PLUGIN_PATTRIBUTENAME"], "Interface\\Icons\\inv_misc_emberclothbolt", PAttribute, "DETAILS_STATUSBAR_PLUGIN_PATTRIBUTE")
if (type(install) == "table" and install.error) then
print (install.errortext)
print(install.errortext)
return
end
@@ -929,7 +929,7 @@ do
end
--leave combat
function Clock:PlayerLeaveCombat()
_detalhes:CancelTimer (Clock.tick)
_detalhes:CancelTimer(Clock.tick)
end
function _detalhes:ClockPluginTickOnSegment()
@@ -939,7 +939,7 @@ do
--1 sec tick
function _detalhes:ClockPluginTick (force)
for index, child in _ipairs(Clock.childs) do
for index, child in ipairs(Clock.childs) do
local instance = child.instance
if (child.enabled and instance:IsEnabled()) then
if (instance.showing and ( (instance.segmento ~= -1) or (instance.segmento == -1 and not _detalhes.in_combat) or force) ) then
@@ -966,7 +966,7 @@ do
getSegment = getSegment+1
end
local lastFight = _detalhes:GetCombat (getSegment)
local lastFight = _detalhes:GetCombat(getSegment)
local currentCombatTime = instance.showing:GetCombatTime()
if (lastFight) then
@@ -983,7 +983,7 @@ do
--on reset
function Clock:DataReset()
for index, child in _ipairs(Clock.childs) do
for index, child in ipairs(Clock.childs) do
if (child.enabled and child.instance:IsEnabled()) then
child.text:SetText("0m 0s")
end
@@ -1061,7 +1061,7 @@ do
--Install
local install = _detalhes:InstallPlugin ("STATUSBAR", Loc ["STRING_PLUGIN_CLOCKNAME"], "Interface\\Icons\\Achievement_BG_grab_cap_flagunderXseconds", Clock, "DETAILS_STATUSBAR_PLUGIN_CLOCK")
if (type(install) == "table" and install.error) then
print (install.errortext)
print(install.errortext)
return
end
@@ -1080,7 +1080,7 @@ do
local _UnitDetailedThreatSituation = UnitDetailedThreatSituation --wow api
local _cstr = string.format --lua api
local _math_abs = math.abs --lua api
local abs = math.abs --lua api
--Create the plugin Object
local Threat = _detalhes:NewPluginObject ("Details_TargetThreat", DETAILSPLUGIN_ALWAYSENABLED, "STATUSBAR")
@@ -1092,7 +1092,7 @@ do
Threat.isTank = nil
function Threat:PlayerEnterCombat()
local role = UnitGroupRolesAssigned ("player")
local role = UnitGroupRolesAssigned("player")
if (role == "TANK") then
Threat.isTank = true
else
@@ -1102,11 +1102,11 @@ do
end
function Threat:PlayerLeaveCombat()
_detalhes:CancelTimer (Threat.tick)
_detalhes:CancelTimer(Threat.tick)
end
function _detalhes:ThreatPluginTick()
for index, child in _ipairs(Threat.childs) do
for index, child in ipairs(Threat.childs) do
local instance = child.instance
if (child.enabled and instance:IsEnabled()) then
-- atualiza a threat
@@ -1115,9 +1115,9 @@ do
if (threatpct) then
child.text:SetText(_math_floor(threatpct).."%")
if (Threat.isTank) then
child.text:SetTextColor (_math_abs (threatpct-100)*0.01, threatpct*0.01, 0, 1)
child.text:SetTextColor (abs(threatpct-100)*0.01, threatpct*0.01, 0, 1)
else
child.text:SetTextColor (threatpct*0.01, _math_abs (threatpct-100)*0.01, 0, 1)
child.text:SetTextColor (threatpct*0.01, abs(threatpct-100)*0.01, 0, 1)
end
else
child.text:SetText("0%")
@@ -1149,7 +1149,7 @@ do
--Install
local install = _detalhes:InstallPlugin ("STATUSBAR", Loc ["STRING_PLUGIN_THREATNAME"], "Interface\\Icons\\Ability_Hunter_ResistanceIsFutile", Threat, "DETAILS_STATUSBAR_PLUGIN_THREAT")
if (type(install) == "table" and install.error) then
print (install.errortext)
print(install.errortext)
return
end
@@ -1175,7 +1175,7 @@ do
end
function PFps:OnDisable()
self:CancelTimer (self.srt, true)
self:CancelTimer(self.srt, true)
end
function PFps:OnEnable()
@@ -1192,7 +1192,7 @@ do
--Install
local install = _detalhes:InstallPlugin ("STATUSBAR", Loc ["STRING_PLUGIN_FPS"], "Interface\\Icons\\Spell_Shadow_MindTwisting", PFps, "DETAILS_STATUSBAR_PLUGIN_PFPS")
if (type(install) == "table" and install.error) then
print (install.errortext)
print(install.errortext)
return
end
@@ -1214,7 +1214,7 @@ do
end
function PLatency:OnDisable()
self:CancelTimer (self.srt, true)
self:CancelTimer(self.srt, true)
end
function PLatency:OnEnable()
@@ -1231,7 +1231,7 @@ do
--Install
local install = _detalhes:InstallPlugin ("STATUSBAR", Loc ["STRING_PLUGIN_LATENCY"], "Interface\\FriendsFrame\\PlusManz-BattleNet", PLatency, "DETAILS_STATUSBAR_PLUGIN_PLATENCY")
if (type(install) == "table" and install.error) then
print (install.errortext)
print(install.errortext)
return
end
@@ -1263,7 +1263,7 @@ do
if (items == 0) then
self.text:SetText(Loc ["STRING_UPTADING"])
return self:ScheduleTimer ("UpdateDurability", 5, self)
return self:ScheduleTimer("UpdateDurability", 5, self)
end
percent = percent / items
@@ -1311,7 +1311,7 @@ do
--Install
local install = _detalhes:InstallPlugin ("STATUSBAR", Loc ["STRING_PLUGIN_DURABILITY"], "Interface\\ICONS\\INV_Chest_Chain_10", PDurability, "DETAILS_STATUSBAR_PLUGIN_PDURABILITY")
if (type(install) == "table" and install.error) then
print (install.errortext)
print(install.errortext)
return
end
@@ -1329,7 +1329,7 @@ do
end
function PGold:GoldPluginTick()
for index, child in _ipairs(PGold.childs) do
for index, child in ipairs(PGold.childs) do
local instance = child.instance
if (child.enabled and instance:IsEnabled()) then
child:UpdateGold()
@@ -1360,7 +1360,7 @@ do
myframe.widget:RegisterEvent ("PLAYER_ENTERING_WORLD")
myframe.widget:SetScript("OnEvent", function(event)
if (event == "PLAYER_ENTERING_WORLD") then
return PGold:ScheduleTimer ("GoldPluginTick", 10)
return PGold:ScheduleTimer("GoldPluginTick", 10)
end
PGold:GoldPluginTick()
end)
@@ -1371,7 +1371,7 @@ do
--Install
local install = _detalhes:InstallPlugin ("STATUSBAR", Loc ["STRING_PLUGIN_GOLD"], "Interface\\Icons\\INV_Ore_Gold_01", PGold, "DETAILS_STATUSBAR_PLUGIN_PGold")
if (type(install) == "table" and install.error) then
print (install.errortext)
print(install.errortext)
return
end
@@ -1398,7 +1398,7 @@ do
end
function PTime:OnDisable()
self:CancelTimer (self.srt, true)
self:CancelTimer(self.srt, true)
end
function PTime:OnEnable()
@@ -1456,7 +1456,7 @@ do
--Install
local install = _detalhes:InstallPlugin ("STATUSBAR", Loc ["STRING_PLUGIN_TIME"], "Interface\\Icons\\Spell_Shadow_LastingAfflictions", PTime, "DETAILS_STATUSBAR_PLUGIN_PTIME")
if (type(install) == "table" and install.error) then
print (install.errortext)
print(install.errortext)
return
end
@@ -1464,7 +1464,7 @@ end
---------default options panel ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
local window = _detalhes.gump:NewPanel (UIParent, nil, "DetailsStatusBarOptions", nil, 300, 180)
local window = _detalhes.gump:NewPanel(UIParent, nil, "DetailsStatusBarOptions", nil, 300, 180)
tinsert(UISpecialFrames, "DetailsStatusBarOptions")
window:SetPoint("center", UIParent, "center")
window.locked = false
@@ -1477,7 +1477,7 @@ DetailsFramework:ApplyStandardBackdrop(window)
--window:SetBackdrop({bgFile = [[Interface\AddOns\Details\images\background]], tile = true, tileSize = 16, edgeFile = [[Interface\AddOns\Details\images\border_2]], edgeSize=12})
--window:SetBackdropColor(0, 0, 0, 0.9)
local extraWindow = _detalhes.gump:NewPanel (window, nil, "DetailsStatusBarOptions2", "extra", 300, 180)
local extraWindow = _detalhes.gump:NewPanel(window, nil, "DetailsStatusBarOptions2", "extra", 300, 180)
extraWindow:SetPoint("left", window, "right")
extraWindow.close_with_right = true
extraWindow.locked = false
@@ -1498,13 +1498,13 @@ end)
window.instance.StatusBar.center.options.textStyle = style
window.instance.StatusBar.right.options.textStyle = style
if (window.instance.StatusBar.left.Refresh and type (window.instance.StatusBar.left.Refresh) == "function") then
if (window.instance.StatusBar.left.Refresh and type(window.instance.StatusBar.left.Refresh) == "function") then
window.instance.StatusBar.left:Refresh (window.instance.StatusBar.left)
end
if (window.instance.StatusBar.center.Refresh and type (window.instance.StatusBar.center.Refresh) == "function") then
if (window.instance.StatusBar.center.Refresh and type(window.instance.StatusBar.center.Refresh) == "function") then
window.instance.StatusBar.center:Refresh (window.instance.StatusBar.center)
end
if (window.instance.StatusBar.right.Refresh and type (window.instance.StatusBar.right.Refresh) == "function") then
if (window.instance.StatusBar.right.Refresh and type(window.instance.StatusBar.right.Refresh) == "function") then
window.instance.StatusBar.right:Refresh (window.instance.StatusBar.right)
end
@@ -1530,7 +1530,7 @@ end)
_detalhes.StatusBar:ApplyOptions (window.instance.StatusBar.right, "textcolor", color)
end
local canceledColor = function()
local r, g, b, a = unpack (ColorPickerFrame.previousValues)
local r, g, b, a = unpack(ColorPickerFrame.previousValues)
window.textcolortexture:SetTexture(r, g, b, a)
local color = {r, g, b, a}
_detalhes.StatusBar:ApplyOptions (window.instance.StatusBar.left, "textcolor", color)
@@ -1544,7 +1544,7 @@ end)
ColorPickerFrame.hasOpacity = false
ColorPickerFrame.previousValues = window.child.options.textColor
ColorPickerFrame:SetParent(window.widget)
ColorPickerFrame:SetColorRGB (unpack (window.child.options.textColor))
ColorPickerFrame:SetColorRGB (unpack(window.child.options.textColor))
ColorPickerFrame:Show()
end
+5 -5
View File
@@ -1,7 +1,7 @@
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
local _detalhes = _G._detalhes
local Loc = LibStub ("AceLocale-3.0"):GetLocale ( "Details" )
local Loc = LibStub("AceLocale-3.0"):GetLocale ( "Details" )
local SharedMedia = LibStub:GetLibrary("LibSharedMedia-3.0")
local _
@@ -90,7 +90,7 @@
if (instance.auto_hide_menu.left and not instance.is_interacting) then
instance:ToolbarMenuButtons()
Button:SetAlpha (0)
Button:SetAlpha(0)
return
end
@@ -203,9 +203,9 @@ end
_detalhes:SetFontFace (f.desc, _detalhes.font_faces.menus)
--f.background:SetTexture(_detalhes.tooltip.menus_bg_texture)
f.background:SetTexCoord (unpack (_detalhes.tooltip.menus_bg_coords))
f.background:SetVertexColor (unpack (_detalhes.tooltip.menus_bg_color))
--f.background:SetDesaturated (true)
f.background:SetTexCoord (unpack(_detalhes.tooltip.menus_bg_coords))
f.background:SetVertexColor(unpack(_detalhes.tooltip.menus_bg_color))
--f.background:SetDesaturated(true)
f.BackdropTable.bgFile = _detalhes.tooltip_backdrop.bgFile
f.BackdropTable.edgeFile = [[Interface\Buttons\WHITE8X8]] --_detalhes.tooltip_backdrop.edgeFile
+12 -12
View File
@@ -8,7 +8,7 @@
--local pointers
local _table_insert = table.insert --lua local
local _ipairs = ipairs --lua local
local ipairs = ipairs --lua local
local _pairs = pairs --lua local
local _math_floor = math.floor --lua local
local _time = time --lua local
@@ -27,8 +27,8 @@
timeMachine.ligada = false
local calc_for_pvp = function(self)
for tipo, tabela in _pairs (self.tabelas) do
for nome, jogador in _ipairs(tabela) do
for tipo, tabela in _pairs(self.tabelas) do
for nome, jogador in ipairs(tabela) do
if (jogador) then
if (jogador.last_event+3 > _tempo) then --okey o jogador esta dando dps
if (jogador.on_hold) then --o dps estava pausado, retornar a ativa
@@ -46,8 +46,8 @@
end
local calc_for_pve = function(self)
for tipo, tabela in _pairs (self.tabelas) do
for nome, jogador in _ipairs(tabela) do
for tipo, tabela in _pairs(self.tabelas) do
for nome, jogador in ipairs(tabela) do
if (jogador) then
if (jogador.last_event+10 > _tempo) then --okey o jogador esta dando dps
if (jogador.on_hold) then --o dps estava pausado, retornar a ativa
@@ -82,7 +82,7 @@
self.tabelas = {{}, {}} --1 dano 2 cura
local danos = _detalhes.tabela_vigente[1]._ActorTable
for _, jogador in _ipairs(danos) do
for _, jogador in ipairs(danos) do
if (jogador.dps_started) then
jogador:RegistrarNaTimeMachine()
end
@@ -93,7 +93,7 @@
self.ligada = false
self.tabelas = nil
if (self.atualizador) then
self:CancelTimer (self.atualizador)
self:CancelTimer(self.atualizador)
self.atualizador = nil
end
end
@@ -130,10 +130,10 @@
end
function _detalhes:ManutencaoTimeMachine()
for tipo, tabela in _ipairs(timeMachine.tabelas) do
for tipo, tabela in ipairs(timeMachine.tabelas) do
local t = {}
local removed = 0
for index, jogador in _ipairs(tabela) do
for index, jogador in ipairs(tabela) do
if (jogador) then
t [#t+1] = jogador
jogador.timeMachine = #t
@@ -145,7 +145,7 @@
timeMachine.tabelas [tipo] = t
if (_detalhes.debug) then
--_detalhes:Msg ("timemachine r"..removed.."| e"..#t.."| t"..tipo)
--_detalhes:Msg("timemachine r"..removed.."| e"..#t.."| t"..tipo)
end
end
end
@@ -257,6 +257,6 @@
end
function _detalhes:PrintTimeMachineIndexes()
print ("timemachine damage", #timeMachine.tabelas [1])
print ("timemachine heal", #timeMachine.tabelas [2])
print("timemachine damage", #timeMachine.tabelas [1])
print("timemachine heal", #timeMachine.tabelas [2])
end
+214 -213
View File
File diff suppressed because it is too large Load Diff
+246 -274
View File
File diff suppressed because it is too large Load Diff
+15 -15
View File
@@ -103,7 +103,7 @@ function _detalhes.PlayBestDamageOnGuild (damage)
BaseTexture:SetDrawLayer ("ARTWORK", -5)
BaseTexture:SetPoint("center", DetailsNewDamageRecord, "center", 0, 0)
BaseTexture:SetSize(256, 64)
BaseTexture:SetVertexColor (0.99999779462814, 0.99999779462814, 0.99999779462814, 0.99999779462814)
BaseTexture:SetVertexColor(0.99999779462814, 0.99999779462814, 0.99999779462814, 0.99999779462814)
--animations for BaseTexture
@@ -131,13 +131,13 @@ function _detalhes.PlayBestDamageOnGuild (damage)
BigFlash:SetDrawLayer ("OVERLAY", 0)
BigFlash:SetPoint("center", DetailsNewDamageRecord, "center", -2, 2)
BigFlash:SetSize(314, 100)
BigFlash:SetDesaturated (false)
BigFlash:SetDesaturated(false)
BigFlash:SetTexCoord (0.0010000000149012, 0.77400001525879, 0.0010000000149012, 0.65800003051758)
if (0 ~= 0) then
BigFlash:SetRotation (0)
end
BigFlash:SetVertexColor (0.96470373868942, 0.98823314905167, 0.99999779462814, 0.99999779462814)
BigFlash:SetAlpha (1)
BigFlash:SetVertexColor(0.96470373868942, 0.98823314905167, 0.99999779462814, 0.99999779462814)
BigFlash:SetAlpha(1)
BigFlash:SetBlendMode("ADD")
--animations for BigFlash
@@ -166,13 +166,13 @@ function _detalhes.PlayBestDamageOnGuild (damage)
FlashSwipe:SetDrawLayer ("OVERLAY", 7)
FlashSwipe:SetPoint("center", DetailsNewDamageRecord, "center", -99, 0)
FlashSwipe:SetSize(100, 57)
FlashSwipe:SetDesaturated (false)
FlashSwipe:SetDesaturated(false)
FlashSwipe:SetTexCoord (0.78199996948242, 0.91900001525879, 0.0010000000149012, 0.2760000038147)
if (0 ~= 0) then
FlashSwipe:SetRotation (0)
end
FlashSwipe:SetVertexColor (0.86666476726532, 0.54117530584335, 0, 0.99999779462814)
FlashSwipe:SetAlpha (1)
FlashSwipe:SetVertexColor(0.86666476726532, 0.54117530584335, 0, 0.99999779462814)
FlashSwipe:SetAlpha(1)
FlashSwipe:SetBlendMode("ADD")
--animations for FlashSwipe
@@ -208,13 +208,13 @@ function _detalhes.PlayBestDamageOnGuild (damage)
Portrait:SetDrawLayer ("OVERLAY", -5)
Portrait:SetPoint("center", DetailsNewDamageRecord, "center", 3, 0)
Portrait:SetSize(246, 44)
Portrait:SetDesaturated (false)
Portrait:SetDesaturated(false)
Portrait:SetTexCoord (0.051753740310669, 0.81701484680176, 0.086334381103516, 0.25102617263794)
if (0 ~= 0) then
Portrait:SetRotation (0)
end
Portrait:SetVertexColor (0.99999779462814, 0.99999779462814, 0.99999779462814, 0.99999779462814)
Portrait:SetAlpha (1)
Portrait:SetVertexColor(0.99999779462814, 0.99999779462814, 0.99999779462814, 0.99999779462814)
Portrait:SetAlpha(1)
Portrait:SetBlendMode("BLEND")
--animations for Portrait
@@ -259,13 +259,13 @@ function _detalhes.PlayBestDamageOnGuild (damage)
DamageIcon:SetDrawLayer ("OVERLAY", 2)
DamageIcon:SetPoint("center", DetailsNewDamageRecord, "center", -97, 1)
DamageIcon:SetSize(32, 32)
DamageIcon:SetDesaturated (false)
DamageIcon:SetDesaturated(false)
DamageIcon:SetTexCoord (0.27200000762939, 0.51899997711182, 0.25837841033936, 0.51399997711182)
if (0 ~= 0) then
DamageIcon:SetRotation (0)
end
DamageIcon:SetVertexColor (0.99999779462814, 0.99999779462814, 0.99999779462814, 0.99999779462814)
DamageIcon:SetAlpha (1)
DamageIcon:SetVertexColor(0.99999779462814, 0.99999779462814, 0.99999779462814, 0.99999779462814)
DamageIcon:SetAlpha(1)
DamageIcon:SetBlendMode("BLEND")
--animations for DamageIcon
@@ -296,7 +296,7 @@ function _detalhes.PlayBestDamageOnGuild (damage)
NewDamageRecord:SetPoint("center", DetailsNewDamageRecord, "center", 18, 7)
NewDamageRecord:SetSize(181, 20)
NewDamageRecord:SetTextColor (1, 1, 1)
NewDamageRecord:SetAlpha (1)
NewDamageRecord:SetAlpha(1)
NewDamageRecord:SetJustifyH("CENTER")
--animations for NewDamageRecord
@@ -335,7 +335,7 @@ function _detalhes.PlayBestDamageOnGuild (damage)
DamageAmount:SetPoint("center", DetailsNewDamageRecord, "center", 18, -7)
DamageAmount:SetSize(100, 20)
DamageAmount:SetTextColor (1, 1, 1)
DamageAmount:SetAlpha (1)
DamageAmount:SetAlpha(1)
DamageAmount:SetJustifyH("CENTER")
--animations for DamageAmount
+6 -6
View File
@@ -28,7 +28,7 @@ function gump:NewLabel2 (parent, container, member, text, font, size, color)
end
if (color) then
newFontString:SetTextColor (unpack (color))
newFontString:SetTextColor (unpack(color))
end
newFontString:SetJustifyH("LEFT")
@@ -78,7 +78,7 @@ function gump:NewDetailsButton (parent, container, instancia, func, param1, para
new_button.supportFrame = CreateFrame("frame", nil, new_button)
new_button.supportFrame:SetPoint("topleft", new_button, "topleft")
new_button.supportFrame:SetPoint("bottomright", new_button, "bottomright")
new_button.supportFrame:SetFrameLevel (new_button:GetFrameLevel()+1)
new_button.supportFrame:SetFrameLevel(new_button:GetFrameLevel()+1)
new_button.supportFrame.disable_overlay = new_button.supportFrame:CreateTexture(nil, "overlay")
new_button.supportFrame.disable_overlay:SetTexture("Interface\\AddOns\\Details\\images\\button_disable_overlay")
@@ -189,7 +189,7 @@ function gump:NewDetailsButton (parent, container, instancia, func, param1, para
GameCooltip:Reset()
GameCooltip:SetType ("tooltip")
GameCooltip:SetColor ("main", "transparent")
GameCooltip:AddLine (new_button.tooltip)
GameCooltip:AddLine(new_button.tooltip)
GameCooltip:SetOwner(new_button)
GameCooltip:ShowCooltip()
end
@@ -270,7 +270,7 @@ function gump:NewTextBox (parent, container, member, func, param1, param2, w, h,
editbox:SetWidth(w)
editbox:SetHeight(h)
editbox:SetJustifyH("CENTER")
editbox:EnableMouse (true)
editbox:EnableMouse(true)
editbox:SetBackdrop(EditBoxBackdrop)
editbox:SetBackdropColor(0, 0, 0, 0.5)
editbox:SetBackdropBorderColor(0.3, 0.3, 0.30, 0.80)
@@ -374,7 +374,7 @@ function gump:NewTextBox (parent, container, member, func, param1, param2, w, h,
GameCooltip:Reset()
GameCooltip:SetType ("tooltip")
GameCooltip:SetColor ("main", "transparent")
GameCooltip:AddLine (editbox.tooltip)
GameCooltip:AddLine(editbox.tooltip)
GameCooltip:SetOwner(editbox)
GameCooltip:ShowCooltip()
end
@@ -690,7 +690,7 @@ function gump:NewScrollBar2 (master, slave, x, y)
self.scrollMax = slave:GetHeight()-master:GetHeight()
if (self.scrollMax > 0) then
slider_gump:SetMinMaxValues (0, self.scrollMax)
slider_gump:SetMinMaxValues(0, self.scrollMax)
if (not slider_gump.ativo) then
slider_gump:Enable()
slider_gump.ativo = true
+19 -19
View File
@@ -24,12 +24,12 @@ function Details:CreateAPI2Frame()
local parametersAmount = 10
local returnAmount = 10
--local Api2Frame = DetailsFramework:CreateSimplePanel (UIParent, panelWidth, panelHeight, "Details! API 2.0", "DetailsAPI2Frame")
--local Api2Frame = DetailsFramework:CreateSimplePanel(UIParent, panelWidth, panelHeight, "Details! API 2.0", "DetailsAPI2Frame")
local Api2Frame = _G.DetailsAPI2Frame
Api2Frame:SetFrameStrata("FULLSCREEN")
Api2Frame:SetPoint("center")
DetailsFramework:ApplyStandardBackdrop (Api2Frame, false, 1.2)
DetailsFramework:ApplyStandardBackdrop(Api2Frame, false, 1.2)
--store
local apiFunctionNames = {}
@@ -134,9 +134,9 @@ function Details:CreateAPI2Frame()
line.index = index
if (currentSelected == index) then
line:SetBackdropColor(unpack (backdropColorSelected))
line:SetBackdropColor(unpack(backdropColorSelected))
else
line:SetBackdropColor(unpack (backdropColor))
line:SetBackdropColor(unpack(backdropColor))
end
end
end
@@ -152,7 +152,7 @@ function Details:CreateAPI2Frame()
Api2Frame.scrollMenu = api2ScrollMenu
local lineOnEnter = function(self)
self:SetBackdropColor(unpack (backdropColorOnEnter))
self:SetBackdropColor(unpack(backdropColorOnEnter))
local apiName = apiFunctionNames [self.index]
if (not apiName) then
@@ -167,15 +167,15 @@ function Details:CreateAPI2Frame()
GameCooltip2:Preset(2)
GameCooltip2:SetOwner(self, "left", "right", 2, 0)
GameCooltip2:AddLine (apiInfo.desc)
GameCooltip2:AddLine(apiInfo.desc)
GameCooltip2:ShowCooltip()
end
local lineOnLeave = function(self)
if (currentSelected == self.index) then
self:SetBackdropColor(unpack (backdropColorSelected))
self:SetBackdropColor(unpack(backdropColorSelected))
else
self:SetBackdropColor(unpack (backdropColor))
self:SetBackdropColor(unpack(backdropColor))
end
GameCooltip2:Hide()
@@ -193,7 +193,7 @@ function Details:CreateAPI2Frame()
line:SetScript("OnLeave", lineOnLeave)
line:SetBackdrop({bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], tileSize = 64, tile = true})
line:SetBackdropColor(unpack (backdropColor))
line:SetBackdropColor(unpack(backdropColor))
line.text = DetailsFramework:CreateLabel(line)
line.text:SetPoint("left", line, "left", 2, 0)
@@ -221,7 +221,7 @@ function Details:CreateAPI2Frame()
apiCopyString:SetPoint("topleft", Api2Frame.ApiFunctionDesc, "bottomleft", 0, -20)
Api2Frame.ApiCopy = DetailsFramework:CreateTextEntry (Api2Frame, function() end, infoWidth, 20)
Api2Frame.ApiCopy:SetPoint("topleft", apiCopyString, "bottomleft", 0, -2)
Api2Frame.ApiCopy:SetTemplate (DetailsFramework:GetTemplate ("button", "DETAILS_CUSTOMDISPLAY_CODE_BOX"))
Api2Frame.ApiCopy:SetTemplate(DetailsFramework:GetTemplate("button", "DETAILS_CUSTOMDISPLAY_CODE_BOX"))
--parameters
local parametersYStart = yStart - 110
@@ -235,7 +235,7 @@ function Details:CreateAPI2Frame()
parametersHeader:SetSize(infoWidth, 20)
parametersHeader:SetPoint("topleft", Api2Frame, "topleft", xAnchorPoint, parametersYStart)
parametersHeader:SetBackdrop({bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], tileSize = 64, tile = true})
parametersHeader:SetBackdropColor(unpack (backdropColor))
parametersHeader:SetBackdropColor(unpack(backdropColor))
parametersHeader.name = DetailsFramework:CreateLabel(parametersHeader, "Name", 12, "yellow")
parametersHeader.typeData = DetailsFramework:CreateLabel(parametersHeader, "Type", 12, "yellow")
parametersHeader.required = DetailsFramework:CreateLabel(parametersHeader, "Is Required", 12, "yellow")
@@ -254,14 +254,14 @@ function Details:CreateAPI2Frame()
if (not apiInfo) then
return
end
GameCooltip2:AddLine (apiInfo.parameters [self.index].desc)
GameCooltip2:AddLine(apiInfo.parameters [self.index].desc)
GameCooltip2:ShowCooltip()
self:SetBackdropColor(unpack (backdropColorOnEnter))
self:SetBackdropColor(unpack(backdropColorOnEnter))
end
local parameterOnLeave = function(self)
GameCooltip2:Hide()
self:SetBackdropColor(unpack (backdropColor))
self:SetBackdropColor(unpack(backdropColor))
end
for i = 1, parametersAmount do
@@ -271,7 +271,7 @@ function Details:CreateAPI2Frame()
f:SetScript("OnEnter", parameterOnEnter)
f:SetScript("OnLeave", parameterOnLeave)
f:SetBackdrop({bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], tileSize = 64, tile = true})
f:SetBackdropColor(unpack (backdropColor))
f:SetBackdropColor(unpack(backdropColor))
f:Hide()
f.name = DetailsFramework:CreateLabel(f)
@@ -301,17 +301,17 @@ function Details:CreateAPI2Frame()
returnHeader:SetSize(infoWidth, 20)
returnHeader:SetPoint("topleft", Api2Frame, "topleft", xAnchorPoint, returnYStart)
returnHeader:SetBackdrop({bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], tileSize = 64, tile = true})
returnHeader:SetBackdropColor(unpack (backdropColor))
returnHeader:SetBackdropColor(unpack(backdropColor))
returnHeader.name = DetailsFramework:CreateLabel(returnHeader, "Name", 12, "yellow")
returnHeader.typeData = DetailsFramework:CreateLabel(returnHeader, "Type", 12, "yellow")
returnHeader.name:SetPoint("left", returnHeader, "left", 2, 0)
returnHeader.typeData:SetPoint("left", returnHeader, "left", space1, 0)
local returnOnEnter = function(self)
self:SetBackdropColor(unpack (backdropColorOnEnter))
self:SetBackdropColor(unpack(backdropColorOnEnter))
end
local returnOnLeave = function(self)
self:SetBackdropColor(unpack (backdropColor))
self:SetBackdropColor(unpack(backdropColor))
end
for i = 1, returnAmount do
@@ -321,7 +321,7 @@ function Details:CreateAPI2Frame()
f:SetScript("OnEnter", returnOnEnter)
f:SetScript("OnLeave", returnOnLeave)
f:SetBackdrop({bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], tileSize = 64, tile = true})
f:SetBackdropColor(unpack (backdropColor))
f:SetBackdropColor(unpack(backdropColor))
f:Hide()
f.name = DetailsFramework:CreateLabel(f)
+21 -21
View File
@@ -20,18 +20,18 @@ local libwindow = LibStub("LibWindow-1.1")
f:SetSize(800, 600)
f:SetPoint("left", UIParent, "left")
f:SetFrameStrata("LOW")
f:EnableMouse (true)
f:SetMovable (true)
f:EnableMouse(true)
f:SetMovable(true)
f:SetBackdrop({edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1, bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], tileSize = 64, tile = true})
f:SetBackdropColor(0, 0, 0, 0.9)
f:SetBackdropBorderColor(0, 0, 0, 1)
--register to libwindow
local LibWindow = LibStub ("LibWindow-1.1")
LibWindow.RegisterConfig (f, _detalhes.benchmark_db.frame)
LibWindow.RestorePosition (f)
LibWindow.MakeDraggable (f)
LibWindow.SavePosition (f)
local LibWindow = LibStub("LibWindow-1.1")
LibWindow.RegisterConfig(f, _detalhes.benchmark_db.frame)
LibWindow.RestorePosition(f)
LibWindow.MakeDraggable(f)
LibWindow.SavePosition(f)
--titlebar
f.TitleBar = CreateFrame("frame", "$parentTitleBar", f,"BackdropTemplate")
@@ -52,7 +52,7 @@ local libwindow = LibStub("LibWindow-1.1")
f.Close:GetNormalTexture():SetTexCoord (0, 16/128, 0, 1)
f.Close:GetHighlightTexture():SetTexCoord (0, 16/128, 0, 1)
f.Close:GetPushedTexture():SetTexCoord (0, 16/128, 0, 1)
f.Close:SetAlpha (0.7)
f.Close:SetAlpha(0.7)
f.Close:SetScript("OnClick", function() f:Hide() end)
--title
@@ -106,11 +106,11 @@ local libwindow = LibStub("LibWindow-1.1")
end
end)
local normal_text_template = DF:GetTemplate ("font", "DETAILS_BENCHMARK_NORMAL")
local options_dropdown_template = DF:GetTemplate ("dropdown", "OPTIONS_DROPDOWN_TEMPLATE")
local options_switch_template = DF:GetTemplate ("switch", "OPTIONS_CHECKBOX_TEMPLATE")
local options_slider_template = DF:GetTemplate ("slider", "OPTIONS_SLIDER_TEMPLATE")
local options_button_template = DF:GetTemplate ("button", "OPTIONS_BUTTON_TEMPLATE")
local normal_text_template = DF:GetTemplate("font", "DETAILS_BENCHMARK_NORMAL")
local options_dropdown_template = DF:GetTemplate("dropdown", "OPTIONS_DROPDOWN_TEMPLATE")
local options_switch_template = DF:GetTemplate("switch", "OPTIONS_CHECKBOX_TEMPLATE")
local options_slider_template = DF:GetTemplate("slider", "OPTIONS_SLIDER_TEMPLATE")
local options_button_template = DF:GetTemplate("button", "OPTIONS_BUTTON_TEMPLATE")
--locations
f.FrameLocations = {
@@ -127,8 +127,8 @@ local libwindow = LibStub("LibWindow-1.1")
--declaration
local summaryFrame = CreateFrame("frame", "$parentSummaryFrame", f,"BackdropTemplate")
summaryFrame:SetPoint("topleft", f, "topleft", unpack (f.FrameLocations.summary))
summaryFrame:SetSize(unpack (f.FrameSizes.default))
summaryFrame:SetPoint("topleft", f, "topleft", unpack(f.FrameLocations.summary))
summaryFrame:SetSize(unpack(f.FrameSizes.default))
summaryFrame:SetBackdrop({edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1, bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], tileSize = 64, tile = true})
summaryFrame:SetBackdropColor(0, 0, 0, 0.9)
summaryFrame:SetBackdropBorderColor(0, 0, 0, 1)
@@ -209,8 +209,8 @@ local libwindow = LibStub("LibWindow-1.1")
--declaration
local spellsFrame = CreateFrame("frame", "$parentSpellsFrame", f,"BackdropTemplate")
spellsFrame:SetPoint("topleft", f, "topleft", unpack (f.FrameLocations.spells))
spellsFrame:SetSize(unpack (f.FrameSizes.default))
spellsFrame:SetPoint("topleft", f, "topleft", unpack(f.FrameLocations.spells))
spellsFrame:SetSize(unpack(f.FrameSizes.default))
spellsFrame:SetBackdrop({edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1, bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], tileSize = 64, tile = true})
spellsFrame:SetBackdropColor(0, 0, 0, 0.9)
spellsFrame:SetBackdropBorderColor(0, 0, 0, 1)
@@ -228,8 +228,8 @@ local libwindow = LibStub("LibWindow-1.1")
--declaration
local aurasFrame = CreateFrame("frame", "$parentAurasFrame", f,"BackdropTemplate")
aurasFrame:SetPoint("topleft", f, "topleft", unpack (f.FrameLocations.auras))
aurasFrame:SetSize(unpack (f.FrameSizes.default))
aurasFrame:SetPoint("topleft", f, "topleft", unpack(f.FrameLocations.auras))
aurasFrame:SetSize(unpack(f.FrameSizes.default))
aurasFrame:SetBackdrop({edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1, bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], tileSize = 64, tile = true})
aurasFrame:SetBackdropColor(0, 0, 0, 0.9)
aurasFrame:SetBackdropBorderColor(0, 0, 0, 1)
@@ -245,8 +245,8 @@ local libwindow = LibStub("LibWindow-1.1")
--declaration
local historyFrame = CreateFrame("frame", "$parentHistoryFrame", f,"BackdropTemplate")
historyFrame:SetPoint("topleft", f, "topleft", unpack (f.FrameLocations.history))
historyFrame:SetSize(unpack (f.FrameSizes.default))
historyFrame:SetPoint("topleft", f, "topleft", unpack(f.FrameLocations.history))
historyFrame:SetSize(unpack(f.FrameSizes.default))
historyFrame:SetBackdrop({edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1, bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], tileSize = 64, tile = true})
historyFrame:SetBackdropColor(0, 0, 0, 0.9)
historyFrame:SetBackdropBorderColor(0, 0, 0, 1)
+12 -12
View File
@@ -8,7 +8,7 @@ local Loc = _G.LibStub("AceLocale-3.0"):GetLocale("Details")
function Details:OpenBookmarkConfig()
if (not _G.DetailsBookmarkManager) then
DF:CreateSimplePanel (UIParent, 465, 460, Loc ["STRING_OPTIONS_MANAGE_BOOKMARKS"], "DetailsBookmarkManager")
DF:CreateSimplePanel(UIParent, 465, 460, Loc ["STRING_OPTIONS_MANAGE_BOOKMARKS"], "DetailsBookmarkManager")
local panel = _G.DetailsBookmarkManager
DF:ApplyStandardBackdrop(panel)
panel:SetBackdropColor(.1, .1, .1, .9)
@@ -62,7 +62,7 @@ function Details:OpenBookmarkConfig()
end
for i = 1, 40 do
local clear = DF:CreateButton (panel, clear_func, 16, 16, nil, i, nil, [[Interface\Glues\LOGIN\Glues-CheckBox-Check]])
local clear = DF:CreateButton(panel, clear_func, 16, 16, nil, i, nil, [[Interface\Glues\LOGIN\Glues-CheckBox-Check]])
if (i%2 ~= 0) then
--impar
clear:SetPoint(15, (( i*10 ) * -1) - 35) --left
@@ -72,7 +72,7 @@ function Details:OpenBookmarkConfig()
clear:SetPoint(250, (( o*10 ) * -1) - 35) --right
end
local set = DF:CreateButton (panel, set_att, 16, 16, nil, i)
local set = DF:CreateButton(panel, set_att, 16, 16, nil, i)
set:SetPoint("left", clear, "right")
set:SetPoint("right", clear, "right", 180, 0)
set:SetBackdrop(button_backdrop)
@@ -81,13 +81,13 @@ function Details:OpenBookmarkConfig()
set:SetHook("OnLeave", set_onleave)
--set:InstallCustomTexture (nil, nil, nil, nil, true)
set:SetTemplate (DF:GetTemplate ("button", "OPTIONS_BUTTON_TEMPLATE"))
set:SetTemplate(DF:GetTemplate("button", "OPTIONS_BUTTON_TEMPLATE"))
local bg_texture = DF:CreateImage (set, [[Interface\AddOns\Details\images\bar_skyline]], 135, 30, "background")
local bg_texture = DF:CreateImage(set, [[Interface\AddOns\Details\images\bar_skyline]], 135, 30, "background")
bg_texture:SetAllPoints()
set.bg = bg_texture
local icon = DF:CreateImage (set, nil, 16, 16, nil, nil, "icon")
local icon = DF:CreateImage(set, nil, 16, 16, nil, nil, "icon")
icon:SetPoint("left", clear, "right", 4, 0)
local label = DF:CreateLabel(set, "")
@@ -112,12 +112,12 @@ function Details:OpenBookmarkConfig()
this_block.label.text = "-- x -- x --"
this_block.icon.texture = "Interface\\ICONS\\Ability_DualWield"
this_block.icon.texcoord = normal_coords
this_block.bg:SetVertexColor (.4, .1, .1, .12)
this_block.bg:SetVertexColor(.4, .1, .1, .12)
else
this_block.label.text = CustomObject.name
this_block.icon.texture = CustomObject.icon
this_block.icon.texcoord = normal_coords
this_block.bg:SetVertexColor (.4, .4, .4, .6)
this_block.bg:SetVertexColor(.4, .4, .4, .6)
end
else
bookmark.atributo = bookmark.atributo or 1
@@ -125,16 +125,16 @@ function Details:OpenBookmarkConfig()
this_block.label.text = Details.sub_atributos [bookmark.atributo] and Details.sub_atributos [bookmark.atributo].lista [bookmark.sub_atributo]
this_block.icon.texture = Details.sub_atributos [bookmark.atributo] and Details.sub_atributos [bookmark.atributo].icones [bookmark.sub_atributo] [1]
this_block.icon.texcoord = Details.sub_atributos [bookmark.atributo] and Details.sub_atributos [bookmark.atributo].icones [bookmark.sub_atributo] [2]
this_block.bg:SetVertexColor (.4, .4, .4, .6)
this_block.bg:SetVertexColor(.4, .4, .4, .6)
end
this_block.button:SetAlpha (1)
this_block.button:SetAlpha(1)
else
this_block.label.text = "-- x -- x --"
this_block.icon.texture = [[Interface\AddOns\Details\images\icons]]
this_block.icon.texcoord = unknown_coords
this_block.bg:SetVertexColor (.1, .1, .1, .12)
this_block.button:SetAlpha (0.3)
this_block.bg:SetVertexColor(.1, .1, .1, .12)
this_block.button:SetAlpha(0.3)
end
end
end
+6 -6
View File
@@ -56,7 +56,7 @@ function Details:OpenBrokerTextEditor()
local d = DF:NewDropDown (panel, _, "$parentTextOptionsDropdown", "TextOptionsDropdown", 150, 20, buildAddMenu, 1)
d:SetPoint("topright", panel, "topright", -12, -25)
d:SetTemplate(DF:GetTemplate ("dropdown", "OPTIONS_DROPDOWN_TEMPLATE"))
d:SetTemplate(DF:GetTemplate("dropdown", "OPTIONS_DROPDOWN_TEMPLATE"))
local optiontable = {"{dmg}", "{dps}", "{dpos}", "{ddiff}", "{heal}", "{hps}", "{hpos}", "{hdiff}", "{time}"}
@@ -65,7 +65,7 @@ function Details:OpenBrokerTextEditor()
end,
nil, nil, nil, "<-")
add_button:SetPoint("right", d, "left", -2, 0)
add_button:SetTemplate(DF:GetTemplate ("button", "OPTIONS_BUTTON_TEMPLATE"))
add_button:SetTemplate(DF:GetTemplate("button", "OPTIONS_BUTTON_TEMPLATE"))
-- code author Saiket from http://www.wowinterface.com/forums/showpost.php?p=245759&postcount=6
@@ -181,7 +181,7 @@ function Details:OpenBrokerTextEditor()
color_button:SetSize(80, 20)
color_button:SetPoint("topright", panel, "topright", -12, -102)
color_button.tooltip = Loc ["STRING_OPTIONS_TEXTEDITOR_COLOR_TOOLTIP"]
color_button:SetTemplate(DF:GetTemplate ("button", "OPTIONS_BUTTON_TEMPLATE"))
color_button:SetTemplate(DF:GetTemplate("button", "OPTIONS_BUTTON_TEMPLATE"))
local done = function()
local text = panel.editbox:GetText()
@@ -197,17 +197,17 @@ function Details:OpenBrokerTextEditor()
local ok_button = DF:NewButton(panel, nil, "$parentButtonOk", nil, 80, 20, done, nil, nil, nil, Loc ["STRING_OPTIONS_TEXTEDITOR_DONE"], 1)
ok_button.tooltip = Loc ["STRING_OPTIONS_TEXTEDITOR_DONE_TOOLTIP"]
ok_button:SetPoint("topright", panel, "topright", -12, -174)
ok_button:SetTemplate(DF:GetTemplate ("button", "OPTIONS_BUTTON_TEMPLATE"))
ok_button:SetTemplate(DF:GetTemplate("button", "OPTIONS_BUTTON_TEMPLATE"))
local reset_button = DF:NewButton(panel, nil, "$parentDefaultOk", nil, 80, 20, function() textentry.editbox:SetText("") end, nil, nil, nil, "Reset", 1)
reset_button.tooltip = Loc ["STRING_OPTIONS_TEXTEDITOR_RESET_TOOLTIP"]
reset_button:SetPoint("topright", panel, "topright", -100, -152)
reset_button:SetTemplate(DF:GetTemplate ("button", "OPTIONS_BUTTON_TEMPLATE"))
reset_button:SetTemplate(DF:GetTemplate("button", "OPTIONS_BUTTON_TEMPLATE"))
local cancel_button = DF:NewButton(panel, nil, "$parentDefaultCancel", nil, 80, 20, function() textentry.editbox:SetText(panel.default_text); done(); end, nil, nil, nil, Loc ["STRING_OPTIONS_TEXTEDITOR_CANCEL"], 1)
cancel_button.tooltip = Loc ["STRING_OPTIONS_TEXTEDITOR_CANCEL_TOOLTIP"]
cancel_button:SetPoint("topright", panel, "topright", -100, -174)
cancel_button:SetTemplate(DF:GetTemplate ("button", "OPTIONS_BUTTON_TEMPLATE"))
cancel_button:SetTemplate(DF:GetTemplate("button", "OPTIONS_BUTTON_TEMPLATE"))
end
+5 -5
View File
@@ -369,11 +369,11 @@ end
--enabled with a toggle button
--execute to reset position
--misc configs
local options_text_template = DF:GetTemplate ("font", "OPTIONS_FONT_TEMPLATE")
local options_dropdown_template = DF:GetTemplate ("dropdown", "OPTIONS_DROPDOWN_TEMPLATE")
local options_switch_template = DF:GetTemplate ("switch", "OPTIONS_CHECKBOX_TEMPLATE")
local options_slider_template = DF:GetTemplate ("slider", "OPTIONS_SLIDER_TEMPLATE")
local options_button_template = DF:GetTemplate ("button", "OPTIONS_BUTTON_TEMPLATE")
local options_text_template = DF:GetTemplate("font", "OPTIONS_FONT_TEMPLATE")
local options_dropdown_template = DF:GetTemplate("dropdown", "OPTIONS_DROPDOWN_TEMPLATE")
local options_switch_template = DF:GetTemplate("switch", "OPTIONS_CHECKBOX_TEMPLATE")
local options_slider_template = DF:GetTemplate("slider", "OPTIONS_SLIDER_TEMPLATE")
local options_button_template = DF:GetTemplate("button", "OPTIONS_BUTTON_TEMPLATE")
local generalOptions = {
{--enable ocd
+15 -15
View File
@@ -7,7 +7,7 @@ local Loc = _G.LibStub("AceLocale-3.0"):GetLocale("Details")
--config class colors
function Details:OpenClassColorsConfig()
if (not _G.DetailsClassColorManager) then
DF:CreateSimplePanel (UIParent, 300, 425, Loc ["STRING_OPTIONS_CLASSCOLOR_MODIFY"], "DetailsClassColorManager")
DF:CreateSimplePanel(UIParent, 300, 425, Loc ["STRING_OPTIONS_CLASSCOLOR_MODIFY"], "DetailsClassColorManager")
local panel = _G.DetailsClassColorManager
DF:ApplyStandardBackdrop(panel)
@@ -15,12 +15,12 @@ function Details:OpenClassColorsConfig()
local upper_panel = CreateFrame("frame", nil, panel,"BackdropTemplate")
upper_panel:SetAllPoints(panel)
upper_panel:SetFrameLevel (panel:GetFrameLevel()+3)
upper_panel:SetFrameLevel(panel:GetFrameLevel()+3)
local y = -50
local callback = function(button, r, g, b, a, self)
self.MyObject.my_texture:SetVertexColor (r, g, b)
self.MyObject.my_texture:SetVertexColor(r, g, b)
Details.class_colors [self.MyObject.my_class][1] = r
Details.class_colors [self.MyObject.my_class][2] = g
Details.class_colors [self.MyObject.my_class][3] = b
@@ -29,14 +29,14 @@ function Details:OpenClassColorsConfig()
local set_color = function(self, button, class, index)
local current_class_color = Details.class_colors [class]
local r, g, b = unpack (current_class_color)
local r, g, b = unpack(current_class_color)
DF:ColorPick (self, r, g, b, 1, callback)
end
local reset_color = function(self, button, class, index)
local color_table = RAID_CLASS_COLORS [class]
local r, g, b = color_table.r, color_table.g, color_table.b
self.MyObject.my_texture:SetVertexColor (r, g, b)
self.MyObject.my_texture:SetVertexColor(r, g, b)
Details.class_colors [self.MyObject.my_class][1] = r
Details.class_colors [self.MyObject.my_class][2] = g
Details.class_colors [self.MyObject.my_class][3] = b
@@ -45,7 +45,7 @@ function Details:OpenClassColorsConfig()
local on_enter = function(self, capsule)
--Details:CooltipPreset(1)
--GameCooltip:AddLine ("right click to reset")
--GameCooltip:AddLine("right click to reset")
--GameCooltip:Show (self)
end
local on_leave = function(self, capsule)
@@ -62,7 +62,7 @@ function Details:OpenClassColorsConfig()
panel.buttons = {}
for index, className in ipairs(CLASS_SORT_ORDER) do
local icon = DF:CreateImage (upper_panel, [[Interface\Glues\CHARACTERCREATE\UI-CHARACTERCREATE-CLASSES]], 32, 32, nil, CLASS_ICON_TCOORDS [className], "icon_" .. className)
local icon = DF:CreateImage(upper_panel, [[Interface\Glues\CHARACTERCREATE\UI-CHARACTERCREATE-CLASSES]], 32, 32, nil, CLASS_ICON_TCOORDS [className], "icon_" .. className)
if (index%2 ~= 0) then
icon:SetPoint(10, y)
@@ -77,7 +77,7 @@ function Details:OpenClassColorsConfig()
local button = DF:CreateButton(panel, set_color, 135, 30, className, className, index)
button:SetPoint("left", icon, "right", -32, 0)
button:InstallCustomTexture(nil, nil, nil, nil, true)
button:SetFrameLevel (panel:GetFrameLevel()+1)
button:SetFrameLevel(panel:GetFrameLevel()+1)
button.text_overlay:ClearAllPoints()
button.text_overlay:SetPoint("left", icon.widget, "right", 2, 0)
@@ -102,7 +102,7 @@ function Details:OpenClassColorsConfig()
num = math.floor(num / 16)
end
if s == '' then s = '00' end
if (string.len (s) == 1) then
if (string.len(s) == 1) then
s = "0"..s
end
return s
@@ -185,11 +185,11 @@ function Details:OpenClassColorsConfig()
}
--templates
local options_text_template = DF:GetTemplate ("font", "OPTIONS_FONT_TEMPLATE")
local options_dropdown_template = DF:GetTemplate ("dropdown", "OPTIONS_DROPDOWN_TEMPLATE")
local options_switch_template = DF:GetTemplate ("switch", "OPTIONS_CHECKBOX_TEMPLATE")
local options_slider_template = DF:GetTemplate ("slider", "OPTIONS_SLIDER_TEMPLATE")
local options_button_template = DF:GetTemplate ("button", "OPTIONS_BUTTON_TEMPLATE")
local options_text_template = DF:GetTemplate("font", "OPTIONS_FONT_TEMPLATE")
local options_dropdown_template = DF:GetTemplate("dropdown", "OPTIONS_DROPDOWN_TEMPLATE")
local options_switch_template = DF:GetTemplate("switch", "OPTIONS_CHECKBOX_TEMPLATE")
local options_slider_template = DF:GetTemplate("slider", "OPTIONS_SLIDER_TEMPLATE")
local options_button_template = DF:GetTemplate("button", "OPTIONS_BUTTON_TEMPLATE")
DetailsFramework:BuildMenu(panel, deathLogOptions, 5, -285, 700, true, options_text_template, options_dropdown_template, options_switch_template, true, options_slider_template, options_button_template)
@@ -198,7 +198,7 @@ function Details:OpenClassColorsConfig()
end
for class, button in pairs(_G.DetailsClassColorManager.buttons) do
button.my_texture:SetVertexColor (unpack (Details.class_colors [class]))
button.my_texture:SetVertexColor(unpack(Details.class_colors [class]))
end
+2 -2
View File
@@ -14,7 +14,7 @@ do
panel:SetPoint("center", UIParent, "center")
panel.locked = false
panel:SetToplevel (true)
panel:SetMovable (true)
panel:SetMovable(true)
panel:SetScript("OnMouseDown", function(self, button)
if (self.isMoving) then
return
@@ -40,7 +40,7 @@ do
--panel.TitleText:SetText("Paste & Copy") --10.0 fuck
--panel.portrait:SetTexture([[Interface\CHARACTERFRAME\TEMPORARYPORTRAIT-FEMALE-BLOODELF]])
DetailsFrameWork:NewTextEntry (panel, _, "$parentTextEntry", "text", 476, 14)
DetailsFrameWork:NewTextEntry(panel, _, "$parentTextEntry", "text", 476, 14)
panel.text:SetPoint(20, -127)
panel.text:SetHook("OnEditFocusLost", function() panel:Hide() end)
panel.text:SetHook("OnChar", function() panel:Hide() end)
+42 -42
View File
@@ -16,7 +16,7 @@ function Details:OpenCurrentRealDPSOptions(from_options_panel)
local DF = _detalhes.gump
local f = DF:CreateSimplePanel (UIParent, 700, 400, "Details! Arena Damage Bar Options", "DetailsCurrentRealDPSOptions")
local f = DF:CreateSimplePanel(UIParent, 700, 400, "Details! Arena Damage Bar Options", "DetailsCurrentRealDPSOptions")
f:SetPoint("center", UIParent, "center")
f:SetScript("OnMouseDown", nil)
f:SetScript("OnMouseUp", nil)
@@ -24,16 +24,16 @@ function Details:OpenCurrentRealDPSOptions(from_options_panel)
--scale bar
local scaleBar = DF:CreateScaleBar(f, _detalhes.realtime_dps_meter.options_frame)
local LibWindow = LibStub ("LibWindow-1.1")
LibWindow.RegisterConfig (f, _detalhes.realtime_dps_meter.options_frame)
LibWindow.MakeDraggable (f)
LibWindow.RestorePosition (f)
local LibWindow = LibStub("LibWindow-1.1")
LibWindow.RegisterConfig(f, _detalhes.realtime_dps_meter.options_frame)
LibWindow.MakeDraggable(f)
LibWindow.RestorePosition(f)
local options_text_template = DF:GetTemplate ("font", "OPTIONS_FONT_TEMPLATE")
local options_dropdown_template = DF:GetTemplate ("dropdown", "OPTIONS_DROPDOWN_TEMPLATE")
local options_switch_template = DF:GetTemplate ("switch", "OPTIONS_CHECKBOX_TEMPLATE")
local options_slider_template = DF:GetTemplate ("slider", "OPTIONS_SLIDER_TEMPLATE")
local options_button_template = DF:GetTemplate ("button", "OPTIONS_BUTTON_TEMPLATE")
local options_text_template = DF:GetTemplate("font", "OPTIONS_FONT_TEMPLATE")
local options_dropdown_template = DF:GetTemplate("dropdown", "OPTIONS_DROPDOWN_TEMPLATE")
local options_switch_template = DF:GetTemplate("switch", "OPTIONS_CHECKBOX_TEMPLATE")
local options_slider_template = DF:GetTemplate("slider", "OPTIONS_SLIDER_TEMPLATE")
local options_button_template = DF:GetTemplate("button", "OPTIONS_BUTTON_TEMPLATE")
--status bar
local statusBar = DF:CreateStatusBar(f)
@@ -94,7 +94,7 @@ function Details:OpenCurrentRealDPSOptions(from_options_panel)
--options table
local options = {
{type = "label", get = function() return "Frame Settings:" end, text_template = DF:GetTemplate ("font", "ORANGE_FONT_TEMPLATE")},
{type = "label", get = function() return "Frame Settings:" end, text_template = DF:GetTemplate("font", "ORANGE_FONT_TEMPLATE")},
--enabled
{
type = "toggle",
@@ -200,7 +200,7 @@ function Details:OpenCurrentRealDPSOptions(from_options_panel)
--[=[
{type = "breakline"},
{type = "label", get = function() return "Enabled On:" end, text_template = DF:GetTemplate ("font", "ORANGE_FONT_TEMPLATE")},
{type = "label", get = function() return "Enabled On:" end, text_template = DF:GetTemplate("font", "ORANGE_FONT_TEMPLATE")},
--arenas
{
type = "toggle",
@@ -226,7 +226,7 @@ function Details:OpenCurrentRealDPSOptions(from_options_panel)
--]=]
{type = "breakline"},
{type = "label", get = function() return "Text Settings:" end, text_template = DF:GetTemplate ("font", "ORANGE_FONT_TEMPLATE")},
{type = "label", get = function() return "Text Settings:" end, text_template = DF:GetTemplate("font", "ORANGE_FONT_TEMPLATE")},
--font size
{
type = "range",
@@ -301,7 +301,7 @@ function Details:OpenCurrentRealDPSOptions(from_options_panel)
--reopen the options panel
if (f.FromOptionsPanel) then
C_Timer.After (0.2, function()
C_Timer.After(0.2, function()
Details:OpenOptionsWindow(Details:GetInstance(1))
end)
end
@@ -343,9 +343,9 @@ function Details:CreateCurrentDpsFrame(parent, name)
f:SetSize(_detalhes.realtime_dps_meter.frame_settings.width, _detalhes.realtime_dps_meter.frame_settings.height)
f:SetBackdrop({bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], tile = true, tileSize = 16, insets = {left = 0, right = 0, top = 0, bottom = 0}})
f:SetBackdropColor(unpack (_detalhes.realtime_dps_meter.frame_settings.backdrop_color))
f:EnableMouse (true)
f:SetMovable (true)
f:SetBackdropColor(unpack(_detalhes.realtime_dps_meter.frame_settings.backdrop_color))
f:EnableMouse(true)
f:SetMovable(true)
f:SetClampedToScreen (true)
f.movemeLabel = f:CreateFontString(nil, "overlay", "GameFontNormal")
@@ -367,10 +367,10 @@ function Details:CreateCurrentDpsFrame(parent, name)
f.PlayerTeam = 0
local LibWindow = LibStub ("LibWindow-1.1")
LibWindow.RegisterConfig (f, _detalhes.realtime_dps_meter.frame_settings)
LibWindow.MakeDraggable (f)
LibWindow.RestorePosition (f)
local LibWindow = LibStub("LibWindow-1.1")
LibWindow.RegisterConfig(f, _detalhes.realtime_dps_meter.frame_settings)
LibWindow.MakeDraggable(f)
LibWindow.RestorePosition(f)
local lockCallback = function()
local f = _G.DetailsCurrentDpsMeter
@@ -470,8 +470,8 @@ function Details:CreateCurrentDpsFrame(parent, name)
DF:SetFontSize (TitleString, 9)
local TitleBackground = f:CreateTexture(nil, "artwork")
TitleBackground:SetTexture([[Interface\Tooltips\UI-Tooltip-Background]])
TitleBackground:SetVertexColor (.1, .1, .1, .9)
TitleBackground:SetVertexColor (.1, .1, .1, 0)
TitleBackground:SetVertexColor(.1, .1, .1, .9)
TitleBackground:SetVertexColor(.1, .1, .1, 0)
TitleBackground:SetPoint("topleft", f, "topleft")
TitleBackground:SetPoint("topright", f, "topright")
TitleBackground:SetHeight(header_size)
@@ -489,11 +489,11 @@ function Details:CreateCurrentDpsFrame(parent, name)
yellow_team_color = Details.class_colors.ARENA_YELLOW
if (f.PlayerTeam == 0) then
labelPlayerTeam:SetTextColor (unpack (yellow_team_color))
labelYellowTeam:SetTextColor (unpack (green_team_color))
labelPlayerTeam:SetTextColor (unpack(yellow_team_color))
labelYellowTeam:SetTextColor (unpack(green_team_color))
else
labelPlayerTeam:SetTextColor (unpack (green_team_color))
labelYellowTeam:SetTextColor (unpack (yellow_team_color))
labelPlayerTeam:SetTextColor (unpack(green_team_color))
labelYellowTeam:SetTextColor (unpack(yellow_team_color))
end
end
@@ -632,20 +632,20 @@ function Details:CreateCurrentDpsFrame(parent, name)
--frame position
f:SetSize(_detalhes.realtime_dps_meter.frame_settings.width, _detalhes.realtime_dps_meter.frame_settings.height)
LibWindow.RegisterConfig (f, _detalhes.realtime_dps_meter.frame_settings)
LibWindow.RestorePosition (f)
LibWindow.RegisterConfig(f, _detalhes.realtime_dps_meter.frame_settings)
LibWindow.RestorePosition(f)
--backdrop color
f:SetBackdropColor(unpack (_detalhes.realtime_dps_meter.frame_settings.backdrop_color))
f:SetBackdropColor(unpack(_detalhes.realtime_dps_meter.frame_settings.backdrop_color))
--set frame size
f:SetSize(_detalhes.realtime_dps_meter.frame_settings.width, _detalhes.realtime_dps_meter.frame_settings.height)
--frame is locked
if (_detalhes.realtime_dps_meter.frame_settings.locked) then
f:EnableMouse (false)
f:EnableMouse(false)
else
f:EnableMouse (true)
f:EnableMouse(true)
end
--frame can show title
@@ -725,19 +725,19 @@ function Details:CreateCurrentDpsFrame(parent, name)
f.YellowDamage = f.YellowDamage + yellowDamageDone
--remove player team damage
local removedDamage = tremove (f.PlayerTeamBuffer, f.MaxBufferIndex+1)
local removedDamage = tremove(f.PlayerTeamBuffer, f.MaxBufferIndex+1)
if (removedDamage) then
f.PlayerTeamDamage = f.PlayerTeamDamage - removedDamage
--be save
f.PlayerTeamDamage = max (0, f.PlayerTeamDamage)
f.PlayerTeamDamage = max(0, f.PlayerTeamDamage)
end
--remove yellow damage
local removedDamage = tremove (f.YellowTeamBuffer, f.MaxBufferIndex+1)
local removedDamage = tremove(f.YellowTeamBuffer, f.MaxBufferIndex+1)
if (removedDamage) then
f.YellowDamage = f.YellowDamage - removedDamage
--be save
f.YellowDamage = max (0, f.YellowDamage)
f.YellowDamage = max(0, f.YellowDamage)
end
self.NextScreenUpdate = self.NextScreenUpdate - time_fraction --always 0.1
@@ -772,8 +772,8 @@ function Details:CreateCurrentDpsFrame(parent, name)
end
else
--not in use, player team is forced to 0
dpsBarFrame:SetLeftColor(unpack (yellow_team_color))
dpsBarFrame:SetRightColor(unpack (green_team_color))
dpsBarFrame:SetLeftColor(unpack(yellow_team_color))
dpsBarFrame:SetRightColor(unpack(green_team_color))
end
if (Details.realtime_dps_meter.frame_settings.locked) then
@@ -820,12 +820,12 @@ function Details:CreateCurrentDpsFrame(parent, name)
f.GroupTotalDamage = f.GroupTotalDamage + groupDamageDoneOnThisTick
--cicle buffer removing the last index and subtract its damage
local removedDamage = tremove (f.GroupBuffer, f.MaxBufferIndex+1)
local removedDamage = tremove(f.GroupBuffer, f.MaxBufferIndex+1)
if (removedDamage) then
--remove the value from the total damage
f.GroupTotalDamage = f.GroupTotalDamage - removedDamage
--be save
f.GroupTotalDamage = max (0, f.GroupTotalDamage)
f.GroupTotalDamage = max(0, f.GroupTotalDamage)
end
self.NextScreenUpdate = self.NextScreenUpdate - time_fraction
@@ -936,8 +936,8 @@ function DetailsTestSplitBar()
local SharedMedia = LibStub:GetLibrary("LibSharedMedia-3.0")
barFrame.splitBar:SetTexture(SharedMedia:Fetch("statusbar", "Details Flat"))
barFrame.splitBar:SetLeftColor(unpack (green_team_color))
barFrame.splitBar:SetRightColor(unpack (yellow_team_color))
barFrame.splitBar:SetLeftColor(unpack(green_team_color))
barFrame.splitBar:SetRightColor(unpack(yellow_team_color))
--test the splitbar
local loopTime = 0.1
+95 -95
View File
@@ -4,9 +4,9 @@
local gump = _detalhes.gump
local _
local AceComm = LibStub ("AceComm-3.0")
local AceSerializer = LibStub ("AceSerializer-3.0")
local Loc = LibStub ("AceLocale-3.0"):GetLocale ( "Details" )
local AceComm = LibStub("AceComm-3.0")
local AceSerializer = LibStub("AceSerializer-3.0")
local Loc = LibStub("AceLocale-3.0"):GetLocale ( "Details" )
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--local pointers
@@ -15,7 +15,7 @@
local _cstr = string.format --lua local
local _math_ceil = math.ceil --lua local
local _math_floor = math.floor --lua local
local _ipairs = ipairs --lua local
local ipairs = ipairs --lua local
local _pairs = pairs --lua local
local _string_lower = string.lower --lua local
local _table_sort = table.sort --lua local
@@ -28,7 +28,7 @@
local _GetTime = GetTime --api local
local _GetCursorPosition = GetCursorPosition --api local
local _GameTooltip = GameTooltip --api local
local _UIParent = UIParent --api local
local UIParent = UIParent --api local
local _GetScreenWidth = GetScreenWidth --api local
local _GetScreenHeight = GetScreenHeight --api local
local _IsAltKeyDown = IsAltKeyDown --api local
@@ -53,8 +53,8 @@
local CONST_EDITBOX_BUTTON_WIDTH = 80
local CONST_EDITBOX_BUTTON_HEIGHT = 20
local CONST_BUTTON_TEMPLATE = gump:GetTemplate ("button", "OPTIONS_BUTTON_TEMPLATE")
local CONST_TEXTENTRY_TEMPLATE = gump:GetTemplate ("button", "OPTIONS_BUTTON_TEMPLATE")
local CONST_BUTTON_TEMPLATE = gump:GetTemplate("button", "OPTIONS_BUTTON_TEMPLATE")
local CONST_TEXTENTRY_TEMPLATE = gump:GetTemplate("button", "OPTIONS_BUTTON_TEMPLATE")
gump:InstallTemplate ("button", "DETAILS_CUSTOMDISPLAY_CODE_BUTTONS",
{
@@ -89,11 +89,11 @@
gump:NewColor("DETAILS_CUSTOMDISPLAY_ICON", .7, .6, .5, 1)
local CONST_CODETEXTENTRY_TEMPLATE = gump:GetTemplate ("button", "DETAILS_CUSTOMDISPLAY_CODE_BOX")
local CONST_CODETEXTENTRYEXPANDED_TEMPLATE = gump:GetTemplate ("button", "DETAILS_CUSTOMDISPLAY_CODE_BOX_EXPANDED")
local CONST_CODETEXTENTRYBUTTON_TEMPLATE = gump:GetTemplate ("button", "DETAILS_CUSTOMDISPLAY_CODE_BOX_BUTTON")
local CONST_CODETEXTENTRY_OPENCODEBUTTONS_TEMPLATE = gump:GetTemplate ("button", "DETAILS_CUSTOMDISPLAY_CODE_BUTTONS")
local CONST_REGULAR_BUTTON_TEMPLATE = gump:GetTemplate ("button", "DETAILS_CUSTOMDISPLAY_REGULAR_BUTTON")
local CONST_CODETEXTENTRY_TEMPLATE = gump:GetTemplate("button", "DETAILS_CUSTOMDISPLAY_CODE_BOX")
local CONST_CODETEXTENTRYEXPANDED_TEMPLATE = gump:GetTemplate("button", "DETAILS_CUSTOMDISPLAY_CODE_BOX_EXPANDED")
local CONST_CODETEXTENTRYBUTTON_TEMPLATE = gump:GetTemplate("button", "DETAILS_CUSTOMDISPLAY_CODE_BOX_BUTTON")
local CONST_CODETEXTENTRY_OPENCODEBUTTONS_TEMPLATE = gump:GetTemplate("button", "DETAILS_CUSTOMDISPLAY_CODE_BUTTONS")
local CONST_REGULAR_BUTTON_TEMPLATE = gump:GetTemplate("button", "DETAILS_CUSTOMDISPLAY_REGULAR_BUTTON")
local atributos = _detalhes.atributos
local sub_atributos = _detalhes.sub_atributos
@@ -169,8 +169,8 @@
custom_window:SetPoint("center", UIParent, "center")
custom_window:SetSize(850, 500)
custom_window:EnableMouse (true)
custom_window:SetMovable (true)
custom_window:EnableMouse(true)
custom_window:SetMovable(true)
custom_window:SetScript("OnMouseDown", function(self, button)
if (button == "LeftButton") then
if (not self.moving) then
@@ -222,7 +222,7 @@
f.Close:GetHighlightTexture():SetDesaturated(true)
f.Close:GetPushedTexture():SetDesaturated(true)
f.Close:SetAlpha (0.7)
f.Close:SetAlpha(0.7)
f.Close:SetScript("OnClick", function() _detalhes:CloseCustomDisplayWindow() end)
f.Close:SetScript("OnHide", function()
_detalhes:CloseCustomDisplayWindow()
@@ -231,10 +231,10 @@
--background
f.bg1 = f:CreateTexture(nil, "background")
f.bg1:SetTexture([[Interface\AddOns\Details\images\background]], true)
f.bg1:SetAlpha (0.7)
f.bg1:SetVertexColor (0.27, 0.27, 0.27)
f.bg1:SetVertTile (true)
f.bg1:SetHorizTile (true)
f.bg1:SetAlpha(0.7)
f.bg1:SetVertexColor(0.27, 0.27, 0.27)
f.bg1:SetVertTile(true)
f.bg1:SetHorizTile(true)
f.bg1:SetAllPoints()
f:SetBackdrop({edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1, bgFile = [[Interface\AddOns\Details\images\background]], tileSize = 64, tile = true})
@@ -279,7 +279,7 @@
DetailsCustomPanel.code3_default = [[
local value, top, total, combat, instance = ...
return math.floor (value)
return math.floor(value)
]]
DetailsCustomPanel.code3 = DetailsCustomPanel.code3_default
@@ -325,7 +325,7 @@
function DetailsCustomPanel:RemoveDisplay (custom_object, index)
table.remove (_detalhes.custom, index)
for _, instance in _ipairs(_detalhes.tabela_instancias) do
for _, instance in ipairs(_detalhes.tabela_instancias) do
if (instance.atributo == 5 and instance.sub_atributo == index) then
instance:ResetAttribute()
elseif (instance.atributo == 5 and instance.sub_atributo > index) then
@@ -435,10 +435,10 @@
DetailsCustomPanel:ClearFocus()
_detalhes.MicroButtonAlert:Hide()
if (string.len (name) < 5) then
return false, _detalhes:Msg (Loc ["STRING_CUSTOM_SHORTNAME"])
elseif (string.len (name) > 32) then
return false, _detalhes:Msg (Loc ["STRING_CUSTOM_LONGNAME"])
if (string.len(name) < 5) then
return false, _detalhes:Msg(Loc ["STRING_CUSTOM_SHORTNAME"])
elseif (string.len(name) > 32) then
return false, _detalhes:Msg(Loc ["STRING_CUSTOM_LONGNAME"])
end
_detalhes:ResetCustomFunctionsCache()
@@ -480,9 +480,9 @@
object.tooltip = false
if (DetailsCustomPanel.IsImporting) then
_detalhes:Msg (Loc ["STRING_CUSTOM_IMPORTED"])
_detalhes:Msg(Loc ["STRING_CUSTOM_IMPORTED"])
else
_detalhes:Msg (Loc ["STRING_CUSTOM_SAVED"])
_detalhes:Msg(Loc ["STRING_CUSTOM_SAVED"])
end
if (DetailsCustomPanel.IsImporting) then
@@ -508,9 +508,9 @@
}
tinsert(_detalhes.custom, new_custom_object)
_setmetatable (new_custom_object, _detalhes.atributo_custom)
_setmetatable(new_custom_object, _detalhes.atributo_custom)
new_custom_object.__index = _detalhes.atributo_custom
_detalhes:Msg (Loc ["STRING_CUSTOM_CREATED"])
_detalhes:Msg(Loc ["STRING_CUSTOM_CREATED"])
end
DetailsCustomPanel:Reset()
@@ -548,9 +548,9 @@
end
if (DetailsCustomPanel.IsImporting) then
_detalhes:Msg (Loc ["STRING_CUSTOM_IMPORTED"])
_detalhes:Msg(Loc ["STRING_CUSTOM_IMPORTED"])
else
_detalhes:Msg (Loc ["STRING_CUSTOM_SAVED"])
_detalhes:Msg(Loc ["STRING_CUSTOM_SAVED"])
end
if (DetailsCustomPanel.IsImporting) then
@@ -591,9 +591,9 @@
end
tinsert(_detalhes.custom, new_custom_object)
_setmetatable (new_custom_object, _detalhes.atributo_custom)
_setmetatable(new_custom_object, _detalhes.atributo_custom)
new_custom_object.__index = _detalhes.atributo_custom
_detalhes:Msg (Loc ["STRING_CUSTOM_CREATED"])
_detalhes:Msg(Loc ["STRING_CUSTOM_CREATED"])
end
DetailsCustomPanel:Reset()
@@ -740,13 +740,13 @@
custom_window.menu = {}
local menu_start = -50
local menu_up_frame = _CreateFrame ("frame", nil, custom_window)
menu_up_frame:SetFrameLevel (custom_window:GetFrameLevel()+2)
menu_up_frame:SetFrameLevel(custom_window:GetFrameLevel()+2)
local onenter = function(self)
--self.icontexture:SetVertexColor (1, 1, 1, 1)
--self.icontexture:SetVertexColor(1, 1, 1, 1)
end
local onleave = function(self)
--self.icontexture:SetVertexColor (.9, .9, .9, 1)
--self.icontexture:SetVertexColor(.9, .9, .9, 1)
end
function custom_window:CreateMenuButton (label, icon, clickfunc, param1, param2, tooltip, name, coords)
@@ -755,8 +755,8 @@
local button = gump:NewButton(self, nil, "$parent" .. name, nil, CONST_MENU_WIDTH, CONST_MENU_HEIGHT, clickfunc, param1, param2, nil, label)
button:SetPoint("topleft", self, "topleft", CONST_MENU_X_POSITION, CONST_MENU_Y_POSITION + ((index-1)*-23))
--button:SetTemplate (CONST_BUTTON_TEMPLATE)
button:SetTemplate (gump:GetTemplate ("button", "DETAILS_PLUGIN_BUTTON_TEMPLATE"))
--button:SetTemplate(CONST_BUTTON_TEMPLATE)
button:SetTemplate(gump:GetTemplate("button", "DETAILS_PLUGIN_BUTTON_TEMPLATE"))
button:SetWidth(160)
button:SetIcon (icon, CONST_MENU_HEIGHT-4, CONST_MENU_HEIGHT-4, "overlay", {.1, .9, .1, .9}, nil, 4)
@@ -771,8 +771,8 @@
local build_menu = function(self, button, func, param2)
GameCooltip:Reset()
for index, custom_object in _ipairs(_detalhes.custom) do
GameCooltip:AddLine (custom_object:GetName())
for index, custom_object in ipairs(_detalhes.custom) do
GameCooltip:AddLine(custom_object:GetName())
GameCooltip:AddIcon (custom_object:GetIcon())
GameCooltip:AddMenu (1, func, custom_object, index, true)
end
@@ -814,7 +814,7 @@
for key, value in pairs(custom_object) do
if (object_keys [key]) then
if (type(value) == "table") then
export_object [key] = Details.CopyTable (value)
export_object [key] = Details.CopyTable(value)
else
export_object [key] = value
end
@@ -824,10 +824,10 @@
local encoded = Details:CompressData (export_object, "print")
if (not custom_window.ExportBox) then
local editbox = _detalhes.gump:NewTextEntry (custom_window, nil, "$parentExportBox", "ExportBox", CONST_EDITBOX_WIDTH, 20)
local editbox = _detalhes.gump:NewTextEntry(custom_window, nil, "$parentExportBox", "ExportBox", CONST_EDITBOX_WIDTH, 20)
editbox:SetPoint("bottomleft", custom_window, "bottomleft", 10, 6)
editbox:SetAutoFocus (false)
editbox:SetTemplate (CONST_TEXTENTRY_TEMPLATE)
editbox:SetTemplate(CONST_TEXTENTRY_TEMPLATE)
editbox:SetHook("OnEditFocusLost", function()
editbox:Hide()
end)
@@ -838,7 +838,7 @@
local flashTexture = editbox:CreateTexture(nil, "overlay")
flashTexture:SetColorTexture (1, 1, 1)
flashTexture:SetAllPoints()
flashTexture:SetAlpha (0)
flashTexture:SetAlpha(0)
local flashAnimHub = DetailsFramework:CreateAnimationHub (flashTexture)
DetailsFramework:CreateAnimation(flashAnimHub, "alpha", 1, 0.2, 0, 1)
@@ -871,10 +871,10 @@
local export_string = gump:NewLabel(custom_window, custom_window, "$parenImportLabel", "exportLabel", "Import String:", "GameFontNormal") --Loc ["STRING_CUSTOM_PASTE"]
export_string:SetPoint("bottomleft", DetailsCustomPanel, "bottomleft", 10, 8)
local editbox = _detalhes.gump:NewTextEntry (custom_window, nil, "$parentImportBox", "ImportBox", CONST_EDITBOX_WIDTH - export_string.width - CONST_EDITBOX_BUTTON_WIDTH - 4, 20)
local editbox = _detalhes.gump:NewTextEntry(custom_window, nil, "$parentImportBox", "ImportBox", CONST_EDITBOX_WIDTH - export_string.width - CONST_EDITBOX_BUTTON_WIDTH - 4, 20)
editbox:SetPoint("left", export_string, "right", 2, 0)
editbox:SetAutoFocus (false)
editbox:SetTemplate (CONST_TEXTENTRY_TEMPLATE)
editbox:SetTemplate(CONST_TEXTENTRY_TEMPLATE)
local import = function()
local text = editbox:GetText()
@@ -882,7 +882,7 @@
local deserialized_object = Details:DecompressData (text, "print")
if (not deserialized_object) then
_detalhes:Msg (Loc ["STRING_CUSTOM_IMPORT_ERROR"])
_detalhes:Msg(Loc ["STRING_CUSTOM_IMPORT_ERROR"])
return
end
@@ -890,7 +890,7 @@
DetailsCustomPanel:CancelFunc()
end
setmetatable (deserialized_object, _detalhes.atributo_custom)
setmetatable(deserialized_object, _detalhes.atributo_custom)
deserialized_object.__index = _detalhes.atributo_custom
_detalhes.MicroButtonAlert.Text:SetText(Loc ["STRING_CUSTOM_IMPORT_ALERT"])
@@ -907,7 +907,7 @@
end
local okey_button = gump:NewButton(custom_window, nil, "$parentImportConfirm", "ImportConfirm", CONST_EDITBOX_BUTTON_WIDTH, CONST_EDITBOX_BUTTON_HEIGHT, import, nil, nil, nil, Loc ["STRING_CUSTOM_IMPORT_BUTTON"])
okey_button:SetTemplate (CONST_BUTTON_TEMPLATE)
okey_button:SetTemplate(CONST_BUTTON_TEMPLATE)
okey_button:SetPoint("left", editbox, "right", 2, 0)
end
@@ -963,21 +963,21 @@
local selected_left = attribute_box:CreateTexture(nil, "overlay")
selected_left:SetTexture([[Interface\Store\Store-Main]])
selected_left:SetSize(50, 20)
selected_left:SetVertexColor (1, .8, 0, 1)
selected_left:SetVertexColor(1, .8, 0, 1)
selected_left:SetTexCoord (960/1024, 1020/1024, 68/1024, 101/1024)
custom_window.selected_left = selected_left
local selected_right = attribute_box:CreateTexture(nil, "overlay")
selected_right:SetTexture([[Interface\Store\Store-Main]])
selected_right:SetSize(31, 20)
selected_right:SetVertexColor (1, .8, 0, 1)
selected_right:SetVertexColor(1, .8, 0, 1)
selected_right:SetTexCoord (270/1024, 311/1024, 873/1024, 906/1024)
custom_window.selected_right = selected_right
local selected_center = attribute_box:CreateTexture(nil, "overlay")
selected_center:SetTexture([[Interface\Store\Store-Main]])
selected_center:SetSize(49, 20)
selected_center:SetVertexColor (1, .8, 0, 1)
selected_center:SetVertexColor(1, .8, 0, 1)
selected_center:SetTexCoord (956/1024, 1004/1024, 164/1024, 197/1024)
selected_center:SetPoint("left", selected_left, "right")
@@ -1033,9 +1033,9 @@
local name_label = gump:NewLabel(box0, box0, "$parenNameLabel", "name", Loc ["STRING_CUSTOM_NAME"], "GameFontHighlightLeft") --localize-me
name_label:SetPoint("topleft", box0, "topleft", 10, 0)
local name_field = gump:NewTextEntry (box0, nil, "$parentNameEntry", "nameentry", 200, 20)
local name_field = gump:NewTextEntry(box0, nil, "$parentNameEntry", "nameentry", 200, 20)
name_field:SetPoint("left", name_label, "left", 62, 0)
name_field:SetTemplate (CONST_TEXTENTRY_TEMPLATE)
name_field:SetTemplate(CONST_TEXTENTRY_TEMPLATE)
name_field.tooltip = Loc ["STRING_CUSTOM_NAME_DESC"]
custom_window.name_field = name_field
@@ -1043,9 +1043,9 @@
local author_label = gump:NewLabel(box0, box0, "$parenAuthorLabel", "author", Loc ["STRING_CUSTOM_AUTHOR"], "GameFontHighlightLeft") --localize-me
author_label:SetPoint("topleft", name_label, "bottomleft", 0, -12)
local author_field = gump:NewTextEntry (box0, nil, "$parentAuthorEntry", "authorentry", 200, 20)
local author_field = gump:NewTextEntry(box0, nil, "$parentAuthorEntry", "authorentry", 200, 20)
author_field:SetPoint("left", author_label, "left", 62, 0)
author_field:SetTemplate (CONST_TEXTENTRY_TEMPLATE)
author_field:SetTemplate(CONST_TEXTENTRY_TEMPLATE)
author_field.tooltip = Loc ["STRING_CUSTOM_AUTHOR_DESC"]
author_field:SetText(UnitName ("player") .. "-" .. GetRealmName())
custom_window.author_field = author_field
@@ -1054,9 +1054,9 @@
local desc_label = gump:NewLabel(box0, box0, "$parenDescLabel", "desc", Loc ["STRING_CUSTOM_DESCRIPTION"], "GameFontHighlightLeft") --localize-me
desc_label:SetPoint("topleft", author_label, "bottomleft", 0, -12)
local desc_field = gump:NewTextEntry (box0, nil, "$parentDescEntry", "descentry", 200, 20)
local desc_field = gump:NewTextEntry(box0, nil, "$parentDescEntry", "descentry", 200, 20)
desc_field:SetPoint("left", desc_label, "left", 62, 0)
desc_field:SetTemplate (CONST_TEXTENTRY_TEMPLATE)
desc_field:SetTemplate(CONST_TEXTENTRY_TEMPLATE)
desc_field.tooltip = Loc ["STRING_CUSTOM_DESCRIPTION_DESC"]
custom_window.desc_field = desc_field
@@ -1082,22 +1082,22 @@
local cancel_button = gump:NewButton(box0, nil, "$parentCancelButton", "cancelbutton", 130, 20, DetailsCustomPanel.CancelFunc, nil, nil, nil, Loc ["STRING_CUSTOM_CANCEL"])
--cancel_button:SetPoint("bottomleft", attribute_box, "bottomleft", 2, 0)
cancel_button:SetPoint("topleft", icon_label, "bottomleft", 0, -10)
cancel_button:SetTemplate (CONST_REGULAR_BUTTON_TEMPLATE)
cancel_button:SetTemplate(CONST_REGULAR_BUTTON_TEMPLATE)
--accept
local accept_button = gump:NewButton(box0, nil, "$parentAcceptButton", "acceptbutton", 130, 20, DetailsCustomPanel.AcceptFunc, nil, nil, nil, Loc ["STRING_CUSTOM_CREATE"])
accept_button:SetPoint("left", cancel_button, "right", 2, 0)
accept_button:SetTemplate (CONST_REGULAR_BUTTON_TEMPLATE)
accept_button:SetTemplate(CONST_REGULAR_BUTTON_TEMPLATE)
cancel_button:SetFrameLevel (500)
accept_button:SetFrameLevel (500)
cancel_button:SetFrameLevel(500)
accept_button:SetFrameLevel(500)
--create box type 1
local box1 = _CreateFrame ("frame", "DetailsCustomPanelBox1", custom_window)
custom_window.box1 = box1
box1:SetSize(450, 180)
box1:SetPoint("topleft", icon_label.widget, "bottomleft", -10, -20)
box1:SetFrameLevel (box0:GetFrameLevel()+1)
box1:SetFrameLevel(box0:GetFrameLevel()+1)
--source
local source_label = gump:NewLabel(box1, box1, "$parenSourceLabel", "source", Loc ["STRING_CUSTOM_SOURCE"], "GameFontHighlightLeft") --localize-me
@@ -1125,7 +1125,7 @@
source_dropdown.tooltip = Loc ["STRING_CUSTOM_SOURCE_DESC"]
custom_window.source_dropdown = source_dropdown
local source_field = gump:NewTextEntry (box1, nil, "$parentSourceEntry", "sourceentry", 201, 20)
local source_field = gump:NewTextEntry(box1, nil, "$parentSourceEntry", "sourceentry", 201, 20)
source_field:SetPoint("topleft", source_dropdown, "bottomleft", 0, -2)
source_field:Disable()
custom_window.source_field = source_field
@@ -1141,7 +1141,7 @@
adds_boss_image:SetWidth(20)
adds_boss_image:SetHeight(16)
local actorsFrame = gump:NewPanel (custom_window, _, "DetailsCustomActorsFrame2", "actorsFrame", 1, 1)
local actorsFrame = gump:NewPanel(custom_window, _, "DetailsCustomActorsFrame2", "actorsFrame", 1, 1)
actorsFrame:SetPoint("topleft", custom_window, "topright", 5, -60)
actorsFrame:Hide()
@@ -1157,12 +1157,12 @@
modelFrameBackground:SetPoint("topright", actorsFrame.widget, "topleft", -15, -8)
modelFrameBackground:SetTexture([[Interface\ACHIEVEMENTFRAME\UI-GuildAchievement-Parchment-Horizontal-Desaturated]])
modelFrameBackground:SetRotation (90)
modelFrameBackground:SetVertexColor (.5, .5, .5, 0.5)
modelFrameBackground:SetVertexColor(.5, .5, .5, 0.5)
local modelFrameBackgroundIcon = custom_window:CreateTexture(nil, "overlay")
modelFrameBackgroundIcon:SetPoint("center", modelFrameBackground, "center")
modelFrameBackgroundIcon:SetTexture([[Interface\CHARACTERFRAME\Disconnect-Icon]])
modelFrameBackgroundIcon:SetVertexColor (.5, .5, .5, 0.7)
modelFrameBackgroundIcon:SetVertexColor(.5, .5, .5, 0.7)
modelFrameBackground:Hide()
modelFrameBackgroundIcon:Hide()
@@ -1181,7 +1181,7 @@
button.MyObject.line:SetBlendMode("ADD")
button.MyObject.label:SetTextColor (1, 1, 1, 1)
GameTooltip:SetOwner(button, "ANCHOR_TOPLEFT")
GameTooltip:AddLine (button.MyObject.actor)
GameTooltip:AddLine(button.MyObject.actor)
GameTooltip:Show()
local name, description, bgImage, buttonImage, loreImage, dungeonAreaMapID, link = DetailsFramework.EncounterJournal.EJ_GetInstanceInfo (button.MyObject.ej_id)
@@ -1229,9 +1229,9 @@
local t = gump:NewImage (thisButton, nil, 20, 20, nil, nil, "image", "DetailsCustomActors2EncounterImageButton"..i)
t:SetPoint("left", thisButton)
t:SetTexture([[Interface\MINIMAP\TRACKING\Target]])
t:SetDesaturated (true)
t:SetDesaturated(true)
t:SetSize(20, 20)
t:SetAlpha (0.7)
t:SetAlpha(0.7)
local text = gump:NewLabel(thisButton, nil, "DetailsCustomActorsFrame2Button"..i.."Label", "label", "Spell", nil, 9.5, {.8, .8, .8, .8})
text:SetPoint("left", t.image, "right", 2, 0)
@@ -1286,7 +1286,7 @@
if (_detalhes:InstanceIsRaid (instanceId)) then
GameCooltip:AddLine (instanceTable.name, _, 1, "white")
GameCooltip:AddLine(instanceTable.name, _, 1, "white")
GameCooltip:AddIcon (instanceTable.icon, 1, 1, 64, 32)
for index, encounterName in ipairs(instanceTable.boss_names) do
@@ -1347,7 +1347,7 @@
target_dropdown.tooltip = Loc ["STRING_CUSTOM_TARGET_DESC"]
custom_window.target_dropdown = target_dropdown
local target_field = gump:NewTextEntry (box1, nil, "$parentTargetEntry", "targetentry", 201, 20)
local target_field = gump:NewTextEntry(box1, nil, "$parentTargetEntry", "targetentry", 201, 20)
target_field:SetPoint("topleft", target_dropdown, "bottomleft", 0, -2)
target_field:Disable()
custom_window.target_field = target_field
@@ -1363,7 +1363,7 @@
adds_boss_image:SetWidth(20)
adds_boss_image:SetHeight(16)
local actorsFrame = gump:NewPanel (custom_window, _, "DetailsCustomActorsFrame", "actorsFrame", 1, 1)
local actorsFrame = gump:NewPanel(custom_window, _, "DetailsCustomActorsFrame", "actorsFrame", 1, 1)
actorsFrame:SetPoint("topleft", custom_window, "topright", 5, -60)
actorsFrame:Hide()
@@ -1389,7 +1389,7 @@
button.MyObject.line:SetBlendMode("ADD")
button.MyObject.label:SetTextColor (1, 1, 1, 1)
GameTooltip:SetOwner(button, "ANCHOR_TOPLEFT")
GameTooltip:AddLine (button.MyObject.actor)
GameTooltip:AddLine(button.MyObject.actor)
GameTooltip:Show()
local name, description, bgImage, buttonImage, loreImage, dungeonAreaMapID, link = DetailsFramework.EncounterJournal.EJ_GetInstanceInfo (button.MyObject.ej_id)
@@ -1437,9 +1437,9 @@
local t = gump:NewImage (thisButton, nil, 20, 20, nil, nil, "image", "DetailsCustomActorsEncounterImageButton"..i)
t:SetPoint("left", thisButton)
t:SetTexture([[Interface\MINIMAP\TRACKING\Target]])
t:SetDesaturated (true)
t:SetDesaturated(true)
t:SetSize(20, 20)
t:SetAlpha (0.7)
t:SetAlpha(0.7)
local text = gump:NewLabel(thisButton, nil, "DetailsCustomActorsFrameButton"..i.."Label", "label", "Spell", nil, 9.5, {.8, .8, .8, .8})
text:SetPoint("left", t.image, "right", 2, 0)
@@ -1494,7 +1494,7 @@
if (_detalhes:InstanceIsRaid (instanceId)) then
GameCooltip:AddLine (instanceTable.name, _, 1, "white")
GameCooltip:AddLine(instanceTable.name, _, 1, "white")
GameCooltip:AddIcon (instanceTable.icon, 1, 1, 64, 32)
for index, encounterName in ipairs(instanceTable.boss_names) do
@@ -1545,7 +1545,7 @@
spell_id_boss_image:SetWidth(20)
spell_id_boss_image:SetHeight(16)
local spellsFrame = gump:NewPanel (custom_window, _, "DetailsCustomSpellsFrame", "spellsFrame", 1, 1)
local spellsFrame = gump:NewPanel(custom_window, _, "DetailsCustomSpellsFrame", "spellsFrame", 1, 1)
spellsFrame:SetPoint("topleft", custom_window, "topright", 5, 0)
spellsFrame:Hide()
@@ -1654,7 +1654,7 @@
if (_detalhes:InstanceisRaid (instanceId)) then
GameCooltip:AddLine (instanceTable.name, _, 1, "white")
GameCooltip:AddLine(instanceTable.name, _, 1, "white")
GameCooltip:AddIcon (instanceTable.icon, 1, 1, 64, 32)
for index, encounterName in ipairs(instanceTable.boss_names) do
@@ -1696,38 +1696,38 @@
box2:SetSize(450, 180)
box2:SetPoint("topleft", icon_label.widget, "bottomleft", -10, -20)
box2:SetFrameLevel (box0:GetFrameLevel()+1)
box2:SetFrameLevel(box0:GetFrameLevel()+1)
--edit main code
local maincode_button = gump:NewButton(box2, nil, "$parentMainCodeButton", "maiccodebutton", 160, 20, DetailsCustomPanel.StartEditCode, 1, nil, nil, Loc ["STRING_CUSTOM_EDIT_SEARCH_CODE"])
maincode_button:SetPoint("topleft", custom_window, "topleft", CONST_EDITBUTTONS_X_POSITION, CONST_MENU_Y_POSITION)
maincode_button.tooltip = Loc ["STRING_CUSTOM_EDITCODE_DESC"]
maincode_button:SetTemplate (CONST_CODETEXTENTRY_OPENCODEBUTTONS_TEMPLATE)
maincode_button:SetTemplate(CONST_CODETEXTENTRY_OPENCODEBUTTONS_TEMPLATE)
--edit tooltip code
local tooltipcode_button = gump:NewButton(box2, nil, "$parentTooltipCodeButton", "tooltipcodebutton", 160, 20, DetailsCustomPanel.StartEditCode, 2, nil, nil, Loc ["STRING_CUSTOM_EDIT_TOOLTIP_CODE"])
tooltipcode_button:SetPoint("topleft", maincode_button, "bottomleft", 0, -8)
tooltipcode_button.tooltip = Loc ["STRING_CUSTOM_EDITTOOLTIP_DESC"]
tooltipcode_button:SetTemplate (CONST_CODETEXTENTRY_OPENCODEBUTTONS_TEMPLATE)
tooltipcode_button:SetTemplate(CONST_CODETEXTENTRY_OPENCODEBUTTONS_TEMPLATE)
--edit total code
local totalcode_button = gump:NewButton(box2, nil, "$parentTotalCodeButton", "totalcodebutton", 160, 20, DetailsCustomPanel.StartEditCode, 3, nil, nil, "Edit Total Code")
totalcode_button:SetPoint("topleft", tooltipcode_button, "bottomleft", 0, -8)
totalcode_button.tooltip = "This code is responsible for edit the total number shown in the player bar.\n\nThis is not necessary if you want show exactly the value gotten in the search code."
totalcode_button:SetTemplate (CONST_CODETEXTENTRY_OPENCODEBUTTONS_TEMPLATE)
totalcode_button:SetTemplate(CONST_CODETEXTENTRY_OPENCODEBUTTONS_TEMPLATE)
--edit percent code
local percentcode_button = gump:NewButton(box2, nil, "$parentPercentCodeButton", "percentcodebutton", 160, 20, DetailsCustomPanel.StartEditCode, 4, nil, nil, "Edit Percent Code")
percentcode_button:SetPoint("topleft", totalcode_button, "bottomleft", 0, -8)
percentcode_button.tooltip = "Edit the code responsible for the percent number in the player bar.\n\nThis is not required if you want to use simple percentage (comparing with total)."
percentcode_button:SetTemplate (CONST_CODETEXTENTRY_OPENCODEBUTTONS_TEMPLATE)
percentcode_button:SetTemplate(CONST_CODETEXTENTRY_OPENCODEBUTTONS_TEMPLATE)
box2:Hide()
--create the code editbox
local code_editor = gump:NewSpecialLuaEditorEntry (custom_window, CONST_EDITBOX_WIDTH, CONST_EDITBOX_HEIGHT, "codeeditor", "$parentCodeEditor")
code_editor:SetPoint("topleft", custom_window, "topleft", CONST_MENU_X_POSITION, CONST_EDITBOX_Y_POSITION)
code_editor:SetFrameLevel (custom_window:GetFrameLevel()+4)
code_editor:SetFrameLevel(custom_window:GetFrameLevel()+4)
code_editor:SetBackdrop(nil)
code_editor:HookScript ("OnUpdate", function()
local script = code_editor:GetText()
@@ -1748,7 +1748,7 @@
--create a background area where the code editor is
local codeEditorBackground = gump:NewButton(custom_window, nil, nil, nil, 1, 1, function()end)
codeEditorBackground:SetAllPoints(code_editor)
codeEditorBackground:SetTemplate (CONST_CODETEXTENTRY_TEMPLATE)
codeEditorBackground:SetTemplate(CONST_CODETEXTENTRY_TEMPLATE)
code_editor:Hide()
code_editor.font_size = 11
@@ -1760,14 +1760,14 @@
if (code_editor.expanded) then
code_editor:SetSize(CONST_EDITBOX_WIDTH, CONST_EDITBOX_HEIGHT)
code_editor.expanded = nil
codeEditorBackground:SetTemplate (CONST_CODETEXTENTRY_TEMPLATE)
codeEditorBackground:SetTemplate(CONST_CODETEXTENTRY_TEMPLATE)
--custom_window.box0.cancelbutton:SetPoint("bottomleft", attribute_box, "bottomright", 37, -10)
--custom_window.box0.acceptbutton:SetPoint("left", cancel_button, "right", 2, 0)
else
code_editor:SetSize(CONST_EDITBOX_WIDTH, CONST_EDITBOX_HEIGHT*1.9)
code_editor.expanded = true
codeEditorBackground:SetTemplate (CONST_CODETEXTENTRYEXPANDED_TEMPLATE)
codeEditorBackground:SetTemplate(CONST_CODETEXTENTRYEXPANDED_TEMPLATE)
--custom_window.box0.cancelbutton:SetPoint("bottomleft", attribute_box, "bottomright", -237, -10)
--custom_window.box0.acceptbutton:SetPoint
@@ -1808,7 +1808,7 @@
local object = DetailsCustomPanel.IsEditing
if (type(object) ~= "table") then
return _detalhes:Msg ("This object need to be saved before.")
return _detalhes:Msg("This object need to be saved before.")
end
object.script = main_code
@@ -1830,27 +1830,27 @@
end
local supportFrame = CreateFrame("frame", "$parentSupportFrame", custom_window)
supportFrame:SetFrameLevel (500)
supportFrame:SetFrameLevel(500)
local expand = gump:NewButton(supportFrame, nil, "$parentExpand", "expandbutton", CONST_EDITBOX_BUTTON_WIDTH, CONST_EDITBOX_BUTTON_HEIGHT, expand_func, 4, nil, nil, "Expand")
expand:SetPoint("bottomleft", code_editor, "topleft", 0, 1)
expand:SetTemplate (CONST_CODETEXTENTRYBUTTON_TEMPLATE)
expand:SetTemplate(CONST_CODETEXTENTRYBUTTON_TEMPLATE)
local font_size1 = gump:NewButton(supportFrame, nil, "$parentFont1", "font1button", CONST_EDITBOX_BUTTON_WIDTH, CONST_EDITBOX_BUTTON_HEIGHT, font_change, nil, nil, nil, "Aa")
font_size1:SetPoint("left", expand, "right", 2, 0)
font_size1:SetTemplate (CONST_CODETEXTENTRYBUTTON_TEMPLATE)
font_size1:SetTemplate(CONST_CODETEXTENTRYBUTTON_TEMPLATE)
local font_size2 = gump:NewButton(supportFrame, nil, "$parentFont2", "font2button", CONST_EDITBOX_BUTTON_WIDTH, CONST_EDITBOX_BUTTON_HEIGHT, font_change, true, nil, nil, "aA")
font_size2:SetPoint("left", font_size1, "right", 2, 0)
font_size2:SetTemplate (CONST_CODETEXTENTRYBUTTON_TEMPLATE)
font_size2:SetTemplate(CONST_CODETEXTENTRYBUTTON_TEMPLATE)
local apply1 = gump:NewButton(supportFrame, nil, "$parentApply", "applybutton", CONST_EDITBOX_BUTTON_WIDTH, CONST_EDITBOX_BUTTON_HEIGHT, apply_code, nil, nil, nil, "Apply")
apply1:SetPoint("left", font_size2, "right", 2, 0)
apply1:SetTemplate (CONST_CODETEXTENTRYBUTTON_TEMPLATE)
apply1:SetTemplate(CONST_CODETEXTENTRYBUTTON_TEMPLATE)
local open_API = gump:NewButton(supportFrame, nil, "$parentOpenAPI", "openAPIbutton", CONST_EDITBOX_BUTTON_WIDTH, CONST_EDITBOX_BUTTON_HEIGHT, function()end, nil, nil, nil, "API") --_detalhes.OpenAPI - opening the api was cancelling the editing process
open_API:SetPoint("left", apply1, "right", 2, 0)
open_API:SetTemplate (CONST_CODETEXTENTRYBUTTON_TEMPLATE)
open_API:SetTemplate(CONST_CODETEXTENTRYBUTTON_TEMPLATE)
local errorString = gump:CreateLabel(supportFrame)
errorString:SetPoint("left", open_API, "right", 10, 0)
+9 -9
View File
@@ -4,8 +4,8 @@ local Details = _G._detalhes
local DF = _G.DetailsFramework
local _
--local AceComm = LibStub ("AceComm-3.0")
--local AceSerializer = LibStub ("AceSerializer-3.0")
--local AceComm = LibStub("AceComm-3.0")
--local AceSerializer = LibStub("AceSerializer-3.0")
local Loc = LibStub("AceLocale-3.0"):GetLocale("Details")
local CONST_MENU_X_POSITION = 10
@@ -23,8 +23,8 @@ local CONST_EDITBOX_HEIGHT = 370
local CONST_EDITBOX_BUTTON_WIDTH = 80
local CONST_EDITBOX_BUTTON_HEIGHT = 20
local CONST_BUTTON_TEMPLATE = DF:GetTemplate ("button", "OPTIONS_BUTTON_TEMPLATE")
local CONST_TEXTENTRY_TEMPLATE = DF:GetTemplate ("button", "OPTIONS_BUTTON_TEMPLATE")
local CONST_BUTTON_TEMPLATE = DF:GetTemplate("button", "OPTIONS_BUTTON_TEMPLATE")
local CONST_TEXTENTRY_TEMPLATE = DF:GetTemplate("button", "OPTIONS_BUTTON_TEMPLATE")
DF:InstallTemplate ("button", "DETAILS_CUSTOMDISPLAY_CODE_BUTTONS",
{
@@ -59,11 +59,11 @@ DF:InstallTemplate ("button", "DETAILS_CUSTOMDISPLAY_CODE_BOX_BUTTON", {
DF:NewColor("DETAILS_CUSTOMDISPLAY_ICON", .7, .6, .5, 1)
local CONST_CODETEXTENTRY_TEMPLATE = DF:GetTemplate ("button", "DETAILS_CUSTOMDISPLAY_CODE_BOX")
local CONST_CODETEXTENTRYEXPANDED_TEMPLATE = DF:GetTemplate ("button", "DETAILS_CUSTOMDISPLAY_CODE_BOX_EXPANDED")
local CONST_CODETEXTENTRYBUTTON_TEMPLATE = DF:GetTemplate ("button", "DETAILS_CUSTOMDISPLAY_CODE_BOX_BUTTON")
local CONST_CODETEXTENTRY_OPENCODEBUTTONS_TEMPLATE = DF:GetTemplate ("button", "DETAILS_CUSTOMDISPLAY_CODE_BUTTONS")
local CONST_REGULAR_BUTTON_TEMPLATE = DF:GetTemplate ("button", "DETAILS_CUSTOMDISPLAY_REGULAR_BUTTON")
local CONST_CODETEXTENTRY_TEMPLATE = DF:GetTemplate("button", "DETAILS_CUSTOMDISPLAY_CODE_BOX")
local CONST_CODETEXTENTRYEXPANDED_TEMPLATE = DF:GetTemplate("button", "DETAILS_CUSTOMDISPLAY_CODE_BOX_EXPANDED")
local CONST_CODETEXTENTRYBUTTON_TEMPLATE = DF:GetTemplate("button", "DETAILS_CUSTOMDISPLAY_CODE_BOX_BUTTON")
local CONST_CODETEXTENTRY_OPENCODEBUTTONS_TEMPLATE = DF:GetTemplate("button", "DETAILS_CUSTOMDISPLAY_CODE_BUTTONS")
local CONST_REGULAR_BUTTON_TEMPLATE = DF:GetTemplate("button", "DETAILS_CUSTOMDISPLAY_REGULAR_BUTTON")
--new script button
+14 -14
View File
@@ -19,7 +19,7 @@ end
function Details:Dump (...)
if (not DetailsDumpFrame) then
DetailsDumpFrame = DetailsFramework:CreateSimplePanel (_G.UIParent)
DetailsDumpFrame = DetailsFramework:CreateSimplePanel(_G.UIParent)
DetailsDumpFrame:SetSize(700, 600)
DetailsDumpFrame:SetTitle ("Details! Dump Table [|cFFFF3333Ready Only|r]")
@@ -40,10 +40,10 @@ function Details:Dump (...)
text_editor:SetBackdropBorderColor(0, 0, 0, 1)
text_editor.__background:SetColorTexture (0.2317647, 0.2317647, 0.2317647)
text_editor.__background:SetVertexColor (0.27, 0.27, 0.27)
text_editor.__background:SetAlpha (0.8)
text_editor.__background:SetVertTile (true)
text_editor.__background:SetHorizTile (true)
text_editor.__background:SetVertexColor(0.27, 0.27, 0.27)
text_editor.__background:SetAlpha(0.8)
text_editor.__background:SetVertTile(true)
text_editor.__background:SetHorizTile(true)
text_editor.__background:SetAllPoints()
end
@@ -80,10 +80,10 @@ end
function _detalhes:ShowImportWindow (defaultText, confirmFunc, titleText)
if (not _G.DetailsExportWindow) then
local importWindow = DetailsFramework:CreateSimplePanel (_G.UIParent, 800, 610, "Details! Dump String", "DetailsExportWindow")
local importWindow = DetailsFramework:CreateSimplePanel(_G.UIParent, 800, 610, "Details! Dump String", "DetailsExportWindow")
importWindow:SetFrameStrata("FULLSCREEN")
importWindow:SetPoint("center")
DetailsFramework:ApplyStandardBackdrop (importWindow, false, 1.2)
DetailsFramework:ApplyStandardBackdrop(importWindow, false, 1.2)
local importTextEditor = DetailsFramework:NewSpecialLuaEditorEntry (importWindow, 780, 540, "ImportEditor", "$parentEditor", true)
importTextEditor:SetBackdrop({edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1, bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], tileSize = 64, tile = true})
@@ -105,10 +105,10 @@ function _detalhes:ShowImportWindow (defaultText, confirmFunc, titleText)
importTextEditor:SetBackdropBorderColor(0, 0, 0, 1)
importTextEditor.__background:SetColorTexture (0.2317647, 0.2317647, 0.2317647)
importTextEditor.__background:SetVertexColor (0.27, 0.27, 0.27)
importTextEditor.__background:SetAlpha (0.8)
importTextEditor.__background:SetVertTile (true)
importTextEditor.__background:SetHorizTile (true)
importTextEditor.__background:SetVertexColor(0.27, 0.27, 0.27)
importTextEditor.__background:SetAlpha(0.8)
importTextEditor.__background:SetVertTile(true)
importTextEditor.__background:SetHorizTile(true)
importTextEditor.__background:SetAllPoints()
--import button
@@ -118,12 +118,12 @@ function _detalhes:ShowImportWindow (defaultText, confirmFunc, titleText)
end
importWindow:Hide()
end
local okayButton = DetailsFramework:CreateButton (importTextEditor, onClickImportButton, 120, 20, "Okay", -1, nil, nil, nil, nil, nil, _detalhes.gump:GetTemplate ("button", "OPTIONS_BUTTON_TEMPLATE"), _detalhes.gump:GetTemplate ("font", "OPTIONS_FONT_TEMPLATE")) --localize-me
local okayButton = DetailsFramework:CreateButton(importTextEditor, onClickImportButton, 120, 20, "Okay", -1, nil, nil, nil, nil, nil, _detalhes.gump:GetTemplate("button", "OPTIONS_BUTTON_TEMPLATE"), _detalhes.gump:GetTemplate("font", "OPTIONS_FONT_TEMPLATE")) --localize-me
okayButton:SetIcon ([[Interface\BUTTONS\UI-Panel-BiggerButton-Up]], 20, 20, "overlay", {0.1, .9, 0.1, .9})
importTextEditor.OkayButton = okayButton
--cancel button
local cancelButton = DetailsFramework:CreateButton (importTextEditor, function() importWindow:Hide() end, 120, 20, "Cancel", -1, nil, nil, nil, nil, nil, _detalhes.gump:GetTemplate ("button", "OPTIONS_BUTTON_TEMPLATE"), _detalhes.gump:GetTemplate ("font", "OPTIONS_FONT_TEMPLATE")) --localize-me
local cancelButton = DetailsFramework:CreateButton(importTextEditor, function() importWindow:Hide() end, 120, 20, "Cancel", -1, nil, nil, nil, nil, nil, _detalhes.gump:GetTemplate("button", "OPTIONS_BUTTON_TEMPLATE"), _detalhes.gump:GetTemplate("font", "OPTIONS_FONT_TEMPLATE")) --localize-me
cancelButton:SetIcon ([[Interface\BUTTONS\UI-Panel-MinimizeButton-Up]], 20, 20, "overlay", {0.1, .9, 0.1, .9})
okayButton:SetPoint("topright", importTextEditor, "bottomright", 0, -10)
@@ -138,7 +138,7 @@ function _detalhes:ShowImportWindow (defaultText, confirmFunc, titleText)
titleText = titleText or "Details! Dump String"
_G.DetailsExportWindow.Title:SetText(titleText)
C_Timer.After (.2, function()
C_Timer.After(.2, function()
_G.DetailsExportWindow.ImportEditor:SetFocus (true)
_G.DetailsExportWindow.ImportEditor.editbox:HighlightText (0)
end)
+39 -39
View File
@@ -10,20 +10,20 @@ function Details:OpenEventTrackerOptions (from_options_panel)
local DF = _detalhes.gump
local f = DF:CreateSimplePanel (_G.UIParent, 700, 400, "Details! Event Tracker Options", "DetailsEventTrackerOptions")
local f = DF:CreateSimplePanel(_G.UIParent, 700, 400, "Details! Event Tracker Options", "DetailsEventTrackerOptions")
f:SetPoint("center", _G.UIParent, "center")
f:SetScript("OnMouseDown", nil)
f:SetScript("OnMouseUp", nil)
local LibWindow = _G.LibStub("LibWindow-1.1")
LibWindow.RegisterConfig (f, _detalhes.event_tracker.options_frame)
LibWindow.MakeDraggable (f)
LibWindow.RestorePosition (f)
LibWindow.RegisterConfig(f, _detalhes.event_tracker.options_frame)
LibWindow.MakeDraggable(f)
LibWindow.RestorePosition(f)
local options_text_template = DF:GetTemplate ("font", "OPTIONS_FONT_TEMPLATE")
local options_dropdown_template = DF:GetTemplate ("dropdown", "OPTIONS_DROPDOWN_TEMPLATE")
local options_switch_template = DF:GetTemplate ("switch", "OPTIONS_CHECKBOX_TEMPLATE")
local options_slider_template = DF:GetTemplate ("slider", "OPTIONS_SLIDER_TEMPLATE")
local options_button_template = DF:GetTemplate ("button", "OPTIONS_BUTTON_TEMPLATE")
local options_text_template = DF:GetTemplate("font", "OPTIONS_FONT_TEMPLATE")
local options_dropdown_template = DF:GetTemplate("dropdown", "OPTIONS_DROPDOWN_TEMPLATE")
local options_switch_template = DF:GetTemplate("switch", "OPTIONS_CHECKBOX_TEMPLATE")
local options_slider_template = DF:GetTemplate("slider", "OPTIONS_SLIDER_TEMPLATE")
local options_button_template = DF:GetTemplate("button", "OPTIONS_BUTTON_TEMPLATE")
--frame strata options
local set_frame_strata = function(_, _, strata)
@@ -69,7 +69,7 @@ function Details:OpenEventTrackerOptions (from_options_panel)
--options table
local options = {
{type = "label", get = function() return "Frame Settings:" end, text_template = DF:GetTemplate ("font", "ORANGE_FONT_TEMPLATE")},
{type = "label", get = function() return "Frame Settings:" end, text_template = DF:GetTemplate("font", "ORANGE_FONT_TEMPLATE")},
--enabled
{
type = "toggle",
@@ -129,7 +129,7 @@ function Details:OpenEventTrackerOptions (from_options_panel)
name = "Frame Strata"
},
{type = "breakline"},
{type = "label", get = function() return "Line Settings:" end, text_template = DF:GetTemplate ("font", "ORANGE_FONT_TEMPLATE")},
{type = "label", get = function() return "Line Settings:" end, text_template = DF:GetTemplate("font", "ORANGE_FONT_TEMPLATE")},
--line height
{
type = "range",
@@ -217,7 +217,7 @@ function Details:OpenEventTrackerOptions (from_options_panel)
f:SetScript("OnHide", function()
--reopen the options panel
if (f.FromOptionsPanel) then
C_Timer.After (0.2, function()
C_Timer.After(0.2, function()
Details:OpenOptionsWindow(Details:GetInstance(1))
end)
end
@@ -249,16 +249,16 @@ function Details:CreateEventTrackerFrame(parent, name)
f:SetSize(_detalhes.event_tracker.frame.width, _detalhes.event_tracker.frame.height)
f:SetBackdrop({bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], tile = true, tileSize = 16, insets = {left = 0, right = 0, top = 0, bottom = 0}})
f:SetBackdropColor(unpack (_detalhes.event_tracker.frame.backdrop_color))
f:EnableMouse (true)
f:SetMovable (true)
f:SetBackdropColor(unpack(_detalhes.event_tracker.frame.backdrop_color))
f:EnableMouse(true)
f:SetMovable(true)
f:SetResizable(true)
f:SetClampedToScreen (true)
local LibWindow = LibStub ("LibWindow-1.1")
LibWindow.RegisterConfig (f, _detalhes.event_tracker.frame)
LibWindow.MakeDraggable (f)
LibWindow.RestorePosition (f)
local LibWindow = LibStub("LibWindow-1.1")
LibWindow.RegisterConfig(f, _detalhes.event_tracker.frame)
LibWindow.MakeDraggable(f)
LibWindow.RestorePosition(f)
--two resizers
@@ -334,7 +334,7 @@ function Details:CreateEventTrackerFrame(parent, name)
local scroll_createline = function(self, index)
local line = CreateFrame("frame", "$parentLine" .. index, self,"BackdropTemplate")
line:EnableMouse (false)
line:EnableMouse(false)
line.Index = index --hack to not trigger error on UpdateWorldTrackerLines since Index is set after this function is ran
--set its backdrop
@@ -346,7 +346,7 @@ function Details:CreateEventTrackerFrame(parent, name)
statusbar:SetAllPoints()
local statusbartexture = statusbar:CreateTexture(nil, "border")
statusbar:SetStatusBarTexture (statusbartexture)
statusbar:SetMinMaxValues (0, 1)
statusbar:SetMinMaxValues(0, 1)
statusbar:SetValue(0)
local statusbarspark = statusbar:CreateTexture(nil, "artwork")
@@ -432,9 +432,9 @@ function Details:CreateEventTrackerFrame(parent, name)
local get_player_icon = function(spec, class)
if (spec) then
return [[Interface\AddOns\Details\images\spec_icons_normal]], unpack (_detalhes.class_specs_coords [spec])
return [[Interface\AddOns\Details\images\spec_icons_normal]], unpack(_detalhes.class_specs_coords [spec])
elseif (class) then
return [[Interface\AddOns\Details\images\classes_small]], unpack (_detalhes.class_coords [class])
return [[Interface\AddOns\Details\images\classes_small]], unpack(_detalhes.class_coords [class])
else
return [[Interface\AddOns\Details\images\classes_plus]], 0.50390625, 0.62890625, 0, 0.125
end
@@ -443,11 +443,11 @@ function Details:CreateEventTrackerFrame(parent, name)
local add_role_and_class_color = function(player_name, player_serial)
--get the actor object
local actor = _detalhes.tabela_vigente[1]:GetActor (player_name)
local actor = _detalhes.tabela_vigente[1]:GetActor(player_name)
if (actor) then
--remove realm name
player_name = _detalhes:GetOnlyName (player_name)
player_name = _detalhes:GetOnlyName(player_name)
local class, spec, role = actor.classe, actor.spec, actor.role
if (not class) then
@@ -468,7 +468,7 @@ function Details:CreateEventTrackerFrame(parent, name)
else
local spec, class = get_spec_or_class (player_serial, player_name)
player_name = _detalhes:GetOnlyName (player_name)
player_name = _detalhes:GetOnlyName(player_name)
if (class) then
--add the class color
@@ -520,7 +520,7 @@ function Details:CreateEventTrackerFrame(parent, name)
local texture, L, R, T, B = get_player_icon (spec, class)
line.LeftIcon:SetTexture(texture)
line.LeftIcon:SetTexCoord (L, R, T, B)
line.LeftText:SetText(_detalhes:GetOnlyName (ability [ABILITYTABLE_CASTERNAME]))
line.LeftText:SetText(_detalhes:GetOnlyName(ability [ABILITYTABLE_CASTERNAME]))
if (ability [ABILITYTABLE_ISENEMY]) then
line:SetBackdropColor(1, .3, .3, 0.5)
@@ -596,7 +596,7 @@ function Details:CreateEventTrackerFrame(parent, name)
TitleString:SetText("Details!: Event Tracker")
local TitleBackground = f:CreateTexture(nil, "artwork")
TitleBackground:SetTexture([[Interface\Tooltips\UI-Tooltip-Background]])
TitleBackground:SetVertexColor (.1, .1, .1, .9)
TitleBackground:SetVertexColor(.1, .1, .1, .9)
TitleBackground:SetPoint("topleft", f, "topleft")
TitleBackground:SetPoint("topright", f, "topright")
TitleBackground:SetHeight(header_size)
@@ -639,13 +639,13 @@ function Details:CreateEventTrackerFrame(parent, name)
--set texture
local texture = SharedMedia:Fetch ("statusbar", _detalhes.event_tracker.line_texture)
line.StatusbarTexture:SetTexture(texture)
line.StatusbarTexture:SetVertexColor (unpack (_detalhes.event_tracker.line_color))
line.StatusbarTexture:SetVertexColor(unpack(_detalhes.event_tracker.line_color))
--set icon size
line.LeftIcon:SetSize(_detalhes.event_tracker.line_height, _detalhes.event_tracker.line_height)
line.RightIcon:SetSize(_detalhes.event_tracker.line_height, _detalhes.event_tracker.line_height)
line.ActionIcon:SetSize(_detalhes.event_tracker.line_height-4, _detalhes.event_tracker.line_height-4)
line.ActionIcon:SetAlpha (0.65)
line.ActionIcon:SetAlpha(0.65)
end
-- /run _detalhes.event_tracker.font_shadow = 24
@@ -676,16 +676,16 @@ function Details:CreateEventTrackerFrame(parent, name)
end
f:SetSize(_detalhes.event_tracker.frame.width, _detalhes.event_tracker.frame.height)
LibWindow.RegisterConfig (f, _detalhes.event_tracker.frame)
LibWindow.RestorePosition (f)
LibWindow.RegisterConfig(f, _detalhes.event_tracker.frame)
LibWindow.RestorePosition(f)
scrollframe:OnSizeChanged()
if (_detalhes.event_tracker.frame.locked) then
f:EnableMouse (false)
f:EnableMouse(false)
left_resize:Hide()
right_resize:Hide()
else
f:EnableMouse (true)
f:EnableMouse(true)
left_resize:Show()
right_resize:Show()
end
@@ -702,8 +702,8 @@ function Details:CreateEventTrackerFrame(parent, name)
scrollframe:SetPoint("topright", f, "topright", 0, 0)
end
f:SetBackdropColor(unpack (_detalhes.event_tracker.frame.backdrop_color))
scrollframe.__background:SetVertexColor (unpack (_detalhes.event_tracker.frame.backdrop_color))
f:SetBackdropColor(unpack(_detalhes.event_tracker.frame.backdrop_color))
scrollframe.__background:SetVertexColor(unpack(_detalhes.event_tracker.frame.backdrop_color))
f:SetFrameStrata(_detalhes.event_tracker.frame.strata)
@@ -734,13 +734,13 @@ function Details:CreateEventTrackerFrame(parent, name)
if (not flag) then
return false
end
return bit.band (flag, OBJECT_TYPE_PLAYER) ~= 0
return bit.band(flag, OBJECT_TYPE_PLAYER) ~= 0
end
local is_enemy = function(flag)
if (not flag) then
return false
end
return bit.band (flag, OBJECT_TYPE_ENEMY) ~= 0
return bit.band(flag, OBJECT_TYPE_ENEMY) ~= 0
end
combatLog:SetScript("OnEvent", function(self, event)
@@ -778,7 +778,7 @@ function Details:CreateEventTrackerFrame(parent, name)
local amountToShow = #CurrentShowing
if (amountToShow > amountOfLines) then
tremove (CurrentShowing, amountToShow)
tremove(CurrentShowing, amountToShow)
end
scrollframe:Refresh()
end
+35 -35
View File
@@ -22,7 +22,7 @@ local CONST_BUTTONSELECTED_TEMPLATE = Details:GetFramework():InstallTemplate("bu
function Details:InitializeForge()
local DetailsForgePanel = Details.gump:CreateSimplePanel (UIParent, 960, 600, "Details! " .. L["STRING_SPELLLIST"], "DetailsForgePanel")
local DetailsForgePanel = Details.gump:CreateSimplePanel(UIParent, 960, 600, "Details! " .. L["STRING_SPELLLIST"], "DetailsForgePanel")
DetailsForgePanel.Frame = DetailsForgePanel
DetailsForgePanel.__name = L["STRING_SPELLLIST"]
DetailsForgePanel.real_name = "DETAILS_FORGE"
@@ -44,11 +44,11 @@ function Details:OpenForge()
DetailsForgePanel.Initialized = true
--main frame
local f = DetailsForgePanel or Details.gump:CreateSimplePanel (UIParent, 960, 600, "Details! " .. L["STRING_SPELLLIST"], "DetailsForgePanel")
local f = DetailsForgePanel or Details.gump:CreateSimplePanel(UIParent, 960, 600, "Details! " .. L["STRING_SPELLLIST"], "DetailsForgePanel")
f:SetPoint("center", UIParent, "center")
f:SetFrameStrata("HIGH")
f:SetToplevel (true)
f:SetMovable (true)
f:SetMovable(true)
f.Title:SetTextColor (1, .8, .2)
local have_plugins_enabled
@@ -91,11 +91,11 @@ function Details:OpenForge()
local editBox = Details.gump:CreateTextEntry (tutorialFrame, function()end, 375, 20, nil, nil, nil, entry_template, label_template)
editBox:SetPoint("topleft", tutorialFrame.Example, "bottomleft", 0, -10)
editBox:SetText([[https://www.youtube.com/watch?v=om0k1Yj2pEw]])
editBox:SetTemplate (Details.gump:GetTemplate ("button", "OPTIONS_BUTTON_TEMPLATE"))
editBox:SetTemplate(Details.gump:GetTemplate("button", "OPTIONS_BUTTON_TEMPLATE"))
local closeButton = Details.gump:CreateButton (tutorialFrame, function() Details:SetTutorialCVar ("FORGE_TUTORIAL", true); tutorialFrame:Hide() end, 80, 20, L["STRING_OPTIONS_CHART_CLOSE"])
local closeButton = Details.gump:CreateButton(tutorialFrame, function() Details:SetTutorialCVar ("FORGE_TUTORIAL", true); tutorialFrame:Hide() end, 80, 20, L["STRING_OPTIONS_CHART_CLOSE"])
closeButton:SetPoint("bottom", tutorialFrame, "bottom", 0, 10)
closeButton:SetTemplate (Details.gump:GetTemplate ("button", "OPTIONS_BUTTON_TEMPLATE"))
closeButton:SetTemplate(Details.gump:GetTemplate("button", "OPTIONS_BUTTON_TEMPLATE"))
end
--modules
@@ -113,10 +113,10 @@ function Details:OpenForge()
f.bg1 = f:CreateTexture(nil, "background")
f.bg1:SetTexture([[Interface\AddOns\Details\images\background]], true)
f.bg1:SetAlpha (0.7)
f.bg1:SetVertexColor (0.27, 0.27, 0.27)
f.bg1:SetVertTile (true)
f.bg1:SetHorizTile (true)
f.bg1:SetAlpha(0.7)
f.bg1:SetVertexColor(0.27, 0.27, 0.27)
f.bg1:SetVertTile(true)
f.bg1:SetHorizTile(true)
f.bg1:SetSize(790, 454)
f.bg1:SetAllPoints()
@@ -128,8 +128,8 @@ function Details:OpenForge()
--scroll gradient
local blackdiv = f:CreateTexture(nil, "artwork")
blackdiv:SetTexture([[Interface\ACHIEVEMENTFRAME\UI-Achievement-HorizontalShadow]])
blackdiv:SetVertexColor (0, 0, 0)
blackdiv:SetAlpha (1)
blackdiv:SetVertexColor(0, 0, 0)
blackdiv:SetAlpha(1)
blackdiv:SetPoint("topleft", f, "topleft", 170, -100)
blackdiv:SetHeight(461)
blackdiv:SetWidth(200)
@@ -137,8 +137,8 @@ function Details:OpenForge()
--big gradient
local blackdiv = f:CreateTexture(nil, "artwork")
blackdiv:SetTexture([[Interface\ACHIEVEMENTFRAME\UI-Achievement-HorizontalShadow]])
blackdiv:SetVertexColor (0, 0, 0)
blackdiv:SetAlpha (0.7)
blackdiv:SetVertexColor(0, 0, 0)
blackdiv:SetAlpha(0.7)
blackdiv:SetPoint("topleft", f, "topleft", 0, 0)
blackdiv:SetPoint("bottomleft", f, "bottomleft", 0, 0)
blackdiv:SetWidth(200)
@@ -150,7 +150,7 @@ function Details:OpenForge()
local buttons = {}
function f:InstallModule (module)
if (module and type (module) == "table") then
if (module and type(module) == "table") then
tinsert(all_modules, module)
end
end
@@ -170,7 +170,7 @@ function Details:OpenForge()
local entry = fw:CreateTextEntry (w, nil, 120, 20, "entry", "DetailsForgeAllPlayersNameFilter")
entry:SetHook("OnTextChanged", function() f:refresh() end)
entry:SetPoint("left", label, "right", 2, 0)
entry:SetTemplate (Details.gump:GetTemplate ("button", "OPTIONS_BUTTON_TEMPLATE"))
entry:SetTemplate(Details.gump:GetTemplate("button", "OPTIONS_BUTTON_TEMPLATE"))
end
return DetailsForgeAllPlayersFilterPanel
end,
@@ -234,7 +234,7 @@ function Details:OpenForge()
local entry = fw:CreateTextEntry (w, nil, 120, 20, "entry", "DetailsForgeAllPetsNameFilter")
entry:SetHook("OnTextChanged", function() f:refresh() end)
entry:SetPoint("left", label, "right", 2, 0)
entry:SetTemplate (Details.gump:GetTemplate ("button", "OPTIONS_BUTTON_TEMPLATE"))
entry:SetTemplate(Details.gump:GetTemplate("button", "OPTIONS_BUTTON_TEMPLATE"))
--
local label = w:CreateFontString (nil, "overlay", "GameFontHighlightSmall")
label:SetText(L["STRING_FORGE_FILTER_OWNERNAME"] .. ": ")
@@ -242,7 +242,7 @@ function Details:OpenForge()
local entry = fw:CreateTextEntry (w, nil, 120, 20, "entry", "DetailsForgeAllPetsOwnerFilter")
entry:SetHook("OnTextChanged", function() f:refresh() end)
entry:SetPoint("left", label, "right", 2, 0)
entry:SetTemplate (Details.gump:GetTemplate ("button", "OPTIONS_BUTTON_TEMPLATE"))
entry:SetTemplate(Details.gump:GetTemplate("button", "OPTIONS_BUTTON_TEMPLATE"))
end
return DetailsForgeAllPetsFilterPanel
end,
@@ -321,7 +321,7 @@ function Details:OpenForge()
local entry = fw:CreateTextEntry (w, nil, 120, 20, "entry", "DetailsForgeAllEnemiesNameFilter")
entry:SetHook("OnTextChanged", function() f:refresh() end)
entry:SetPoint("left", label, "right", 2, 0)
entry:SetTemplate (Details.gump:GetTemplate ("button", "OPTIONS_BUTTON_TEMPLATE"))
entry:SetTemplate(Details.gump:GetTemplate("button", "OPTIONS_BUTTON_TEMPLATE"))
end
return DetailsForgeAllEnemiesFilterPanel
end,
@@ -418,7 +418,7 @@ function Details:OpenForge()
local entry = fw:CreateTextEntry (w, nil, 120, 20, "entry", "DetailsForgeAllSpellsNameFilter")
entry:SetHook("OnTextChanged", function() f:refresh() end)
entry:SetPoint("left", label, "right", 2, 0)
entry:SetTemplate (Details.gump:GetTemplate ("button", "OPTIONS_BUTTON_TEMPLATE"))
entry:SetTemplate(Details.gump:GetTemplate("button", "OPTIONS_BUTTON_TEMPLATE"))
--
local label = w:CreateFontString (nil, "overlay", "GameFontHighlightSmall")
label:SetText(L["STRING_FORGE_FILTER_CASTERNAME"] .. ": ")
@@ -426,7 +426,7 @@ function Details:OpenForge()
local entry = fw:CreateTextEntry (w, nil, 120, 20, "entry", "DetailsForgeAllSpellsCasterFilter")
entry:SetHook("OnTextChanged", function() f:refresh() end)
entry:SetPoint("left", label, "right", 2, 0)
entry:SetTemplate (Details.gump:GetTemplate ("button", "OPTIONS_BUTTON_TEMPLATE"))
entry:SetTemplate(Details.gump:GetTemplate("button", "OPTIONS_BUTTON_TEMPLATE"))
end
return DetailsForgeAllSpellsFilterPanel
end,
@@ -548,7 +548,7 @@ function Details:OpenForge()
local entry = fw:CreateTextEntry (w, nil, 120, 20, "entry", "DetailsForgeEncounterSpellsNameFilter")
entry:SetHook("OnTextChanged", function() f:refresh() end)
entry:SetPoint("left", label, "right", 2, 0)
entry:SetTemplate (Details.gump:GetTemplate ("button", "OPTIONS_BUTTON_TEMPLATE"))
entry:SetTemplate(Details.gump:GetTemplate("button", "OPTIONS_BUTTON_TEMPLATE"))
--
local label = w:CreateFontString (nil, "overlay", "GameFontHighlightSmall")
label:SetText(L["STRING_FORGE_FILTER_CASTERNAME"] .. ": ")
@@ -556,7 +556,7 @@ function Details:OpenForge()
local entry = fw:CreateTextEntry (w, nil, 120, 20, "entry", "DetailsForgeEncounterSpellsCasterFilter")
entry:SetHook("OnTextChanged", function() f:refresh() end)
entry:SetPoint("left", label, "right", 2, 0)
entry:SetTemplate (Details.gump:GetTemplate ("button", "OPTIONS_BUTTON_TEMPLATE"))
entry:SetTemplate(Details.gump:GetTemplate("button", "OPTIONS_BUTTON_TEMPLATE"))
--
local label = w:CreateFontString (nil, "overlay", "GameFontHighlightSmall")
label:SetText(L["STRING_FORGE_FILTER_ENCOUNTERNAME"] .. ": ")
@@ -564,7 +564,7 @@ function Details:OpenForge()
local entry = fw:CreateTextEntry (w, nil, 120, 20, "entry", "DetailsForgeEncounterSpellsEncounterFilter")
entry:SetHook("OnTextChanged", function() f:refresh() end)
entry:SetPoint("left", label, "right", 2, 0)
entry:SetTemplate (Details.gump:GetTemplate ("button", "OPTIONS_BUTTON_TEMPLATE"))
entry:SetTemplate(Details.gump:GetTemplate("button", "OPTIONS_BUTTON_TEMPLATE"))
end
return DetailsForgeEncounterBossSpellsFilterPanel
end,
@@ -709,7 +709,7 @@ function Details:OpenForge()
local searchEntry = fw:CreateTextEntry(npcIdFrame, nil, 120, 20, "entry", "DetailsForgeEncounterNpcIDsFilter")
searchEntry:SetHook("OnTextChanged", function() f:refresh() end)
searchEntry:SetPoint("left", filterSpellNameLabel, "right", 2, 0)
searchEntry:SetTemplate(Details.gump:GetTemplate ("button", "OPTIONS_BUTTON_TEMPLATE"))
searchEntry:SetTemplate(Details.gump:GetTemplate("button", "OPTIONS_BUTTON_TEMPLATE"))
end
return DetailsForgeEncounterNpcIDsFilterPanel
@@ -803,7 +803,7 @@ function Details:OpenForge()
local entry = fw:CreateTextEntry (w, nil, 120, 20, "entry", "DetailsForgeDBMBarsTextFilter")
entry:SetHook("OnTextChanged", function() f:refresh() end)
entry:SetPoint("left", label, "right", 2, 0)
entry:SetTemplate (Details.gump:GetTemplate ("button", "OPTIONS_BUTTON_TEMPLATE"))
entry:SetTemplate(Details.gump:GetTemplate("button", "OPTIONS_BUTTON_TEMPLATE"))
--
local label = w:CreateFontString (nil, "overlay", "GameFontHighlightSmall")
label:SetText(L["STRING_FORGE_FILTER_ENCOUNTERNAME"] .. ": ")
@@ -811,7 +811,7 @@ function Details:OpenForge()
local entry = fw:CreateTextEntry (w, nil, 120, 20, "entry", "DetailsForgeDBMBarsEncounterFilter")
entry:SetHook("OnTextChanged", function() f:refresh() end)
entry:SetPoint("left", label, "right", 2, 0)
entry:SetTemplate (Details.gump:GetTemplate ("button", "OPTIONS_BUTTON_TEMPLATE"))
entry:SetTemplate(Details.gump:GetTemplate("button", "OPTIONS_BUTTON_TEMPLATE"))
end
return DetailsForgeDBMBarsFilterPanel
end,
@@ -906,7 +906,7 @@ function Details:OpenForge()
if (type(spellid) == "number") then
if (spellid < 0) then
local title, description, depth, abilityIcon, displayInfo, siblingID, nextSectionID, filteredByDifficulty, link, startsOpen, flag1, flag2, flag3, flag4 = DetailsFramework.EncounterJournal.EJ_GetSectionInfo (abs (spellid))
local title, description, depth, abilityIcon, displayInfo, siblingID, nextSectionID, filteredByDifficulty, link, startsOpen, flag1, flag2, flag3, flag4 = DetailsFramework.EncounterJournal.EJ_GetSectionInfo (abs(spellid))
spellname, spellicon = title, abilityIcon
else
spellname, _, spellicon = GetSpellInfo(spellid)
@@ -934,7 +934,7 @@ function Details:OpenForge()
local entry = fw:CreateTextEntry (w, nil, 120, 20, "entry", "DetailsForgeBigWigsBarsTextFilter")
entry:SetHook("OnTextChanged", function() f:refresh() end)
entry:SetPoint("left", label, "right", 2, 0)
entry:SetTemplate (Details.gump:GetTemplate ("button", "OPTIONS_BUTTON_TEMPLATE"))
entry:SetTemplate(Details.gump:GetTemplate("button", "OPTIONS_BUTTON_TEMPLATE"))
--
local label = w:CreateFontString (nil, "overlay", "GameFontHighlightSmall")
label:SetText(L["STRING_FORGE_FILTER_ENCOUNTERNAME"] .. ": ")
@@ -942,7 +942,7 @@ function Details:OpenForge()
local entry = fw:CreateTextEntry (w, nil, 120, 20, "entry", "DetailsForgeBWBarsEncounterFilter")
entry:SetHook("OnTextChanged", function() f:refresh() end)
entry:SetPoint("left", label, "right", 2, 0)
entry:SetTemplate (Details.gump:GetTemplate ("button", "OPTIONS_BUTTON_TEMPLATE"))
entry:SetTemplate(Details.gump:GetTemplate("button", "OPTIONS_BUTTON_TEMPLATE"))
--
end
return DetailsForgeBigWigsBarsFilterPanel
@@ -1042,9 +1042,9 @@ function Details:OpenForge()
end
for index, button in ipairs(buttons) do
button:SetTemplate (CONST_BUTTON_TEMPLATE)
button:SetTemplate(CONST_BUTTON_TEMPLATE)
end
buttons[module_number]:SetTemplate (CONST_BUTTONSELECTED_TEMPLATE)
buttons[module_number]:SetTemplate(CONST_BUTTONSELECTED_TEMPLATE)
local module = all_modules [module_number]
if (module) then
@@ -1075,7 +1075,7 @@ function Details:OpenForge()
for o = 1, #fillpanel.scrollframe.lines do
for i = 1, #fillpanel.scrollframe.lines [o].entry_inuse do
--text entry
fillpanel.scrollframe.lines [o].entry_inuse [i]:SetTemplate (fw:GetTemplate ("button", "DETAILS_FORGE_TEXTENTRY_TEMPLATE"))
fillpanel.scrollframe.lines [o].entry_inuse [i]:SetTemplate(fw:GetTemplate("button", "DETAILS_FORGE_TEXTENTRY_TEMPLATE"))
end
end
end
@@ -1109,10 +1109,10 @@ function Details:OpenForge()
for i = 1, #all_modules do
local module = all_modules [i]
local b = fw:CreateButton (f, select_module, 140, 20, module.name, i)
local b = fw:CreateButton(f, select_module, 140, 20, module.name, i)
b.tooltip = module.desc
b:SetTemplate (CONST_BUTTON_TEMPLATE)
b:SetTemplate(CONST_BUTTON_TEMPLATE)
b:SetIcon ([[Interface\BUTTONS\UI-GuildButton-PublicNote-Up]], nil, nil, nil, nil, {1, 1, 1, 0.7})
b:SetWidth(140)
+12 -12
View File
@@ -6,7 +6,7 @@ local DF = _G.DetailsFramework
local _
function Details:InitializeMacrosWindow()
local DetailsMacrosPanel = DF:CreateSimplePanel (UIParent, 700, 480, "Details! Useful Macros", "DetailsMacrosPanel")
local DetailsMacrosPanel = DF:CreateSimplePanel(UIParent, 700, 480, "Details! Useful Macros", "DetailsMacrosPanel")
DetailsMacrosPanel.Frame = DetailsMacrosPanel
DetailsMacrosPanel.__name = "Macros"
DetailsMacrosPanel.real_name = "DETAILS_MACROSWINDOW"
@@ -27,7 +27,7 @@ function Details.OpenMacrosWindow()
if (not DetailsMacrosPanel or not DetailsMacrosPanel.Initialized) then
DetailsMacrosPanel.Initialized = true
local f = DetailsMacrosPanel or DF:CreateSimplePanel (UIParent, 700, 480, "Details! Useful Macros", "DetailsMacrosPanel")
local f = DetailsMacrosPanel or DF:CreateSimplePanel(UIParent, 700, 480, "Details! Useful Macros", "DetailsMacrosPanel")
local scrollbox_line_backdrop_color = {0, 0, 0, 0.2}
local scrollbox_line_backdrop_color_onenter = {.3, .3, .3, 0.5}
@@ -37,10 +37,10 @@ function Details.OpenMacrosWindow()
f.bg1 = f:CreateTexture(nil, "background")
f.bg1:SetTexture([[Interface\AddOns\Details\images\background]], true)
f.bg1:SetAlpha (0.8)
f.bg1:SetVertexColor (0.27, 0.27, 0.27)
f.bg1:SetVertTile (true)
f.bg1:SetHorizTile (true)
f.bg1:SetAlpha(0.8)
f.bg1:SetVertexColor(0.27, 0.27, 0.27)
f.bg1:SetVertTile(true)
f.bg1:SetHorizTile(true)
f.bg1:SetSize(790, 454)
f.bg1:SetAllPoints()
f:SetBackdrop({edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1, bgFile = [[Interface\AddOns\Details\images\background]], tileSize = 64, tile = true})
@@ -50,11 +50,11 @@ function Details.OpenMacrosWindow()
local macrosAvailable = Details.MacroList
local OnEnterMacroButton = function(self)
self:SetBackdropColor(unpack (scrollbox_line_backdrop_color_onenter))
self:SetBackdropColor(unpack(scrollbox_line_backdrop_color_onenter))
end
local onLeaveMacroButton = function(self)
self:SetBackdropColor(unpack (scrollbox_line_backdrop_color))
self:SetBackdropColor(unpack(scrollbox_line_backdrop_color))
end
local updateMacroLine = function(self, index, title, desc, macroText)
@@ -92,16 +92,16 @@ function Details.OpenMacrosWindow()
line:SetScript("OnEnter", OnEnterMacroButton)
line:SetScript("OnLeave", onLeaveMacroButton)
line:SetBackdrop({bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], tileSize = 64, tile = true, edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1})
line:SetBackdropColor(unpack (scrollbox_line_backdrop_color))
line:SetBackdropColor(unpack(scrollbox_line_backdrop_color))
line:SetBackdropBorderColor(0, 0, 0, 0.3)
local titleLabel = DF:CreateLabel(line, "", DF:GetTemplate ("font", "ORANGE_FONT_TEMPLATE"))
local titleLabel = DF:CreateLabel(line, "", DF:GetTemplate("font", "ORANGE_FONT_TEMPLATE"))
titleLabel.textsize = 14
titleLabel.textcolor = "yellow"
local descLabel = DF:CreateLabel(line, "", DF:GetTemplate ("font", "ORANGE_FONT_TEMPLATE"))
local descLabel = DF:CreateLabel(line, "", DF:GetTemplate("font", "ORANGE_FONT_TEMPLATE"))
descLabel.textsize = 12
local options_dropdown_template = DF:GetTemplate ("dropdown", "OPTIONS_DROPDOWN_TEMPLATE")
local options_dropdown_template = DF:GetTemplate("dropdown", "OPTIONS_DROPDOWN_TEMPLATE")
options_dropdown_template = DF.table.copy ({}, options_dropdown_template)
options_dropdown_template.backdropcolor = {.51, .51, .51, .3}
options_dropdown_template.onenterbordercolor = {.51, .51, .51, .2}
+79 -81
View File
@@ -18,7 +18,7 @@ local unpack = unpack
local CreateFrame = CreateFrame
local _GetTime = GetTime
local _GetCursorPosition = GetCursorPosition
local _UIParent = UIParent
local UIParent = UIParent
local _IsAltKeyDown = IsAltKeyDown
local _IsShiftKeyDown = IsShiftKeyDown
local _IsControlKeyDown = IsControlKeyDown
@@ -237,7 +237,7 @@ function Details:MostrarScrollBar(sem_animacao)
local nao_mostradas = self.rows_showing - self.rows_fit_in_window
local slider_height = nao_mostradas*self.row_height
self.scroll.scrollMax = slider_height
self.scroll:SetMinMaxValues (0, slider_height)
self.scroll:SetMinMaxValues(0, slider_height)
self.rolagem = true
self.scroll:Enable()
@@ -1658,13 +1658,13 @@ end
function Details:DelayOptionsRefresh(instance, noReopen)
if (_G.DetailsOptionsWindow and _G.DetailsOptionsWindow:IsShown()) then
Details:ScheduleTimer ("OpenOptionsWindow", 0.1, {instance or _G.DetailsOptionsWindow.instance, noReopen})
Details:ScheduleTimer("OpenOptionsWindow", 0.1, {instance or _G.DetailsOptionsWindow.instance, noReopen})
end
end
function Details:RefreshLockedState()
if (not self.baseframe and self.meu_id and self:IsEnabled()) then
self:ScheduleTimer ("RefreshLockedState", 1)
self:ScheduleTimer("RefreshLockedState", 1)
return
elseif (not self.baseframe) then
return
@@ -1982,7 +1982,7 @@ local lineScript_Onmouseup = function(self, button)
end
end
if (Details.row_singleclick_overwrite [self._instance.atributo] and type (Details.row_singleclick_overwrite [self._instance.atributo][self._instance.sub_atributo]) == "function") then
if (Details.row_singleclick_overwrite [self._instance.atributo] and type(Details.row_singleclick_overwrite [self._instance.atributo][self._instance.sub_atributo]) == "function") then
return Details.row_singleclick_overwrite [self._instance.atributo][self._instance.sub_atributo] (_, self.minha_tabela, self._instance, is_shift_down, is_control_down)
end
@@ -2413,10 +2413,10 @@ local icon_frame_on_click_up = function(self, button)
if (Details.ilevel.core:HasQueuedInspec (self.unitname)) then
--icon animation
local anim = tremove (Details.icon_animations.load.available)
local anim = tremove(Details.icon_animations.load.available)
if (not anim) then
icon_frame_create_animation()
anim = tremove (Details.icon_animations.load.available)
anim = tremove(Details.icon_animations.load.available)
end
local f = anim
@@ -2435,13 +2435,13 @@ local icon_frame_on_click_up = function(self, button)
frame.question_icon:Hide()
end
end
Details:ScheduleTimer ("HideBarQuestionIcon", 1, f)
Details:ScheduleTimer("HideBarQuestionIcon", 1, f)
self.icon_animation = anim
anim.icon_frame = self
local pid
pid = icon_frame_events:ScheduleTimer ("CancelAnim", 1, {anim})
pid = icon_frame_events:ScheduleTimer("CancelAnim", 1, {anim})
Details.icon_animations.load.in_use [anim] = pid
anim.parent = self
@@ -2455,10 +2455,10 @@ local icon_frame_on_click_up = function(self, button)
end
--icon animation
local anim = tremove (Details.icon_animations.load.available)
local anim = tremove(Details.icon_animations.load.available)
if (not anim) then
icon_frame_create_animation()
anim = tremove (Details.icon_animations.load.available)
anim = tremove(Details.icon_animations.load.available)
end
anim:Show()
@@ -2475,9 +2475,9 @@ local icon_frame_on_click_up = function(self, button)
local pid
if (does_query) then
pid = icon_frame_events:ScheduleTimer ("CancelAnim", 4, {anim, true})
pid = icon_frame_events:ScheduleTimer("CancelAnim", 4, {anim, true})
else
pid = icon_frame_events:ScheduleTimer ("CancelAnim", 0.2, {anim})
pid = icon_frame_events:ScheduleTimer("CancelAnim", 0.2, {anim})
end
Details.icon_animations.load.in_use [anim] = pid
anim.parent = self
@@ -2996,7 +2996,7 @@ local hide_click_func = function()
--empty
end
function Details:InstanceAlert (msg, icon, time, clickfunc, doflash, forceAlert)
function Details:InstanceAlert (msg, icon, timeInSeconds, clickfunc, doflash, forceAlert)
if (not forceAlert and Details.streamer_config.no_alerts) then
--return
@@ -3059,9 +3059,9 @@ function Details:InstanceAlert (msg, icon, time, clickfunc, doflash, forceAlert)
self.alert.button.func_param = {unpack(clickfunc, 2)}
end
time = time or 15
self.alert_time = time
Details:ScheduleTimer ("InstanceAlertTime", time, self)
timeInSeconds = timeInSeconds or 15
self.alert_time = timeInSeconds
Details:ScheduleTimer("InstanceAlertTime", timeInSeconds, self)
self.alert:SetPoint("bottom", self.baseframe, "bottom", 0, -12)
self.alert:SetPoint("left", self.baseframe, "left", 3, 0)
@@ -3077,7 +3077,6 @@ function Details:InstanceAlert (msg, icon, time, clickfunc, doflash, forceAlert)
end
self.alert:Play()
end
local alert_on_click = function(self, button)
@@ -3090,8 +3089,7 @@ local alert_on_click = function(self, button)
self:GetParent():Hide()
end
local function CreateAlertFrame (baseframe, instancia)
local function CreateAlertFrame(baseframe, instancia)
local frame_upper = CreateFrame("scrollframe", "DetailsAlertFrameScroll" .. instancia.meu_id, baseframe)
frame_upper:SetPoint("bottom", baseframe, "bottom")
frame_upper:SetPoint("left", baseframe, "left", 3, 0)
@@ -3215,7 +3213,7 @@ local function CreateAlertFrame (baseframe, instancia)
end
function alert_bg:DoFlash()
C_Timer.After (0.23, do_flash)
C_Timer.After(0.23, do_flash)
end
alert_bg.text = text
@@ -3247,7 +3245,7 @@ function Details:InstanceMsg (text, icon, textcolor, iconcoords, iconcolor)
self.freeze_texto:SetTextColor(1, 1, 1, 1)
end
if (iconcoords and type (iconcoords) == "table") then
if (iconcoords and type(iconcoords) == "table") then
self.freeze_icon:SetTexCoord(unpack(iconcoords))
else
self.freeze_icon:SetTexCoord(0, 1, 0, 1)
@@ -3267,10 +3265,10 @@ function Details:schedule_hide_anti_overlap (self)
end
local function hide_anti_overlap (self)
if (self.schdule) then
Details:CancelTimer (self.schdule)
Details:CancelTimer(self.schdule)
self.schdule = nil
end
local schdule = Details:ScheduleTimer ("schedule_hide_anti_overlap", 0.3, self)
local schdule = Details:ScheduleTimer("schedule_hide_anti_overlap", 0.3, self)
self.schdule = schdule
end
@@ -3279,7 +3277,7 @@ local function show_anti_overlap (instance, host, side)
local anti_menu_overlap = instance.baseframe.anti_menu_overlap
if (anti_menu_overlap.schdule) then
Details:CancelTimer (anti_menu_overlap.schdule)
Details:CancelTimer(anti_menu_overlap.schdule)
anti_menu_overlap.schdule = nil
end
@@ -3310,7 +3308,7 @@ do
local tooltip_anchor = CreateFrame("frame", "DetailsTooltipAnchor", UIParent,"BackdropTemplate")
tooltip_anchor:SetSize(140, 20)
tooltip_anchor:SetAlpha(0)
tooltip_anchor:SetMovable (false)
tooltip_anchor:SetMovable(false)
tooltip_anchor:SetClampedToScreen (true)
tooltip_anchor.locked = true
tooltip_anchor:SetBackdrop({bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], edgeFile = [[Interface\DialogFrame\UI-DialogBox-Border]], edgeSize = 10, insets = {left = 1, right = 1, top = 2, bottom = 1}})
@@ -3357,7 +3355,7 @@ do
if (self.locked) then
self:SetAlpha(1)
self:EnableMouse(true)
self:SetMovable (true)
self:SetMovable(true)
self:SetFrameStrata("FULLSCREEN")
self.locked = false
tooltip_anchor.alert.animOut:Stop()
@@ -3366,7 +3364,7 @@ do
self:SetAlpha(0)
self:EnableMouse(false)
self:SetFrameStrata("MEDIUM")
self:SetMovable (false)
self:SetMovable(false)
self.locked = true
tooltip_anchor.alert.animIn:Stop()
tooltip_anchor.alert.animOut:Play()
@@ -3409,7 +3407,7 @@ function gump:CriaJanelaPrincipal (ID, instancia, criando)
-- main frames -----------------------------------------------------------------------------------------------------------------------------------------------
--baseframe is the lowest frame in the window architecture
local baseframe = CreateFrame("scrollframe", "DetailsBaseFrame" .. ID, _UIParent, "BackdropTemplate")
local baseframe = CreateFrame("scrollframe", "DetailsBaseFrame" .. ID, UIParent, "BackdropTemplate")
baseframe:SetMovable(true)
baseframe:SetResizable(true)
baseframe:SetUserPlaced(false)
@@ -3463,7 +3461,7 @@ function gump:CriaJanelaPrincipal (ID, instancia, criando)
instancia.windowBackgroundDisplay = backgrounddisplay
--row frame is the parent of rows, it have setallpoints on baseframe
local rowframe = CreateFrame("frame", "DetailsRowFrame"..ID, _UIParent) --row frame
local rowframe = CreateFrame("frame", "DetailsRowFrame"..ID, UIParent) --row frame
rowframe:SetAllPoints(baseframe)
rowframe:SetFrameStrata(baseframe_strata)
rowframe:SetFrameLevel(3)
@@ -3555,7 +3553,7 @@ function gump:CriaJanelaPrincipal (ID, instancia, criando)
--config set
scrollbar:SetOrientation ("VERTICAL")
scrollbar.scrollMax = 0
scrollbar:SetMinMaxValues (0, 0)
scrollbar:SetMinMaxValues(0, 0)
scrollbar:SetValue(0)
scrollbar.ultimo = 0
@@ -3597,7 +3595,7 @@ function gump:CriaJanelaPrincipal (ID, instancia, criando)
baseframe:SetClampedToScreen (true)
baseframe:SetSize(Details.new_window_size.width, Details.new_window_size.height)
baseframe:SetPoint("center", _UIParent)
baseframe:SetPoint("center", UIParent)
baseframe:EnableMouseWheel(false)
baseframe:EnableMouse(true)
@@ -5444,7 +5442,7 @@ function Details:StatusBarAlert(text, icon, color, time)
if (icon or text) then
statusbar:Show()
if (time) then
Details:ScheduleTimer ("StatusBarAlertTime", time, self)
Details:ScheduleTimer("StatusBarAlertTime", time, self)
end
else
statusbar:Hide()
@@ -5541,7 +5539,7 @@ function gump:CriaRodape(baseframe, instancia)
baseframe.DOWNFrame:Show()
baseframe.DOWNFrame:EnableMouse(true)
baseframe.DOWNFrame:SetMovable (true)
baseframe.DOWNFrame:SetMovable(true)
baseframe.DOWNFrame:SetResizable(true)
BGFrame_scripts(baseframe.DOWNFrame, baseframe, instancia)
@@ -6157,7 +6155,7 @@ function Details:SetMenuOwner (self, instance)
local instance_height = instance.baseframe:GetHeight()
if (y + math.max (instance_height, 250) > screen_height) then
if (y + math.max(instance_height, 250) > screen_height) then
GameCooltip:SetOwner(self, "top", "bottom", 0, -10)
else
GameCooltip:SetOwner(self, "bottom", "top", 0, 0)
@@ -6395,7 +6393,7 @@ local buildSegmentTooltip = function(self, deltaTime)
local wasted = totalRealTime - decorrido
--wasted time
gameCooltip:AddLine(Loc["STRING_SEGMENTS_LIST_WASTED_TIME"] .. ":", "|cFFFF3300" .. Details.gump:IntegerToTimer (wasted) .. " (" .. floor (wasted / totalRealTime * 100) .. "%)|r", 2, "white", "white")
gameCooltip:AddLine(Loc["STRING_SEGMENTS_LIST_WASTED_TIME"] .. ":", "|cFFFF3300" .. Details.gump:IntegerToTimer (wasted) .. " (" .. floor(wasted / totalRealTime * 100) .. "%)|r", 2, "white", "white")
gameCooltip:AddStatusBar(100, 2, 0, 0, 0, 0.35, false, false, "Skyline")
gameCooltip:AddLine(Loc["STRING_SEGMENTS_LIST_TOTALTIME"] .. ":", Details.gump:IntegerToTimer (endedAt - startedAt), 2, "white", "white")
@@ -6405,7 +6403,7 @@ local buildSegmentTooltip = function(self, deltaTime)
local wasted = totalRealTime - decorrido
--wasted time
gameCooltip:AddLine(Loc["STRING_SEGMENTS_LIST_WASTED_TIME"] .. ":", "|cFFFF3300" .. Details.gump:IntegerToTimer (wasted) .. " (" .. floor (wasted / totalRealTime * 100) .. "%)|r", 2, "white", "white")
gameCooltip:AddLine(Loc["STRING_SEGMENTS_LIST_WASTED_TIME"] .. ":", "|cFFFF3300" .. Details.gump:IntegerToTimer (wasted) .. " (" .. floor(wasted / totalRealTime * 100) .. "%)|r", 2, "white", "white")
gameCooltip:AddStatusBar(100, 2, 0, 0, 0, 0.35, false, false, "Skyline")
gameCooltip:AddLine(Loc["STRING_SEGMENTS_LIST_TOTALTIME"] .. ":", Details.gump:IntegerToTimer (totalRealTime), 2, "white", "white")
@@ -6687,7 +6685,7 @@ local buildSegmentTooltip = function(self, deltaTime)
gameCooltip:AddLine(Loc["STRING_SEGMENTS_LIST_TIMEINCOMBAT"] .. ":", Details.gump:IntegerToTimer (decorrido), 2, "white", "white")
--wasted time
gameCooltip:AddLine(Loc["STRING_SEGMENTS_LIST_WASTED_TIME"] .. ":", "|cFFFF3300" .. Details.gump:IntegerToTimer (wasted) .. " (" .. floor (wasted / totalRealTime * 100) .. "%)|r", 2, "white", "white")
gameCooltip:AddLine(Loc["STRING_SEGMENTS_LIST_WASTED_TIME"] .. ":", "|cFFFF3300" .. Details.gump:IntegerToTimer (wasted) .. " (" .. floor(wasted / totalRealTime * 100) .. "%)|r", 2, "white", "white")
gameCooltip:AddStatusBar (100, 2, 0, 0, 0, 0.35, false, false, "Skyline")
gameCooltip:AddLine(Loc["STRING_SEGMENTS_LIST_TOTALTIME"] .. ":", Details.gump:IntegerToTimer (endedAt - startedAt) .. " [|cFFFF3300" .. Details.gump:IntegerToTimer (totalRealTime - decorrido) .. "|r]", 2, "white", "white")
@@ -6701,7 +6699,7 @@ local buildSegmentTooltip = function(self, deltaTime)
gameCooltip:AddLine(Loc["STRING_SEGMENTS_LIST_TOTALTIME"] .. ":", Details.gump:IntegerToTimer (totalRealTime), 2, "white", "white")
--wasted time
gameCooltip:AddLine(Loc["STRING_SEGMENTS_LIST_WASTED_TIME"] .. ":", "|cFFFF3300" .. Details.gump:IntegerToTimer (wasted) .. " (" .. floor (wasted / totalRealTime * 100) .. "%)|r", 2, "white", "white")
gameCooltip:AddLine(Loc["STRING_SEGMENTS_LIST_WASTED_TIME"] .. ":", "|cFFFF3300" .. Details.gump:IntegerToTimer (wasted) .. " (" .. floor(wasted / totalRealTime * 100) .. "%)|r", 2, "white", "white")
gameCooltip:AddStatusBar (100, 2, 0, 0, 0, 0.35, false, false, "Skyline")
else
@@ -7319,16 +7317,16 @@ end
--update the window click through state
local updateClickThroughListener = Details:CreateEventListener()
function updateClickThroughListener:EnterCombat()
Details:InstanceCall (function(instance)
C_Timer.After (1.5, function()
Details:InstanceCall(function(instance)
C_Timer.After(1.5, function()
instance:UpdateClickThrough()
end)
end)
end
function updateClickThroughListener:LeaveCombat()
Details:InstanceCall (function(instance)
C_Timer.After (1.5, function()
Details:InstanceCall(function(instance)
C_Timer.After(1.5, function()
instance:UpdateClickThrough()
end)
end)
@@ -7498,25 +7496,25 @@ end
function Details:DelayedCheckCombatAlpha (instance, alpha)
if (UnitAffectingCombat("player") or InCombatLockdown()) then
instance:SetWindowAlphaForCombat (true, true, alpha) --hida a janela
instance:SetWindowAlphaForCombat (true, true, alpha) --hida a janela
instance:SetWindowAlphaForCombat(true, true, alpha) --hida a janela
instance:SetWindowAlphaForCombat(true, true, alpha) --hida a janela
end
end
function Details:DelayedCheckOutOfCombatAlpha (instance, alpha)
if (not UnitAffectingCombat("player") and not InCombatLockdown()) then
instance:SetWindowAlphaForCombat (true, true, alpha) --hida a janela
instance:SetWindowAlphaForCombat (true, true, alpha) --hida a janela
instance:SetWindowAlphaForCombat(true, true, alpha) --hida a janela
instance:SetWindowAlphaForCombat(true, true, alpha) --hida a janela
end
end
function Details:DelayedCheckOutOfCombatAndGroupAlpha (instance, alpha)
if ((Details.zone_type == "raid" or Details.zone_type == "party") and IsInInstance()) then
if (UnitAffectingCombat("player") or InCombatLockdown()) then
instance:SetWindowAlphaForCombat (false, false, alpha) --deshida a janela
instance:SetWindowAlphaForCombat(false, false, alpha) --deshida a janela
else
instance:SetWindowAlphaForCombat (true, true, alpha) --hida a janela
instance:SetWindowAlphaForCombat (true, true, alpha) --hida a janela
instance:SetWindowAlphaForCombat(true, true, alpha) --hida a janela
instance:SetWindowAlphaForCombat(true, true, alpha) --hida a janela
end
end
end
@@ -7543,15 +7541,15 @@ function Details:AdjustAlphaByContext(interacting)
if (self.hide_on_context[3].inverse) then
--while in group
if (Details.in_group) then
self:SetWindowAlphaForCombat (true, true, getAlphaByContext(self, 3)) --hida a janela
self:SetWindowAlphaForCombat (true, true, getAlphaByContext(self, 3)) --hida a janela
self:SetWindowAlphaForCombat(true, true, getAlphaByContext(self, 3)) --hida a janela
self:SetWindowAlphaForCombat(true, true, getAlphaByContext(self, 3)) --hida a janela
hasRuleEnabled = true
end
else
--while not in group
if (not Details.in_group) then
self:SetWindowAlphaForCombat (true, true, getAlphaByContext(self, 3)) --hida a janela
self:SetWindowAlphaForCombat (true, true, getAlphaByContext(self, 3)) --hida a janela
self:SetWindowAlphaForCombat(true, true, getAlphaByContext(self, 3)) --hida a janela
self:SetWindowAlphaForCombat(true, true, getAlphaByContext(self, 3)) --hida a janela
hasRuleEnabled = true
end
end
@@ -7561,8 +7559,8 @@ function Details:AdjustAlphaByContext(interacting)
if (self.hide_on_context[4].enabled) then
local isInInstance = IsInInstance()
if (not isInInstance or (not Details.zone_type == "raid" and not Details.zone_type == "party")) then
self:SetWindowAlphaForCombat (true, true, getAlphaByContext(self, 4)) --hida a janela
self:SetWindowAlphaForCombat (true, true, getAlphaByContext(self, 4)) --hida a janela
self:SetWindowAlphaForCombat(true, true, getAlphaByContext(self, 4)) --hida a janela
self:SetWindowAlphaForCombat(true, true, getAlphaByContext(self, 4)) --hida a janela
hasRuleEnabled = true
end
end
@@ -7571,8 +7569,8 @@ function Details:AdjustAlphaByContext(interacting)
if (self.hide_on_context[5].enabled) then
local isInInstance = IsInInstance()
if (isInInstance or Details.zone_type == "raid" or Details.zone_type == "party") then
self:SetWindowAlphaForCombat (true, true, getAlphaByContext(self, 5)) --hida a janela
self:SetWindowAlphaForCombat (true, true, getAlphaByContext(self, 5)) --hida a janela
self:SetWindowAlphaForCombat(true, true, getAlphaByContext(self, 5)) --hida a janela
self:SetWindowAlphaForCombat(true, true, getAlphaByContext(self, 5)) --hida a janela
hasRuleEnabled = true
end
end
@@ -7580,7 +7578,7 @@ function Details:AdjustAlphaByContext(interacting)
--raid debug (inside instance + out of combat)
if (self.hide_on_context[6].enabled) then
if ((Details.zone_type == "raid" or Details.zone_type == "party") and IsInInstance()) then
Details:ScheduleTimer ("DelayedCheckOutOfCombatAndGroupAlpha", 0.3, self, getAlphaByContext(self, 6))
Details:ScheduleTimer("DelayedCheckOutOfCombatAndGroupAlpha", 0.3, self, getAlphaByContext(self, 6))
end
end
@@ -7600,8 +7598,8 @@ function Details:AdjustAlphaByContext(interacting)
else
--player is not inside an arena
if (self.hide_on_context[contextId].inverse) then
self:SetWindowAlphaForCombat (true, true, getAlphaByContext(self, contextId))
self:SetWindowAlphaForCombat (true, true, getAlphaByContext(self, contextId))
self:SetWindowAlphaForCombat(true, true, getAlphaByContext(self, contextId))
self:SetWindowAlphaForCombat(true, true, getAlphaByContext(self, contextId))
hasRuleEnabled = true
end
end
@@ -7613,10 +7611,10 @@ function Details:AdjustAlphaByContext(interacting)
if (isInInstance and Details.zone_type == "pvp") then
--player is inside a battleground
if (not self.hide_on_context[7].inverse) then
self:SetWindowAlphaForCombat (true, true, getAlphaByContext(self, 7)) --hida a janela
self:SetWindowAlphaForCombat (true, true, getAlphaByContext(self, 7)) --hida a janela
self:SetWindowAlphaForCombat(true, true, getAlphaByContext(self, 7)) --hida a janela
self:SetWindowAlphaForCombat(true, true, getAlphaByContext(self, 7)) --hida a janela
else
self:SetWindowAlphaForCombat (false, false, getAlphaByContext(self, 7)) --deshida a janela
self:SetWindowAlphaForCombat(false, false, getAlphaByContext(self, 7)) --deshida a janela
end
hasRuleEnabled = true
@@ -7624,10 +7622,10 @@ function Details:AdjustAlphaByContext(interacting)
--player is not inside a battleground
if (not self.hide_on_context[7].inverse) then
--there's no inverse rule: do nothing
--self:SetWindowAlphaForCombat (false, false, getAlphaByContext(self, 7)) --deshida a janela
--self:SetWindowAlphaForCombat(false, false, getAlphaByContext(self, 7)) --deshida a janela
else
self:SetWindowAlphaForCombat (true, true, getAlphaByContext(self, 7)) --hida a janela
self:SetWindowAlphaForCombat (true, true, getAlphaByContext(self, 7)) --hida a janela
self:SetWindowAlphaForCombat(true, true, getAlphaByContext(self, 7)) --hida a janela
self:SetWindowAlphaForCombat(true, true, getAlphaByContext(self, 7)) --hida a janela
hasRuleEnabled = true
end
end
@@ -7638,20 +7636,20 @@ function Details:AdjustAlphaByContext(interacting)
if (_G.DetailsMythicPlusFrame and _G.DetailsMythicPlusFrame.IsDoingMythicDungeon) then
--player is inside a dungeon mythic+
if (not self.hide_on_context[8].inverse) then
self:SetWindowAlphaForCombat (true, true, getAlphaByContext(self, 8)) --hida a janela
self:SetWindowAlphaForCombat (true, true, getAlphaByContext(self, 8)) --hida a janela
self:SetWindowAlphaForCombat(true, true, getAlphaByContext(self, 8)) --hida a janela
self:SetWindowAlphaForCombat(true, true, getAlphaByContext(self, 8)) --hida a janela
else
self:SetWindowAlphaForCombat (false, false, getAlphaByContext(self, 8)) --deshida a janela
self:SetWindowAlphaForCombat(false, false, getAlphaByContext(self, 8)) --deshida a janela
end
hasRuleEnabled = true
else
if (not self.hide_on_context[8].inverse) then
--there's no inverse rule: do nothing
--self:SetWindowAlphaForCombat (false, false, getAlphaByContext(self, 8)) --deshida a janela
--self:SetWindowAlphaForCombat(false, false, getAlphaByContext(self, 8)) --deshida a janela
else
self:SetWindowAlphaForCombat (true, true, getAlphaByContext(self, 8)) --hida a janela
self:SetWindowAlphaForCombat (true, true, getAlphaByContext(self, 8)) --hida a janela
self:SetWindowAlphaForCombat(true, true, getAlphaByContext(self, 8)) --hida a janela
self:SetWindowAlphaForCombat(true, true, getAlphaByContext(self, 8)) --hida a janela
hasRuleEnabled = true
end
end
@@ -7659,12 +7657,12 @@ function Details:AdjustAlphaByContext(interacting)
--in combat
if (self.hide_on_context[1].enabled) then
Details:ScheduleTimer ("DelayedCheckCombatAlpha", 0.3, self, getAlphaByContext(self, 1))
Details:ScheduleTimer("DelayedCheckCombatAlpha", 0.3, self, getAlphaByContext(self, 1))
end
--out of combat
if (self.hide_on_context[2].enabled) then
Details:ScheduleTimer ("DelayedCheckOutOfCombatAlpha", 0.3, self, getAlphaByContext(self, 2))
Details:ScheduleTimer("DelayedCheckOutOfCombatAlpha", 0.3, self, getAlphaByContext(self, 2))
end
--if no rule is enabled, show the window
@@ -9456,7 +9454,7 @@ local function click_to_change_segment (instancia, buttontype)
local total_shown = segments_filled+2
local goal = segmento_goal+1
local select_ = math.abs (goal - total_shown)
local select_ = math.abs(goal - total_shown)
GameCooltip:Select(1, select_)
instancia:TrocaTabela(segmento_goal)
@@ -9473,7 +9471,7 @@ local function click_to_change_segment (instancia, buttontype)
local total_shown = segments_filled+2
local goal = segmento_goal+1
local select_ = math.abs (goal - total_shown)
local select_ = math.abs(goal - total_shown)
GameCooltip:Select(1, select_)
instancia:TrocaTabela(segmento_goal)
@@ -9486,7 +9484,7 @@ local function click_to_change_segment (instancia, buttontype)
local total_shown = segments_filled+2
local goal = segmento_goal+1
local select_ = math.abs (goal - total_shown)
local select_ = math.abs(goal - total_shown)
GameCooltip:Select(1, select_)
instancia:TrocaTabela(segmento_goal)
@@ -9587,7 +9585,7 @@ function gump:CriaCabecalho (baseframe, instancia)
baseframe.UPFrame:Show()
baseframe.UPFrame:EnableMouse(true)
baseframe.UPFrame:SetMovable (true)
baseframe.UPFrame:SetMovable(true)
baseframe.UPFrame:SetResizable(true)
BGFrame_scripts(baseframe.UPFrame, baseframe, instancia)
@@ -9598,7 +9596,7 @@ function gump:CriaCabecalho (baseframe, instancia)
baseframe.UPFrameConnect:SetPoint("bottomright", baseframe, "topright", 0, -1)
baseframe.UPFrameConnect:SetHeight(2)
baseframe.UPFrameConnect:EnableMouse(true)
baseframe.UPFrameConnect:SetMovable (true)
baseframe.UPFrameConnect:SetMovable(true)
baseframe.UPFrameConnect:SetResizable(true)
baseframe.UPFrameConnect.is_toolbar = true
@@ -9608,7 +9606,7 @@ function gump:CriaCabecalho (baseframe, instancia)
baseframe.UPFrameLeftPart:SetPoint("bottomleft", baseframe, "topleft", 0, 0)
baseframe.UPFrameLeftPart:SetSize(22, 20)
baseframe.UPFrameLeftPart:EnableMouse(true)
baseframe.UPFrameLeftPart:SetMovable (true)
baseframe.UPFrameLeftPart:SetMovable(true)
baseframe.UPFrameLeftPart:SetResizable(true)
baseframe.UPFrameLeftPart.is_toolbar = true
+4 -4
View File
@@ -15,7 +15,7 @@ function Details:OpenNewsWindow(textToShow, dumpValues, keeptext)
return
end
if (textToShow and type (textToShow) == "table") then
if (textToShow and type(textToShow) == "table") then
DetailsNewsWindowLower:SetSize(450, 5000)
DetailsNewsWindowSlider:SetMinMaxValues(0, 5000)
DetailsNewsWindowText:SetHeight(5000)
@@ -118,7 +118,7 @@ function Details:CreateOrOpenNewsWindow()
slider:SetOrientation ("vertical");
slider:SetSize(16, 499)
slider:SetPoint("topleft", frameUpper, "topright")
slider:SetMinMaxValues (0, 2000)
slider:SetMinMaxValues(0, 2000)
slider:SetValue(0)
slider:SetScript("OnValueChanged", function(self)
frameUpper:SetVerticalScroll (self:GetValue())
@@ -155,7 +155,7 @@ function Details:CreateOrOpenNewsWindow()
local onToggleAutoOpen = function(_, _, state)
Details.auto_open_news_window = state
end
local autoOpenCheckbox = DetailsFramework:CreateSwitch(statusBar, onToggleAutoOpen, Details.auto_open_news_window, _, _, _, _, "AutoOpenCheckbox", _, _, _, _, _, DetailsFramework:GetTemplate ("switch", "OPTIONS_CHECKBOX_BRIGHT_TEMPLATE"))
local autoOpenCheckbox = DetailsFramework:CreateSwitch(statusBar, onToggleAutoOpen, Details.auto_open_news_window, _, _, _, _, "AutoOpenCheckbox", _, _, _, _, _, DetailsFramework:GetTemplate("switch", "OPTIONS_CHECKBOX_BRIGHT_TEMPLATE"))
autoOpenCheckbox:SetAsCheckBox()
autoOpenCheckbox:SetPoint("left", statusBar, "left", 2, 0)
@@ -163,7 +163,7 @@ function Details:CreateOrOpenNewsWindow()
autoOpenText:SetPoint("left", autoOpenCheckbox, "right", 2, 0)
DetailsFramework:ApplyStandardBackdrop(statusBar)
statusBar:SetAlpha (0.8)
statusBar:SetAlpha(0.8)
DetailsFramework:BuildStatusbarAuthorInfo(statusBar, "", "")
statusBar.authorName:SetPoint("left", statusBar, "left", 207, 0)
+10 -11
View File
@@ -7,7 +7,7 @@ local Details = _G.Details
local DF = _G.DetailsFramework
local Loc = _G.LibStub("AceLocale-3.0"):GetLocale("Details")
--local SharedMedia = _G.LibStub:GetLibrary("LibSharedMedia-3.0")
--local LDB = _G.LibStub ("LibDataBroker-1.1", true)
--local LDB = _G.LibStub("LibDataBroker-1.1", true)
--local LDBIcon = LDB and _G.LibStub("LibDBIcon-1.0", true)
--options panel namespace
@@ -22,13 +22,13 @@ local preset_version = 3
Details.preset_version = preset_version
--templates
local options_text_template = DF:GetTemplate ("font", "OPTIONS_FONT_TEMPLATE")
local options_dropdown_template = DF:GetTemplate ("dropdown", "OPTIONS_DROPDOWN_TEMPLATE")
local options_switch_template = DF:GetTemplate ("switch", "OPTIONS_CHECKBOX_TEMPLATE")
local options_slider_template = DF:GetTemplate ("slider", "OPTIONS_SLIDER_TEMPLATE")
local options_text_template = DF:GetTemplate("font", "OPTIONS_FONT_TEMPLATE")
local options_dropdown_template = DF:GetTemplate("dropdown", "OPTIONS_DROPDOWN_TEMPLATE")
local options_switch_template = DF:GetTemplate("switch", "OPTIONS_CHECKBOX_TEMPLATE")
local options_slider_template = DF:GetTemplate("slider", "OPTIONS_SLIDER_TEMPLATE")
local options_button_template = DF:GetTemplate ("button", "OPTIONS_BUTTON_TEMPLATE")
local options_button_template_selected = DF.table.copy({}, DF:GetTemplate ("button", "OPTIONS_BUTTON_TEMPLATE"))
local options_button_template = DF:GetTemplate("button", "OPTIONS_BUTTON_TEMPLATE")
local options_button_template_selected = DF.table.copy({}, DF:GetTemplate("button", "OPTIONS_BUTTON_TEMPLATE"))
options_button_template_selected.backdropbordercolor = {1, .8, .2}
--options
@@ -50,7 +50,6 @@ function Details.options.InitializeOptionsWindow(instance)
f.__icon = [[Interface\Scenarios\ScenarioIcon-Interact]]
_G.DetailsPluginContainerWindow.EmbedPlugin(f, f, true)
f.sectionFramesContainer = {}
Details:FormatBackground(f)
DF:ApplyStandardBackdrop(f)
local titleBar = DF:CreateTitleBar(f, "Options Panel")
@@ -145,7 +144,7 @@ function Details.options.InitializeOptionsWindow(instance)
instanceSelection:SetTemplate(options_dropdown_template)
instanceSelection:SetHook("OnEnter", function()
GameCooltip:Reset()
GameCooltip:Preset (2)
GameCooltip:Preset(2)
GameCooltip:AddLine(Loc ["STRING_MINITUTORIAL_OPTIONS_PANEL1"])
GameCooltip:ShowCooltip(instanceSelection.widget, "tooltip")
end)
@@ -192,7 +191,7 @@ function Details.options.InitializeOptionsWindow(instance)
--change log
local changelog = DF:NewButton(footerFrame, _, "$parentOpenChangeLogButton", nil, 140, 20, _detalhes.OpenNewsWindow, "change_log", nil, nil, Loc ["STRING_OPTIONS_CHANGELOG"], 1)
changelog:SetPoint("left", fillbars, "right", 10, 0)
changelog:SetTemplate (options_button_template)
changelog:SetTemplate(options_button_template)
changelog:SetIcon ("Interface\\AddOns\\Details\\images\\icons", nil, nil, nil, {367/512, 399/512, 43/512, 76/512}, {1, 1, 1, 0.8}, 4, 2)
--search field
@@ -254,7 +253,7 @@ function Details.options.InitializeOptionsWindow(instance)
if (optionName:find(searchingText)) then
if optionData.header ~= lastTab then
if lastTab ~= nil then
options[#options+1] = {type = "label", get = function() return "" end, text_template = DF:GetTemplate ("font", "OPTIONS_FONT_TEMPLATE")} -- blank
options[#options+1] = {type = "label", get = function() return "" end, text_template = DF:GetTemplate("font", "OPTIONS_FONT_TEMPLATE")} -- blank
end
options[#options+1] = {type = "label", get = function() return optionData.header end, text_template = {color = "silver", size = 14, font = DF:GetBestFontForLanguage()}}
lastTab = optionData.header
+97 -97
View File
@@ -31,7 +31,7 @@ local Details = _G.Details
local DF = _G.DetailsFramework
local Loc = _G.LibStub("AceLocale-3.0"):GetLocale("Details")
local SharedMedia = _G.LibStub:GetLibrary("LibSharedMedia-3.0")
local LDB = _G.LibStub ("LibDataBroker-1.1", true)
local LDB = _G.LibStub("LibDataBroker-1.1", true)
local LDBIcon = LDB and _G.LibStub("LibDBIcon-1.0", true)
local _
local unpack = _G.unpack
@@ -46,13 +46,13 @@ local mainHeightSize = 800
local presetVersion = 3
--templates
local options_text_template = DF:GetTemplate ("font", "OPTIONS_FONT_TEMPLATE")
local options_dropdown_template = DF:GetTemplate ("dropdown", "OPTIONS_DROPDOWN_TEMPLATE")
local options_switch_template = DF:GetTemplate ("switch", "OPTIONS_CHECKBOX_TEMPLATE")
local options_slider_template = DF:GetTemplate ("slider", "OPTIONS_SLIDER_TEMPLATE")
local options_button_template = DF:GetTemplate ("button", "OPTIONS_BUTTON_TEMPLATE")
local options_text_template = DF:GetTemplate("font", "OPTIONS_FONT_TEMPLATE")
local options_dropdown_template = DF:GetTemplate("dropdown", "OPTIONS_DROPDOWN_TEMPLATE")
local options_switch_template = DF:GetTemplate("switch", "OPTIONS_CHECKBOX_TEMPLATE")
local options_slider_template = DF:GetTemplate("slider", "OPTIONS_SLIDER_TEMPLATE")
local options_button_template = DF:GetTemplate("button", "OPTIONS_BUTTON_TEMPLATE")
local subSectionTitleTextTemplate = DF:GetTemplate ("font", "ORANGE_FONT_TEMPLATE")
local subSectionTitleTextTemplate = DF:GetTemplate("font", "ORANGE_FONT_TEMPLATE")
local font_select_icon, font_select_texcoord = [[Interface\AddOns\Details\images\icons]], {472/512, 513/512, 186/512, 230/512}
local texture_select_icon, texture_select_texcoord = [[Interface\AddOns\Details\images\icons]], {472/512, 513/512, 186/512, 230/512}
@@ -805,7 +805,7 @@ do
for key, value in pairs(skinObject) do
if (key ~= "skin" and not _detalhes.instance_skin_ignored_values[key]) then
if (type(value) == "table") then
instance[key] = Details.CopyTable (value)
instance[key] = Details.CopyTable(value)
else
instance[key] = value
end
@@ -837,7 +837,7 @@ do
if (dataTable) then
--add the new skin
_detalhes.savedStyles [#_detalhes.savedStyles+1] = dataTable
_detalhes:Msg (Loc ["STRING_OPTIONS_SAVELOAD_IMPORT_OKEY"])
_detalhes:Msg(Loc ["STRING_OPTIONS_SAVELOAD_IMPORT_OKEY"])
Details.options.SetCurrentInstanceAndRefresh(currentInstance)
afterUpdate()
else
@@ -916,7 +916,7 @@ do
end
end
_detalhes:Msg (Loc ["STRING_OPTIONS_SAVELOAD_APPLYALL"])
_detalhes:Msg(Loc ["STRING_OPTIONS_SAVELOAD_APPLYALL"])
Details.options.SetCurrentInstanceAndRefresh(currentInstance)
afterUpdate()
end,
@@ -2618,7 +2618,7 @@ do
{--text color
type = "color",
get = function()
local r, g, b = unpack (currentInstance.attribute_text.text_color)
local r, g, b = unpack(currentInstance.attribute_text.text_color)
return {r, g, b, a}
end,
set = function(self, r, g, b, a)
@@ -2819,7 +2819,7 @@ do
{--window color (skin color)
type = "color",
get = function()
local r, g, b = unpack (currentInstance.color)
local r, g, b = unpack(currentInstance.color)
return {r, g, b, 1}
end,
@@ -3109,23 +3109,23 @@ do
local hideLeftButton = sectionFrame.MicroDisplayLeftDropdown.hideLeftMicroFrameButton
if (instance.StatusBar ["left"].options.isHidden) then
hideLeftButton:GetNormalTexture():SetDesaturated (false)
hideLeftButton:GetNormalTexture():SetDesaturated(false)
else
hideLeftButton:GetNormalTexture():SetDesaturated (true)
hideLeftButton:GetNormalTexture():SetDesaturated(true)
end
local hide_center_button = sectionFrame.MicroDisplayCenterDropdown.HideCenterMicroFrameButton
if (instance.StatusBar ["center"].options.isHidden) then
hide_center_button:GetNormalTexture():SetDesaturated (false)
hide_center_button:GetNormalTexture():SetDesaturated(false)
else
hide_center_button:GetNormalTexture():SetDesaturated (true)
hide_center_button:GetNormalTexture():SetDesaturated(true)
end
local hide_right_button = sectionFrame.MicroDisplayRightDropdown.HideRightMicroFrameButton
if (instance.StatusBar ["right"].options.isHidden) then
hide_right_button:GetNormalTexture():SetDesaturated (false)
hide_right_button:GetNormalTexture():SetDesaturated(false)
else
hide_right_button:GetNormalTexture():SetDesaturated (true)
hide_right_button:GetNormalTexture():SetDesaturated(true)
end
local left = instance.StatusBar ["left"].__name
@@ -3169,7 +3169,7 @@ do
{--color
type = "color",
get = function()
local r, g, b = unpack (currentInstance.statusbar_info.overlay)
local r, g, b = unpack(currentInstance.statusbar_info.overlay)
local alpha = currentInstance.statusbar_info.alpha
return {r, g, b, alpha}
end,
@@ -3220,7 +3220,7 @@ do
--dropdown on select option
local onMicroDisplaySelect = function(_, _, micro_display)
local anchor, index = unpack (micro_display)
local anchor, index = unpack(micro_display)
if (index == -1) then
return _detalhes.StatusBar:SetPlugin (currentInstance, -1, anchor)
@@ -3280,16 +3280,16 @@ do
_detalhes.StatusBar:SetPlugin (currentInstance, -1, "left")
end
if (currentInstance.StatusBar ["left"].options.isHidden) then
self:GetNormalTexture():SetDesaturated (false)
self:GetNormalTexture():SetDesaturated(false)
else
self:GetNormalTexture():SetDesaturated (true)
self:GetNormalTexture():SetDesaturated(true)
end
end)
hideLeftMicroFrameButton:SetPoint("left", sectionFrame.MicroDisplayLeftDropdown, "right", 2, 0)
hideLeftMicroFrameButton:SetNormalTexture([[Interface\Buttons\UI-GroupLoot-Pass-Down]])
hideLeftMicroFrameButton:SetPushedTexture([[Interface\Buttons\UI-GroupLoot-Pass-Up]])
hideLeftMicroFrameButton:GetNormalTexture():SetDesaturated (true)
hideLeftMicroFrameButton:GetNormalTexture():SetDesaturated(true)
hideLeftMicroFrameButton.tooltip = Loc ["STRING_OPTIONS_MICRODISPLAYS_SHOWHIDE_TOOLTIP"]
hideLeftMicroFrameButton:SetHook("OnEnter", function(self, capsule)
self:GetNormalTexture():SetBlendMode("ADD")
@@ -3306,15 +3306,15 @@ do
end
if (currentInstance.StatusBar ["center"].options.isHidden) then
self:GetNormalTexture():SetDesaturated (false)
self:GetNormalTexture():SetDesaturated(false)
else
self:GetNormalTexture():SetDesaturated (true)
self:GetNormalTexture():SetDesaturated(true)
end
end)
HideCenterMicroFrameButton:SetPoint("left", sectionFrame.MicroDisplayCenterDropdown, "right", 2, 0)
HideCenterMicroFrameButton:SetNormalTexture([[Interface\Buttons\UI-GroupLoot-Pass-Down]])
HideCenterMicroFrameButton:SetPushedTexture([[Interface\Buttons\UI-GroupLoot-Pass-Up]])
HideCenterMicroFrameButton:GetNormalTexture():SetDesaturated (true)
HideCenterMicroFrameButton:GetNormalTexture():SetDesaturated(true)
HideCenterMicroFrameButton.tooltip = Loc ["STRING_OPTIONS_MICRODISPLAYS_SHOWHIDE_TOOLTIP"]
HideCenterMicroFrameButton:SetHook("OnEnter", function(self, capsule)
self:GetNormalTexture():SetBlendMode("ADD")
@@ -3330,15 +3330,15 @@ do
_detalhes.StatusBar:SetPlugin (currentInstance, -1, "right")
end
if (currentInstance.StatusBar ["right"].options.isHidden) then
self:GetNormalTexture():SetDesaturated (false)
self:GetNormalTexture():SetDesaturated(false)
else
self:GetNormalTexture():SetDesaturated (true)
self:GetNormalTexture():SetDesaturated(true)
end
end)
HideRightMicroFrameButton:SetPoint("left", sectionFrame.MicroDisplayRightDropdown, "right", 2, 0)
HideRightMicroFrameButton:SetNormalTexture([[Interface\Buttons\UI-GroupLoot-Pass-Down]])
HideRightMicroFrameButton:SetPushedTexture([[Interface\Buttons\UI-GroupLoot-Pass-Up]])
HideRightMicroFrameButton:GetNormalTexture():SetDesaturated (true)
HideRightMicroFrameButton:GetNormalTexture():SetDesaturated(true)
HideRightMicroFrameButton.tooltip = Loc ["STRING_OPTIONS_MICRODISPLAYS_SHOWHIDE_TOOLTIP"]
HideRightMicroFrameButton:SetHook("OnEnter", function(self, capsule)
self:GetNormalTexture():SetBlendMode("ADD")
@@ -3424,8 +3424,8 @@ do
if (self.plugin) then
local desc = self.plugin:GetPluginDescription()
if (desc) then
GameCooltip:Preset (2)
GameCooltip:AddLine (desc)
GameCooltip:Preset(2)
GameCooltip:AddLine(desc)
GameCooltip:SetType ("tooltip")
GameCooltip:SetOwner(self, "bottomleft", "topleft", 150, -2)
GameCooltip:Show()
@@ -3433,8 +3433,8 @@ do
end
if (self.hasDesc) then
GameCooltip:Preset (2)
GameCooltip:AddLine (self.hasDesc)
GameCooltip:Preset(2)
GameCooltip:AddLine(self.hasDesc)
GameCooltip:SetType ("tooltip")
GameCooltip:SetOwner(self, "bottomleft", "topleft", 150, -2)
GameCooltip:Show()
@@ -3605,8 +3605,8 @@ do
bframe ["toolbarPluginsLabel3"..i]:SetPoint("topleft", anchorFrame, "topleft", 290, y-4)
bframe ["toolbarPluginsLabel3"..i].color = notInstalledColor
local installButton = DF:CreateButton (bframe, function() Details:CopyPaste (allExistentToolbarPlugins [o] [5]) end, 120, 20, "Install")
installButton:SetTemplate (options_button_template)
local installButton = DF:CreateButton(bframe, function() Details:CopyPaste (allExistentToolbarPlugins [o] [5]) end, 120, 20, "Install")
installButton:SetTemplate(options_button_template)
installButton:SetPoint("topleft", anchorFrame, "topleft", 510, y-0)
i = i + 1
@@ -3743,8 +3743,8 @@ do
bframe ["toolbarPluginsLabel3"..i]:SetPoint("topleft", anchorFrame, "topleft", 290, y-4)
bframe ["toolbarPluginsLabel3"..i].color = notInstalledColor
local installButton = DF:CreateButton (bframe, function() Details:CopyPaste (allExistentRaidPlugins [o] [5]) end, 120, 20, "Install")
installButton:SetTemplate (options_button_template)
local installButton = DF:CreateButton(bframe, function() Details:CopyPaste (allExistentRaidPlugins [o] [5]) end, 120, 20, "Install")
installButton:SetTemplate(options_button_template)
installButton:SetPoint("topleft", anchorFrame, "topleft", 510, y-0)
i = i + 1
@@ -3861,7 +3861,7 @@ do
_detalhes:ApplyProfile (profile_name)
_detalhes:Msg (Loc ["STRING_OPTIONS_PROFILE_LOADED"], profile_name)
_detalhes:Msg(Loc ["STRING_OPTIONS_PROFILE_LOADED"], profile_name)
afterUpdate()
end
local buildProfileMenuForAlwaysUse = function()
@@ -3874,7 +3874,7 @@ do
local selectProfile = function(_, _, profileName)
_detalhes:ApplyProfile(profileName)
_detalhes:Msg (Loc ["STRING_OPTIONS_PROFILE_LOADED"], profileName)
_detalhes:Msg(Loc ["STRING_OPTIONS_PROFILE_LOADED"], profileName)
--Details.options.SetCurrentInstanceAndRefresh(currentInstance)
--afterUpdate()
_G.DetailsOptionsWindow:Hide()
@@ -3941,7 +3941,7 @@ do
local profileName = profileNameString:GetText()
if (profileName == "") then
return _detalhes:Msg (Loc ["STRING_OPTIONS_PROFILE_FIELDEMPTY"])
return _detalhes:Msg(Loc ["STRING_OPTIONS_PROFILE_FIELDEMPTY"])
end
profileNameString:SetText("")
@@ -3953,7 +3953,7 @@ do
afterUpdate()
Details.options.SetCurrentInstanceAndRefresh(currentInstance)
else
return _detalhes:Msg (Loc ["STRING_OPTIONS_PROFILE_NOTCREATED"])
return _detalhes:Msg(Loc ["STRING_OPTIONS_PROFILE_NOTCREATED"])
end
end,
--icontexture = [[Interface\PetBattles\PetBattle-LockIcon]],
@@ -3978,7 +3978,7 @@ do
local profileName = profileDropdown:GetValue()
if (profileName == "") then
return _detalhes:Msg (Loc ["STRING_OPTIONS_PROFILE_FIELDEMPTY"])
return _detalhes:Msg(Loc ["STRING_OPTIONS_PROFILE_FIELDEMPTY"])
end
if (#_detalhes:GetProfileList() == 1) then
@@ -3993,7 +3993,7 @@ do
Details.options.SetCurrentInstanceAndRefresh(currentInstance)
afterUpdate()
_detalhes:Msg (Loc ["STRING_OPTIONS_PROFILE_REMOVEOKEY"])
_detalhes:Msg(Loc ["STRING_OPTIONS_PROFILE_REMOVEOKEY"])
end,
name = Loc ["STRING_OPTIONS_PROFILES_ERASE"],
},
@@ -4017,7 +4017,7 @@ do
type = "execute",
func = function(self)
_detalhes:ShowImportWindow("", function(profileString)
if (type(profileString) ~= "string" or string.len (profileString) < 2) then
if (type(profileString) ~= "string" or string.len(profileString) < 2) then
return
end
@@ -4760,10 +4760,10 @@ do
icon4:SetDrawLayer ("artwork", 1)
icon4:SetTexCoord (0.337890625, 0.5859375, 0.59375+0.0009765625, 0.716796875) --173 304 300 367
icon1:SetVertexColor (.15, .15, .15, 1)
icon2:SetVertexColor (.15, .15, .15, 1)
icon3:SetVertexColor (.15, .15, .15, 1)
icon4:SetVertexColor (.15, .15, .15, 1)
icon1:SetVertexColor(.15, .15, .15, 1)
icon2:SetVertexColor(.15, .15, .15, 1)
icon3:SetVertexColor(.15, .15, .15, 1)
icon4:SetVertexColor(.15, .15, .15, 1)
--corners
local w, h = 20, 20
@@ -4774,7 +4774,7 @@ do
L1:SetTexCoord (0.13671875+0.0009765625, 0.234375, 0.29296875, 0.1953125+0.0009765625)
L1:SetSize(w, h)
L1:SetDrawLayer ("overlay", 2)
L1:SetVertexColor (1, 1, 1, .8)
L1:SetVertexColor(1, 1, 1, .8)
local L2 = sectionFrame:CreateTexture(nil, "overlay")
L2:SetPoint("bottomleft", preview, "bottomleft")
@@ -4782,7 +4782,7 @@ do
L2:SetTexCoord (0.13671875+0.0009765625, 0.234375, 0.1953125+0.0009765625, 0.29296875)
L2:SetSize(w, h)
L2:SetDrawLayer ("overlay", 2)
L2:SetVertexColor (1, 1, 1, .8)
L2:SetVertexColor(1, 1, 1, .8)
local L3 = sectionFrame:CreateTexture(nil, "overlay")
L3:SetPoint("bottomright", preview, "bottomright", 0, 0)
@@ -4790,7 +4790,7 @@ do
L3:SetTexCoord (0.234375, 0.13671875-0.0009765625, 0.1953125+0.0009765625, 0.29296875)
L3:SetSize(w, h)
L3:SetDrawLayer ("overlay", 5)
L3:SetVertexColor (1, 1, 1, .8)
L3:SetVertexColor(1, 1, 1, .8)
local L4 = sectionFrame:CreateTexture(nil, "overlay")
L4:SetPoint("topright", preview, "topright", 0, 0)
@@ -4798,16 +4798,16 @@ do
L4:SetTexCoord (0.234375, 0.13671875-0.0009765625, 0.29296875, 0.1953125+0.0009765625)
L4:SetSize(w, h)
L4:SetDrawLayer ("overlay", 5)
L4:SetVertexColor (1, 1, 1, .8)
L4:SetVertexColor(1, 1, 1, .8)
--update preview
function sectionFrame:UpdateWallpaperInfo()
local wallpaper = currentInstance.wallpaper
preview:SetTexture(wallpaper.texture)
preview:SetTexCoord (unpack (wallpaper.texcoord))
preview:SetVertexColor (unpack (wallpaper.overlay))
preview:SetAlpha (wallpaper.alpha)
preview:SetTexCoord (unpack(wallpaper.texcoord))
preview:SetVertexColor(unpack(wallpaper.overlay))
preview:SetAlpha(wallpaper.alpha)
end
--wallpaper alignment
@@ -4864,8 +4864,8 @@ do
f:SetPoint("center", UIParent, "center")
f:SetFrameStrata("FULLSCREEN")
f:SetSize(550, 170)
f:EnableMouse (true)
f:SetMovable (true)
f:EnableMouse(true)
f:SetMovable(true)
f:SetScript("OnMouseDown", function(self, button)
if (self.isMoving) then
return
@@ -4899,7 +4899,7 @@ do
filename:SetPoint("topleft", f, "topleft", 15, -128)
filename:SetText(Loc ["STRING_OPTIONS_WALLPAPER_LOAD_FILENAME"])
local editbox = DF:NewTextEntry (f, nil, "$parentFileName", "FileName", 160, 20, function() end, nil, nil, nil, nil, options_dropdown_template)
local editbox = DF:NewTextEntry(f, nil, "$parentFileName", "FileName", 160, 20, function() end, nil, nil, nil, nil, options_dropdown_template)
editbox:SetPoint("left", filename, "right", 2, 0)
editbox.tooltip = Loc ["STRING_OPTIONS_WALLPAPER_LOAD_FILENAME_DESC"]
@@ -5058,7 +5058,7 @@ do
for atributo, sub_atributo in ipairs(attributes) do
local icones = sub_atributo.icones
for index, att_name in ipairs(sub_atributo.lista) do
local texture, texcoord = unpack (icones [index])
local texture, texcoord = unpack(icones [index])
tinsert(t, {value = i, label = att_name, onclick = Current_Switch_Func, icon = texture, texcoord = texcoord})
sectionFrame.lastSwitchList [i] = {atributo, index, i}
i = i + 1
@@ -5466,7 +5466,7 @@ do
--[=[]]
local spec1Table = {}
local playerSpecs = DF.ClassSpecIds [select (2, UnitClass("player"))]
local playerSpecs = DF.ClassSpecIds [select(2, UnitClass("player"))]
for specID, _ in pairs(playerSpecs) do
local spec_id, specName, spec_description, spec_icon = GetSpecializationInfoByID(specID)
tinsert(spec1Table, {
@@ -5568,7 +5568,7 @@ do --raid tools
f:SetFrameStrata("FULLSCREEN")
f:EnableMouse()
f:SetMovable (true)
f:SetMovable(true)
f:SetScript("OnMouseDown", function(self, button)
if (button == "RightButton") then
if (f.IsMoving) then
@@ -5615,11 +5615,11 @@ do --raid tools
function f:CreateLabel()
local L = {
icon = DF:CreateImage (f, nil, 16, 16, "overlay", {0.1, 0.9, 0.1, 0.9}),
icon = DF:CreateImage(f, nil, 16, 16, "overlay", {0.1, 0.9, 0.1, 0.9}),
text = DF:CreateLabel(f, "", 10, "white", "GameFontHighlightSmall"),
}
L.switch = DF:CreateSwitch (f, on_switch_func, false)
L.switch = DF:CreateSwitch(f, on_switch_func, false)
L.switch:SetPoint("topleft", f, "topleft", 10, ((#f.labels*20)*-1)-55)
L.icon:SetPoint("left", L.switch, "right", 2, 0)
@@ -5966,7 +5966,7 @@ do
streamerTitleDesc:SetJustifyV ("top")
streamerTitleDesc:SetPoint("topleft", sectionFrame.streamerPluginAnchor, "bottomleft", 0, -4)
local streamerTitleImage = DF:CreateImage (sectionFrame, [[Interface\AddOns\Details\images\icons2.blp]], 268*0.75, 59*0.75, "overlay", {0, 268/512, 454/512, 1})
local streamerTitleImage = DF:CreateImage(sectionFrame, [[Interface\AddOns\Details\images\icons2.blp]], 268*0.75, 59*0.75, "overlay", {0, 268/512, 454/512, 1})
streamerTitleImage:SetPoint("topleft", sectionFrame.streamerPluginAnchor, "bottomleft", 0, -40)
--get the plugin object
@@ -6056,7 +6056,7 @@ do
eventTrackerTitleDesc:SetSize(270, 40)
eventTrackerTitleDesc:SetPoint("topleft", sectionFrame.eventTrackerAnchor, "bottomleft", 0, -4)
local eventTrackerTitleImage = DF:CreateImage (sectionFrame, [[Interface\AddOns\Details\images\icons2]], 256, 50, "overlay", {0.5, 1, 134/512, 184/512})
local eventTrackerTitleImage = DF:CreateImage(sectionFrame, [[Interface\AddOns\Details\images\icons2]], 256, 50, "overlay", {0.5, 1, 134/512, 184/512})
eventTrackerTitleImage:SetPoint("topleft", sectionFrame.eventTrackerAnchor, "bottomleft", 0, -40)
local enableEventTracker = function()
@@ -6098,7 +6098,7 @@ do
currentDPSTitleDesc:SetSize(270, 40)
currentDPSTitleDesc:SetPoint("topleft", sectionFrame.currentDPSAnchor, "bottomleft", 0, -4)
local currentDPSTitleImage = DF:CreateImage (sectionFrame, [[Interface\AddOns\Details\images\icons2]], 256, 32, "overlay", {0/512, 256/512, 421/512, 453/512})
local currentDPSTitleImage = DF:CreateImage(sectionFrame, [[Interface\AddOns\Details\images\icons2]], 256, 32, "overlay", {0/512, 256/512, 421/512, 453/512})
currentDPSTitleImage:SetPoint("topleft", sectionFrame.currentDPSAnchor, "bottomleft", 0, -40)
local enableArenaDPS = function()
@@ -6274,9 +6274,9 @@ do
--add
--add panel
local addframe = DF:NewPanel (sectionFrame, nil, "$parentCustomSpellsAddPanel", "customSpellsAddPanel", 644, 462)
local addframe = DF:NewPanel(sectionFrame, nil, "$parentCustomSpellsAddPanel", "customSpellsAddPanel", 644, 462)
addframe:SetPoint(startX, startY - 40)
addframe:SetFrameLevel (7)
addframe:SetFrameLevel(7)
DF:ApplyStandardBackdrop(addframe)
addframe:Hide()
@@ -6285,7 +6285,7 @@ do
local spellicon = DF:NewLabel(addframe, nil, "$parentSpelliconLabel", "spelliconLabel", Loc ["STRING_OPTIONS_SPELL_ADDICON"])
local spellname_entry_func = function() end
local spellname_entry = DF:NewTextEntry (addframe, nil, "$parentSpellnameEntry", "spellnameEntry", 160, 20, spellname_entry_func, nil, nil, nil, nil, options_dropdown_template)
local spellname_entry = DF:NewTextEntry(addframe, nil, "$parentSpellnameEntry", "spellnameEntry", 160, 20, spellname_entry_func, nil, nil, nil, nil, options_dropdown_template)
spellname_entry:SetPoint("left", spellname, "right", 2, 0)
local spellid_entry_func = function(arg1, arg2, spellid)
@@ -6294,11 +6294,11 @@ do
spellname_entry:SetText(spellname)
addframe.spellIconButton.icon.texture = icon
else
_detalhes:Msg (Loc ["STRING_OPTIONS_SPELL_NOTFOUND"])
_detalhes:Msg(Loc ["STRING_OPTIONS_SPELL_NOTFOUND"])
end
end
local spellid_entry = DF:NewSpellEntry (addframe, spellid_entry_func, 160, 20, nil, nil, "spellidEntry", "$parentSpellidEntry")
spellid_entry:SetTemplate (options_dropdown_template)
spellid_entry:SetTemplate(options_dropdown_template)
spellid_entry:SetPoint("left", spellid, "right", 2, 0)
local icon_button_func = function(texture)
@@ -6317,17 +6317,17 @@ do
local addspell = function()
local id = spellid_entry.text
if (id == "") then
return _detalhes:Msg (Loc ["STRING_OPTIONS_SPELL_IDERROR"])
return _detalhes:Msg(Loc ["STRING_OPTIONS_SPELL_IDERROR"])
end
local name = spellname_entry.text
if (name == "") then
return _detalhes:Msg (Loc ["STRING_OPTIONS_SPELL_NAMEERROR"])
return _detalhes:Msg(Loc ["STRING_OPTIONS_SPELL_NAMEERROR"])
end
local icon = addframe.spellIconButton.icon.texture
id = tonumber (id)
if (not id) then
return _detalhes:Msg (Loc ["STRING_OPTIONS_SPELL_IDERROR"])
return _detalhes:Msg(Loc ["STRING_OPTIONS_SPELL_IDERROR"])
end
_detalhes:UserCustomSpellAdd (id, name, icon)
@@ -6420,7 +6420,7 @@ do
local big_code_editor = DF:NewSpecialLuaEditorEntry (sectionFrame, 683, 422, "bigCodeEditor", "$parentBigCodeEditor")
big_code_editor:SetPoint("topleft", sectionFrame, "topleft", startX, startY - 70)
big_code_editor:SetFrameLevel (sectionFrame:GetFrameLevel()+6)
big_code_editor:SetFrameLevel(sectionFrame:GetFrameLevel()+6)
big_code_editor:SetBackdrop({bgFile = [[Interface\AddOns\Details\images\background]], edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1,tile = 1, tileSize = 16})
DF:ReskinSlider(big_code_editor.scroll)
big_code_editor:SetBackdropColor(0.5, 0.5, 0.5, 0.95)
@@ -6457,7 +6457,7 @@ do
local func = data [2]
if (type(func) == "function") then
return _detalhes:Msg (Loc ["STRING_OPTIONS_CHART_CODELOADED"])
return _detalhes:Msg(Loc ["STRING_OPTIONS_CHART_CODELOADED"])
end
big_code_editor:SetText(func)
@@ -6490,7 +6490,7 @@ do
local big_code_editor2 = DF:NewSpecialLuaEditorEntry (sectionFrame, 643, 402, "exportEditor", "$parentExportEditor", true)
big_code_editor2:SetPoint("topleft", sectionFrame, "topleft", 7, -70)
big_code_editor2:SetFrameLevel (sectionFrame:GetFrameLevel()+6)
big_code_editor2:SetFrameLevel(sectionFrame:GetFrameLevel()+6)
big_code_editor2:SetBackdrop({bgFile = [[Interface\AddOns\Details\images\background]], edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1,tile = 1, tileSize = 16})
DF:ReskinSlider(big_code_editor2.scroll)
big_code_editor2:SetBackdropColor(0.5, 0.5, 0.5, 0.95)
@@ -6506,7 +6506,7 @@ do
close_export:SetPoint(10, 18)
close_export:SetIcon ([[Interface\Buttons\UI-CheckBox-Check]])
close_export:SetText(Loc ["STRING_OPTIONS_CHART_CLOSE"])
close_export:SetTemplate (options_button_template)
close_export:SetTemplate(options_button_template)
local export_function = function(index)
local data = _detalhes.savedTimeCaptures [index]
@@ -6589,9 +6589,9 @@ do
panel:Refresh()
--add panel
local addframe = DF:NewPanel (sectionFrame, nil, "$parentUserTimeCapturesAddPanel", "userTimeCaptureAddPanel", 683, 422)
local addframe = DF:NewPanel(sectionFrame, nil, "$parentUserTimeCapturesAddPanel", "userTimeCaptureAddPanel", 683, 422)
addframe:SetPoint("topleft", sectionFrame, "topleft", startX, startY - 70)
addframe:SetFrameLevel (7)
addframe:SetFrameLevel(7)
addframe:Hide()
addframe:SetBackdrop({bgFile = [[Interface\AddOns\Details\images\background]], edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1,tile = 1, tileSize = 16})
@@ -6600,7 +6600,7 @@ do
--name
local capture_name = DF:NewLabel(addframe, nil, "$parentNameLabel", "nameLabel", Loc ["STRING_OPTIONS_CHART_ADDNAME"])
local capture_name_entry = DF:NewTextEntry (addframe, nil, "$parentNameEntry", "nameEntry", 160, 20, function() end, nil, nil, nil, nil, options_dropdown_template)
local capture_name_entry = DF:NewTextEntry(addframe, nil, "$parentNameEntry", "nameEntry", 160, 20, function() end, nil, nil, nil, nil, options_dropdown_template)
capture_name_entry:SetMaxLetters (16)
capture_name_entry:SetPoint("left", capture_name, "right", 2, 0)
@@ -6627,12 +6627,12 @@ do
--author
local capture_author = DF:NewLabel(addframe, nil, "$parentAuthorLabel", "authorLabel", Loc ["STRING_OPTIONS_CHART_ADDAUTHOR"])
local capture_author_entry = DF:NewTextEntry (addframe, nil, "$parentAuthorEntry", "authorEntry", 160, 20, function() end, nil, nil, nil, nil, options_dropdown_template)
local capture_author_entry = DF:NewTextEntry(addframe, nil, "$parentAuthorEntry", "authorEntry", 160, 20, function() end, nil, nil, nil, nil, options_dropdown_template)
capture_author_entry:SetPoint("left", capture_author, "right", 2, 0)
--version
local capture_version = DF:NewLabel(addframe, nil, "$parentVersionLabel", "versionLabel", Loc ["STRING_OPTIONS_CHART_ADDVERSION"])
local capture_version_entry = DF:NewTextEntry (addframe, nil, "$parentVersionEntry", "versionEntry", 160, 20, function() end, nil, nil, nil, nil, options_dropdown_template)
local capture_version_entry = DF:NewTextEntry(addframe, nil, "$parentVersionEntry", "versionEntry", 160, 20, function() end, nil, nil, nil, nil, options_dropdown_template)
capture_version_entry:SetPoint("left", capture_version, "right", 2, 0)
--open add panel button
@@ -6659,7 +6659,7 @@ do
local font, size, flag = importframe.editbox:GetFont()
importframe.editbox:SetFont (font, 9, flag)
importframe:SetPoint("topleft", sectionFrame, "topleft", startX, startY - 70)
importframe:SetFrameLevel (sectionFrame:GetFrameLevel()+6)
importframe:SetFrameLevel(sectionFrame:GetFrameLevel()+6)
importframe:SetBackdrop({bgFile = [[Interface\AddOns\Details\images\background]], edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1,tile = 1, tileSize = 16})
DF:ReskinSlider(importframe.scroll)
importframe:SetBackdropColor(0.5, 0.5, 0.5, 0.95)
@@ -6677,21 +6677,21 @@ do
if (type(unserialize) == "table") then
if (unserialize[1] and unserialize[2] and unserialize[3] and unserialize[4] and unserialize[5]) then
local register = _detalhes:TimeDataRegister (unpack (unserialize))
local register = _detalhes:TimeDataRegister (unpack(unserialize))
if (type(register) == "string") then
_detalhes:Msg (register)
_detalhes:Msg(register)
end
else
_detalhes:Msg (Loc ["STRING_OPTIONS_CHART_IMPORTERROR"])
_detalhes:Msg(Loc ["STRING_OPTIONS_CHART_IMPORTERROR"])
end
else
_detalhes:Msg (Loc ["STRING_OPTIONS_CHART_IMPORTERROR"])
_detalhes:Msg(Loc ["STRING_OPTIONS_CHART_IMPORTERROR"])
end
importframe:Hide()
panel:Refresh()
else
_detalhes:Msg (Loc ["STRING_CUSTOM_IMPORT_ERROR"])
_detalhes:Msg(Loc ["STRING_CUSTOM_IMPORT_ERROR"])
return
end
end
@@ -6700,7 +6700,7 @@ do
accept_import:SetIcon ([[Interface\Buttons\UI-CheckBox-Check]])
accept_import:SetPoint(10, 18)
accept_import:SetText(Loc ["STRING_OPTIONS_CHART_IMPORT"])
accept_import:SetTemplate (options_button_template)
accept_import:SetTemplate(options_button_template)
local cancelimport = function()
importframe:ClearFocus()
@@ -6711,7 +6711,7 @@ do
cancel_changes:SetIcon ([[Interface\PetBattles\DeadPetIcon]])
cancel_changes:SetText(Loc ["STRING_OPTIONS_CHART_CANCEL"])
cancel_changes:SetPoint(132, 18)
cancel_changes:SetTemplate (options_button_template)
cancel_changes:SetTemplate(options_button_template)
local import = function()
importframe:Show()
@@ -6739,24 +6739,24 @@ do
local addcapture = function()
local name = capture_name_entry.text
if (name == "") then
return _detalhes:Msg (Loc ["STRING_OPTIONS_CHART_NAMEERROR"])
return _detalhes:Msg(Loc ["STRING_OPTIONS_CHART_NAMEERROR"])
end
local author = capture_author_entry.text
if (author == "") then
return _detalhes:Msg (Loc ["STRING_OPTIONS_CHART_AUTHORERROR"])
return _detalhes:Msg(Loc ["STRING_OPTIONS_CHART_AUTHORERROR"])
end
local icon = addframe.iconButton.iconTexture
local version = capture_version_entry.text
if (version == "") then
return _detalhes:Msg (Loc ["STRING_OPTIONS_CHART_VERSIONERROR"])
return _detalhes:Msg(Loc ["STRING_OPTIONS_CHART_VERSIONERROR"])
end
local func = capture_func_entry:GetText()
if (func == "") then
return _detalhes:Msg (Loc ["STRING_OPTIONS_CHART_FUNCERROR"])
return _detalhes:Msg(Loc ["STRING_OPTIONS_CHART_FUNCERROR"])
end
_detalhes:TimeDataRegister (name, func, nil, author, version, icon, true)
@@ -6789,8 +6789,8 @@ do
addcapturebutton:SetIcon ([[Interface\Buttons\UI-CheckBox-Check]], 18, 18, nil, nil, nil, 4)
closebutton:SetIcon ([[Interface\PetBattles\DeadPetIcon]], 14, 14, nil, nil, nil, 4)
addcapturebutton:SetTemplate (options_button_template)
closebutton:SetTemplate (options_button_template)
addcapturebutton:SetTemplate(options_button_template)
closebutton:SetTemplate(options_button_template)
addcapturebutton:SetPoint("bottomright", addframe, "bottomright", -5, 5)
closebutton:SetPoint("right", addcapturebutton, "left", -4, 0)
+19 -19
View File
@@ -4,7 +4,7 @@ local Details = _G.Details
local DF = _G.DetailsFramework
function Details:InitializePlaterIntegrationWindow()
local DetailsPlaterIntegrationPanel = DF:CreateSimplePanel (UIParent, 700, 480, "Details! Plater Nameplates Integration", "DetailsPlaterIntegrationPanel")
local DetailsPlaterIntegrationPanel = DF:CreateSimplePanel(UIParent, 700, 480, "Details! Plater Nameplates Integration", "DetailsPlaterIntegrationPanel")
DetailsPlaterIntegrationPanel.Frame = DetailsPlaterIntegrationPanel
DetailsPlaterIntegrationPanel.__name = "Plater Nameplates"
DetailsPlaterIntegrationPanel.real_name = "DETAILS_PLATERWINDOW"
@@ -25,15 +25,15 @@ function Details.OpenPlaterIntegrationWindow()
DetailsPlaterIntegrationPanel.Initialized = true
local f = DetailsPlaterIntegrationPanel or DF:CreateSimplePanel (UIParent, 700, 480, "Details! Plater Nameplates Integration", "DetailsPlaterIntegrationPanel")
local f = DetailsPlaterIntegrationPanel or DF:CreateSimplePanel(UIParent, 700, 480, "Details! Plater Nameplates Integration", "DetailsPlaterIntegrationPanel")
--background
f.bg1 = f:CreateTexture(nil, "background")
f.bg1:SetTexture([[Interface\AddOns\Details\images\background]], true)
f.bg1:SetAlpha (0.8)
f.bg1:SetVertexColor (0.27, 0.27, 0.27)
f.bg1:SetVertTile (true)
f.bg1:SetHorizTile (true)
f.bg1:SetAlpha(0.8)
f.bg1:SetVertexColor(0.27, 0.27, 0.27)
f.bg1:SetVertTile(true)
f.bg1:SetHorizTile(true)
f.bg1:SetSize(790, 454)
f.bg1:SetAllPoints()
f:SetBackdrop({edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1, bgFile = [[Interface\AddOns\Details\images\background]], tileSize = 64, tile = true})
@@ -61,7 +61,7 @@ function Details.OpenPlaterIntegrationWindow()
local menu_table = {
{type = "label", get = function() return "Add Real Time DPS Info in the Nameplate:" end, text_template = DF:GetTemplate ("font", "ORANGE_FONT_TEMPLATE")},
{type = "label", get = function() return "Add Real Time DPS Info in the Nameplate:" end, text_template = DF:GetTemplate("font", "ORANGE_FONT_TEMPLATE")},
--real time dps from all sources
{
@@ -173,7 +173,7 @@ function Details.OpenPlaterIntegrationWindow()
},
{type = "breakline"},
{type = "label", get = function() return "Add Real Time DPS Info Only From You in the Nameplate:" end, text_template = DF:GetTemplate ("font", "ORANGE_FONT_TEMPLATE")},
{type = "label", get = function() return "Add Real Time DPS Info Only From You in the Nameplate:" end, text_template = DF:GetTemplate("font", "ORANGE_FONT_TEMPLATE")},
--real time dps from the player only
{
@@ -285,7 +285,7 @@ function Details.OpenPlaterIntegrationWindow()
},
{type = "breakline"},
{type = "label", get = function() return "Add Total Damage Taken in the Nameplate:" end, text_template = DF:GetTemplate ("font", "ORANGE_FONT_TEMPLATE")},
{type = "label", get = function() return "Add Total Damage Taken in the Nameplate:" end, text_template = DF:GetTemplate("font", "ORANGE_FONT_TEMPLATE")},
--total damage taken from all sources
{
@@ -397,11 +397,11 @@ function Details.OpenPlaterIntegrationWindow()
},
}
local options_text_template = DF:GetTemplate ("font", "OPTIONS_FONT_TEMPLATE")
local options_dropdown_template = DF:GetTemplate ("dropdown", "OPTIONS_DROPDOWN_TEMPLATE")
local options_switch_template = DF:GetTemplate ("switch", "OPTIONS_CHECKBOX_TEMPLATE")
local options_slider_template = DF:GetTemplate ("slider", "OPTIONS_SLIDER_TEMPLATE")
local options_button_template = DF:GetTemplate ("button", "OPTIONS_BUTTON_TEMPLATE")
local options_text_template = DF:GetTemplate("font", "OPTIONS_FONT_TEMPLATE")
local options_dropdown_template = DF:GetTemplate("dropdown", "OPTIONS_DROPDOWN_TEMPLATE")
local options_switch_template = DF:GetTemplate("switch", "OPTIONS_CHECKBOX_TEMPLATE")
local options_slider_template = DF:GetTemplate("slider", "OPTIONS_SLIDER_TEMPLATE")
local options_button_template = DF:GetTemplate("button", "OPTIONS_BUTTON_TEMPLATE")
local titleBackground = CreateFrame("frame", nil, f,"BackdropTemplate")
titleBackground:SetPoint("topleft", f, "topleft", 10, -30)
@@ -411,10 +411,10 @@ function Details.OpenPlaterIntegrationWindow()
--background
titleBackground.bg1 = titleBackground:CreateTexture(nil, "background")
titleBackground.bg1:SetTexture([[Interface\AddOns\Details\images\background]])
titleBackground.bg1:SetAlpha (0.8)
titleBackground.bg1:SetVertexColor (0.27, 0.27, 0.27)
titleBackground.bg1:SetVertTile (true)
titleBackground.bg1:SetHorizTile (true)
titleBackground.bg1:SetAlpha(0.8)
titleBackground.bg1:SetVertexColor(0.27, 0.27, 0.27)
titleBackground.bg1:SetVertTile(true)
titleBackground.bg1:SetHorizTile(true)
titleBackground.bg1:SetSize(790, 454)
titleBackground.bg1:SetAllPoints()
titleBackground:SetBackdrop({edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1, bgFile = [[Interface\AddOns\Details\images\background]], tileSize = 64, tile = true})
@@ -424,7 +424,7 @@ function Details.OpenPlaterIntegrationWindow()
local platerTitle = DF:CreateLabel(titleBackground, "Plater Nameplates Integration", 16, "white")
local platerDesc1 = DF:CreateLabel(titleBackground, "Add DPS and Damage information directly into the nameplate", 11, "silver")
local platerDesc2 = DF:CreateLabel(titleBackground, "See how much damage the enemy is taking in real time!", 11, "silver")
local platerImage = DF:CreateImage (titleBackground, "Interface\\AddOns\\Details\\images\\plater_image")
local platerImage = DF:CreateImage(titleBackground, "Interface\\AddOns\\Details\\images\\plater_image")
platerImage:SetSize(256, 64)
platerImage:SetPoint("topright", f, "topright", -150, -35)
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -153,7 +153,7 @@
line:SetScript("OnClick", lineOnClick)
line:SetBackdrop({bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], tileSize = 64, tile = true, edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1})
line:SetBackdropColor(unpack (scrollbox_line_backdrop_color))
line:SetBackdropColor(unpack(scrollbox_line_backdrop_color))
line:SetBackdropBorderColor(0, 0, 0, 1)
local specIcon = line:CreateTexture("$parentSpecIcon", "artwork")
+1 -1
View File
@@ -1,6 +1,6 @@
local Details = _G.Details
local L = _G.LibStub ("AceLocale-3.0"):GetLocale( "Details" )
local L = _G.LibStub("AceLocale-3.0"):GetLocale( "Details" )
function Details:OpenProfiler()
+4 -4
View File
@@ -598,7 +598,7 @@ local createDropdown = function(thisFrame)
window.fechar:SetHeight(20)
window.fechar:SetPoint("TOPRIGHT", window, "TOPRIGHT", 0, -3)
window.fechar:Show()
window.fechar:GetNormalTexture():SetDesaturated (true)
window.fechar:GetNormalTexture():SetDesaturated(true)
local recentReportButton = window.recently_report_buttons[10]
recentReportButton:Hide()
@@ -682,8 +682,8 @@ local createDropdown = function(thisFrame)
bg1:SetTexture([[Interface\AddOns\Details\images\background]], true)
bg1:SetAlpha(0.7)
bg1:SetVertexColor(0.27, 0.27, 0.27)
bg1:SetVertTile (true)
bg1:SetHorizTile (true)
bg1:SetVertTile(true)
bg1:SetHorizTile(true)
bg1:SetAllPoints()
tinsert(window.all_widgets, bg1)
@@ -713,7 +713,7 @@ local createDropdown = function(thisFrame)
function Details:DelayUpdateReportWindowRecentlyReported()
if (DetailsReportWindow) then
Details:ScheduleTimer ("UpdateRecentlyReported", 0.5)
Details:ScheduleTimer("UpdateRecentlyReported", 0.5)
end
end
+12 -12
View File
@@ -13,7 +13,7 @@ local panel = Details:CreateWelcomePanel ("DetailsWindowOptionsBarTextEditor", n
panel:SetPoint("center", UIParent, "center")
panel:Hide()
panel:SetFrameStrata("FULLSCREEN")
DF:ApplyStandardBackdrop (panel)
DF:ApplyStandardBackdrop(panel)
DF:CreateTitleBar (panel, "Details! Custom Line Text Editor")
function panel:Open (text, callback, host, default)
@@ -31,11 +31,11 @@ function panel:Open (text, callback, host, default)
end
local y = -32
local buttonTemplate = DF:GetTemplate ("button", "OPTIONS_BUTTON_TEMPLATE")
local buttonTemplate = DF:GetTemplate("button", "OPTIONS_BUTTON_TEMPLATE")
local textentry = DF:NewSpecialLuaEditorEntry (panel, scrollWidth, 555, "editbox", "$parentEntry")
textentry:SetPoint("topleft", panel, "topleft", 10, y)
DF:ApplyStandardBackdrop (textentry)
DF:ApplyStandardBackdrop(textentry)
DF:SetFontSize (textentry.editbox, 14)
DF:ReskinSlider(textentry.scroll)
@@ -45,9 +45,9 @@ local arg3_button = DF:NewButton(panel, nil, "$parentButton3", nil, 80, 20, func
arg1_button:SetPoint("topright", panel, "topright", -12, y)
arg2_button:SetPoint("topright", panel, "topright", -12, y - (20*1))
arg3_button:SetPoint("topright", panel, "topright", -12, y - (20*2))
arg1_button:SetTemplate (buttonTemplate)
arg2_button:SetTemplate (buttonTemplate)
arg3_button:SetTemplate (buttonTemplate)
arg1_button:SetTemplate(buttonTemplate)
arg2_button:SetTemplate(buttonTemplate)
arg3_button:SetTemplate(buttonTemplate)
arg1_button.tooltip = Loc ["STRING_OPTIONS_TEXTEDITOR_DATA_TOOLTIP"]
arg2_button.tooltip = Loc ["STRING_OPTIONS_TEXTEDITOR_DATA_TOOLTIP"]
@@ -165,10 +165,10 @@ end
local func_button = DF:NewButton(panel, nil, "$parentButton4", nil, 80, 20, function() textentry.editbox:Insert ("{func local player, combat = ...; return 0;}") end, nil, nil, nil, Loc ["STRING_OPTIONS_TEXTEDITOR_FUNC"], 1)
local color_button = DF:NewColorPickButton (panel, "$parentButton5", nil, color_func)
color_button:SetSize(80, 20)
color_button:SetTemplate (buttonTemplate)
color_button:SetTemplate(buttonTemplate)
func_button:SetPoint("topright", panel, "topright", -12, y - (20*3))
func_button:SetTemplate (buttonTemplate)
func_button:SetTemplate(buttonTemplate)
color_button.tooltip = Loc ["STRING_OPTIONS_TEXTEDITOR_COLOR_TOOLTIP"]
func_button.tooltip = Loc ["STRING_OPTIONS_TEXTEDITOR_FUNC_TOOLTIP"]
@@ -179,20 +179,20 @@ local done = function()
end
local apply_button = DF:NewButton(panel, nil, "$parentApply", nil, 80, 20, function() panel.callback(panel.editbox:GetText()) end, nil, nil, nil, "Apply", 1) --localize-me
apply_button:SetTemplate (buttonTemplate)
apply_button:SetTemplate(buttonTemplate)
apply_button:SetPoint("topright", panel, "topright", -14, -128)
local ok_button = DF:NewButton(panel, nil, "$parentButtonOk", nil, 80, 20, done, nil, nil, nil, Loc ["STRING_OPTIONS_TEXTEDITOR_DONE"], 1)
ok_button.tooltip = Loc ["STRING_OPTIONS_TEXTEDITOR_DONE_TOOLTIP"]
ok_button:SetTemplate (buttonTemplate)
ok_button:SetTemplate(buttonTemplate)
ok_button:SetPoint("topright", panel, "topright", -14, -194)
local reset_button = DF:NewButton(panel, nil, "$parentDefaultOk", nil, 80, 20, function() textentry.editbox:SetText(panel.default); panel.callback(panel.editbox:GetText()) end, nil, nil, nil, Loc ["STRING_OPTIONS_TEXTEDITOR_RESET"], 1)
reset_button.tooltip = Loc ["STRING_OPTIONS_TEXTEDITOR_RESET_TOOLTIP"]
reset_button:SetTemplate (buttonTemplate)
reset_button:SetTemplate(buttonTemplate)
reset_button:SetPoint("topright", panel, "topright", -14, -150)
local cancel_button = DF:NewButton(panel, nil, "$parentDefaultCancel", nil, 80, 20, function() textentry.editbox:SetText(panel.default_text); done(); end, nil, nil, nil, Loc ["STRING_OPTIONS_TEXTEDITOR_CANCEL"], 1)
cancel_button.tooltip = Loc ["STRING_OPTIONS_TEXTEDITOR_CANCEL_TOOLTIP"]
cancel_button:SetTemplate (buttonTemplate)
cancel_button:SetTemplate(buttonTemplate)
cancel_button:SetPoint("topright", panel, "topright", -14, -172)
+13 -13
View File
@@ -6,7 +6,7 @@ local _
-- ~run ~runcode
function Details:InitializeRunCodeWindow()
local DetailsRunCodePanel = DF:CreateSimplePanel (UIParent, 700, 480, "Details! Run Code", "DetailsRunCodePanel")
local DetailsRunCodePanel = DF:CreateSimplePanel(UIParent, 700, 480, "Details! Run Code", "DetailsRunCodePanel")
DetailsRunCodePanel.Frame = DetailsRunCodePanel
DetailsRunCodePanel.__name = "Auto Run Code"
DetailsRunCodePanel.real_name = "DETAILS_RUNCODEWINDOW"
@@ -30,7 +30,7 @@ function Details.OpenRunCodeWindow()
DetailsRunCodePanel.Initialized = true
local f = DetailsRunCodePanel or DF:CreateSimplePanel (UIParent, 700, 480, "Details! Run Code", "DetailsRunCodePanel")
local f = DetailsRunCodePanel or DF:CreateSimplePanel(UIParent, 700, 480, "Details! Run Code", "DetailsRunCodePanel")
--lua editor
local code_editor = DF:NewSpecialLuaEditorEntry (f, 885, 510, "text", "$parentCodeEditorWindow")
@@ -52,10 +52,10 @@ function Details.OpenRunCodeWindow()
code_editor:SetBackdropBorderColor(0, 0, 0, 1)
code_editor.__background:SetColorTexture (0.2317647, 0.2317647, 0.2317647)
code_editor.__background:SetVertexColor (0.27, 0.27, 0.27)
code_editor.__background:SetAlpha (0.8)
code_editor.__background:SetVertTile (true)
code_editor.__background:SetHorizTile (true)
code_editor.__background:SetVertexColor(0.27, 0.27, 0.27)
code_editor.__background:SetAlpha(0.8)
code_editor.__background:SetVertTile(true)
code_editor.__background:SetHorizTile(true)
code_editor.__background:SetAllPoints()
--code compile error warning
@@ -69,7 +69,7 @@ function Details.OpenRunCodeWindow()
DF:CreateFlashAnimation (errortext_frame)
local errortext_label = DF:CreateLabel(errortext_frame, "", DF:GetTemplate ("font", "ORANGE_FONT_TEMPLATE"))
local errortext_label = DF:CreateLabel(errortext_frame, "", DF:GetTemplate("font", "ORANGE_FONT_TEMPLATE"))
errortext_label.textcolor = "red"
errortext_label:SetPoint("left", errortext_frame, "left", 3, 0)
code_editor.NextCodeCheck = 0.33
@@ -118,10 +118,10 @@ function Details.OpenRunCodeWindow()
return t
end
local code_type_label = DF:CreateLabel(f, "Event:", DF:GetTemplate ("font", "ORANGE_FONT_TEMPLATE"))
local code_type_dropdown = DF:CreateDropDown (f, build_CodeType_dropdown_options, 1, 160, 20, "CodeTypeDropdown", _, DF:GetTemplate ("dropdown", "OPTIONS_DROPDOWN_TEMPLATE"))
local code_type_label = DF:CreateLabel(f, "Event:", DF:GetTemplate("font", "ORANGE_FONT_TEMPLATE"))
local code_type_dropdown = DF:CreateDropDown (f, build_CodeType_dropdown_options, 1, 160, 20, "CodeTypeDropdown", _, DF:GetTemplate("dropdown", "OPTIONS_DROPDOWN_TEMPLATE"))
code_type_dropdown:SetPoint("left", code_type_label, "right", 2, 0)
code_type_dropdown:SetFrameLevel (code_editor:GetFrameLevel() + 10)
code_type_dropdown:SetFrameLevel(code_editor:GetFrameLevel() + 10)
code_type_label:SetPoint("bottomleft", code_editor, "topleft", 0, 8)
--create save button
@@ -142,7 +142,7 @@ function Details.OpenRunCodeWindow()
local button_y = -6
local save_script_button = DF:CreateButton (f, save_script, 120, 20, "Save", -1, nil, nil, nil, nil, nil, DF:GetTemplate ("button", "OPTIONS_BUTTON_TEMPLATE"), DF:GetTemplate ("font", "PLATER_BUTTON"))
local save_script_button = DF:CreateButton(f, save_script, 120, 20, "Save", -1, nil, nil, nil, nil, nil, DF:GetTemplate("button", "OPTIONS_BUTTON_TEMPLATE"), DF:GetTemplate("font", "PLATER_BUTTON"))
save_script_button:SetIcon ([[Interface\BUTTONS\UI-Panel-ExpandButton-Up]], 20, 20, "overlay", {0.1, .9, 0.1, .9})
save_script_button:SetPoint("topright", code_editor, "bottomright", 0, button_y)
@@ -153,7 +153,7 @@ function Details.OpenRunCodeWindow()
code_editor:ClearFocus()
end
local cancel_script_button = DF:CreateButton (f, cancel_script, 120, 20, "Cancel", -1, nil, nil, nil, nil, nil, DF:GetTemplate ("button", "OPTIONS_BUTTON_TEMPLATE"), DF:GetTemplate ("font", "PLATER_BUTTON"))
local cancel_script_button = DF:CreateButton(f, cancel_script, 120, 20, "Cancel", -1, nil, nil, nil, nil, nil, DF:GetTemplate("button", "OPTIONS_BUTTON_TEMPLATE"), DF:GetTemplate("font", "PLATER_BUTTON"))
cancel_script_button:SetIcon ([[Interface\BUTTONS\UI-Panel-MinimizeButton-Up]], 20, 20, "overlay", {0.1, .9, 0.1, .9})
cancel_script_button:SetPoint("topleft", code_editor, "bottomleft", 0, button_y)
@@ -171,7 +171,7 @@ function Details.OpenRunCodeWindow()
end
end
local run_script_button = DF:CreateButton (f, execute_script, 120, 20, "Test Code", -1, nil, nil, nil, nil, nil, DF:GetTemplate ("button", "OPTIONS_BUTTON_TEMPLATE"), DF:GetTemplate ("font", "PLATER_BUTTON"))
local run_script_button = DF:CreateButton(f, execute_script, 120, 20, "Test Code", -1, nil, nil, nil, nil, nil, DF:GetTemplate("button", "OPTIONS_BUTTON_TEMPLATE"), DF:GetTemplate("font", "PLATER_BUTTON"))
run_script_button:SetIcon ([[Interface\BUTTONS\UI-SpellbookIcon-NextPage-Up]], 20, 20, "overlay", {0.05, 0.95, 0.05, 0.95})
run_script_button:SetPoint("bottomright", code_editor, "topright", 0, 3)
+2 -2
View File
@@ -69,7 +69,7 @@ function Details:ScrollDamage()
if (spellTable) then
local line = self:GetLine(i)
local time, token, hidding, sourceSerial, sourceName, sourceFlag, sourceFlag2, targetSerial, targetName, targetFlag, targetFlag2, spellID, spellName, spellType, amount, overKill, school, resisted, blocked, absorbed, isCritical = unpack (spellTable)
local time, token, hidding, sourceSerial, sourceName, sourceFlag, sourceFlag2, targetSerial, targetName, targetFlag, targetFlag2, spellID, spellName, spellType, amount, overKill, school, resisted, blocked, absorbed, isCritical = unpack(spellTable)
local spellName, _, spellIcon
@@ -136,7 +136,7 @@ function Details:ScrollDamage()
line:SetSize(scroll_width - 2, scroll_line_height)
line:SetBackdrop({bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], tileSize = 64, tile = true})
line:SetBackdropColor(unpack (backdrop_color))
line:SetBackdropColor(unpack(backdrop_color))
DF:Mixin(line, DF.HeaderFunctions)
+2 -2
View File
@@ -154,7 +154,7 @@ function Details.Survey.OpenSpellCategoryScreen()
statusBar:SetPoint("bottomleft", detailsSpellCategoryFrame, "bottomleft")
statusBar:SetPoint("bottomright", detailsSpellCategoryFrame, "bottomright")
statusBar:SetHeight(26)
statusBar:SetAlpha (0.8)
statusBar:SetAlpha(0.8)
DF:ApplyStandardBackdrop(statusBar)
--statusbar of the statusbar
@@ -162,7 +162,7 @@ function Details.Survey.OpenSpellCategoryScreen()
statusBar2:SetPoint("topleft", statusBar, "bottomleft")
statusBar2:SetPoint("topright", statusBar, "bottomright")
statusBar2:SetHeight(20)
statusBar2:SetAlpha (0.8)
statusBar2:SetAlpha(0.8)
DF:ApplyStandardBackdrop(statusBar2)
DF:ApplyStandardBackdrop(statusBar2)
local dataInfoLabel = DF:CreateLabel(statusBar2, "This cooldown data is send to people on Details! team and shared in 'Open Raid' library where any weakaura or addon can use it", 12, "silver")
+41 -41
View File
@@ -38,7 +38,7 @@ function Details:OpenRaidHistoryWindow (_raid, _boss, _difficulty, _role, _guild
f:SetFrameStrata("HIGH")
f:SetToplevel (true)
f:SetMovable (true)
f:SetMovable(true)
f:SetWidth(850)
f:SetHeight(500)
tinsert(UISpecialFrames, "DetailsRaidHistoryWindow")
@@ -67,10 +67,10 @@ function Details:OpenRaidHistoryWindow (_raid, _boss, _difficulty, _role, _guild
f.bg1 = f:CreateTexture(nil, "background")
f.bg1:SetTexture([[Interface\AddOns\Details\images\background]], true)
f.bg1:SetAlpha (0.7)
f.bg1:SetVertexColor (0.27, 0.27, 0.27)
f.bg1:SetVertTile (true)
f.bg1:SetHorizTile (true)
f.bg1:SetAlpha(0.7)
f.bg1:SetVertexColor(0.27, 0.27, 0.27)
f.bg1:SetVertTile(true)
f.bg1:SetHorizTile(true)
f.bg1:SetSize(790, 454)
f.bg1:SetAllPoints()
@@ -96,28 +96,28 @@ function Details:OpenRaidHistoryWindow (_raid, _boss, _difficulty, _role, _guild
tutorialFrame.Desc.width = 370
tutorialFrame.Desc:SetPoint("topleft", tutorialFrame, "topleft", 10, -45)
local closeButton = DF:CreateButton (tutorialFrame, function() Details:SetTutorialCVar ("HISTORYPANEL_TUTORIAL", true); tutorialFrame:Hide() end, 80, 20, Loc ["STRING_OPTIONS_CHART_CLOSE"])
local closeButton = DF:CreateButton(tutorialFrame, function() Details:SetTutorialCVar ("HISTORYPANEL_TUTORIAL", true); tutorialFrame:Hide() end, 80, 20, Loc ["STRING_OPTIONS_CHART_CLOSE"])
closeButton:SetPoint("bottom", tutorialFrame, "bottom", 0, 10)
closeButton:SetTemplate (DF:GetTemplate ("button", "OPTIONS_BUTTON_TEMPLATE"))
closeButton:SetTemplate(DF:GetTemplate("button", "OPTIONS_BUTTON_TEMPLATE"))
end
--background
local background = f:CreateTexture("$parentBackgroundImage", "border")
background:SetAlpha (0.3)
background:SetAlpha(0.3)
background:SetPoint("topleft", f, "topleft", 6, -65)
background:SetPoint("bottomright", f, "bottomright", -10, 28)
--separate menu and main list
local div = f:CreateTexture(nil, "artwork")
div:SetTexture([[Interface\ACHIEVEMENTFRAME\UI-Achievement-MetalBorder-Left]])
div:SetAlpha (0.1)
div:SetAlpha(0.1)
div:SetPoint("topleft", f, "topleft", 180, -64)
div:SetHeight(574)
--select history or guild rank
local options_switch_template = DF:GetTemplate ("switch", "OPTIONS_CHECKBOX_TEMPLATE")
local options_text_template = DF:GetTemplate ("font", "OPTIONS_FONT_TEMPLATE")
local options_button_template = DF:GetTemplate ("button", "OPTIONS_BUTTON_TEMPLATE")
local options_switch_template = DF:GetTemplate("switch", "OPTIONS_CHECKBOX_TEMPLATE")
local options_text_template = DF:GetTemplate("font", "OPTIONS_FONT_TEMPLATE")
local options_button_template = DF:GetTemplate("button", "OPTIONS_BUTTON_TEMPLATE")
local selectKillTimeline = function()
f.GuildRankCheckBox:SetValue(false)
@@ -139,7 +139,7 @@ function Details:OpenRaidHistoryWindow (_raid, _boss, _difficulty, _role, _guild
end
--kill timeline
local HistoryCheckBox, HistoryLabel = DF:CreateSwitch (f, selectKillTimeline, false, 18, 18, "", "", "HistoryCheckBox", nil, nil, nil, nil, Loc ["STRING_GUILDDAMAGERANK_SHOWHISTORY"], options_switch_template) --, options_text_template
local HistoryCheckBox, HistoryLabel = DF:CreateSwitch(f, selectKillTimeline, false, 18, 18, "", "", "HistoryCheckBox", nil, nil, nil, nil, Loc ["STRING_GUILDDAMAGERANK_SHOWHISTORY"], options_switch_template) --, options_text_template
HistoryLabel:ClearAllPoints()
HistoryCheckBox:ClearAllPoints()
HistoryCheckBox:SetPoint("topleft", f, "topleft", 100, -34)
@@ -147,7 +147,7 @@ function Details:OpenRaidHistoryWindow (_raid, _boss, _difficulty, _role, _guild
HistoryCheckBox:SetAsCheckBox()
--guildrank
local GuildRankCheckBox, GuildRankLabel = DF:CreateSwitch (f, selectGuildRank, true, 18, 18, "", "", "GuildRankCheckBox", nil, nil, nil, nil, Loc ["STRING_GUILDDAMAGERANK_SHOWRANK"], options_switch_template) --, options_text_template
local GuildRankCheckBox, GuildRankLabel = DF:CreateSwitch(f, selectGuildRank, true, 18, 18, "", "", "GuildRankCheckBox", nil, nil, nil, nil, Loc ["STRING_GUILDDAMAGERANK_SHOWRANK"], options_switch_template) --, options_text_template
GuildRankLabel:ClearAllPoints()
GuildRankCheckBox:ClearAllPoints()
GuildRankCheckBox:SetPoint("topleft", f, "topleft", 240, -34)
@@ -201,7 +201,7 @@ function Details:OpenRaidHistoryWindow (_raid, _boss, _difficulty, _role, _guild
f.WorkingFrame:Show()
f.WorkingAnimation:Play()
C_Timer.NewTicker (10, function(self)
C_Timer.NewTicker(10, function(self)
if (not Details.LastGuildSyncReceived) then
f.GuildSyncButton:Enable()
f.EndAnimationHub:Play()
@@ -214,7 +214,7 @@ function Details:OpenRaidHistoryWindow (_raid, _boss, _difficulty, _role, _guild
end)
end
local GuildSyncButton = DF:CreateButton (f, doGuildSync, 130, 20, Loc ["STRING_GUILDDAMAGERANK_SYNCBUTTONTEXT"], nil, nil, nil, "GuildSyncButton", nil, nil, options_button_template, options_text_template)
local GuildSyncButton = DF:CreateButton(f, doGuildSync, 130, 20, Loc ["STRING_GUILDDAMAGERANK_SYNCBUTTONTEXT"], nil, nil, nil, "GuildSyncButton", nil, nil, options_button_template, options_text_template)
GuildSyncButton:SetPoint("topright", f, "topright", -20, -34)
GuildSyncButton:SetIcon ([[Interface\GLUES\CharacterSelect\RestoreButton]], 12, 12, "overlay", {0.2, .8, 0.2, .8}, nil, 4)
@@ -290,7 +290,7 @@ function Details:OpenRaidHistoryWindow (_raid, _boss, _difficulty, _role, _guild
end
end
local ReportButton = DF:CreateButton (f, f.BuildReport, 130, 20, Loc ["STRING_OPTIONS_REPORT_ANCHOR"]:gsub (":", ""), nil, nil, nil, "ReportButton", nil, nil, options_button_template, options_text_template)
local ReportButton = DF:CreateButton(f, f.BuildReport, 130, 20, Loc ["STRING_OPTIONS_REPORT_ANCHOR"]:gsub (":", ""), nil, nil, nil, "ReportButton", nil, nil, options_button_template, options_text_template)
ReportButton:SetPoint("right", GuildSyncButton, "left", -2, 0)
ReportButton:SetIcon ([[Interface\GLUES\CharacterSelect\RestoreButton]], 12, 12, "overlay", {0.2, .8, 0.2, .8}, nil, 4)
@@ -299,7 +299,7 @@ function Details:OpenRaidHistoryWindow (_raid, _boss, _difficulty, _role, _guild
local instanceId = Details:GetInstanceIdFromEncounterId (encounterId)
if (instanceId) then
local file, L, R, T, B = Details:GetRaidBackground (instanceId)
--print ("file:", file)
--print("file:", file)
--can't get the image, looks to be restricted
--[[
if (file) then
@@ -373,7 +373,7 @@ function Details:OpenRaidHistoryWindow (_raid, _boss, _difficulty, _role, _guild
end
local raid_dropdown = DF:CreateDropDown (f, buildRaidList, 1, dropdownWidth, 20, "select_raid")
local raid_string = DF:CreateLabel(f, Loc ["STRING_GUILDDAMAGERANK_RAID"] .. ":", _, _, "GameFontNormal", "select_raid_label")
raid_dropdown:SetTemplate (DF:GetTemplate ("dropdown", "OPTIONS_DROPDOWN_TEMPLATE"))
raid_dropdown:SetTemplate(DF:GetTemplate("dropdown", "OPTIONS_DROPDOWN_TEMPLATE"))
--select boss:
local on_boss_select = function(_, _, boss)
@@ -384,7 +384,7 @@ function Details:OpenRaidHistoryWindow (_raid, _boss, _difficulty, _role, _guild
end
local boss_dropdown = DF:CreateDropDown (f, build_boss_list, 1, dropdownWidth, 20, "select_boss")
local boss_string = DF:CreateLabel(f, Loc ["STRING_GUILDDAMAGERANK_BOSS"] .. ":", _, _, "GameFontNormal", "select_boss_label")
boss_dropdown:SetTemplate (DF:GetTemplate ("dropdown", "OPTIONS_DROPDOWN_TEMPLATE"))
boss_dropdown:SetTemplate(DF:GetTemplate("dropdown", "OPTIONS_DROPDOWN_TEMPLATE"))
--select difficulty:
local on_diff_select = function(_, _, diff)
@@ -397,7 +397,7 @@ function Details:OpenRaidHistoryWindow (_raid, _boss, _difficulty, _role, _guild
end
local diff_dropdown = DF:CreateDropDown (f, build_diff_list, 1, dropdownWidth, 20, "select_diff")
local diff_string = DF:CreateLabel(f, Loc ["STRING_GUILDDAMAGERANK_DIFF"] .. ":", _, _, "GameFontNormal", "select_diff_label")
diff_dropdown:SetTemplate (DF:GetTemplate ("dropdown", "OPTIONS_DROPDOWN_TEMPLATE"))
diff_dropdown:SetTemplate(DF:GetTemplate("dropdown", "OPTIONS_DROPDOWN_TEMPLATE"))
--select role:
local on_role_select = function(_, _, role)
@@ -411,7 +411,7 @@ function Details:OpenRaidHistoryWindow (_raid, _boss, _difficulty, _role, _guild
end
local role_dropdown = DF:CreateDropDown (f, build_role_list, 1, dropdownWidth, 20, "select_role")
local role_string = DF:CreateLabel(f, Loc ["STRING_GUILDDAMAGERANK_ROLE"] .. ":", _, _, "GameFontNormal", "select_role_label")
role_dropdown:SetTemplate (DF:GetTemplate ("dropdown", "OPTIONS_DROPDOWN_TEMPLATE"))
role_dropdown:SetTemplate(DF:GetTemplate("dropdown", "OPTIONS_DROPDOWN_TEMPLATE"))
--select guild:
local on_guild_select = function(_, _, guild)
@@ -422,7 +422,7 @@ function Details:OpenRaidHistoryWindow (_raid, _boss, _difficulty, _role, _guild
end
local guild_dropdown = DF:CreateDropDown (f, build_guild_list, 1, dropdownWidth, 20, "select_guild")
local guild_string = DF:CreateLabel(f, Loc ["STRING_GUILDDAMAGERANK_GUILD"] .. ":", _, _, "GameFontNormal", "select_guild_label")
guild_dropdown:SetTemplate (DF:GetTemplate ("dropdown", "OPTIONS_DROPDOWN_TEMPLATE"))
guild_dropdown:SetTemplate(DF:GetTemplate("dropdown", "OPTIONS_DROPDOWN_TEMPLATE"))
--select playerbase:
local on_player_select = function(_, _, player)
@@ -436,7 +436,7 @@ function Details:OpenRaidHistoryWindow (_raid, _boss, _difficulty, _role, _guild
end
local player_dropdown = DF:CreateDropDown (f, build_player_list, 1, dropdownWidth, 20, "select_player")
local player_string = DF:CreateLabel(f, Loc ["STRING_GUILDDAMAGERANK_PLAYERBASE"] .. ":", _, _, "GameFontNormal", "select_player_label")
player_dropdown:SetTemplate (DF:GetTemplate ("dropdown", "OPTIONS_DROPDOWN_TEMPLATE"))
player_dropdown:SetTemplate(DF:GetTemplate("dropdown", "OPTIONS_DROPDOWN_TEMPLATE"))
--select player:
local onPlayer2Select = function(_, _, player)
@@ -444,7 +444,7 @@ function Details:OpenRaidHistoryWindow (_raid, _boss, _difficulty, _role, _guild
f:BuildPlayerTable (player)
end
local build_player2_list = function()
local encounterTable, guild, role = unpack (f.build_player2_data or {})
local encounterTable, guild, role = unpack(f.build_player2_data or {})
local t = {}
local alreadyListed = {}
if (encounterTable) then
@@ -466,7 +466,7 @@ function Details:OpenRaidHistoryWindow (_raid, _boss, _difficulty, _role, _guild
end
local player2_dropdown = DF:CreateDropDown (f, build_player2_list, 1, dropdownWidth, 20, "select_player2")
local player2_string = DF:CreateLabel(f, Loc ["STRING_GUILDDAMAGERANK_PLAYERBASE_PLAYER"] .. ":", _, _, "GameFontNormal", "select_player2_label")
player2_dropdown:SetTemplate (DF:GetTemplate ("dropdown", "OPTIONS_DROPDOWN_TEMPLATE"))
player2_dropdown:SetTemplate(DF:GetTemplate("dropdown", "OPTIONS_DROPDOWN_TEMPLATE"))
function f:UpdateDropdowns(DoNotSelectRaid)
@@ -494,7 +494,7 @@ function Details:OpenRaidHistoryWindow (_raid, _boss, _difficulty, _role, _guild
if (difficulty == 14) then
--don't show normal encounters
--tinsert(difficultyList, {value = 14, label = "Normal", icon = icon, onclick = on_diff_select})
--print ("has normal encounter")
--print("has normal encounter")
elseif (difficulty == 15) then
local alreadyHave = false
@@ -581,7 +581,7 @@ function Details:OpenRaidHistoryWindow (_raid, _boss, _difficulty, _role, _guild
if (type(difficulty) == "number") then
if (difficulty == 14) then
--tinsert(difficultyList, {value = 14, label = "Normal", icon = icon, onclick = on_diff_select})
--print ("has normal encounter")
--print("has normal encounter")
elseif (difficulty == 15) then
local alreadyHave = false
for i, t in ipairs(difficultyList) do
@@ -664,10 +664,10 @@ function Details:OpenRaidHistoryWindow (_raid, _boss, _difficulty, _role, _guild
function f:BuildPlayerTable (playerName)
local encounterTable, guild, role = unpack (f.build_player2_data or {})
local encounterTable, guild, role = unpack(f.build_player2_data or {})
local data = {}
if (type(playerName) == "string" and string.len (playerName) > 1) then
if (type(playerName) == "string" and string.len(playerName) > 1) then
for encounterIndex, encounter in ipairs(encounterTable) do
if (encounter.guild == guild) then
@@ -693,12 +693,12 @@ function Details:OpenRaidHistoryWindow (_raid, _boss, _difficulty, _role, _guild
local onenter = function(self)
GameCooltip:Reset()
GameCooltip:SetType ("tooltip")
GameCooltip:Preset (2)
GameCooltip:Preset(2)
GameCooltip:AddLine ("Total Done:", Details:ToK2 (self.data.value), 1, "white")
GameCooltip:AddLine ("Dps:", Details:ToK2 (self.data.value / self.data.elapsed), 1, "white")
GameCooltip:AddLine ("Item Level:", floor (self.data.data [2]), 1, "white")
GameCooltip:AddLine ("Date:", self.data.fulldate:gsub (".*%s", ""), 1, "white")
GameCooltip:AddLine("Total Done:", Details:ToK2 (self.data.value), 1, "white")
GameCooltip:AddLine("Dps:", Details:ToK2 (self.data.value / self.data.elapsed), 1, "white")
GameCooltip:AddLine("Item Level:", floor(self.data.data [2]), 1, "white")
GameCooltip:AddLine("Date:", self.data.fulldate:gsub (".*%s", ""), 1, "white")
GameCooltip:SetOwner(self.ball.tooltip_anchor)
GameCooltip:Show()
@@ -768,19 +768,19 @@ function Details:OpenRaidHistoryWindow (_raid, _boss, _difficulty, _role, _guild
local sortTable = {}
for playerName, t in pairs(playerScore) do
local className = select (2, GetClassInfo (t.class or 0))
local className = select(2, GetClassInfo (t.class or 0))
local classColor = "FFFFFFFF"
if (className) then
classColor = RAID_CLASS_COLORS [className] and RAID_CLASS_COLORS [className].colorStr
end
local playerNameFormated = Details:GetOnlyName (playerName)
local playerNameFormated = Details:GetOnlyName(playerName)
tinsert(sortTable, {
"|c" .. classColor .. playerNameFormated .. "|r",
Details:comma_value (t.ps),
Details:ToK2 (t.total),
DF:IntegerToTimer (t.length),
floor (t.ilvl),
floor(t.ilvl),
t.date,
t.total,
t.ps,
@@ -841,7 +841,7 @@ function Details:OpenRaidHistoryWindow (_raid, _boss, _difficulty, _role, _guild
tinsert(players, player)
players_index [playerName] = #players
--print ("not index", playerName, amt_encounters, date, 2, amt_encounters-1)
--print("not index", playerName, amt_encounters, date, 2, amt_encounters-1)
else
player = players [index]
for i = #player+1, amt_encounters-1 do
@@ -862,9 +862,9 @@ function Details:OpenRaidHistoryWindow (_raid, _boss, _difficulty, _role, _guild
tinsert(playerTable, "")
end
local className = select (2, GetClassInfo (player_class [playerTable [1]] or 0))
local className = select(2, GetClassInfo (player_class [playerTable [1]] or 0))
if (className) then
local playerNameFormated = Details:GetOnlyName (playerTable[1])
local playerNameFormated = Details:GetOnlyName(playerTable[1])
local classColor = RAID_CLASS_COLORS [className] and RAID_CLASS_COLORS [className].colorStr
playerTable [1] = "|c" .. classColor .. playerNameFormated .. "|r"
end
+7 -7
View File
@@ -242,7 +242,7 @@ do
allDisplaysFrame.check_text_size (button.text)
button.texture:SetTexture(Details.sub_atributos [attribute].icones [i] [1])
button.texture:SetTexCoord (unpack (Details.sub_atributos [attribute].icones [i] [2]))
button.texture:SetTexCoord (unpack(Details.sub_atributos [attribute].icones [i] [2]))
tinsert(allDisplaysFrame.buttons [attribute], button)
y = y - 17
end
@@ -532,12 +532,12 @@ function Details.switch:ShowMe(instancia)
index = index - 1
end
local button = gump:CreateButton (Details.switch.frame, segment_switch, 100, 20, "", index)
local button = gump:CreateButton(Details.switch.frame, segment_switch, 100, 20, "", index)
button:SetPoint("topleft", s, "topleft", -17, 0)
button:SetPoint("bottomright", s, "bottomright", 0, 0)
button:SetClickFunction(segment_switch, nil, nil, "right")
local boss_texture = gump:CreateImage (button, nil, 16, 16)
local boss_texture = gump:CreateImage(button, nil, 16, 16)
boss_texture:SetPoint("right", s, "left", -2, 0)
local background = button:CreateTexture(nil, "background")
@@ -586,8 +586,8 @@ function Details.switch:ShowMe(instancia)
local window_width, window_height = Details.switch.current_instancia:GetSize()
local horizontal_amt = floor (math.max (window_width / 100, 2))
local vertical_amt = floor ((window_height - y) / 20)
local horizontal_amt = floor(math.max(window_width / 100, 2))
local vertical_amt = floor((window_height - y) / 20)
local size = window_width / horizontal_amt
local frame = Details.switch.frame
@@ -694,7 +694,7 @@ function Details.switch:ShowMe(instancia)
Details.switch.frame:SetPoint("bottomright", instancia.baseframe, "bottomright", 0, 1)
local altura = instancia.baseframe:GetHeight()
local mostrar_quantas = floor (altura / Details.switch.button_height) * 2
local mostrar_quantas = floor(altura / Details.switch.button_height) * 2
local precisa_mostrar = 0
for i = 1, #Details.switch.table do
@@ -932,7 +932,7 @@ function Details.switch:Update()
local button = Details.switch.buttons [i]
if (not button) then
button = Details.switch:NewSwitchButton (Details.switch.frame, i, x, y, jump)
button:SetFrameLevel (Details.switch.frame:GetFrameLevel()+2)
button:SetFrameLevel(Details.switch.frame:GetFrameLevel()+2)
Details.switch.showing = Details.switch.showing + 1
end
+87 -87
View File
@@ -1,5 +1,5 @@
local _detalhes = _G._detalhes
local L = LibStub ("AceLocale-3.0"):GetLocale ( "Details" )
local L = LibStub("AceLocale-3.0"):GetLocale ( "Details" )
--default weaktable
_detalhes.weaktable = {__mode = "v"}
@@ -68,7 +68,7 @@ local text_dispell_prototype = {
["events"] = "COMBAT_LOG_EVENT_UNFILTERED, ENCOUNTER_START",
["use_spellName"] = false,
["use_spellId"] = false,
["custom"] = "function(event, time, token, hidding, who_serial, who_name, who_flags, who_flags2, alvo_serial, alvo_name, alvo_flags, alvo_flags2, spellid, spellname, spelltype, extraSpellID, extraSpellName, extraSchool)\n if (event == \"COMBAT_LOG_EVENT_UNFILTERED\") then\n \n if ((token == \"SPELL_DISPEL\" or token == \"SPELL_STOLEN\") and extraSpellID == 159947) then\n aura_env.dispelled = aura_env.dispelled + 1\n aura_env.dispels_by [who_name] = (aura_env.dispels_by [who_name] or 0) + 1\n \n aura_env.text = aura_env.text .. \"|cffd2e8ff\" .. who_name .. \" (\" .. aura_env.dispels_by [who_name] .. \") \".. \"|r\\n\"\n \n if (select (2, aura_env.text:gsub (\"\\n\", \"\")) == 9) then\n aura_env.text = aura_env.text:gsub (\".-\\n\", \"\", 1)\n end\n return true\n end \n else\n aura_env.text = \"\"\n aura_env.success = 0\n aura_env.dispelled = 0\n wipe (aura_env.dispels_by)\n return true \n end\nend",
["custom"] = "function(event, time, token, hidding, who_serial, who_name, who_flags, who_flags2, alvo_serial, alvo_name, alvo_flags, alvo_flags2, spellid, spellname, spelltype, extraSpellID, extraSpellName, extraSchool)\n if (event == \"COMBAT_LOG_EVENT_UNFILTERED\") then\n \n if ((token == \"SPELL_DISPEL\" or token == \"SPELL_STOLEN\") and extraSpellID == 159947) then\n aura_env.dispelled = aura_env.dispelled + 1\n aura_env.dispels_by [who_name] = (aura_env.dispels_by [who_name] or 0) + 1\n \n aura_env.text = aura_env.text .. \"|cffd2e8ff\" .. who_name .. \" (\" .. aura_env.dispels_by [who_name] .. \") \".. \"|r\\n\"\n \n if (select(2, aura_env.text:gsub (\"\\n\", \"\")) == 9) then\n aura_env.text = aura_env.text:gsub (\".-\\n\", \"\", 1)\n end\n return true\n end \n else\n aura_env.text = \"\"\n aura_env.success = 0\n aura_env.dispelled = 0\n wipe (aura_env.dispels_by)\n return true \n end\nend",
["spellIds"] = {
},
["use_message"] = true,
@@ -1419,7 +1419,7 @@ local glow_prototype = {
function _detalhes:CreateWeakAura (aura_type, spellid, use_spellid, spellname, name, icon_texture, target, stacksize, sound, chat, icon_text, icon_glow, encounter_id, group, icon_size, other_values, in_combat, cooldown_animation)
--print (aura_type, spellid, use_spellid, spellname, name, icon_texture, target, stacksize, sound, chat, icon_text, icon_glow, encounter_id, group, icon_size, other_values)
--print(aura_type, spellid, use_spellid, spellname, name, icon_texture, target, stacksize, sound, chat, icon_text, icon_glow, encounter_id, group, icon_size, other_values)
--check if wa is installed
if (not WeakAuras or not WeakAurasSaved) then
@@ -1466,7 +1466,7 @@ function _detalhes:CreateWeakAura (aura_type, spellid, use_spellid, spellname, n
aura_env.interrupted = aura_env.interrupted + 1
aura_env.text = aura_env.text .. "|cffc5ffc5" .. who_name .. " (" .. aura_env.interrupted .. ") ".. "|r\n"
end
if (select (2, aura_env.text:gsub ("\n", "")) == 9) then
if (select(2, aura_env.text:gsub ("\n", "")) == 9) then
aura_env.text = aura_env.text:gsub (".-\n", "", 1)
end
return true
@@ -1509,7 +1509,7 @@ function _detalhes:CreateWeakAura (aura_type, spellid, use_spellid, spellname, n
aura_env.dispels_by [who_name] = (aura_env.dispels_by [who_name] or 0) + 1
aura_env.text = aura_env.text .. "|cffd2e8ff" .. who_name .. " (" .. aura_env.dispels_by [who_name] .. ") ".. "|r\n"
if (select (2, aura_env.text:gsub ("\n", "")) == 11) then
if (select(2, aura_env.text:gsub ("\n", "")) == 11) then
aura_env.text = aura_env.text:gsub (".-\n", "", 2)
aura_env.text = "@title\n" .. aura_env.text
end
@@ -1566,7 +1566,7 @@ function _detalhes:CreateWeakAura (aura_type, spellid, use_spellid, spellname, n
new_aura.width = icon_size
new_aura.height = icon_size
elseif (aura_type == "aurabar") then
new_aura.width = max (icon_size, 370)
new_aura.width = max(icon_size, 370)
new_aura.height = 38
elseif (aura_type == "text") then
new_aura.fontSize = min (icon_size, 72)
@@ -1580,15 +1580,15 @@ function _detalhes:CreateWeakAura (aura_type, spellid, use_spellid, spellname, n
]]
init_start = init_start:gsub ("@text", icon_text)
init_start = init_start:gsub ("@countdown", floor (stacksize))
new_aura.trigger.remaining = tostring (floor (stacksize))
init_start = init_start:gsub ("@countdown", floor(stacksize))
new_aura.trigger.remaining = tostring (floor(stacksize))
new_aura.actions.init.custom = init_start
if (other_values.dbm_timer_id) then
new_aura.trigger.event = "DBM Timer"
local timerId = tostring (other_values.dbm_timer_id)
--print ("timerId:", other_values.dbm_timer_id, type (other_values.dbm_timer_id), timerId:find ("%s"))
--print("timerId:", other_values.dbm_timer_id, type(other_values.dbm_timer_id), timerId:find ("%s"))
--other_values.spellid
--if (timerId:find ("%s")) then
@@ -1617,8 +1617,8 @@ function _detalhes:CreateWeakAura (aura_type, spellid, use_spellid, spellname, n
local init_start = [[
aura_env.reimaningTime = @countdown
]]
init_start = init_start:gsub ("@countdown", floor (stacksize))
trigger.remaining = tostring (floor (stacksize))
init_start = init_start:gsub ("@countdown", floor(stacksize))
trigger.remaining = tostring (floor(stacksize))
new_aura.actions.init.custom = init_start
if (other_values.dbm_timer_id) then
@@ -1795,7 +1795,7 @@ function _detalhes:CreateWeakAura (aura_type, spellid, use_spellid, spellname, n
--check stack size
if (stacksize and stacksize >= 1) then
stacksize = floor (stacksize)
stacksize = floor(stacksize)
local add = _detalhes.table.copy ({}, stack_prototype)
add.trigger.count = tostring (stacksize)
_detalhes.table.overwrite (new_aura, add)
@@ -1835,7 +1835,7 @@ function _detalhes:CreateWeakAura (aura_type, spellid, use_spellid, spellname, n
end
--using sound
if (sound and type (sound) == "table") then
if (sound and type(sound) == "table") then
local add = _detalhes.table.copy ({}, sound_prototype_custom)
add.actions.start.sound_path = sound.sound_path
add.actions.start.sound_channel = sound.sound_channel or "Master"
@@ -1958,7 +1958,7 @@ local empty_other_values = {}
function _detalhes:OpenAuraPanel (spellid, spellname, spellicon, encounterid, triggertype, auratype, other_values)
if (not spellname) then
spellname = select (1, GetSpellInfo(spellid))
spellname = select(1, GetSpellInfo(spellid))
end
wipe (empty_other_values)
@@ -1984,17 +1984,17 @@ function _detalhes:OpenAuraPanel (spellid, spellname, spellicon, encounterid, tr
f:SetSize(800, 600)
f:SetPoint("center", UIParent, "center", 0, 150)
f:SetFrameStrata("DIALOG")
f:EnableMouse (true)
f:SetMovable (true)
f:EnableMouse(true)
f:SetMovable(true)
f:SetToplevel (true)
--background
f.bg1 = f:CreateTexture(nil, "background")
f.bg1:SetTexture([[Interface\AddOns\Details\images\background]], true)
f.bg1:SetAlpha (0.8)
f.bg1:SetVertexColor (0.27, 0.27, 0.27)
f.bg1:SetVertTile (true)
f.bg1:SetHorizTile (true)
f.bg1:SetAlpha(0.8)
f.bg1:SetVertexColor(0.27, 0.27, 0.27)
f.bg1:SetVertTile(true)
f.bg1:SetHorizTile(true)
f.bg1:SetSize(790, 454)
f.bg1:SetAllPoints()
f:SetBackdrop({edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1, bgFile = [[Interface\AddOns\Details\images\background]], tileSize = 64, tile = true})
@@ -2002,11 +2002,11 @@ function _detalhes:OpenAuraPanel (spellid, spellname, spellicon, encounterid, tr
f:SetBackdropBorderColor(0, 0, 0, 1)
--register to libwindow
local LibWindow = LibStub ("LibWindow-1.1")
LibWindow.RegisterConfig (f, _detalhes.createauraframe)
LibWindow.RestorePosition (f)
LibWindow.MakeDraggable (f)
LibWindow.SavePosition (f)
local LibWindow = LibStub("LibWindow-1.1")
LibWindow.RegisterConfig(f, _detalhes.createauraframe)
LibWindow.RestorePosition(f)
LibWindow.MakeDraggable(f)
LibWindow.SavePosition(f)
f:SetScript("OnMouseDown", function(self, button)
if (button == "RightButton") then
@@ -2035,7 +2035,7 @@ function _detalhes:OpenAuraPanel (spellid, spellname, spellicon, encounterid, tr
f.Close:GetHighlightTexture():SetDesaturated(true)
f.Close:GetPushedTexture():SetDesaturated(true)
f.Close:SetAlpha (0.7)
f.Close:SetAlpha(0.7)
f.Close:SetScript("OnClick", function() f:Hide() end)
--title
@@ -2045,16 +2045,16 @@ function _detalhes:OpenAuraPanel (spellid, spellname, spellicon, encounterid, tr
local fw = _detalhes:GetFramework()
local text_template = fw:GetTemplate ("font", "OPTIONS_FONT_TEMPLATE")
local dropdown_template = fw:GetTemplate ("dropdown", "OPTIONS_DROPDOWN_TEMPLATE")
local switch_template = fw:GetTemplate ("switch", "OPTIONS_CHECKBOX_TEMPLATE")
local slider_template = fw:GetTemplate ("slider", "OPTIONS_SLIDER_TEMPLATE")
local button_template = fw:GetTemplate ("button", "OPTIONS_BUTTON_TEMPLATE")
local text_template = fw:GetTemplate("font", "OPTIONS_FONT_TEMPLATE")
local dropdown_template = fw:GetTemplate("dropdown", "OPTIONS_DROPDOWN_TEMPLATE")
local switch_template = fw:GetTemplate("switch", "OPTIONS_CHECKBOX_TEMPLATE")
local slider_template = fw:GetTemplate("slider", "OPTIONS_SLIDER_TEMPLATE")
local button_template = fw:GetTemplate("button", "OPTIONS_BUTTON_TEMPLATE")
--aura name
local name_label = fw:CreateLabel(f, "Aura Name: ", nil, nil, "GameFontNormal")
local name_textentry = fw:CreateTextEntry (f, _detalhes.empty_function, 150, 20, "AuraName", "$parentAuraName")
name_textentry:SetTemplate (slider_template)
name_textentry:SetTemplate(slider_template)
name_textentry:SetPoint("left", name_label, "right", 2, 0)
f.name = name_textentry
@@ -2077,13 +2077,13 @@ function _detalhes:OpenAuraPanel (spellid, spellname, spellicon, encounterid, tr
aura_type:SetPoint("left", aura_type_label, "right", 2, 0)
aura_type:Hide()
local Icon_IconAuraType = fw:CreateImage (f, [[Interface\AddOns\Details\images\icons2]], 32, 32, "overlay", {200/512, 232/512, 336/512, 368/512}, nil, nil)
local Icon_IconAuraType = fw:CreateImage(f, [[Interface\AddOns\Details\images\icons2]], 32, 32, "overlay", {200/512, 232/512, 336/512, 368/512}, nil, nil)
Icon_IconAuraType:SetPoint("topleft", aura_type_label, "bottomleft", 10, -16)
local Icon_StatusbarAuraType = fw:CreateImage (f, [[Interface\AddOns\Details\images\icons2]], 92, 12, "overlay", {235/512, 327/512, 336/512, 348/512}, nil, nil)
local Icon_StatusbarAuraType = fw:CreateImage(f, [[Interface\AddOns\Details\images\icons2]], 92, 12, "overlay", {235/512, 327/512, 336/512, 348/512}, nil, nil)
Icon_StatusbarAuraType:SetPoint("topleft", aura_type_label, "bottomleft", 60, -26)
local Icon_TextOnlyAuraType = fw:CreateImage (f, [[Interface\AddOns\Details\images\icons2]], 57, 8, "overlay", {250/512, 306/512, 360/512, 367/512}, nil, nil)
local Icon_TextOnlyAuraType = fw:CreateImage(f, [[Interface\AddOns\Details\images\icons2]], 57, 8, "overlay", {250/512, 306/512, 360/512, 367/512}, nil, nil)
Icon_TextOnlyAuraType:SetPoint("topleft", aura_type_label, "bottomleft", 170, -28)
local AuraTypeSelectedColor = {1, 1, 1, 0.3}
@@ -2106,19 +2106,19 @@ function _detalhes:OpenAuraPanel (spellid, spellname, spellicon, encounterid, tr
f.StatusbarAuraTypeButton:SetBackdropColor(0, 0, 0, 0.05)
f.TextOnlyAuraTypeButton:SetBackdropColor(0, 0, 0, 0.05)
f.IconAuraTypeButton:SetBackdropBorderColor(unpack (AuraTypeBorderColor))
f.StatusbarAuraTypeButton:SetBackdropBorderColor(unpack (AuraTypeBorderColor))
f.TextOnlyAuraTypeButton:SetBackdropBorderColor(unpack (AuraTypeBorderColor))
f.IconAuraTypeButton:SetBackdropBorderColor(unpack(AuraTypeBorderColor))
f.StatusbarAuraTypeButton:SetBackdropBorderColor(unpack(AuraTypeBorderColor))
f.TextOnlyAuraTypeButton:SetBackdropBorderColor(unpack(AuraTypeBorderColor))
if (auraType == "icon") then
f.IconAuraTypeButton:SetBackdropColor(unpack (AuraTypeSelectedColor))
f.IconAuraTypeButton:SetBackdropBorderColor(unpack (AuraTypeBorderSelectedColor))
f.IconAuraTypeButton:SetBackdropColor(unpack(AuraTypeSelectedColor))
f.IconAuraTypeButton:SetBackdropBorderColor(unpack(AuraTypeBorderSelectedColor))
elseif (auraType == "aurabar") then
f.StatusbarAuraTypeButton:SetBackdropColor(unpack (AuraTypeSelectedColor))
f.StatusbarAuraTypeButton:SetBackdropBorderColor(unpack (AuraTypeBorderSelectedColor))
f.StatusbarAuraTypeButton:SetBackdropColor(unpack(AuraTypeSelectedColor))
f.StatusbarAuraTypeButton:SetBackdropBorderColor(unpack(AuraTypeBorderSelectedColor))
elseif (auraType == "text") then
f.TextOnlyAuraTypeButton:SetBackdropColor(unpack (AuraTypeSelectedColor))
f.TextOnlyAuraTypeButton:SetBackdropBorderColor(unpack (AuraTypeBorderSelectedColor))
f.TextOnlyAuraTypeButton:SetBackdropColor(unpack(AuraTypeSelectedColor))
f.TextOnlyAuraTypeButton:SetBackdropBorderColor(unpack(AuraTypeBorderSelectedColor))
end
aura_type:SetValue(auraType)
@@ -2134,25 +2134,25 @@ function _detalhes:OpenAuraPanel (spellid, spellname, spellicon, encounterid, tr
AuraTypeBackground:SetPoint("topleft", f, "topleft", 10, -79)
AuraTypeBackground:SetPoint("topright", f, "topright", -10, -79)
local Icon_IconAuraTypeButton = fw:CreateButton (f, OnSelectAuraType, 46, 46, "", "icon", nil, nil, "IconAuraTypeButton")
local Icon_StatusbarAuraTypeButton = fw:CreateButton (f, OnSelectAuraType, 100, 46, "", "aurabar", nil, nil, "StatusbarAuraTypeButton")
local Icon_TextOnlyAuraTypeButton = fw:CreateButton (f, OnSelectAuraType, 69, 46, "", "text", nil, nil, "TextOnlyAuraTypeButton")
local Icon_IconAuraTypeButton = fw:CreateButton(f, OnSelectAuraType, 46, 46, "", "icon", nil, nil, "IconAuraTypeButton")
local Icon_StatusbarAuraTypeButton = fw:CreateButton(f, OnSelectAuraType, 100, 46, "", "aurabar", nil, nil, "StatusbarAuraTypeButton")
local Icon_TextOnlyAuraTypeButton = fw:CreateButton(f, OnSelectAuraType, 69, 46, "", "text", nil, nil, "TextOnlyAuraTypeButton")
Icon_IconAuraTypeButton:SetPoint("center", Icon_IconAuraType, "center")
Icon_StatusbarAuraTypeButton:SetPoint("center", Icon_StatusbarAuraType, "center")
Icon_TextOnlyAuraTypeButton:SetPoint("center", Icon_TextOnlyAuraType, "center")
Icon_IconAuraTypeButton:SetBackdrop({edgeFile = [[Interface\AddOns\Details\images\dotted]], edgeSize = 1, bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], tileSize = 64, tile = true})
Icon_IconAuraTypeButton:SetBackdropColor(unpack (AuraTypeSelectedColor))
Icon_IconAuraTypeButton:SetBackdropBorderColor(unpack (AuraTypeBorderColor))
Icon_IconAuraTypeButton:SetBackdropColor(unpack(AuraTypeSelectedColor))
Icon_IconAuraTypeButton:SetBackdropBorderColor(unpack(AuraTypeBorderColor))
Icon_StatusbarAuraTypeButton:SetBackdrop({edgeFile = [[Interface\AddOns\Details\images\dotted]], edgeSize = 1, bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], tileSize = 64, tile = true})
Icon_StatusbarAuraTypeButton:SetBackdropColor(0, 0, 0, 0.05)
Icon_StatusbarAuraTypeButton:SetBackdropBorderColor(unpack (AuraTypeBorderColor))
Icon_StatusbarAuraTypeButton:SetBackdropBorderColor(unpack(AuraTypeBorderColor))
Icon_TextOnlyAuraTypeButton:SetBackdrop({edgeFile = [[Interface\AddOns\Details\images\dotted]], edgeSize = 1, bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], tileSize = 64, tile = true})
Icon_TextOnlyAuraTypeButton:SetBackdropColor(0, 0, 0, 0.05)
Icon_TextOnlyAuraTypeButton:SetBackdropBorderColor(unpack (AuraTypeBorderColor))
Icon_TextOnlyAuraTypeButton:SetBackdropBorderColor(unpack(AuraTypeBorderColor))
--trigger list
--target
@@ -2226,8 +2226,8 @@ function _detalhes:OpenAuraPanel (spellid, spellname, spellicon, encounterid, tr
end
for i = 1, #triggerList do
local checkBox = fw:CreateSwitch (f, OnChangeTriggerState, i == 1)
checkBox:SetTemplate (fw:GetTemplate ("switch", "OPTIONS_CHECKBOX_TEMPLATE"))
local checkBox = fw:CreateSwitch(f, OnChangeTriggerState, i == 1)
checkBox:SetTemplate(fw:GetTemplate("switch", "OPTIONS_CHECKBOX_TEMPLATE"))
checkBox:SetAsCheckBox()
checkBox:SetFixedParameter(triggerList [i].value)
@@ -2245,7 +2245,7 @@ function _detalhes:OpenAuraPanel (spellid, spellname, spellicon, encounterid, tr
--spellname
local spellname_label = fw:CreateLabel(f, "Spell Name: ", nil, nil, "GameFontNormal")
local spellname_textentry = fw:CreateTextEntry (f, _detalhes.empty_function, 150, 20, "SpellName", "$parentSpellName")
spellname_textentry:SetTemplate (slider_template)
spellname_textentry:SetTemplate(slider_template)
spellname_textentry:SetPoint("left", spellname_label, "right", 2, 0)
f.spellname = spellname_textentry
spellname_textentry.tooltip = "Spell/Debuff/Buff to be tracked."
@@ -2253,14 +2253,14 @@ function _detalhes:OpenAuraPanel (spellid, spellname, spellicon, encounterid, tr
--spellid
local auraid_label = fw:CreateLabel(f, "Spell Id: ", nil, nil, "GameFontNormal")
local auraid_textentry = fw:CreateTextEntry (f, _detalhes.empty_function, 150, 20, "AuraSpellId", "$parentAuraSpellId")
auraid_textentry:SetTemplate (slider_template)
auraid_textentry:SetTemplate(slider_template)
auraid_textentry:Disable()
auraid_textentry:SetPoint("left", auraid_label, "right", 2, 0)
--use spellid
local usespellid_label = fw:CreateLabel(f, "Use SpellId: ", nil, nil, "GameFontNormal")
local aura_use_spellid = fw:CreateSwitch (f, function(_, _, state) if (state) then auraid_textentry:Enable() else auraid_textentry:Disable() end end, false, nil, nil, nil, nil, "UseSpellId")
aura_use_spellid:SetTemplate (fw:GetTemplate ("switch", "OPTIONS_CHECKBOX_TEMPLATE"))
local aura_use_spellid = fw:CreateSwitch(f, function(_, _, state) if (state) then auraid_textentry:Enable() else auraid_textentry:Disable() end end, false, nil, nil, nil, nil, "UseSpellId")
aura_use_spellid:SetTemplate(fw:GetTemplate("switch", "OPTIONS_CHECKBOX_TEMPLATE"))
aura_use_spellid:SetAsCheckBox()
aura_use_spellid:SetPoint("left", usespellid_label, "right", 2, 0)
@@ -2268,8 +2268,8 @@ function _detalhes:OpenAuraPanel (spellid, spellname, spellicon, encounterid, tr
--in combat only
local incombat_label = fw:CreateLabel(f, "Only in Combat: ", nil, nil, "GameFontNormal")
local aura_incombat = fw:CreateSwitch (f, function(_, _, state) end, true, nil, nil, nil, nil, "UseInCombat")
aura_incombat:SetTemplate (fw:GetTemplate ("switch", "OPTIONS_CHECKBOX_TEMPLATE"))
local aura_incombat = fw:CreateSwitch(f, function(_, _, state) end, true, nil, nil, nil, nil, "UseInCombat")
aura_incombat:SetTemplate(fw:GetTemplate("switch", "OPTIONS_CHECKBOX_TEMPLATE"))
aura_incombat:SetAsCheckBox()
aura_incombat:SetPoint("left", incombat_label, "right", 2, 0)
aura_incombat.tooltip = "Only active when in combat."
@@ -2290,8 +2290,8 @@ function _detalhes:OpenAuraPanel (spellid, spellname, spellicon, encounterid, tr
--is cooldown
local iscooldown_label = fw:CreateLabel(f, "Cooldown Animation: ", nil, nil, "GameFontNormal")
local aura_iscooldown = fw:CreateSwitch (f, function(_, _, state) end, true, nil, nil, nil, nil, "IsCooldown")
aura_iscooldown:SetTemplate (fw:GetTemplate ("switch", "OPTIONS_CHECKBOX_TEMPLATE"))
local aura_iscooldown = fw:CreateSwitch(f, function(_, _, state) end, true, nil, nil, nil, nil, "IsCooldown")
aura_iscooldown:SetTemplate(fw:GetTemplate("switch", "OPTIONS_CHECKBOX_TEMPLATE"))
aura_iscooldown:SetAsCheckBox()
aura_iscooldown:SetPoint("left", iscooldown_label, "right", 2, 0)
aura_iscooldown.tooltip = "Only active when in combat."
@@ -2299,7 +2299,7 @@ function _detalhes:OpenAuraPanel (spellid, spellname, spellicon, encounterid, tr
--stack
local stack_slider = fw:NewSlider (f, f, "$parentStackSlider", "StackSlider", 150, 20, 0, 30, 1, 0, true)
stack_slider.useDecimals = true
stack_slider:SetTemplate (slider_template)
stack_slider:SetTemplate(slider_template)
local stack_label = fw:CreateLabel(f, "Trigger Stack Size: ", nil, nil, "GameFontNormal")
stack_slider:SetPoint("left", stack_label, "right", 2, 0)
stack_slider.tooltip = "Minimum amount of stacks to trigger the aura."
@@ -2397,7 +2397,7 @@ function _detalhes:OpenAuraPanel (spellid, spellname, spellicon, encounterid, tr
return t
end
local sound_effect = fw:CreateDropDown (f, sound_options, 1, 150, 20, "SoundEffectDropdown", "$parentSoundEffectDropdown")
sound_effect:SetTemplate (slider_template)
sound_effect:SetTemplate(slider_template)
local sound_effect_label = fw:CreateLabel(f, "Play Sound: ", nil, nil, "GameFontNormal")
sound_effect:SetPoint("left", sound_effect_label, "right", 2, 0)
sound_effect.tooltip = "Sound played when the aura triggers."
@@ -2405,20 +2405,20 @@ function _detalhes:OpenAuraPanel (spellid, spellname, spellicon, encounterid, tr
--say something
local say_something_label = fw:CreateLabel(f, "/Say on Trigger: ", nil, nil, "GameFontNormal")
local say_something = fw:CreateTextEntry (f, _detalhes.empty_function, 150, 20, "SaySomething", "$parentSaySomething")
say_something:SetTemplate (slider_template)
say_something:SetTemplate(slider_template)
say_something:SetPoint("left", say_something_label, "right", 2, 0)
say_something.tooltip = "Your character /say this phrase when the aura triggers."
--aura text
local aura_text_label = fw:CreateLabel(f, "Aura Text: ", nil, nil, "GameFontNormal")
local aura_text = fw:CreateTextEntry (f, _detalhes.empty_function, 150, 20, "AuraText", "$parentAuraText")
aura_text:SetTemplate (slider_template)
aura_text:SetTemplate(slider_template)
aura_text:SetPoint("left", aura_text_label, "right", 2, 0)
aura_text.tooltip = "Text shown at aura's icon right side."
--apply glow
local useglow_label = fw:CreateLabel(f, "Glow Effect: ", nil, nil, "GameFontNormal")
local useglow = fw:CreateSwitch (f, function(self, _, state)
local useglow = fw:CreateSwitch(f, function(self, _, state)
if (state and self.glow_test) then
self.glow_test:Show()
self.glow_test.animOut:Stop()
@@ -2429,7 +2429,7 @@ function _detalhes:OpenAuraPanel (spellid, spellname, spellicon, encounterid, tr
end
end, false, nil, nil, nil, nil, "UseGlow")
useglow:SetTemplate (fw:GetTemplate ("switch", "OPTIONS_CHECKBOX_TEMPLATE"))
useglow:SetTemplate(fw:GetTemplate("switch", "OPTIONS_CHECKBOX_TEMPLATE"))
useglow:SetAsCheckBox()
useglow:SetPoint("left", useglow_label, "right", 2, 0)
@@ -2443,14 +2443,14 @@ function _detalhes:OpenAuraPanel (spellid, spellname, spellicon, encounterid, tr
--encounter id
local encounterid_label = fw:CreateLabel(f, "Encounter ID: ", nil, nil, "GameFontNormal")
local encounterid = fw:CreateTextEntry (f, _detalhes.empty_function, 150, 20, "EncounterIdText", "$parentEncounterIdText")
encounterid:SetTemplate (slider_template)
encounterid:SetTemplate(slider_template)
encounterid:SetPoint("left", encounterid_label, "right", 2, 0)
encounterid.tooltip = "Only load this aura for this raid encounter."
--size
local icon_size_slider = fw:NewSlider (f, f, "$parentIconSizeSlider", "IconSizeSlider", 150, 20, 8, 256, 1, 64)
local icon_size_label = fw:CreateLabel(f, "Size: ", nil, nil, "GameFontNormal")
icon_size_slider:SetTemplate (slider_template)
icon_size_slider:SetTemplate(slider_template)
icon_size_slider:SetPoint("left", icon_size_label, "right", 2, 0)
icon_size_slider.tooltip = "Icon size, width and height."
@@ -2463,7 +2463,7 @@ function _detalhes:OpenAuraPanel (spellid, spellname, spellicon, encounterid, tr
return t
end
local aura_addon = fw:CreateDropDown (f, addon_options, 1, 150, 20, "AuraAddonDropdown", "$parentAuraAddonDropdown")
aura_addon:SetTemplate (slider_template)
aura_addon:SetTemplate(slider_template)
local aura_addon_label = fw:CreateLabel(f, "Addon: ", nil, nil, "GameFontNormal")
aura_addon:SetPoint("left", aura_addon_label, "right", 2, 0)
@@ -2491,7 +2491,7 @@ function _detalhes:OpenAuraPanel (spellid, spellname, spellicon, encounterid, tr
local weakauras_folder_label = fw:CreateLabel(f, "WeakAuras Group: ", nil, nil, "GameFontNormal")
local weakauras_folder = fw:CreateDropDown (f, weakauras_folder_options, 1, 150, 20, "WeakaurasFolderDropdown", "$parentWeakaurasFolder")
weakauras_folder:SetTemplate (slider_template)
weakauras_folder:SetTemplate(slider_template)
weakauras_folder:SetPoint("left", weakauras_folder_label, "right", 2, 0)
--make new group
@@ -2500,19 +2500,19 @@ function _detalhes:OpenAuraPanel (spellid, spellname, spellicon, encounterid, tr
local weakauras_newgroup_textentry = f.NewWeakaurasGroupTextEntry
if (not WeakAurasSaved or not WeakAurasSaved.displays) then
print ("nop, weakauras not found")
print("nop, weakauras not found")
return
end
local groupName = weakauras_newgroup_textentry.text
if (string.len (groupName) == 0) then
print ("nop, group name is too small")
if (string.len(groupName) == 0) then
print("nop, group name is too small")
return
end
if (WeakAurasSaved.displays [groupName]) then
print ("nop, group already exists")
print("nop, group already exists")
return
end
@@ -2538,14 +2538,14 @@ function _detalhes:OpenAuraPanel (spellid, spellname, spellicon, encounterid, tr
local weakauras_newgroup_label = fw:CreateLabel(f, "New WeakAuras Group: ", nil, nil, "GameFontNormal")
local weakauras_newgroup_textentry = fw:CreateTextEntry (f, create_wa_group, 150, 20, "NewWeakaurasGroupTextEntry", "$parentNewWeakaurasGroup")
weakauras_newgroup_textentry:SetTemplate (slider_template)
weakauras_newgroup_textentry:SetTemplate(slider_template)
weakauras_newgroup_textentry:SetPoint("left", weakauras_newgroup_label, "right", 2, 0)
f.weakauras_newgroup = weakauras_newgroup_textentry
weakauras_newgroup_textentry.tooltip = "Enter the name of the new group"
local weakauras_newgroup_button = fw:CreateButton (f, create_wa_group, 106, 20, "Create Group")
weakauras_newgroup_button:SetTemplate (slider_template)
weakauras_newgroup_button:SetTemplate (_detalhes.gump:GetTemplate ("button", "DETAILS_PLUGIN_BUTTON_TEMPLATE"))
local weakauras_newgroup_button = fw:CreateButton(f, create_wa_group, 106, 20, "Create Group")
weakauras_newgroup_button:SetTemplate(slider_template)
weakauras_newgroup_button:SetTemplate(_detalhes.gump:GetTemplate("button", "DETAILS_PLUGIN_BUTTON_TEMPLATE"))
weakauras_newgroup_button:SetWidth(100)
weakauras_newgroup_button:SetPoint("left", weakauras_newgroup_textentry, "right", 2, 0)
@@ -2580,19 +2580,19 @@ function _detalhes:OpenAuraPanel (spellid, spellname, spellicon, encounterid, tr
if (addon == "WA") then
_detalhes:CreateWeakAura (aura_type_value, spellid, use_spellId, spellname, name, icon, target, stacksize, sound, chat, icon_text, icon_glow, eid, folder, iconsize, f.other_values, incombat, iscooldown)
else
_detalhes:Msg ("No Aura Addon selected. Addons currently supported: WeakAuras 2.")
_detalhes:Msg("No Aura Addon selected. Addons currently supported: WeakAuras 2.")
end
f:Hide()
end
local create_button = fw:CreateButton (f, create_func, 106, 20, L["STRING_CREATEAURA"])
create_button:SetTemplate (slider_template)
create_button:SetTemplate (_detalhes.gump:GetTemplate ("button", "DETAILS_PLUGIN_BUTTON_TEMPLATE"))
local create_button = fw:CreateButton(f, create_func, 106, 20, L["STRING_CREATEAURA"])
create_button:SetTemplate(slider_template)
create_button:SetTemplate(_detalhes.gump:GetTemplate("button", "DETAILS_PLUGIN_BUTTON_TEMPLATE"))
create_button:SetWidth(160)
local cancel_button = fw:CreateButton (f, function() name_textentry:ClearFocus(); f:Hide() end, 106, 20, "Cancel")
cancel_button:SetTemplate (_detalhes.gump:GetTemplate ("button", "DETAILS_PLUGIN_BUTTON_TEMPLATE"))
local cancel_button = fw:CreateButton(f, function() name_textentry:ClearFocus(); f:Hide() end, 106, 20, "Cancel")
cancel_button:SetTemplate(_detalhes.gump:GetTemplate("button", "DETAILS_PLUGIN_BUTTON_TEMPLATE"))
cancel_button:SetWidth(160)
@@ -2762,7 +2762,7 @@ function _detalhes:OpenAuraPanel (spellid, spellname, spellicon, encounterid, tr
DetailsAuraPanel.AuraText:SetText(DetailsAuraPanel.other_values.text or "")
DetailsAuraPanel.SaySomething:SetText("")
if (triggertype and type (triggertype) == "number") then
if (triggertype and type(triggertype) == "number") then
DetailsAuraPanel.AuraOnDropdown:Select(triggertype, true)
DetailsAuraPanel.SetTriggerState (DetailsAuraPanel.TriggerList [triggertype].value) --passed by index not by the trigger ID
else
@@ -2770,7 +2770,7 @@ function _detalhes:OpenAuraPanel (spellid, spellname, spellicon, encounterid, tr
DetailsAuraPanel.SetTriggerState (1)
end
if (auratype and type (auratype) == "number") then
if (auratype and type(auratype) == "number") then
DetailsAuraPanel.AuraTypeDropdown:Select(auratype, true)
DetailsAuraPanel.OnSelectAuraType (nil, nil, auratype)
else
+61 -61
View File
@@ -1,5 +1,5 @@
local _detalhes = _G._detalhes
local Loc = LibStub ("AceLocale-3.0"):GetLocale ( "Details" )
local Loc = LibStub("AceLocale-3.0"):GetLocale ( "Details" )
local SharedMedia = LibStub:GetLibrary("LibSharedMedia-3.0")
local g = _detalhes.gump
@@ -24,7 +24,7 @@ function _detalhes:OpenWelcomeWindow()
window:SetBackdropColor(0, 0, 0, 0.75)
window:SetWidth(612)
window:SetHeight(315)
window:SetMovable (true)
window:SetMovable(true)
window:SetScript("OnMouseDown", function() window:StartMoving() end)
window:SetScript("OnMouseUp", function() window:StopMovingOrSizing() end)
window:SetScript("OnHide", function()
@@ -44,7 +44,7 @@ function _detalhes:OpenWelcomeWindow()
rodape_bg:SetPoint("bottomright", window, "bottomright", -11, 12)
rodape_bg:SetTexture([[Interface\Tooltips\UI-Tooltip-Background]])
rodape_bg:SetHeight(25)
rodape_bg:SetVertexColor (0, 0, 0, 1)
rodape_bg:SetVertexColor(0, 0, 0, 1)
local logotipo = window:CreateTexture(nil, "overlay")
logotipo:SetPoint("topleft", window, "topleft", 16, -20)
@@ -57,12 +57,12 @@ function _detalhes:OpenWelcomeWindow()
cancel:SetWidth(22)
cancel:SetHeight(22)
cancel:SetPoint("bottomleft", window, "bottomleft", 12, 14)
cancel:SetFrameLevel (window:GetFrameLevel()+1)
cancel:SetFrameLevel(window:GetFrameLevel()+1)
cancel:SetPushedTexture([[Interface\Buttons\UI-GroupLoot-Pass-Down]])
cancel:SetHighlightTexture([[Interface\Buttons\UI-GROUPLOOT-PASS-HIGHLIGHT]])
cancel:SetNormalTexture([[Interface\Buttons\UI-GroupLoot-Pass-Up]])
cancel:SetScript("OnClick", function() window:Hide() end)
cancel:GetNormalTexture():SetDesaturated (true)
cancel:GetNormalTexture():SetDesaturated(true)
cancel:Disable()
local cancelText = cancel:CreateFontString (nil, "overlay", "GameFontNormal")
@@ -74,7 +74,7 @@ function _detalhes:OpenWelcomeWindow()
forward:SetWidth(26)
forward:SetHeight(26)
forward:SetPoint("bottomright", window, "bottomright", -14, 13)
forward:SetFrameLevel (window:GetFrameLevel()+1)
forward:SetFrameLevel(window:GetFrameLevel()+1)
forward:SetPushedTexture([[Interface\Buttons\UI-SpellbookIcon-NextPage-Down]])
forward:SetHighlightTexture([[Interface\Buttons\UI-SpellbookIcon-NextPage-Up]])
forward:SetNormalTexture([[Interface\Buttons\UI-SpellbookIcon-NextPage-Up]])
@@ -133,7 +133,7 @@ function _detalhes:OpenWelcomeWindow()
instance.baseframe:SetPoint("left", DetailsWelcomeWindow, "right", 10, 0)
DetailsWelcomeWindow.SetLocTimer = nil
end
DetailsWelcomeWindow.SetLocTimer = _detalhes:ScheduleTimer ("WelcomeSetLoc", 12)
DetailsWelcomeWindow.SetLocTimer = _detalhes:ScheduleTimer("WelcomeSetLoc", 12)
--/script local f=CreateFrame("frame");local g=false;f:SetScript("OnUpdate",function(s,e)if not g then local r=math.random for i=1,2500000 do local a=r(1,1000000);a=a+1 end g=true else print(string.format("cpu: %.3f",e));f:SetScript("OnUpdate",nil)end end)
@@ -151,7 +151,7 @@ function _detalhes:OpenWelcomeWindow()
got = true
elseif (not InCombatLockdown()) then
--print ("process time:", elapsed)
--print("process time:", elapsed)
if (elapsed < 0.295) then
_detalhes.use_row_animations = true
@@ -183,7 +183,7 @@ function _detalhes:OpenWelcomeWindow()
end
--deprecated
--_detalhes:ScheduleTimer ("CalcCpuPower", 10)
--_detalhes:ScheduleTimer("CalcCpuPower", 10)
--detect ElvUI
--[=[ --deprecated
@@ -202,7 +202,7 @@ function _detalhes:OpenWelcomeWindow()
for key, value in pairs(instance) do
if (_detalhes.instance_defaults [key] ~= nil) then
if (type(value) == "table") then
savedObject [key] = Details.CopyTable (value)
savedObject [key] = Details.CopyTable(value)
else
savedObject [key] = value
end
@@ -241,7 +241,7 @@ local window_openned_at = time()
angel:SetTexCoord (0.162109375, 0.591796875, 0, 1)
angel:SetWidth(442)
angel:SetHeight(256)
angel:SetAlpha (.2)
angel:SetAlpha(.2)
local texto1 = window:CreateFontString (nil, "overlay", "GameFontNormal")
texto1:SetPoint("topleft", window, "topleft", 13, -220)
@@ -262,7 +262,7 @@ local window_openned_at = time()
bg55:SetPoint("bottomright", window, "bottomright", -10, 10)
bg55:SetHeight(125*3)
bg55:SetWidth(89*3)
bg55:SetAlpha (.05)
bg55:SetAlpha(.05)
bg55:SetTexCoord (1, 0, 0, 1)
local texto55 = window:CreateFontString (nil, "overlay", "GameFontNormal")
@@ -320,7 +320,7 @@ local window_openned_at = time()
local instance1 = _detalhes:GetInstance(1)
local skin_dropdown = g:NewDropDown (window, _, "$parentSkinDropdown", "skinDropdown", 160, 20, buildSkinMenu, instance1.skin)
skin_dropdown:SetTemplate (g:GetTemplate ("dropdown", "OPTIONS_DROPDOWN_TEMPLATE"))
skin_dropdown:SetTemplate(g:GetTemplate("dropdown", "OPTIONS_DROPDOWN_TEMPLATE"))
skin_dropdown.tooltip = Loc ["STRING_WELCOME_58"]
local skin_label = g:NewLabel(window, _, "$parentSkinLabel", "skinLabel", Loc ["STRING_OPTIONS_INSTANCE_SKIN"] .. ":", "GameFontNormal")
@@ -426,7 +426,7 @@ local window_openned_at = time()
g:NewSwitch (window, _, "$parentLatinAlphabetCheckBox", "LatinAlphabetCheckBox", 20, 20, _, _, true)
window.LatinAlphabetCheckBox:SetAsCheckBox()
window.LatinAlphabetCheckBox:SetFixedParameter(1)
window.LatinAlphabetCheckBox:SetTemplate (g:GetTemplate ("switch", "OPTIONS_CHECKBOX_TEMPLATE"))
window.LatinAlphabetCheckBox:SetTemplate(g:GetTemplate("switch", "OPTIONS_CHECKBOX_TEMPLATE"))
window.LatinAlphabetCheckBox.OnSwitch = onSelectAlphabet
window.LatinAlphabetLabel:SetPoint("left", window.LatinAlphabetCheckBox, "right", 2, 0)
@@ -438,7 +438,7 @@ local window_openned_at = time()
g:NewSwitch (window, _, "$parentCyrillicAlphabetCheckBox", "CyrillicAlphabetCheckBox", 20, 20, _, _, false)
window.CyrillicAlphabetCheckBox:SetAsCheckBox()
window.CyrillicAlphabetCheckBox:SetFixedParameter(2)
window.CyrillicAlphabetCheckBox:SetTemplate (g:GetTemplate ("switch", "OPTIONS_CHECKBOX_TEMPLATE"))
window.CyrillicAlphabetCheckBox:SetTemplate(g:GetTemplate("switch", "OPTIONS_CHECKBOX_TEMPLATE"))
window.CyrillicAlphabetCheckBox.OnSwitch = onSelectAlphabet
window.CyrillicAlphabetLabel:SetPoint("left", window.CyrillicAlphabetCheckBox, "right", 2, 0)
tinsert(allAlphabetCheckBoxes, window.CyrillicAlphabetCheckBox)
@@ -449,7 +449,7 @@ local window_openned_at = time()
g:NewSwitch (window, _, "$parentChinaCheckBox", "ChinaCheckBox", 20, 20, _, _, false)
window.ChinaCheckBox:SetAsCheckBox()
window.ChinaCheckBox:SetFixedParameter(3)
window.ChinaCheckBox:SetTemplate (g:GetTemplate ("switch", "OPTIONS_CHECKBOX_TEMPLATE"))
window.ChinaCheckBox:SetTemplate(g:GetTemplate("switch", "OPTIONS_CHECKBOX_TEMPLATE"))
window.ChinaCheckBox.OnSwitch = onSelectAlphabet
window.ChinaAlphabetLabel:SetPoint("left", window.ChinaCheckBox, "right", 2, 0)
tinsert(allAlphabetCheckBoxes, window.ChinaCheckBox)
@@ -460,7 +460,7 @@ local window_openned_at = time()
g:NewSwitch (window, _, "$parentKoreanCheckBox", "KoreanCheckBox", 20, 20, _, _, false)
window.KoreanCheckBox:SetAsCheckBox()
window.KoreanCheckBox:SetFixedParameter(4)
window.KoreanCheckBox:SetTemplate (g:GetTemplate ("switch", "OPTIONS_CHECKBOX_TEMPLATE"))
window.KoreanCheckBox:SetTemplate(g:GetTemplate("switch", "OPTIONS_CHECKBOX_TEMPLATE"))
window.KoreanCheckBox.OnSwitch = onSelectAlphabet
window.KoreanAlphabetLabel:SetPoint("left", window.KoreanCheckBox, "right", 2, 0)
tinsert(allAlphabetCheckBoxes, window.KoreanCheckBox)
@@ -471,7 +471,7 @@ local window_openned_at = time()
g:NewSwitch (window, _, "$parentTaiwanCheckBox", "TaiwanCheckBox", 20, 20, _, _, false)
window.TaiwanCheckBox:SetAsCheckBox()
window.TaiwanCheckBox:SetFixedParameter(5)
window.TaiwanCheckBox:SetTemplate (g:GetTemplate ("switch", "OPTIONS_CHECKBOX_TEMPLATE"))
window.TaiwanCheckBox:SetTemplate(g:GetTemplate("switch", "OPTIONS_CHECKBOX_TEMPLATE"))
window.TaiwanCheckBox.OnSwitch = onSelectAlphabet
window.TaiwanAlphabetLabel:SetPoint("left", window.TaiwanCheckBox, "right", 2, 0)
tinsert(allAlphabetCheckBoxes, window.TaiwanCheckBox)
@@ -499,8 +499,8 @@ local window_openned_at = time()
self.MyObject:Disable()
end
local create_window_button = g:CreateButton (window, new_window, buttonWidth, 20, Loc["STRING_WELCOME_79"])
create_window_button:SetTemplate (g:GetTemplate ("dropdown", "OPTIONS_DROPDOWN_TEMPLATE"))
local create_window_button = g:CreateButton(window, new_window, buttonWidth, 20, Loc["STRING_WELCOME_79"])
create_window_button:SetTemplate(g:GetTemplate("dropdown", "OPTIONS_DROPDOWN_TEMPLATE"))
create_window_button:SetIcon ([[Interface\FriendsFrame\UI-FriendsList-Large-Up]], nil, nil, nil, {5/32, 26/32, 6/32, 26/32}, nil, 4, 2)
create_window_button:SetPoint("topright", window, "topright", -100, -137)
@@ -514,7 +514,7 @@ local window_openned_at = time()
local instance = window.editing_window
if (instance.menu_alpha.enabled and a ~= instance.color[4]) then
_detalhes:Msg (Loc ["STRING_OPTIONS_MENU_ALPHAWARNING"])
_detalhes:Msg(Loc ["STRING_OPTIONS_MENU_ALPHAWARNING"])
instance:InstanceColor (r, g, b, instance.menu_alpha.onleave, nil, true)
if (_detalhes.options_group_edit) then
@@ -545,12 +545,12 @@ local window_openned_at = time()
local change_color = function()
window.editing_window = _detalhes:GetInstance(1)
local r, g, b, a = unpack (window.editing_window.color)
local r, g, b, a = unpack(window.editing_window.color)
_detalhes.gump:ColorPick (window, r, g, b, a, windowcolor_callback)
end
local window_color = g:CreateButton (window, change_color, buttonWidth, 20, Loc ["STRING_OPTIONS_CHANGECOLOR"])
window_color:SetTemplate (g:GetTemplate ("dropdown", "OPTIONS_DROPDOWN_TEMPLATE"))
local window_color = g:CreateButton(window, change_color, buttonWidth, 20, Loc ["STRING_OPTIONS_CHANGECOLOR"])
window_color:SetTemplate(g:GetTemplate("dropdown", "OPTIONS_DROPDOWN_TEMPLATE"))
window_color:SetPoint("topleft", create_window_button, "bottomleft", 0, padding)
window_color:SetIcon ([[Interface\AddOns\Details\images\icons]], 14, 14, nil, {434/512, 466/512, 277/512, 307/512}, nil, 4, 2)
@@ -560,7 +560,7 @@ local window_openned_at = time()
--
g:NewSlider (window, _, "$parentBarHeightSpeed", "BarHeightSlider", 160, 20, 8, 24, 1, 14) --parent, container, name, member, w, h, min, max, step, defaultv
window.BarHeightSlider:SetPoint("left", window.BarHeightLabel, "right", 2, 0)
window.BarHeightSlider:SetTemplate (g:GetTemplate ("slider", "OPTIONS_SLIDER_TEMPLATE"))
window.BarHeightSlider:SetTemplate(g:GetTemplate("slider", "OPTIONS_SLIDER_TEMPLATE"))
window.BarHeightSlider:SetHook("OnValueChange", function(self, _, amount)
local instance1 = Details:GetInstance(1)
@@ -580,7 +580,7 @@ local window_openned_at = time()
--
g:NewSlider (window, _, "$parentTextSizeSpeed", "TextSizeSlider", 160, 20, 10, 20, 1, 14) --parent, container, name, member, w, h, min, max, step, defaultv
window.TextSizeSlider:SetPoint("left", window.TextSizeLabel, "right", 2, 0)
window.TextSizeSlider:SetTemplate (g:GetTemplate ("slider", "OPTIONS_SLIDER_TEMPLATE"))
window.TextSizeSlider:SetTemplate(g:GetTemplate("slider", "OPTIONS_SLIDER_TEMPLATE"))
window.TextSizeSlider:SetHook("OnValueChange", function(self, _, amount)
local instance1 = Details:GetInstance(1)
@@ -619,7 +619,7 @@ local window_openned_at = time()
local instance1 = _detalhes:GetInstance(1)
local font_dropdown = g:NewDropDown (window, _, "$parentFontDropdown", "FontDropdown", 160, 20, buildFontMenu, instance1.row_info.font_face)
font_dropdown:SetTemplate (g:GetTemplate ("dropdown", "OPTIONS_DROPDOWN_TEMPLATE"))
font_dropdown:SetTemplate(g:GetTemplate("dropdown", "OPTIONS_DROPDOWN_TEMPLATE"))
font_dropdown.tooltip = Loc ["STRING_WELCOME_58"]
local font_label = g:NewLabel(window, _, "$parentFontLabel", "FontLabel", Loc ["STRING_OPTIONS_TEXT_FONT"], "GameFontNormal")
@@ -631,7 +631,7 @@ local window_openned_at = time()
g:NewSwitch (window, _, "$parentShowPercentCheckBox", "ShowPercentCheckBox", 20, 20, _, _, false)
window.ShowPercentCheckBox:SetAsCheckBox()
window.ShowPercentCheckBox:SetFixedParameter(1)
window.ShowPercentCheckBox:SetTemplate (g:GetTemplate ("switch", "OPTIONS_CHECKBOX_TEMPLATE"))
window.ShowPercentCheckBox:SetTemplate(g:GetTemplate("switch", "OPTIONS_CHECKBOX_TEMPLATE"))
window.ShowPercentCheckBox.OnSwitch = function(self, fixedParameter, value)
local instance1 = Details:GetInstance(1)
@@ -669,7 +669,7 @@ local window_openned_at = time()
end
if (DetailsWelcomeWindow.SetLocTimer) then
_detalhes:CancelTimer (DetailsWelcomeWindow.SetLocTimer)
_detalhes:CancelTimer(DetailsWelcomeWindow.SetLocTimer)
DetailsWelcomeWindow.SetLocTimer = nil
_detalhes:WelcomeSetLoc()
end
@@ -696,7 +696,7 @@ local window_openned_at = time()
numeral_image:SetPoint("bottomright", window, "bottomright", -10, 10)
numeral_image:SetHeight(125*3)--125
numeral_image:SetWidth(89*3)--82
numeral_image:SetAlpha (.05)
numeral_image:SetAlpha(.05)
numeral_image:SetTexCoord (1, 0, 0, 1)
g:NewLabel(window, _, "$parentChangeMindNumeralLabel", "changemindNumeralLabel", Loc ["STRING_WELCOME_2"], "GameFontNormal", 9, "orange")
@@ -713,7 +713,7 @@ local window_openned_at = time()
local WesternNumbersCheckbox = g:NewSwitch (window, _, "WesternNumbersCheckbox", "WesternNumbersCheckbox", 20, 20, _, _, true)
WesternNumbersCheckbox:SetAsCheckBox()
WesternNumbersCheckbox:SetFixedParameter(1)
WesternNumbersCheckbox:SetTemplate (g:GetTemplate ("switch", "OPTIONS_CHECKBOX_TEMPLATE"))
WesternNumbersCheckbox:SetTemplate(g:GetTemplate("switch", "OPTIONS_CHECKBOX_TEMPLATE"))
WesternNumbersCheckbox:SetPoint("topleft", window, "topleft", 40, -130)
window.WesternNumbersLabel:SetPoint("left", WesternNumbersCheckbox, "right", 2, 0)
@@ -722,7 +722,7 @@ local window_openned_at = time()
local AsianNumbersCheckbox = g:NewSwitch (window, _, "AsianNumbersCheckbox", "AsianNumbersCheckbox", 20, 20, _, _, true)
AsianNumbersCheckbox:SetAsCheckBox()
AsianNumbersCheckbox:SetFixedParameter(2)
AsianNumbersCheckbox:SetTemplate (g:GetTemplate ("switch", "OPTIONS_CHECKBOX_TEMPLATE"))
AsianNumbersCheckbox:SetTemplate(g:GetTemplate("switch", "OPTIONS_CHECKBOX_TEMPLATE"))
AsianNumbersCheckbox:SetPoint("topleft", window, "topleft", 40, -200)
window.AsianNumbersLabel:SetPoint("left", AsianNumbersCheckbox, "right", 2, 0)
@@ -815,7 +815,7 @@ local window_openned_at = time()
ampulheta:SetPoint("bottomright", window, "bottomright", -10, 10)
ampulheta:SetHeight(125*3)--125
ampulheta:SetWidth(89*3)--82
ampulheta:SetAlpha (.05)
ampulheta:SetAlpha(.05)
ampulheta:SetTexCoord (1, 0, 0, 1)
g:NewLabel(window, _, "$parentChangeMind2Label", "changemind2Label", Loc ["STRING_WELCOME_2"], "GameFontNormal", 9, "orange")
@@ -832,7 +832,7 @@ local window_openned_at = time()
local chronometer = g:NewSwitch (window, _, "WelcomeWindowChronometer", "WelcomeWindowChronometer", 20, 20, _, _, true)
chronometer:SetAsCheckBox()
chronometer:SetFixedParameter(1)
chronometer:SetTemplate (g:GetTemplate ("switch", "OPTIONS_CHECKBOX_TEMPLATE"))
chronometer:SetTemplate(g:GetTemplate("switch", "OPTIONS_CHECKBOX_TEMPLATE"))
window.ChronometerLabel:SetPoint("left", chronometer, "right", 2, 0)
--continuouses checkbox
@@ -840,7 +840,7 @@ local window_openned_at = time()
local continuous = g:NewSwitch (window, _, "WelcomeWindowContinuous", "WelcomeWindowContinuous", 20, 20, _, _, true)
continuous:SetAsCheckBox()
continuous:SetFixedParameter(1)
continuous:SetTemplate (g:GetTemplate ("switch", "OPTIONS_CHECKBOX_TEMPLATE"))
continuous:SetTemplate(g:GetTemplate("switch", "OPTIONS_CHECKBOX_TEMPLATE"))
window.ContinuousLabel:SetPoint("left", continuous, "right", 2, 0)
--on clkich chronomoeter checkbox
@@ -915,7 +915,7 @@ local window_openned_at = time()
pleasewait:Hide()
pleasewait:SetText("")
forward:Enable()
_detalhes:CancelTimer (window.free_frame3_schedule)
_detalhes:CancelTimer(window.free_frame3_schedule)
window.free_frame3_schedule = nil
end
end
@@ -923,7 +923,7 @@ local window_openned_at = time()
if (window_openned_at-10 > time()) then
forward:Disable()
if (window.free_frame3_schedule) then
_detalhes:CancelTimer (window.free_frame3_schedule)
_detalhes:CancelTimer(window.free_frame3_schedule)
window.free_frame3_schedule = nil
end
window.free_frame3_schedule = _detalhes:ScheduleRepeatingTimer ("FreeTutorialFrame3", 1)
@@ -931,7 +931,7 @@ local window_openned_at = time()
end)
free_frame3:SetScript("OnHide", function()
if (window.free_frame3_schedule) then
_detalhes:CancelTimer (window.free_frame3_schedule)
_detalhes:CancelTimer(window.free_frame3_schedule)
window.free_frame3_schedule = nil
pleasewait:SetText("")
pleasewait:Hide()
@@ -955,7 +955,7 @@ local window_openned_at = time()
bg:SetPoint("bottomright", window, "bottomright", -10, 10)
bg:SetHeight(125*3)--125
bg:SetWidth(89*3)--82
bg:SetAlpha (.05)
bg:SetAlpha(.05)
bg:SetTexCoord (1, 0, 0, 1)
g:NewLabel(window, _, "$parentChangeMind4Label", "changemind4Label", Loc ["STRING_WELCOME_11"], "GameFontNormal", 9, "orange")
@@ -992,7 +992,7 @@ local window_openned_at = time()
g:NewSlider (window, _, "$parentSliderUpdateSpeed", "updatespeedSlider", 160, 20, 0.050, 3, 0.050, _detalhes.update_speed, true) --parent, container, name, member, w, h, min, max, step, defaultv
window.updatespeedSlider:SetPoint("left", window.updatespeedLabel, "right", 2, 0)
window.updatespeedSlider:SetTemplate (g:GetTemplate ("slider", "OPTIONS_SLIDER_TEMPLATE"))
window.updatespeedSlider:SetTemplate(g:GetTemplate("slider", "OPTIONS_SLIDER_TEMPLATE"))
window.updatespeedSlider:SetThumbSize (50)
window.updatespeedSlider.useDecimals = true
local updateColor = function(slider, value)
@@ -1027,7 +1027,7 @@ local window_openned_at = time()
_detalhes:SetUseAnimations (value)
end
window.animateSlider:SetTemplate (g:GetTemplate ("switch", "OPTIONS_CHECKBOX_TEMPLATE"))
window.animateSlider:SetTemplate(g:GetTemplate("switch", "OPTIONS_CHECKBOX_TEMPLATE"))
window.animateSlider:SetAsCheckBox()
--window.animateSlider.tooltip = Loc ["STRING_WELCOME_17"] --removed
@@ -1042,7 +1042,7 @@ local window_openned_at = time()
_detalhes:GetInstance(1):FastPSUpdate (value)
end
window.DpsHpsSlider:SetTemplate (g:GetTemplate ("switch", "OPTIONS_CHECKBOX_TEMPLATE"))
window.DpsHpsSlider:SetTemplate(g:GetTemplate("switch", "OPTIONS_CHECKBOX_TEMPLATE"))
window.DpsHpsSlider:SetAsCheckBox()
--window.DpsHpsSlider.tooltip = Loc ["STRING_WELCOME_64"]
@@ -1054,7 +1054,7 @@ local window_openned_at = time()
-- g:NewSlider (window, _, "$parentSlider", "segmentsSlider", 120, 20, 1, 25, 1, _detalhes.segments_amount) -- min, max, step, defaultv
-- window.segmentsSlider:SetPoint("left", window.segmentsLabel, "right", 2, 0)
-- window.segmentsSlider:SetHook("OnValueChange", function(self, _, amount) --slider, fixedValue, sliderValue
-- _detalhes.segments_amount = math.floor (amount)
-- _detalhes.segments_amount = math.floor(amount)
-- end)
-- window.segmentsSlider.tooltip = Loc ["STRING_WELCOME_22"]
@@ -1064,14 +1064,14 @@ local window_openned_at = time()
mech_icon:SetPoint("topright", window, "topright", -15, -15)
mech_icon:SetWidth(128*0.9)
mech_icon:SetHeight(128*0.9)
mech_icon:SetAlpha (0.8)
mech_icon:SetAlpha(0.8)
local mech_icon2 = window:CreateTexture(nil, "overlay")
mech_icon2:SetTexture([[Interface\Vehicles\UI-Vehicles-Trim-Alliance]])
mech_icon2:SetPoint("topright", window, "topright", -10, -151)
mech_icon2:SetWidth(128*1.0)
mech_icon2:SetHeight(128*0.6)
mech_icon2:SetAlpha (0.6)
mech_icon2:SetAlpha(0.6)
mech_icon2:SetTexCoord (0, 1, 40/128, 1)
mech_icon2:SetDrawLayer ("overlay", 2)
@@ -1122,7 +1122,7 @@ local window_openned_at = time()
bg6:SetPoint("bottomright", window, "bottomright", -10, 10)
bg6:SetHeight(125*3)--125
bg6:SetWidth(89*3)--82
bg6:SetAlpha (.1)
bg6:SetAlpha(.1)
bg6:SetTexCoord (1, 0, 0, 1)
local texto5 = window:CreateFontString (nil, "overlay", "GameFontNormal")
@@ -1152,16 +1152,16 @@ local window_openned_at = time()
stretch_frame_alert:SetScript("OnShow", function()
local instance = _detalhes:GetInstance(1)
_detalhes.OnEnterMainWindow(instance)
instance.baseframe.button_stretch:SetAlpha (1)
instance.baseframe.button_stretch:SetAlpha(1)
frame_alert.alert:SetPoint("topleft", instance.baseframe.button_stretch, "topleft", -20, 6)
frame_alert.alert:SetPoint("bottomright", instance.baseframe.button_stretch, "bottomright", 20, -14)
frame_alert.alert.animOut:Stop()
frame_alert.alert.animIn:Play()
if (_detalhes.stopwelcomealert) then
_detalhes:CancelTimer (_detalhes.stopwelcomealert)
_detalhes:CancelTimer(_detalhes.stopwelcomealert)
end
_detalhes.stopwelcomealert = _detalhes:ScheduleTimer ("StopPlayStretchAlert", 30)
_detalhes.stopwelcomealert = _detalhes:ScheduleTimer("StopPlayStretchAlert", 30)
end)
@@ -1180,7 +1180,7 @@ local window_openned_at = time()
bg6:SetPoint("bottomright", window, "bottomright", -10, 10)
bg6:SetHeight(125*3)--125
bg6:SetWidth(89*3)--82
bg6:SetAlpha (.1)
bg6:SetAlpha(.1)
bg6:SetTexCoord (1, 0, 0, 1)
local texto6 = window:CreateFontString (nil, "overlay", "GameFontNormal")
@@ -1216,9 +1216,9 @@ local window_openned_at = time()
frame_alert.alert.animOut:Stop()
frame_alert.alert.animIn:Play()
if (_detalhes.stopwelcomealert) then
_detalhes:CancelTimer (_detalhes.stopwelcomealert)
_detalhes:CancelTimer(_detalhes.stopwelcomealert)
end
_detalhes.stopwelcomealert = _detalhes:ScheduleTimer ("StopPlayStretchAlert", 30)
_detalhes.stopwelcomealert = _detalhes:ScheduleTimer("StopPlayStretchAlert", 30)
end)
pages [#pages+1] = {bg6, texto6, instance_button_image, texto_instance_button, instance_frame_alert}
@@ -1236,7 +1236,7 @@ local window_openned_at = time()
bg7:SetPoint("bottomright", window, "bottomright", -10, 10)
bg7:SetHeight(125*3)--125
bg7:SetWidth(89*3)--82
bg7:SetAlpha (.1)
bg7:SetAlpha(.1)
bg7:SetTexCoord (1, 0, 0, 1)
local texto7 = window:CreateFontString (nil, "overlay", "GameFontNormal")
@@ -1305,7 +1305,7 @@ local window_openned_at = time()
bg77:SetPoint("bottomright", window, "bottomright", -10, 10)
bg77:SetHeight(125*3)--125
bg77:SetWidth(89*3)--82
bg77:SetAlpha (.1)
bg77:SetAlpha(.1)
bg77:SetTexCoord (1, 0, 0, 1)
local texto77 = window:CreateFontString (nil, "overlay", "GameFontNormal")
@@ -1351,7 +1351,7 @@ local window_openned_at = time()
bg88:SetPoint("bottomright", window, "bottomright", -10, 10)
bg88:SetHeight(125*3)--125
bg88:SetWidth(89*3)--82
bg88:SetAlpha (.1)
bg88:SetAlpha(.1)
bg88:SetTexCoord (1, 0, 0, 1)
local texto88 = window:CreateFontString (nil, "overlay", "GameFontNormal")
@@ -1380,7 +1380,7 @@ local window_openned_at = time()
_detalhes.tabela_historico:resetar()
created_test_bars = 0
local current_combat = _detalhes:GetCombat ("current")
local current_combat = _detalhes:GetCombat("current")
local actors_classes = CLASS_SORT_ORDER
local total_damage = 0
local total_heal = 0
@@ -1450,9 +1450,9 @@ local window_openned_at = time()
frame_alert.alert.animOut:Stop()
frame_alert.alert.animIn:Play()
if (_detalhes.stopwelcomealert) then
_detalhes:CancelTimer (_detalhes.stopwelcomealert)
_detalhes:CancelTimer(_detalhes.stopwelcomealert)
end
_detalhes.stopwelcomealert = _detalhes:ScheduleTimer ("StopPlayStretchAlert", 2)
_detalhes.stopwelcomealert = _detalhes:ScheduleTimer("StopPlayStretchAlert", 2)
end)
@@ -1474,7 +1474,7 @@ local window_openned_at = time()
bg11:SetPoint("bottomright", window, "bottomright", -10, 10)
bg11:SetHeight(125*3)--125
bg11:SetWidth(89*3)--82
bg11:SetAlpha (.1)
bg11:SetAlpha(.1)
bg11:SetTexCoord (1, 0, 0, 1)
local texto11 = window:CreateFontString (nil, "overlay", "GameFontNormal")
@@ -1513,7 +1513,7 @@ local window_openned_at = time()
bg8:SetPoint("bottomright", window, "bottomright", -10, 10)
bg8:SetHeight(125*3)--125
bg8:SetWidth(89*3)--82
bg8:SetAlpha (.1)
bg8:SetAlpha(.1)
bg8:SetTexCoord (1, 0, 0, 1)
local texto8 = window:CreateFontString (nil, "overlay", "GameFontNormal")
@@ -1535,7 +1535,7 @@ local window_openned_at = time()
final_frame:Hide()
final_frame:SetScript("OnShow", function()
cancel:Enable()
cancel:GetNormalTexture():SetDesaturated (false)
cancel:GetNormalTexture():SetDesaturated(false)
end)
pages [#pages+1] = {bg8, texto8, texto, final_frame}
+22 -22
View File
@@ -43,7 +43,7 @@ end
--return the spell object and the spellId
local getSpellObject = function(playerObject, spellId, isLiteral)
local parameterType = type (spellId)
local parameterType = type(spellId)
if (parameterType == "number" and isLiteral) then
--is the id of a spell and literal, directly get the spell object
@@ -357,7 +357,7 @@ function Details.SegmentTotalDamage (segment)
return 0
end
return floor (combatObject.totals_grupo [1])
return floor(combatObject.totals_grupo [1])
end
@@ -394,7 +394,7 @@ function Details.SegmentTotalHealing (segment)
return 0
end
return floor (combatObject.totals_grupo [2])
return floor(combatObject.totals_grupo [2])
end
--[=[
@@ -654,7 +654,7 @@ function Details.UnitDamage (unitId, segment)
return 0
end
return floor (playerObject.total or 0)
return floor(playerObject.total or 0)
end
@@ -714,7 +714,7 @@ function Details.UnitDamageByPhase (unitId, phaseNumber, segment)
end
local phaseDamage = damagePhaseData [unitName] or 0
return floor (phaseDamage)
return floor(phaseDamage)
end
--[=[
@@ -771,10 +771,10 @@ function Details.UnitDamageInfo (unitId, segment)
return damageInfo
end
damageInfo.total = floor (playerObject.total)
damageInfo.totalWithoutPet = floor (playerObject.total_without_pet)
damageInfo.damageAbsorbed = floor (playerObject.totalabsorbed)
damageInfo.damageTaken = floor (playerObject.damage_taken)
damageInfo.total = floor(playerObject.total)
damageInfo.totalWithoutPet = floor(playerObject.total_without_pet)
damageInfo.damageAbsorbed = floor(playerObject.totalabsorbed)
damageInfo.damageTaken = floor(playerObject.damage_taken)
damageInfo.friendlyFire = playerObject.friendlyfire_total
damageInfo.activityTime = playerObject:Tempo()
@@ -1092,7 +1092,7 @@ function Details.UnitDamageTaken (unitId, segment)
return 0
end
return floor (playerObject.damage_taken)
return floor(playerObject.damage_taken)
end
--[=[
@@ -1202,7 +1202,7 @@ function Details.UnitDamageTakenFromSpell (unitId, spellId, isLiteral, segment)
local damageContainer = combatObject:GetContainer (DETAILS_ATTRIBUTE_DAMAGE)
local totalDamageTaken = 0
if (isLiteral and type (spellId) == "number") then
if (isLiteral and type(spellId) == "number") then
for i = 1, #damageContainer._ActorTable do
for thisSpellId, spellObject in pairs(damageContainer._ActorTable [i].spells._ActorTable) do
if (thisSpellId == spellId) then
@@ -1437,7 +1437,7 @@ function Details.UnitHealing (unitId, segment)
return 0
end
return floor (playerObject.total or 0)
return floor(playerObject.total or 0)
end
@@ -1498,14 +1498,14 @@ function Details.UnitHealingInfo (unitId, segment)
return healingInfo
end
healingInfo.total = floor (playerObject.total)
healingInfo.totalWithoutPet = floor (playerObject.total_without_pet)
healingInfo.totalOverhealWithoutPet = floor (playerObject.totalover_without_pet)
healingInfo.overhealing = floor (playerObject.totalover)
healingInfo.absorbed = floor (playerObject.totalabsorb)
healingInfo.healingDenied = floor (playerObject.totaldenied)
healingInfo.healingEnemy = floor (playerObject.heal_enemy_amt)
healingInfo.healingTaken = floor (playerObject.healing_taken)
healingInfo.total = floor(playerObject.total)
healingInfo.totalWithoutPet = floor(playerObject.total_without_pet)
healingInfo.totalOverhealWithoutPet = floor(playerObject.totalover_without_pet)
healingInfo.overhealing = floor(playerObject.totalover)
healingInfo.absorbed = floor(playerObject.totalabsorb)
healingInfo.healingDenied = floor(playerObject.totaldenied)
healingInfo.healingEnemy = floor(playerObject.heal_enemy_amt)
healingInfo.healingTaken = floor(playerObject.healing_taken)
healingInfo.activityTime = playerObject:Tempo()
return healingInfo
@@ -1826,7 +1826,7 @@ function Details.UnitHealingTaken (unitId, segment)
return 0
end
return floor (playerObject.healing_taken)
return floor(playerObject.healing_taken)
end
@@ -1941,7 +1941,7 @@ function Details.UnitHealingTakenFromSpell (unitId, spellId, isLiteral, segment)
local healingContainer = combatObject:GetContainer (DETAILS_ATTRIBUTE_HEAL)
local totalHealingTaken = 0
if (isLiteral and type (spellId) == "number") then
if (isLiteral and type(spellId) == "number") then
for i = 1, #healingContainer._ActorTable do
for thisSpellId, spellObject in pairs(healingContainer._ActorTable [i].spells._ActorTable) do
if (thisSpellId == spellId) then
+1 -1
View File
@@ -2,7 +2,7 @@
do
local _detalhes = _G._detalhes
local Loc = LibStub ("AceLocale-3.0"):GetLocale ( "Details" )
local Loc = LibStub("AceLocale-3.0"):GetLocale ( "Details" )
--Globals
--[[global]] DETAILS_ATTRIBUTE_DAMAGE = 1
+8 -8
View File
@@ -3,7 +3,7 @@ do
local _detalhes = _G._detalhes
_detalhes.EncounterInformation = {}
local _ipairs = ipairs --lua local
local ipairs = ipairs --lua local
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--details api functions
@@ -127,7 +127,7 @@ do
if (t) then
local _end = t.combat_end
if (_end) then
return unpack (_end)
return unpack(_end)
end
end
return
@@ -167,15 +167,15 @@ do
local encounter = _detalhes:GetBossDetails (mapid, bossindex)
local habilidades_poll = {}
if (encounter.continuo) then
for index, spellid in _ipairs(encounter.continuo) do
for index, spellid in ipairs(encounter.continuo) do
habilidades_poll [spellid] = true
end
end
local fases = encounter.phases
if (fases) then
for fase_id, fase in _ipairs(fases) do
for fase_id, fase in ipairs(fases) do
if (fase.spells) then
for index, spellid in _ipairs(fase.spells) do
for index, spellid in ipairs(fase.spells) do
habilidades_poll [spellid] = true
end
end
@@ -230,7 +230,7 @@ do
if (bosstables) then
local bg = bosstables.backgroundFile
if (bg) then
return bg.file, unpack (bg.coords)
return bg.file, unpack(bg.coords)
end
end
end
@@ -326,7 +326,7 @@ do
end
function _detalhes:GetInstanceEJID (mapid)
mapid = mapid or select (8, GetInstanceInfo())
mapid = mapid or select(8, GetInstanceInfo())
if (mapid) then
local instance_info = _detalhes.EncounterInformation [mapid]
if (instance_info) then
@@ -341,7 +341,7 @@ do
local mapID = C_Map.GetBestMapForUnit ("player")
if (not mapID) then
--print ("Details! exeption handled: zone has no map")
--print("Details! exeption handled: zone has no map")
return
end
+9 -9
View File
@@ -47,9 +47,9 @@ function Details:BossModsLink()
Details:OnCombatPhaseChanged()
encounterTable.phase = phase
local currentCombat = Details:GetCurrentCombat()
local time = currentCombat:GetCombatTime()
if (time > 5) then
tinsert(currentCombat.PhaseData, {phase, time})
local combatTime = currentCombat:GetCombatTime()
if (combatTime > 5) then
tinsert(currentCombat.PhaseData, {phase, combatTime})
end
Details:SendEvent("COMBAT_ENCOUNTER_PHASE_CHANGED", nil, phase)
end
@@ -71,15 +71,15 @@ function Details:BossModsLink()
function Details:BigWigs_SetStage (event, module, phase)
phase = tonumber(phase)
if (phase and type (phase) == "number" and Details.encounter_table.phase ~= phase) then
if (phase and type(phase) == "number" and Details.encounter_table.phase ~= phase) then
Details:OnCombatPhaseChanged()
Details.encounter_table.phase = phase
local cur_combat = Details:GetCurrentCombat()
local time = cur_combat:GetCombatTime()
if (time > 5) then
tinsert(cur_combat.PhaseData, {phase, time})
local currentCombat = Details:GetCurrentCombat()
local combatTime = currentCombat:GetCombatTime()
if (combatTime > 5) then
tinsert(currentCombat.PhaseData, {phase, combatTime})
end
Details:SendEvent("COMBAT_ENCOUNTER_PHASE_CHANGED", nil, phase)
@@ -107,7 +107,7 @@ function Details:CreateCallbackListeners()
local event_frame = CreateFrame("frame", nil, UIParent, "BackdropTemplate")
event_frame:SetScript("OnEvent", function(self, event, ...)
if (event == "ENCOUNTER_START") then
local encounterID, encounterName, difficultyID, raidSize = select (1, ...)
local encounterID, encounterName, difficultyID, raidSize = select(1, ...)
current_encounter = encounterID
elseif (event == "ENCOUNTER_END" or event == "PLAYER_REGEN_ENABLED") then
+10 -10
View File
@@ -6,7 +6,7 @@
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
local _detalhes = _G._detalhes
local Loc = LibStub ("AceLocale-3.0"):GetLocale ( "Details" )
local Loc = LibStub("AceLocale-3.0"):GetLocale ( "Details" )
local _
--initialize buffs name container
_detalhes.Buffs.BuffsTable = {} -- armazenara o [nome do buff] = { tabela do buff }
@@ -21,7 +21,7 @@
--local pointers
local _pairs = pairs --lua local
local _ipairs = ipairs --lua local
local ipairs = ipairs --lua local
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--details api functions
@@ -29,14 +29,14 @@
--return if the buff is already registred or not
function _detalhes.Buffs:IsRegistred (buff)
if (type(buff) == "number") then
for _, buffObject in _pairs (_detalhes.Buffs.BuffsTable) do
for _, buffObject in _pairs(_detalhes.Buffs.BuffsTable) do
if (buffObject.id == buff) then
return true
end
end
return false
elseif (type(buff) == "string") then
for name, _ in _pairs (_detalhes.Buffs.BuffsTable) do
for name, _ in _pairs(_detalhes.Buffs.BuffsTable) do
if (name == buff) then
return true
end
@@ -70,7 +70,7 @@
--return a list of registred buffs
function _detalhes.Buffs:GetBuffList()
local list = {}
for name, _ in _pairs (_detalhes.Buffs.BuffsTable) do
for name, _ in _pairs(_detalhes.Buffs.BuffsTable) do
list [#list+1] = name
end
return list
@@ -79,7 +79,7 @@
--return a list of registred buffs ids
function _detalhes.Buffs:GetBuffListIds()
local list = {}
for name, buffObject in _pairs (_detalhes.Buffs.BuffsTable) do
for name, buffObject in _pairs(_detalhes.Buffs.BuffsTable) do
list [#list+1] = buffObject.id
end
return list
@@ -126,7 +126,7 @@
function _detalhes.Buffs:BuildTables()
_detalhes.Buffs.built = true
if (_detalhes.savedbuffs) then
for _, BuffId in _ipairs(_detalhes.savedbuffs) do
for _, BuffId in ipairs(_detalhes.savedbuffs) do
_detalhes.Buffs:NewBuff (nil, BuffId)
end
end
@@ -141,7 +141,7 @@
function _detalhes.Buffs:BuildBuffTable (BuffName, BuffId)
local bufftable = {name = BuffName, id = BuffId, duration = 0, start = nil, castedAmt = 0, refreshAmt = 0, droppedAmt = 0, active = false, appliedAt = {}}
bufftable.IsBuff = true
setmetatable (bufftable, _detalhes.Buffs)
setmetatable(bufftable, _detalhes.Buffs)
return bufftable
end
@@ -153,7 +153,7 @@
_detalhes.Buffs:BuildTables()
end
for _, BuffTable in _pairs (_detalhes.Buffs.BuffsTable) do
for _, BuffTable in _pairs(_detalhes.Buffs.BuffsTable) do
if (BuffTable.active) then
BuffTable.start = _detalhes._tempo
BuffTable.castedAmt = 1
@@ -180,7 +180,7 @@
end
--[[
for index, BuffName in _pairs (_detalhes.SoloTables.BuffsTableNameCache) do
for index, BuffName in _pairs(_detalhes.SoloTables.BuffsTableNameCache) do
if (BuffName == name) then
local BuffObject = _detalhes.SoloTables.SoloBuffUptime [name]
if (not BuffObject) then
+18 -18
View File
@@ -6,82 +6,82 @@ do
-------- container que armazena o cache de pets
_detalhes.container_pets = {}
_detalhes.container_pets.__index = _detalhes.container_pets
setmetatable (_detalhes.container_pets, _detalhes)
setmetatable(_detalhes.container_pets, _detalhes)
-------- time machine controla o tempo em combate dos jogadores
_detalhes.timeMachine = {}
_detalhes.timeMachine.__index = _detalhes.timeMachine
setmetatable (_detalhes.timeMachine, _detalhes)
setmetatable(_detalhes.timeMachine, _detalhes)
-------- classe da tabela que armazenar todos os combates efetuados
_detalhes.historico = {}
_detalhes.historico.__index = _detalhes.historico
setmetatable (_detalhes.historico, _detalhes)
setmetatable(_detalhes.historico, _detalhes)
---------------- classe da tabela onde sero armazenados cada combate efetuado
_detalhes.combate = {}
_detalhes.combate.__index = _detalhes.combate
setmetatable (_detalhes.combate, _detalhes.historico)
setmetatable(_detalhes.combate, _detalhes.historico)
------------------------ armazenas classes de jogadores ou outros derivados
_detalhes.container_combatentes = {}
_detalhes.container_combatentes.__index = _detalhes.container_combatentes
setmetatable (_detalhes.container_combatentes, _detalhes.combate)
setmetatable(_detalhes.container_combatentes, _detalhes.combate)
-------------------------------- dano das habilidades.
_detalhes.atributo_damage = {}
_detalhes.atributo_damage.__index = _detalhes.atributo_damage
setmetatable (_detalhes.atributo_damage, _detalhes.container_combatentes)
setmetatable(_detalhes.atributo_damage, _detalhes.container_combatentes)
-------------------------------- cura das habilidades.
_detalhes.atributo_heal = {}
_detalhes.atributo_heal.__index = _detalhes.atributo_heal
setmetatable (_detalhes.atributo_heal, _detalhes.container_combatentes)
setmetatable(_detalhes.atributo_heal, _detalhes.container_combatentes)
-------------------------------- e_energy ganha
_detalhes.atributo_energy = {}
_detalhes.atributo_energy.__index = _detalhes.atributo_energy
setmetatable (_detalhes.atributo_energy, _detalhes.container_combatentes)
setmetatable(_detalhes.atributo_energy, _detalhes.container_combatentes)
-------------------------------- outros atributos
_detalhes.atributo_misc = {}
_detalhes.atributo_misc.__index = _detalhes.atributo_misc
setmetatable (_detalhes.atributo_misc, _detalhes.container_combatentes)
setmetatable(_detalhes.atributo_misc, _detalhes.container_combatentes)
-------------------------------- atributos customizados
_detalhes.atributo_custom = {}
_detalhes.atributo_custom.__index = _detalhes.atributo_custom
setmetatable (_detalhes.atributo_custom, _detalhes.container_combatentes)
setmetatable(_detalhes.atributo_custom, _detalhes.container_combatentes)
-------------------------------- armazena as classes de habilidades usadas pelo combatente
_detalhes.container_habilidades = {}
_detalhes.container_habilidades.__index = _detalhes.container_habilidades
setmetatable (_detalhes.container_habilidades, _detalhes.combate)
setmetatable(_detalhes.container_habilidades, _detalhes.combate)
---------------------------------------- classe das habilidades que do cura
_detalhes.habilidade_cura = {}
_detalhes.habilidade_cura.__index = _detalhes.habilidade_cura
setmetatable (_detalhes.habilidade_cura, _detalhes.container_habilidades)
setmetatable(_detalhes.habilidade_cura, _detalhes.container_habilidades)
---------------------------------------- classe das habilidades que do danos
_detalhes.habilidade_dano = {}
_detalhes.habilidade_dano.__index = _detalhes.habilidade_dano
setmetatable (_detalhes.habilidade_dano, _detalhes.container_habilidades)
setmetatable(_detalhes.habilidade_dano, _detalhes.container_habilidades)
---------------------------------------- classe das habilidades que do e_energy
_detalhes.habilidade_e_energy = {}
_detalhes.habilidade_e_energy.__index = _detalhes.habilidade_e_energy
setmetatable (_detalhes.habilidade_e_energy, _detalhes.container_habilidades)
setmetatable(_detalhes.habilidade_e_energy, _detalhes.container_habilidades)
---------------------------------------- classe das habilidades variadas
_detalhes.habilidade_misc = {}
_detalhes.habilidade_misc.__index = _detalhes.habilidade_misc
setmetatable (_detalhes.habilidade_misc, _detalhes.container_habilidades)
setmetatable(_detalhes.habilidade_misc, _detalhes.container_habilidades)
---------------------------------------- classe dos alvos das habilidads
_detalhes.alvo_da_habilidade = {}
_detalhes.alvo_da_habilidade.__index = _detalhes.alvo_da_habilidade
setmetatable (_detalhes.alvo_da_habilidade, _detalhes.container_combatentes)
setmetatable(_detalhes.alvo_da_habilidade, _detalhes.container_combatentes)
@@ -125,7 +125,7 @@ do
end
end
function _detalhes:GetOnlyName (string)
function _detalhes:GetOnlyName(string)
if (string) then
return string:gsub (("%-.*"), "")
end
@@ -139,7 +139,7 @@ do
return self.nome:gsub ((" <.*"), "")
end
function _detalhes:GetCLName (id)
function _detalhes:GetCLName(id)
local name, realm = UnitName (id)
if (name) then
if (realm and realm ~= "") then
+1 -1
View File
@@ -503,7 +503,7 @@ function Details.Coach.WelcomePanel()
end, 80, 20, "Start Coaching!")
startCoachButton:SetPoint("bottomright", welcomePanel, "bottomright", -10, 10)
startCoachButton:SetTemplate(DetailsFramework:GetTemplate ("button", "OPTIONS_BUTTON_TEMPLATE"))
startCoachButton:SetTemplate(DetailsFramework:GetTemplate("button", "OPTIONS_BUTTON_TEMPLATE"))
function welcomePanel.Update()
local good = 0
+36 -36
View File
@@ -12,8 +12,8 @@ detailsOnDeathMenu.Debug = false
detailsOnDeathMenu:RegisterEvent ("PLAYER_REGEN_ENABLED")
detailsOnDeathMenu:RegisterEvent ("ENCOUNTER_END")
DetailsFramework:ApplyStandardBackdrop (detailsOnDeathMenu)
detailsOnDeathMenu:SetAlpha (0.75)
DetailsFramework:ApplyStandardBackdrop(detailsOnDeathMenu)
detailsOnDeathMenu:SetAlpha(0.75)
--disable text
detailsOnDeathMenu.disableLabel = Details.gump:CreateLabel(detailsOnDeathMenu, "you can disable this at /details > Raid Tools", 9)
@@ -25,7 +25,7 @@ detailsOnDeathMenu.warningLabel:Hide()
detailsOnDeathMenu:SetScript("OnEvent", function(self, event, ...)
if (event == "ENCOUNTER_END") then
C_Timer.After (0.5, detailsOnDeathMenu.ShowPanel)
C_Timer.After(0.5, detailsOnDeathMenu.ShowPanel)
end
end)
@@ -33,7 +33,7 @@ function detailsOnDeathMenu.OpenEncounterBreakdown()
if (not Details:GetPlugin ("DETAILS_PLUGIN_ENCOUNTER_DETAILS")) then
detailsOnDeathMenu.warningLabel.text = "Encounter Breakdown plugin is disabled! Please enable it in the Addon Control Panel."
detailsOnDeathMenu.warningLabel:Show()
C_Timer.After (5, function()
C_Timer.After(5, function()
detailsOnDeathMenu.warningLabel:Hide()
end)
end
@@ -46,14 +46,14 @@ function detailsOnDeathMenu.OpenPlayerEndurance()
if (not Details:GetPlugin ("DETAILS_PLUGIN_DEATH_GRAPHICS")) then
detailsOnDeathMenu.warningLabel.text = "Advanced Death Logs plugin is disabled! Please enable it (or download) in the Addon Control Panel."
detailsOnDeathMenu.warningLabel:Show()
C_Timer.After (5, function()
C_Timer.After(5, function()
detailsOnDeathMenu.warningLabel:Hide()
end)
end
DetailsPluginContainerWindow.OnMenuClick (nil, nil, "DETAILS_PLUGIN_DEATH_GRAPHICS", true)
C_Timer.After (0, function()
C_Timer.After(0, function()
local a = Details_DeathGraphsModeEnduranceButton and Details_DeathGraphsModeEnduranceButton.MyObject:Click()
end)
@@ -67,7 +67,7 @@ function detailsOnDeathMenu.OpenPlayerSpells()
local window3 = Details:GetWindow (3)
local window4 = Details:GetWindow (4)
local assignedRole = UnitGroupRolesAssigned ("player")
local assignedRole = UnitGroupRolesAssigned("player")
if (assignedRole == "HEALER") then
if (window1 and window1:GetDisplay() == 2) then
Details:OpenPlayerDetails(1)
@@ -106,27 +106,27 @@ function detailsOnDeathMenu.OpenPlayerSpells()
end
--encounter breakdown button
detailsOnDeathMenu.breakdownButton = Details.gump:CreateButton (detailsOnDeathMenu, detailsOnDeathMenu.OpenEncounterBreakdown, 120, 20, "Encounter Breakdown", "breakdownButton")
detailsOnDeathMenu.breakdownButton:SetTemplate (Details.gump:GetTemplate ("button", "DETAILS_PLUGINPANEL_BUTTON_TEMPLATE"))
detailsOnDeathMenu.breakdownButton = Details.gump:CreateButton(detailsOnDeathMenu, detailsOnDeathMenu.OpenEncounterBreakdown, 120, 20, "Encounter Breakdown", "breakdownButton")
detailsOnDeathMenu.breakdownButton:SetTemplate(Details.gump:GetTemplate("button", "DETAILS_PLUGINPANEL_BUTTON_TEMPLATE"))
detailsOnDeathMenu.breakdownButton:SetPoint("topleft", detailsOnDeathMenu, "topleft", 5, -5)
detailsOnDeathMenu.breakdownButton:Hide()
detailsOnDeathMenu.breakdownButton.CoolTip = {
Type = "tooltip",
BuildFunc = function()
GameCooltip2:Preset (2)
GameCooltip2:AddLine ("Show a panel with:")
GameCooltip2:AddLine ("- Player Damage Taken")
GameCooltip2:AddLine ("- Damage Taken by Spell")
GameCooltip2:AddLine ("- Enemy Damage Taken")
GameCooltip2:AddLine ("- Player Deaths")
GameCooltip2:AddLine ("- Interrupts and Dispells")
GameCooltip2:AddLine ("- Damage Done Chart")
GameCooltip2:AddLine ("- Damage Per Phase")
GameCooltip2:AddLine ("- Weakauras Tool")
GameCooltip2:Preset(2)
GameCooltip2:AddLine("Show a panel with:")
GameCooltip2:AddLine("- Player Damage Taken")
GameCooltip2:AddLine("- Damage Taken by Spell")
GameCooltip2:AddLine("- Enemy Damage Taken")
GameCooltip2:AddLine("- Player Deaths")
GameCooltip2:AddLine("- Interrupts and Dispells")
GameCooltip2:AddLine("- Damage Done Chart")
GameCooltip2:AddLine("- Damage Per Phase")
GameCooltip2:AddLine("- Weakauras Tool")
if (not Details:GetPlugin ("DETAILS_PLUGIN_ENCOUNTER_DETAILS")) then
GameCooltip2:AddLine ("Encounter Breakdown plugin is disabled in the Addon Control Panel.", "", 1, "red")
GameCooltip2:AddLine("Encounter Breakdown plugin is disabled in the Addon Control Panel.", "", 1, "red")
end
end, --called when user mouse over the frame
@@ -150,24 +150,24 @@ detailsOnDeathMenu.breakdownButton.CoolTip = {
GameCooltip2:CoolTipInject (detailsOnDeathMenu.breakdownButton)
--player endurance button
detailsOnDeathMenu.enduranceButton = Details.gump:CreateButton (detailsOnDeathMenu, detailsOnDeathMenu.OpenPlayerEndurance, 120, 20, "Player Endurance", "enduranceButton")
detailsOnDeathMenu.enduranceButton:SetTemplate (Details.gump:GetTemplate ("button", "DETAILS_PLUGINPANEL_BUTTON_TEMPLATE"))
detailsOnDeathMenu.enduranceButton = Details.gump:CreateButton(detailsOnDeathMenu, detailsOnDeathMenu.OpenPlayerEndurance, 120, 20, "Player Endurance", "enduranceButton")
detailsOnDeathMenu.enduranceButton:SetTemplate(Details.gump:GetTemplate("button", "DETAILS_PLUGINPANEL_BUTTON_TEMPLATE"))
detailsOnDeathMenu.enduranceButton:SetPoint("topleft", detailsOnDeathMenu.breakdownButton, "topright", 2, 0)
detailsOnDeathMenu.enduranceButton:Hide()
detailsOnDeathMenu.enduranceButton.CoolTip = {
Type = "tooltip",
BuildFunc = function()
GameCooltip2:Preset (2)
GameCooltip2:AddLine ("Open Player Endurance Breakdown")
GameCooltip2:AddLine ("")
GameCooltip2:AddLine ("Player endurance is calculated using the amount of player deaths.")
GameCooltip2:AddLine ("By default the plugin register the three first player deaths on each encounter to calculate who is under performing.")
GameCooltip2:Preset(2)
GameCooltip2:AddLine("Open Player Endurance Breakdown")
GameCooltip2:AddLine("")
GameCooltip2:AddLine("Player endurance is calculated using the amount of player deaths.")
GameCooltip2:AddLine("By default the plugin register the three first player deaths on each encounter to calculate who is under performing.")
--GameCooltip2:AddLine (" ")
--GameCooltip2:AddLine(" ")
if (not Details:GetPlugin ("DETAILS_PLUGIN_DEATH_GRAPHICS")) then
GameCooltip2:AddLine ("Advanced Death Logs plugin is disabled or not installed, check the Addon Control Panel or download it from the Curseforge APP.", "", 1, "red")
GameCooltip2:AddLine("Advanced Death Logs plugin is disabled or not installed, check the Addon Control Panel or download it from the Curseforge APP.", "", 1, "red")
end
end, --called when user mouse over the frame
@@ -191,16 +191,16 @@ detailsOnDeathMenu.enduranceButton.CoolTip = {
GameCooltip2:CoolTipInject (detailsOnDeathMenu.enduranceButton)
--spells
detailsOnDeathMenu.spellsButton = Details.gump:CreateButton (detailsOnDeathMenu, detailsOnDeathMenu.OpenPlayerSpells, 48, 20, "Spells", "SpellsButton")
detailsOnDeathMenu.spellsButton:SetTemplate (Details.gump:GetTemplate ("button", "DETAILS_PLUGINPANEL_BUTTON_TEMPLATE"))
detailsOnDeathMenu.spellsButton = Details.gump:CreateButton(detailsOnDeathMenu, detailsOnDeathMenu.OpenPlayerSpells, 48, 20, "Spells", "SpellsButton")
detailsOnDeathMenu.spellsButton:SetTemplate(Details.gump:GetTemplate("button", "DETAILS_PLUGINPANEL_BUTTON_TEMPLATE"))
detailsOnDeathMenu.spellsButton:SetPoint("topleft", detailsOnDeathMenu.enduranceButton, "topright", 2, 0)
detailsOnDeathMenu.spellsButton:Hide()
detailsOnDeathMenu.spellsButton.CoolTip = {
Type = "tooltip",
BuildFunc = function()
GameCooltip2:Preset (2)
GameCooltip2:AddLine ("Open your player Details! breakdown.")
GameCooltip2:Preset(2)
GameCooltip2:AddLine("Open your player Details! breakdown.")
end, --called when user mouse over the frame
OnEnterFunc = function(self)
@@ -239,13 +239,13 @@ function detailsOnDeathMenu.CanShowPanel()
--check if all players in the raid are out of combat
for i = 1, GetNumGroupMembers() do
if (UnitAffectingCombat ("raid" .. i)) then
C_Timer.After (0.5, detailsOnDeathMenu.ShowPanel)
C_Timer.After(0.5, detailsOnDeathMenu.ShowPanel)
return false
end
end
if (Details.in_combat) then
C_Timer.After (0.5, detailsOnDeathMenu.ShowPanel)
C_Timer.After(0.5, detailsOnDeathMenu.ShowPanel)
return false
end
@@ -292,7 +292,7 @@ end
hooksecurefunc ("StaticPopup_Show", function(which, text_arg1, text_arg2, data, insertedFrame)
if (which == "DEATH") then
if (detailsOnDeathMenu.Debug) then
C_Timer.After (0.5, detailsOnDeathMenu.ShowPanel)
C_Timer.After(0.5, detailsOnDeathMenu.ShowPanel)
end
end
end)
+31 -31
View File
@@ -2,7 +2,7 @@
local Details = _G.Details
local textAlpha = 0.9
local AceLocale = LibStub ("AceLocale-3.0")
local AceLocale = LibStub("AceLocale-3.0")
local L = AceLocale:GetLocale ( "Details" )
local on_deathrecap_line_enter = function(self)
@@ -12,10 +12,10 @@ local on_deathrecap_line_enter = function(self)
self:SetBackdropColor(.3, .3, .3, .2)
GameTooltip:Show()
self.backgroundTextureOverlay:Show()
self.timeAt:SetAlpha (1)
self.sourceName:SetAlpha (1)
self.amount:SetAlpha (1)
self.lifePercent:SetAlpha (1)
self.timeAt:SetAlpha(1)
self.sourceName:SetAlpha(1)
self.amount:SetAlpha(1)
self.lifePercent:SetAlpha(1)
end
end
@@ -23,10 +23,10 @@ local on_deathrecap_line_leave = function(self)
GameTooltip:Hide()
self:SetBackdropColor(.3, .3, .3, 0)
self.backgroundTextureOverlay:Hide()
self.timeAt:SetAlpha (textAlpha)
self.sourceName:SetAlpha (textAlpha)
self.amount:SetAlpha (textAlpha)
self.lifePercent:SetAlpha (textAlpha)
self.timeAt:SetAlpha(textAlpha)
self.sourceName:SetAlpha(textAlpha)
self.amount:SetAlpha(textAlpha)
self.lifePercent:SetAlpha(textAlpha)
end
local create_deathrecap_line = function(parent, n)
@@ -79,10 +79,10 @@ local create_deathrecap_line = function(parent, n)
Details.gump:SetFontSize (sourceName, 10)
--text alpha
timeAt:SetAlpha (textAlpha)
sourceName:SetAlpha (textAlpha)
amount:SetAlpha (textAlpha)
lifePercent:SetAlpha (textAlpha)
timeAt:SetAlpha(textAlpha)
sourceName:SetAlpha(textAlpha)
amount:SetAlpha(textAlpha)
lifePercent:SetAlpha(textAlpha)
--text setup
amount:SetWidth(85)
@@ -97,13 +97,13 @@ local create_deathrecap_line = function(parent, n)
backgroundTexture:SetTexture([[Interface\AddOns\Details\images\deathrecap_background]])
backgroundTexture:SetTexCoord (0, 1, 0, 1)
backgroundTexture:SetVertexColor (.1, .1, .1, .3)
backgroundTexture:SetVertexColor(.1, .1, .1, .3)
--top border
local TopFader = line:CreateTexture(nil, "border")
TopFader:SetTexture([[Interface\AddOns\Details\images\deathrecap_background_top]])
TopFader:SetTexCoord (0, 1, 0, 1)
TopFader:SetVertexColor (.1, .1, .1, .3)
TopFader:SetVertexColor(.1, .1, .1, .3)
TopFader:SetPoint("bottomleft", backgroundTexture, "topleft", 0, -0)
TopFader:SetPoint("bottomright", backgroundTexture, "topright", 0, -0)
TopFader:SetHeight(32)
@@ -115,24 +115,24 @@ local create_deathrecap_line = function(parent, n)
local backgroundTexture2 = line:CreateTexture(nil, "border")
backgroundTexture2:SetTexture([[Interface\AddOns\Details\images\deathrecap_background_bottom]])
backgroundTexture2:SetTexCoord (0, 1, 0, 1)
backgroundTexture2:SetVertexColor (.1, .1, .1, .3)
backgroundTexture2:SetVertexColor(.1, .1, .1, .3)
backgroundTexture2:SetPoint("topleft", backgroundTexture, "bottomleft", 0, 0)
backgroundTexture2:SetPoint("topright", backgroundTexture, "bottomright", 0, 0)
backgroundTexture2:SetHeight(32)
Details.gump:SetFontSize (amount, 14)
Details.gump:SetFontSize (lifePercent, 14)
backgroundTexture:SetVertexColor (.2, .1, .1, .3)
backgroundTexture:SetVertexColor(.2, .1, .1, .3)
end
backgroundTexture:SetPoint("topleft", 0, 1)
backgroundTexture:SetPoint("bottomright", 0, -1)
backgroundTexture:SetDesaturated (true)
backgroundTexture:SetDesaturated(true)
backgroundTextureOverlay:SetTexture([[Interface\AdventureMap\AdventureMap]])
backgroundTextureOverlay:SetTexCoord (460/1024, 659/1024, 330/1024, 350/1024)
backgroundTextureOverlay:SetAllPoints()
backgroundTextureOverlay:SetDesaturated (true)
backgroundTextureOverlay:SetAlpha (0.5)
backgroundTextureOverlay:SetDesaturated(true)
backgroundTextureOverlay:SetAlpha(0.5)
backgroundTextureOverlay:Hide()
line.timeAt = timeAt
@@ -173,7 +173,7 @@ function Details.BuildDeathTableFromRecap (recapID)
{}, --deathlog events
(events [1] and events [1].timestamp) or (DeathRecapFrame and DeathRecapFrame.DeathTimeStamp) or 0, --time of death
UnitName ("player"),
select (2, UnitClass ("player")),
select(2, UnitClass ("player")),
UnitHealthMax ("player"),
"0m 0s", --formated fight time
["dead"] = true,
@@ -272,7 +272,7 @@ function Details.OpenDetailsDeathRecap (segment, RecapID, fromChat)
local segmentButton = CreateFrame("button", "DetailsDeathRecapSegmentButton" .. i, Details.DeathRecap, "BackdropTemplate")
segmentButton:SetSize(16, 20)
segmentButton:SetPoint("topright", DeathRecapFrame, "topright", (-abs (i-6) * 22) - 10, -5)
segmentButton:SetPoint("topright", DeathRecapFrame, "topright", (-abs(i-6) * 22) - 10, -5)
local text = segmentButton:CreateFontString (nil, "overlay", "GameFontNormal")
segmentButton.text = text
@@ -398,7 +398,7 @@ function Details.OpenDetailsDeathRecap (segment, RecapID, fromChat)
end)
for i = #BiggestDamageHits, 1, -1 do
if (BiggestDamageHits [i][4] + relevanceTime < timeOfDeath) then
tremove (BiggestDamageHits, i)
tremove(BiggestDamageHits, i)
end
end
@@ -449,7 +449,7 @@ function Details.OpenDetailsDeathRecap (segment, RecapID, fromChat)
else
--cut table to show only 10 events
while (#BiggestDamageHits > 10) do
tremove (BiggestDamageHits, 11)
tremove(BiggestDamageHits, 11)
end
end
@@ -474,7 +474,7 @@ function Details.OpenDetailsDeathRecap (segment, RecapID, fromChat)
local event = events [i]
local evType = event [1]
local hp = min (floor (event [5] / maxHP * 100), 100)
local hp = min (floor(event [5] / maxHP * 100), 100)
local spellName, _, spellIcon = Details.GetSpellInfo(event [2])
local amount = event [3]
local eventTime = event [4]
@@ -500,7 +500,7 @@ function Details.OpenDetailsDeathRecap (segment, RecapID, fromChat)
if (not sourceClass) then
local combat = Details:GetCurrentCombat()
if (combat) then
local sourceActor = combat:GetActor (1, source)
local sourceActor = combat:GetActor(1, source)
if (sourceActor) then
sourceClass = sourceActor.classe
end
@@ -510,7 +510,7 @@ function Details.OpenDetailsDeathRecap (segment, RecapID, fromChat)
if (not sourceSpec) then
local combat = Details:GetCurrentCombat()
if (combat) then
local sourceActor = combat:GetActor (1, source)
local sourceActor = combat:GetActor(1, source)
if (sourceActor) then
sourceSpec = sourceActor.spec
end
@@ -518,7 +518,7 @@ function Details.OpenDetailsDeathRecap (segment, RecapID, fromChat)
end
--remove real name or owner name
source = Details:GetOnlyName (source)
source = Details:GetOnlyName(source)
--remove owner name
source = source:gsub ((" <.*"), "")
@@ -541,7 +541,7 @@ function Details.OpenDetailsDeathRecap (segment, RecapID, fromChat)
else
source = "Gravity"
end
--/run for a,b in pairs(_G) do if (type(b)=="string" and b:find ("Falling")) then print (a,b) end end
--/run for a,b in pairs(_G) do if (type(b)=="string" and b:find ("Falling")) then print(a,b) end end
end
end
@@ -556,8 +556,8 @@ function Details.OpenDetailsDeathRecap (segment, RecapID, fromChat)
--line.amount:SetText("-" .. Details:ToK (amount))
line.amount:SetText("-" .. Details:comma_value(floor(amount)))
else
--line.amount:SetText("-" .. floor (amount))
line.amount:SetText("-" .. floor (amount))
--line.amount:SetText("-" .. floor(amount))
line.amount:SetText("-" .. floor(amount))
end
line.lifePercent:SetText(hp .. "%")
+298 -313
View File
File diff suppressed because it is too large Load Diff
+9 -9
View File
@@ -2,7 +2,7 @@
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
local _detalhes = _G._detalhes
local Loc = LibStub ("AceLocale-3.0"):GetLocale ( "Details" )
local Loc = LibStub("AceLocale-3.0"):GetLocale ( "Details" )
local _
--Event types:
@@ -189,9 +189,9 @@ local common_events = {
if (not _detalhes.RegistredEvents [event]) then
if (object.Msg) then
object:Msg ("(debug) unknown event", event)
object:Msg("(debug) unknown event", event)
else
_detalhes:Msg ("(debug) unknown event", event)
_detalhes:Msg("(debug) unknown event", event)
end
return
end
@@ -239,7 +239,7 @@ local common_events = {
--internal functions
local dispatch_error = function(name, errortext)
_detalhes:Msg ((name or "<no context>"), " |cFFFF9900error|r: ", errortext)
_detalhes:Msg((name or "<no context>"), " |cFFFF9900error|r: ", errortext)
end
--safe call an external func with payload and without telling who is calling
@@ -374,21 +374,21 @@ local common_events = {
_detalhes:SendEvent("DETAILS_OPTIONS_MODIFIED", nil, instance)
_detalhes.last_options_modified = GetTime()
if (_detalhes.last_options_modified_schedule) then
_detalhes:CancelTimer (_detalhes.last_options_modified_schedule)
_detalhes:CancelTimer(_detalhes.last_options_modified_schedule)
_detalhes.last_options_modified_schedule = nil
end
else
if (_detalhes.last_options_modified_schedule) then
_detalhes:CancelTimer (_detalhes.last_options_modified_schedule)
_detalhes:CancelTimer(_detalhes.last_options_modified_schedule)
end
_detalhes.last_options_modified_schedule = _detalhes:ScheduleTimer ("SendOptionsModifiedEvent", 0.31, instance)
_detalhes.last_options_modified_schedule = _detalhes:ScheduleTimer("SendOptionsModifiedEvent", 0.31, instance)
end
end
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--listeners
local listener_meta = setmetatable ({}, _detalhes)
local listener_meta = setmetatable({}, _detalhes)
listener_meta.__index = listener_meta
function listener_meta:RegisterEvent (event, func)
@@ -400,6 +400,6 @@ local common_events = {
function _detalhes:CreateEventListener()
local new = {Enabled = true, __enabled = true}
setmetatable (new, listener_meta)
setmetatable(new, listener_meta)
return new
end
+17 -17
View File
@@ -2,7 +2,7 @@
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
local _detalhes = _G._detalhes
local Loc = LibStub ("AceLocale-3.0"):GetLocale ( "Details" )
local Loc = LibStub("AceLocale-3.0"):GetLocale ( "Details" )
local _
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
@@ -19,7 +19,7 @@ function _detalhes:ApplyBasicKeys()
--who is
self.playername = UnitName ("player")
self.playerserial = UnitGUID ("player")
self.playerserial = UnitGUID("player")
--player faction and enemy faction
self.faction = UnitFactionGroup ("player")
@@ -64,7 +64,7 @@ function _detalhes:ApplyBasicKeys()
--load default profile keys
for key, value in pairs(_detalhes.default_profile) do
if (type(value) == "table") then
local ctable = Details.CopyTable (value)
local ctable = Details.CopyTable(value)
self [key] = ctable
else
self [key] = value
@@ -86,7 +86,7 @@ function _detalhes:LoadGlobalAndCharacterData()
--it exists?
if (not _detalhes_database) then
_detalhes_database = Details.CopyTable (_detalhes.default_player_data)
_detalhes_database = Details.CopyTable(_detalhes.default_player_data)
end
--load saved values
@@ -95,7 +95,7 @@ function _detalhes:LoadGlobalAndCharacterData()
--check if key exists, e.g. a new key was added
if (_detalhes_database [key] == nil) then
if (type(value) == "table") then
_detalhes_database [key] = Details.CopyTable (_detalhes.default_player_data [key])
_detalhes_database [key] = Details.CopyTable(_detalhes.default_player_data [key])
else
_detalhes_database [key] = value
end
@@ -107,7 +107,7 @@ function _detalhes:LoadGlobalAndCharacterData()
for key2, value2 in pairs(_detalhes.default_player_data [key]) do
if (_detalhes_database [key] [key2] == nil) then
if (type(value2) == "table") then
_detalhes_database [key] [key2] = Details.CopyTable (_detalhes.default_player_data [key] [key2])
_detalhes_database [key] [key2] = Details.CopyTable(_detalhes.default_player_data [key] [key2])
else
_detalhes_database [key] [key2] = value2
end
@@ -117,7 +117,7 @@ function _detalhes:LoadGlobalAndCharacterData()
--copy the key from saved table to details object
if (type(value) == "table") then
_detalhes [key] = Details.CopyTable (_detalhes_database [key])
_detalhes [key] = Details.CopyTable(_detalhes_database [key])
else
_detalhes [key] = _detalhes_database [key]
end
@@ -126,7 +126,7 @@ function _detalhes:LoadGlobalAndCharacterData()
--check and build the default container for account database
if (not _detalhes_global) then
_detalhes_global = Details.CopyTable (_detalhes.default_global_data)
_detalhes_global = Details.CopyTable(_detalhes.default_global_data)
end
for key, value in pairs(_detalhes.default_global_data) do
@@ -134,7 +134,7 @@ function _detalhes:LoadGlobalAndCharacterData()
--check if key exists
if (_detalhes_global [key] == nil) then
if (type(value) == "table") then
_detalhes_global [key] = Details.CopyTable (_detalhes.default_global_data [key])
_detalhes_global [key] = Details.CopyTable(_detalhes.default_global_data [key])
else
_detalhes_global [key] = value
end
@@ -155,7 +155,7 @@ function _detalhes:LoadGlobalAndCharacterData()
for key2, value2 in pairs(_detalhes.default_global_data [key]) do
if (_detalhes_global [key] [key2] == nil) then
if (type(value2) == "table") then
_detalhes_global [key] [key2] = Details.CopyTable (_detalhes.default_global_data [key] [key2])
_detalhes_global [key] [key2] = Details.CopyTable(_detalhes.default_global_data [key] [key2])
else
_detalhes_global [key] [key2] = value2
end
@@ -166,7 +166,7 @@ function _detalhes:LoadGlobalAndCharacterData()
--copy the key from saved table to details object
if (type(value) == "table") then
_detalhes [key] = Details.CopyTable (_detalhes_global [key])
_detalhes [key] = Details.CopyTable(_detalhes_global [key])
else
_detalhes [key] = _detalhes_global [key]
end
@@ -201,7 +201,7 @@ function _detalhes:LoadCombatTables()
-- pets
_detalhes.tabela_pets = _detalhes.container_pets:NovoContainer()
if (_detalhes_database.tabela_pets) then
_detalhes.tabela_pets.pets = Details.CopyTable (_detalhes_database.tabela_pets)
_detalhes.tabela_pets.pets = Details.CopyTable(_detalhes_database.tabela_pets)
end
_detalhes:UpdateContainerCombatentes()
@@ -382,16 +382,16 @@ function _detalhes:LoadConfig()
local instance = _detalhes.tabela_instancias [index]
if (instance) then
saved_skin.__was_opened = instance.ativa
saved_skin.__pos = Details.CopyTable (instance.posicao)
saved_skin.__pos = Details.CopyTable(instance.posicao)
saved_skin.__locked = instance.isLocked
saved_skin.__snap = Details.CopyTable (instance.snap)
saved_skin.__snap = Details.CopyTable(instance.snap)
saved_skin.__snapH = instance.horizontalSnap
saved_skin.__snapV = instance.verticalSnap
for key, value in pairs(instance) do
if (_detalhes.instance_defaults [key] ~= nil) then
if (type(value) == "table") then
saved_skin [key] = Details.CopyTable (value)
saved_skin [key] = Details.CopyTable(value)
else
saved_skin [key] = value
end
@@ -402,14 +402,14 @@ function _detalhes:LoadConfig()
for index, instance in _detalhes:ListInstances() do
_detalhes.local_instances_config [index] = {
pos = Details.CopyTable (instance.posicao),
pos = Details.CopyTable(instance.posicao),
is_open = instance.ativa,
attribute = instance.atributo,
sub_attribute = instance.sub_atributo,
mode = instance.modo or 2,
modo = instance.modo or 2,
segment = instance.segmento,
snap = Details.CopyTable (instance.snap),
snap = Details.CopyTable(instance.snap),
horizontalSnap = instance.horizontalSnap,
verticalSnap = instance.verticalSnap,
sub_atributo_last = instance.sub_atributo_last,
+2 -2
View File
@@ -8,9 +8,9 @@ function Details:OpenPlayerDetails(window)
if (instance) then
local display, subDisplay = instance:GetDisplay()
if (display == 1) then
instance:AbreJanelaInfo (Details:GetPlayer (false, 1))
instance:AbreJanelaInfo (Details:GetPlayer(false, 1))
elseif (display == 2) then
instance:AbreJanelaInfo (Details:GetPlayer (false, 2))
instance:AbreJanelaInfo (Details:GetPlayer(false, 2))
end
end
end
+160 -165
View File
@@ -31,14 +31,14 @@ end
.is_mythic_dungeon_segment = true
.is_mythic_dungeon_run_id = run id from details.profile.mythic_dungeon_id
boss, 'trash overall' and 'dungeon overall' segments have:
.is_mythic_dungeon
.is_mythic_dungeon
boss segments have:
.is_boss
'trash overall' segments have:
.is_mythic_dungeon with .SegmentID = "trashoverall"
'dungeon overall' segment have:
.is_mythic_dungeon with .SegmentID = "overall"
--]]
--precisa converter um wipe em um trash segment? provavel que sim
@@ -46,12 +46,12 @@ end
-- at the end of a mythic run, if enable on settings, merge all the segments from the mythic run into only one
function DetailsMythicPlusFrame.MergeSegmentsOnEnd()
if (DetailsMythicPlusFrame.DevelopmentDebug) then
print ("Details!", "MergeSegmentsOnEnd() > starting to merge mythic segments.", "InCombatLockdown():", InCombatLockdown())
print("Details!", "MergeSegmentsOnEnd() > starting to merge mythic segments.", "InCombatLockdown():", InCombatLockdown())
end
--create a new combat to be the overall for the mythic run
Details:EntrarEmCombate()
--get the current combat just created and the table with all past segments
local newCombat = Details:GetCurrentCombat()
local segmentHistory = Details:GetCombatSegments()
@@ -71,16 +71,16 @@ function DetailsMythicPlusFrame.MergeSegmentsOnEnd()
canAddThisSegment = false
end
end
if (canAddThisSegment) then
newCombat = newCombat + pastCombat
totalTime = totalTime + pastCombat:GetCombatTime()
totalSegments = totalSegments + 1
if (DetailsMythicPlusFrame.DevelopmentDebug) then
print ("MergeSegmentsOnEnd() > adding time:", pastCombat:GetCombatTime(), pastCombat.is_boss and pastCombat.is_boss.name)
print("MergeSegmentsOnEnd() > adding time:", pastCombat:GetCombatTime(), pastCombat.is_boss and pastCombat.is_boss.name)
end
if (endDate == "") then
local _, whenEnded = pastCombat:GetDate()
endDate =whenEnded
@@ -89,18 +89,18 @@ function DetailsMythicPlusFrame.MergeSegmentsOnEnd()
end
end
end
--get the date where the first segment started
if (lastSegment) then
startDate = lastSegment:GetDate()
end
if (DetailsMythicPlusFrame.DevelopmentDebug) then
print ("Details!", "MergeSegmentsOnEnd() > totalTime:", totalTime, "startDate:", startDate)
print("Details!", "MergeSegmentsOnEnd() > totalTime:", totalTime, "startDate:", startDate)
end
local zoneName, instanceType, difficultyID, difficultyName, maxPlayers, dynamicDifficulty, isDynamic, instanceMapID, instanceGroupSize = GetInstanceInfo()
--tag the segment as mythic overall segment
newCombat.is_mythic_dungeon = {
StartedAt = Details.MythicPlus.StartedAt, --the start of the run
@@ -113,12 +113,12 @@ function DetailsMythicPlusFrame.MergeSegmentsOnEnd()
Level = Details.MythicPlus.Level,
EJID = Details.MythicPlus.ejID,
}
newCombat.total_segments_added = totalSegments
newCombat.is_mythic_dungeon_segment = true
newCombat.is_mythic_dungeon_run_id = Details.mythic_dungeon_id
--set the segment time and date
newCombat:SetStartTime (GetTime() - totalTime)
newCombat:SetEndTime (GetTime())
@@ -133,12 +133,12 @@ function DetailsMythicPlusFrame.MergeSegmentsOnEnd()
Details:InstanciaCallFunction(Details.AtualizaSoloMode_AfertReset)
Details:InstanciaCallFunction(Details.ResetaGump)
Details:RefreshMainWindow(-1, true)
if (DetailsMythicPlusFrame.DevelopmentDebug) then
print ("Details!", "MergeSegmentsOnEnd() > finished merging segments.")
print ("Details!", "MergeSegmentsOnEnd() > all done, check in the segments list if everything is correct, if something is weird: '/details feedback' thanks in advance!")
print("Details!", "MergeSegmentsOnEnd() > finished merging segments.")
print("Details!", "MergeSegmentsOnEnd() > all done, check in the segments list if everything is correct, if something is weird: '/details feedback' thanks in advance!")
end
local lower_instance = Details:GetLowerInstanceNumber()
if (lower_instance) then
local instance = Details:GetInstance(lower_instance)
@@ -152,45 +152,45 @@ end
--after each boss fight, if enalbed on settings, create an extra segment with all trash segments from the boss just killed
function DetailsMythicPlusFrame.MergeTrashCleanup (isFromSchedule)
if (DetailsMythicPlusFrame.DevelopmentDebug) then
print ("Details!", "MergeTrashCleanup() > running", DetailsMythicPlusFrame.TrashMergeScheduled and #DetailsMythicPlusFrame.TrashMergeScheduled)
print("Details!", "MergeTrashCleanup() > running", DetailsMythicPlusFrame.TrashMergeScheduled and #DetailsMythicPlusFrame.TrashMergeScheduled)
end
local segmentsToMerge = DetailsMythicPlusFrame.TrashMergeScheduled
--table exists and there's at least one segment
if (segmentsToMerge and segmentsToMerge[1]) then
--the first segment is the segment where all other trash segments will be added
local masterSegment = segmentsToMerge[1]
masterSegment.is_mythic_dungeon_trash = nil
--get the current combat just created and the table with all past segments
local newCombat = masterSegment
local totalTime = newCombat:GetCombatTime()
local startDate, endDate = "", ""
local lastSegment
--add segments
for i = 2, #segmentsToMerge do --segment #1 is the host
local pastCombat = segmentsToMerge[i]
newCombat = newCombat + pastCombat
totalTime = totalTime + pastCombat:GetCombatTime()
--tag this combat as already added to a boss trash overall
pastCombat._trashoverallalreadyadded = true
if (endDate == "") then
local _, whenEnded = pastCombat:GetDate()
endDate = whenEnded
end
lastSegment = pastCombat
end
--get the date where the first segment started
if (lastSegment) then
startDate = lastSegment:GetDate()
end
local zoneName, instanceType, difficultyID, difficultyName, maxPlayers, dynamicDifficulty, isDynamic, instanceMapID, instanceGroupSize = GetInstanceInfo()
--tag the segment as mythic overall segment
@@ -207,19 +207,19 @@ function DetailsMythicPlusFrame.MergeTrashCleanup (isFromSchedule)
EncounterID = segmentsToMerge.EncounterID,
EncounterName = segmentsToMerge.EncounterName or Loc ["STRING_UNKNOW"],
}
newCombat.is_mythic_dungeon_segment = true
newCombat.is_mythic_dungeon_run_id = Details.mythic_dungeon_id
--set the segment time / using a sum of combat times, this combat time is reliable
newCombat:SetStartTime (GetTime() - totalTime)
newCombat:SetEndTime (GetTime())
--set the segment date
newCombat:SetDate (startDate, endDate)
if (DetailsMythicPlusFrame.DevelopmentDebug) then
print ("Details!", "MergeTrashCleanup() > finished merging trash segments.", _detalhes.tabela_vigente, _detalhes.tabela_vigente.is_boss)
end
print("Details!", "MergeTrashCleanup() > finished merging trash segments.", _detalhes.tabela_vigente, _detalhes.tabela_vigente.is_boss)
end
--should delete the trash segments after the merge?
if (_detalhes.mythic_plus.delete_trash_after_merge) then
@@ -227,33 +227,33 @@ function DetailsMythicPlusFrame.MergeTrashCleanup (isFromSchedule)
for i = #segmentHistory, 1, -1 do
local segment = segmentHistory [i]
if (segment and segment._trashoverallalreadyadded) then
tremove (segmentHistory, i)
tremove(segmentHistory, i)
end
end
for i = #segmentsToMerge, 1, -1 do
tremove (segmentsToMerge, i)
tremove(segmentsToMerge, i)
end
Details:SendEvent("DETAILS_DATA_SEGMENTREMOVED")
else
--clear the segments to merge table
for i = #segmentsToMerge, 1, -1 do
tremove (segmentsToMerge, i)
tremove(segmentsToMerge, i)
--notify plugins about a segment deleted
Details:SendEvent("DETAILS_DATA_SEGMENTREMOVED")
end
--clear encounter name and id
segmentsToMerge.EncounterID = nil
segmentsToMerge.EncounterName = nil
end
--update all windows
Details:InstanciaCallFunction (Details.FadeHandler.Fader, "IN", nil, "barras")
Details:InstanciaCallFunction (Details.AtualizaSegmentos)
Details:InstanciaCallFunction (Details.AtualizaSoloMode_AfertReset)
Details:InstanciaCallFunction (Details.ResetaGump)
Details:InstanciaCallFunction(Details.FadeHandler.Fader, "IN", nil, "barras")
Details:InstanciaCallFunction(Details.AtualizaSegmentos)
Details:InstanciaCallFunction(Details.AtualizaSoloMode_AfertReset)
Details:InstanciaCallFunction(Details.ResetaGump)
Details:RefreshMainWindow(-1, true)
end
end
@@ -262,58 +262,58 @@ end
--happens when the group finishes all bosses but don't complete the trash requirement
function DetailsMythicPlusFrame.MergeRemainingTrashAfterAllBossesDone()
if (DetailsMythicPlusFrame.DevelopmentDebug) then
print ("Details!", "MergeRemainingTrashAfterAllBossesDone() > running, #segments: ", #DetailsMythicPlusFrame.TrashMergeScheduled2, "trash overall table:", DetailsMythicPlusFrame.TrashMergeScheduled2_OverallCombat)
print("Details!", "MergeRemainingTrashAfterAllBossesDone() > running, #segments: ", #DetailsMythicPlusFrame.TrashMergeScheduled2, "trash overall table:", DetailsMythicPlusFrame.TrashMergeScheduled2_OverallCombat)
end
local segmentsToMerge = DetailsMythicPlusFrame.TrashMergeScheduled2
local overallCombat = DetailsMythicPlusFrame.TrashMergeScheduled2_OverallCombat
--needs to merge, add the total combat time, set the date end to the date of the first segment
local totalTime = 0
local startDate, endDate = "", ""
local lastSegment
--add segments
for i, pastCombat in ipairs(segmentsToMerge) do
overallCombat = overallCombat + pastCombat
if (DetailsMythicPlusFrame.DevelopmentDebug) then
print ("MergeRemainingTrashAfterAllBossesDone() > segment added")
print("MergeRemainingTrashAfterAllBossesDone() > segment added")
end
totalTime = totalTime + pastCombat:GetCombatTime()
--tag this combat as already added to a boss trash overall
pastCombat._trashoverallalreadyadded = true
if (endDate == "") then --get the end date of the first index only
local _, whenEnded = pastCombat:GetDate()
endDate = whenEnded
end
lastSegment = pastCombat
end
--set the segment time / using a sum of combat times, this combat time is reliable
local startTime = overallCombat:GetStartTime()
overallCombat:SetStartTime (startTime - totalTime)
if (DetailsMythicPlusFrame.DevelopmentDebug) then
print ("MergeRemainingTrashAfterAllBossesDone() > total combat time:", totalTime)
print("MergeRemainingTrashAfterAllBossesDone() > total combat time:", totalTime)
end
--set the segment date
local startDate = overallCombat:GetDate()
overallCombat:SetDate (startDate, endDate)
if (DetailsMythicPlusFrame.DevelopmentDebug) then
print ("MergeRemainingTrashAfterAllBossesDone() > new end date:", endDate)
print("MergeRemainingTrashAfterAllBossesDone() > new end date:", endDate)
end
local mythicDungeonInfo = overallCombat:GetMythicDungeonInfo()
if (DetailsMythicPlusFrame.DevelopmentDebug) then
print ("MergeRemainingTrashAfterAllBossesDone() > elapsed time before:", mythicDungeonInfo.EndedAt - mythicDungeonInfo.StartedAt)
print("MergeRemainingTrashAfterAllBossesDone() > elapsed time before:", mythicDungeonInfo.EndedAt - mythicDungeonInfo.StartedAt)
end
mythicDungeonInfo.StartedAt = mythicDungeonInfo.StartedAt - (Details.MythicPlus.EndedAt - Details.MythicPlus.PreviousBossKilledAt)
if (DetailsMythicPlusFrame.DevelopmentDebug) then
print ("MergeRemainingTrashAfterAllBossesDone() > elapsed time after:", mythicDungeonInfo.EndedAt - mythicDungeonInfo.StartedAt)
print("MergeRemainingTrashAfterAllBossesDone() > elapsed time after:", mythicDungeonInfo.EndedAt - mythicDungeonInfo.StartedAt)
end
--should delete the trash segments after the merge?
if (_detalhes.mythic_plus.delete_trash_after_merge) then
local removedCurrentSegment = false
@@ -326,27 +326,27 @@ function DetailsMythicPlusFrame.MergeRemainingTrashAfterAllBossesDone()
if (_detalhes.tabela_vigente == segment) then
removedCurrentSegment = true
end
tremove (segmentHistory, i)
tremove(segmentHistory, i)
break
end
end
end
for i = #segmentsToMerge, 1, -1 do
tremove (segmentsToMerge, i)
tremove(segmentsToMerge, i)
end
if (removedCurrentSegment) then
--find another current segment
local segmentHistory = Details:GetCombatSegments()
_detalhes.tabela_vigente = segmentHistory [1]
if (not _detalhes.tabela_vigente) then
--assuming there's no segment from the dungeon run
Details:EntrarEmCombate()
Details:SairDoCombate()
end
--update all windows
Details:InstanciaCallFunction(Details.FadeHandler.Fader, "IN", nil, "barras")
Details:InstanciaCallFunction(Details.AtualizaSegmentos)
@@ -354,12 +354,12 @@ function DetailsMythicPlusFrame.MergeRemainingTrashAfterAllBossesDone()
Details:InstanciaCallFunction(Details.ResetaGump)
Details:RefreshMainWindow(-1, true)
end
Details:SendEvent("DETAILS_DATA_SEGMENTREMOVED")
else
--clear the segments to merge table
for i = #segmentsToMerge, 1, -1 do
tremove (segmentsToMerge, i)
tremove(segmentsToMerge, i)
--notify plugins about a segment deleted
Details:SendEvent("DETAILS_DATA_SEGMENTREMOVED")
end
@@ -369,7 +369,7 @@ function DetailsMythicPlusFrame.MergeRemainingTrashAfterAllBossesDone()
DetailsMythicPlusFrame.TrashMergeScheduled2_OverallCombat = nil
if (DetailsMythicPlusFrame.DevelopmentDebug) then
print ("Details!", "MergeRemainingTrashAfterAllBossesDone() > done merging")
print("Details!", "MergeRemainingTrashAfterAllBossesDone() > done merging")
end
end
@@ -377,11 +377,11 @@ end
--it comes from details! control leave combat
function DetailsMythicPlusFrame.BossDefeated (this_is_end_end, encounterID, encounterName, difficultyID, raidSize, endStatus) --hold your breath and count to ten
if (DetailsMythicPlusFrame.DevelopmentDebug) then
print ("Details!", "BossDefeated() > boss defeated | SegmentID:", Details.MythicPlus.SegmentID, " | mapID:", Details.MythicPlus.DungeonID)
print("Details!", "BossDefeated() > boss defeated | SegmentID:", Details.MythicPlus.SegmentID, " | mapID:", Details.MythicPlus.DungeonID)
end
local zoneName, instanceType, difficultyID, difficultyName, maxPlayers, dynamicDifficulty, isDynamic, instanceMapID, instanceGroupSize = GetInstanceInfo()
--add the mythic dungeon info to the combat
_detalhes.tabela_vigente.is_mythic_dungeon = {
StartedAt = Details.MythicPlus.StartedAt, --the start of the run
@@ -404,7 +404,7 @@ function DetailsMythicPlusFrame.BossDefeated (this_is_end_end, encounterID, enco
--table with all past semgnets
local segmentHistory = Details:GetCombatSegments()
--iterate among segments
for i = 1, 25 do --from the newer combat to the oldest
local pastCombat = segmentHistory [i]
@@ -413,7 +413,7 @@ function DetailsMythicPlusFrame.BossDefeated (this_is_end_end, encounterID, enco
--is the combat a mythic segment from this run?
local isMythicSegment, SegmentID = pastCombat:IsMythicDungeon()
if (isMythicSegment and SegmentID == Details.mythic_dungeon_id and not pastCombat.is_boss) then
local mythicDungeonInfo = pastCombat:GetMythicDungeonInfo() -- .is_mythic_dungeon only boss, trash overall and run overall have it
if (not mythicDungeonInfo or not mythicDungeonInfo.TrashOverallSegment) then
--trash segment found, schedule to merge
@@ -422,27 +422,27 @@ function DetailsMythicPlusFrame.BossDefeated (this_is_end_end, encounterID, enco
end
end
end
--add encounter information
segmentsToMerge.EncounterID = encounterID
segmentsToMerge.EncounterName = encounterName
segmentsToMerge.PreviousBossKilledAt = Details.MythicPlus.PreviousBossKilledAt
--reduce this boss encounter time from the trash lenght time, since the boss doesn't count towards the time spent cleaning trash
segmentsToMerge.LastBossKilledAt = time() - _detalhes.tabela_vigente:GetCombatTime()
DetailsMythicPlusFrame.TrashMergeScheduled = segmentsToMerge
--there's no more script run too long
--if (not InCombatLockdown() and not UnitAffectingCombat ("player")) then
if (DetailsMythicPlusFrame.DevelopmentDebug) then
print ("Details!", "BossDefeated() > not in combat, merging trash now")
print("Details!", "BossDefeated() > not in combat, merging trash now")
end
--merge the trash clean up
DetailsMythicPlusFrame.MergeTrashCleanup()
--else
-- if (DetailsMythicPlusFrame.DevelopmentDebug) then
-- print ("Details!", "BossDefeated() > player in combatlockdown, scheduling trash merge")
-- print("Details!", "BossDefeated() > player in combatlockdown, scheduling trash merge")
-- end
-- _detalhes.schedule_mythicdungeon_trash_merge = true
--end
@@ -459,13 +459,13 @@ function DetailsMythicPlusFrame.BossDefeated (this_is_end_end, encounterID, enco
if (Details.mythic_plus.always_in_combat) then
Details:EntrarEmCombate()
end
--increase the segment number for the mythic run
Details.MythicPlus.SegmentID = Details.MythicPlus.SegmentID + 1
--register the time when the last boss has been killed (started a clean up for the next trash)
Details.MythicPlus.PreviousBossKilledAt = time()
--update the saved table inside the profile
_detalhes:UpdateState_CurrentMythicDungeonRun (true, Details.MythicPlus.SegmentID, Details.MythicPlus.PreviousBossKilledAt)
end
@@ -474,75 +474,75 @@ end
function DetailsMythicPlusFrame.MythicDungeonFinished (fromZoneLeft)
if (DetailsMythicPlusFrame.IsDoingMythicDungeon) then
if (DetailsMythicPlusFrame.DevelopmentDebug) then
print ("Details!", "MythicDungeonFinished() > the dungeon was a Mythic+ and just ended.")
print("Details!", "MythicDungeonFinished() > the dungeon was a Mythic+ and just ended.")
end
DetailsMythicPlusFrame.IsDoingMythicDungeon = false
Details.MythicPlus.Started = false
Details.MythicPlus.EndedAt = time()-1.9
Details:UpdateState_CurrentMythicDungeonRun()
--at this point, details! should not be in combat, but if something triggered a combat start, just close the combat right away
if (Details.in_combat) then
if (DetailsMythicPlusFrame.DevelopmentDebug) then
print ("Details!", "MythicDungeonFinished() > was in combat, calling SairDoCombate():", InCombatLockdown())
print("Details!", "MythicDungeonFinished() > was in combat, calling SairDoCombate():", InCombatLockdown())
end
Details:SairDoCombate()
end
local segmentsToMerge = {}
--check if there is trash segments after the last boss. need to merge these segments with the trash segment of the last boss
if (_detalhes.mythic_plus.merge_boss_trash and not Details.MythicPlus.IsRestoredState and not fromZoneLeft) then
--is the current combat not a boss fight?
--is the current combat not a boss fight?
--this mean a combat was opened after the last boss of the dungeon was killed
if (not Details.tabela_vigente.is_boss and Details.tabela_vigente:GetCombatTime() > 5) then
if (DetailsMythicPlusFrame.DevelopmentDebug) then
print ("Details!", "MythicDungeonFinished() > the last combat isn't a boss fight, might have trash after bosses done.")
print("Details!", "MythicDungeonFinished() > the last combat isn't a boss fight, might have trash after bosses done.")
end
--table with all past semgnets
local segmentHistory = Details:GetCombatSegments()
for i = 1, #segmentHistory do
local pastCombat = segmentHistory [i]
--does the combat exists
if (pastCombat and not pastCombat._trashoverallalreadyadded and pastCombat:GetCombatTime() > 5) then
--is the last boss?
if (pastCombat.is_boss) then
break
end
--is the combat a mythic segment from this run?
local isMythicSegment, SegmentID = pastCombat:IsMythicDungeon()
if (isMythicSegment and SegmentID == Details.mythic_dungeon_id and pastCombat.is_mythic_dungeon_trash) then
--if have mythic dungeon info, cancel the loop
local mythicDungeonInfo = pastCombat:GetMythicDungeonInfo()
if (mythicDungeonInfo) then
break
end
--merge this segment
tinsert(segmentsToMerge, pastCombat)
if (DetailsMythicPlusFrame.DevelopmentDebug) then
print ("MythicDungeonFinished() > found after last boss combat")
print("MythicDungeonFinished() > found after last boss combat")
end
end
end
end
end
end
if (#segmentsToMerge > 0) then
if (DetailsMythicPlusFrame.DevelopmentDebug) then
print ("Details!", "MythicDungeonFinished() > found ", #segmentsToMerge, "segments after the last boss")
print("Details!", "MythicDungeonFinished() > found ", #segmentsToMerge, "segments after the last boss")
end
--find the latest trash overall
local segmentHistory = Details:GetCombatSegments()
local latestTrashOverall
@@ -553,45 +553,45 @@ function DetailsMythicPlusFrame.MythicDungeonFinished (fromZoneLeft)
break
end
end
if (latestTrashOverall) then
--stores the segment table and the trash overall segment to use on the merge
DetailsMythicPlusFrame.TrashMergeScheduled2 = segmentsToMerge
DetailsMythicPlusFrame.TrashMergeScheduled2_OverallCombat = latestTrashOverall
--there's no more script ran too long
--if (not InCombatLockdown() and not UnitAffectingCombat ("player")) then
if (DetailsMythicPlusFrame.DevelopmentDebug) then
print ("Details!", "MythicDungeonFinished() > not in combat, merging last pack of trash now")
print("Details!", "MythicDungeonFinished() > not in combat, merging last pack of trash now")
end
DetailsMythicPlusFrame.MergeRemainingTrashAfterAllBossesDone()
--else
-- if (DetailsMythicPlusFrame.DevelopmentDebug) then
-- print ("Details!", "MythicDungeonFinished() > player in combatlockdown, scheduling the merge for last trash packs")
-- print("Details!", "MythicDungeonFinished() > player in combatlockdown, scheduling the merge for last trash packs")
-- end
-- _detalhes.schedule_mythicdungeon_endtrash_merge = true
--end
end
end
--merge segments
if (_detalhes.mythic_plus.make_overall_when_done and not Details.MythicPlus.IsRestoredState and not fromZoneLeft) then
--if (not InCombatLockdown() and not UnitAffectingCombat ("player")) then
if (DetailsMythicPlusFrame.DevelopmentDebug) then
print ("Details!", "MythicDungeonFinished() > not in combat, creating overall segment now")
print("Details!", "MythicDungeonFinished() > not in combat, creating overall segment now")
end
DetailsMythicPlusFrame.MergeSegmentsOnEnd()
--else
-- if (DetailsMythicPlusFrame.DevelopmentDebug) then
-- print ("Details!", "MythicDungeonFinished() > player in combatlockdown, scheduling the creation of the overall segment")
-- print("Details!", "MythicDungeonFinished() > player in combatlockdown, scheduling the creation of the overall segment")
-- end
-- _detalhes.schedule_mythicdungeon_overallrun_merge = true
--end
end
Details.MythicPlus.IsRestoredState = nil
--shutdown parser for a few seconds to avoid opening new segments after the run ends
if (not fromZoneLeft) then
Details:CaptureSet (false, "damage", false, 15)
@@ -600,23 +600,23 @@ function DetailsMythicPlusFrame.MythicDungeonFinished (fromZoneLeft)
Details:CaptureSet (false, "energy", false, 15)
Details:CaptureSet (false, "spellcast", false, 15)
end
--store data
--[=[
local expansion = tostring (select (4, GetBuildInfo())):match ("%d%d")
if (expansion and type (expansion) == "string" and string.len (expansion) == 2) then
local expansion = tostring (select(4, GetBuildInfo())):match ("%d%d")
if (expansion and type(expansion) == "string" and string.len(expansion) == 2) then
local expansionDungeonData = _detalhes.dungeon_data [expansion]
if (not expansionDungeonData) then
expansionDungeonData = {}
_detalhes.dungeon_data [expansion] = expansionDungeonData
end
--store information about the dungeon run
--the the dungeon ID, can't be localized
--players in the group
--difficulty level
--
end
--]=]
end
@@ -625,19 +625,19 @@ end
function DetailsMythicPlusFrame.MythicDungeonStarted()
--flag as a mythic dungeon
DetailsMythicPlusFrame.IsDoingMythicDungeon = true
--this counter is individual for each character
Details.mythic_dungeon_id = Details.mythic_dungeon_id + 1
local mythicLevel = C_ChallengeMode.GetActiveKeystoneInfo()
local zoneName, _, _, _, _, _, _, currentZoneID = GetInstanceInfo()
local mapID = C_Map.GetBestMapForUnit ("player")
if (not mapID) then
return
end
local ejID = DF.EncounterJournal.EJ_GetInstanceForMap (mapID)
--setup the mythic run info
@@ -652,31 +652,31 @@ function DetailsMythicPlusFrame.MythicDungeonStarted()
Details.MythicPlus.PreviousBossKilledAt = time()
Details:SaveState_CurrentMythicDungeonRun (Details.mythic_dungeon_id, zoneName, currentZoneID, time()+9.7, 1, mythicLevel, ejID, time())
--start a new combat segment after 10 seconds
if (_detalhes.mythic_plus.always_in_combat) then
C_Timer.After (9.7, function()
C_Timer.After(9.7, function()
if (DetailsMythicPlusFrame.DevelopmentDebug) then
print ("Details!", "New segment for mythic dungeon created.")
print("Details!", "New segment for mythic dungeon created.")
end
_detalhes:EntrarEmCombate()
end)
end
local name, groupType, difficultyID, difficult = GetInstanceInfo()
if (groupType == "party" and Details.overall_clear_newchallenge) then
Details.historico:resetar_overall()
Details:Msg("overall data are now reset.")
if (Details.debug) then
Details:Msg("(debug) timer is for a mythic+ dungeon, overall has been reseted.")
end
end
if (DetailsMythicPlusFrame.DevelopmentDebug) then
print ("Details!", "MythicDungeonStarted() > State set to Mythic Dungeon, new combat starting in 10 seconds.")
print("Details!", "MythicDungeonStarted() > State set to Mythic Dungeon, new combat starting in 10 seconds.")
end
end
function DetailsMythicPlusFrame.OnChallengeModeStart()
@@ -699,7 +699,7 @@ function DetailsMythicPlusFrame.OnChallengeModeStart()
--print("currentZoneID", currentZoneID)
--print("Details.MythicPlus.Level", Details.MythicPlus.Level)
--print("mythicLevel", mythicLevel)
if (not Details.MythicPlus.Started and Details.MythicPlus.DungeonID == currentZoneID and Details.MythicPlus.Level == mythicLevel) then
Details.MythicPlus.Started = true
Details.MythicPlus.EndedAt = nil
@@ -720,11 +720,11 @@ DetailsMythicPlusFrame.EventListener:RegisterEvent ("COMBAT_PLAYER_LEAVE")
DetailsMythicPlusFrame.EventListener:RegisterEvent ("COMBAT_MYTHICDUNGEON_START")
DetailsMythicPlusFrame.EventListener:RegisterEvent ("COMBAT_MYTHICDUNGEON_END")
function DetailsMythicPlusFrame.EventListener.OnDetailsEvent (contextObject, event, ...)
function DetailsMythicPlusFrame.EventListener.OnDetailsEvent(contextObject, event, ...)
--these events triggers within Details control functions, they run exactly after details! creates or close a segment
if (event == "COMBAT_PLAYER_ENTER") then
elseif (event == "COMBAT_PLAYER_LEAVE") then
--ignore the event if ignoring mythic dungeon special treatment
if (_detalhes.streamer_config.disable_mythic_dungeon) then
@@ -733,13 +733,13 @@ function DetailsMythicPlusFrame.EventListener.OnDetailsEvent (contextObject, eve
if (DetailsMythicPlusFrame.IsDoingMythicDungeon) then
local combatObject = ...
if (combatObject.is_boss) then
if (not combatObject.is_boss.killed) then
--just in case the combat get tagged as boss fight
Details.tabela_vigente.is_boss = nil
--tag the combat as mythic dungeon trash
local zoneName, instanceType, difficultyID, difficultyName, maxPlayers, dynamicDifficulty, isDynamic, instanceMapID, instanceGroupSize = GetInstanceInfo()
Details.tabela_vigente.is_mythic_dungeon_trash = {
@@ -752,34 +752,34 @@ function DetailsMythicPlusFrame.EventListener.OnDetailsEvent (contextObject, eve
DetailsMythicPlusFrame.BossDefeated (false, combatObject.is_boss.id, combatObject.is_boss.name, combatObject.is_boss.diff, 5, 1)
end
end
end
elseif (event == "COMBAT_ENCOUNTER_START") then
--ignore the event if ignoring mythic dungeon special treatment
if (_detalhes.streamer_config.disable_mythic_dungeon) then
return
end
local encounterID, encounterName, difficultyID, raidSize, endStatus = ...
--nothing
elseif (event == "COMBAT_ENCOUNTER_END") then
--ignore the event if ignoring mythic dungeon special treatment
if (_detalhes.streamer_config.disable_mythic_dungeon) then
return
end
local encounterID, encounterName, difficultyID, raidSize, endStatus = ...
--nothing
elseif (event == "COMBAT_MYTHICDUNGEON_START") then
print("COMBAT_MYTHICDUNGEON_START", ...)
local lower_instance = _detalhes:GetLowerInstanceNumber()
if (lower_instance) then
lower_instance = _detalhes:GetInstance(lower_instance)
if (lower_instance) then
C_Timer.After (3, function()
C_Timer.After(3, function()
if (lower_instance:IsEnabled()) then
--todo, need localization
lower_instance:InstanceAlert ("Details!" .. " " .. "Damage" .. " " .. "Meter", {[[Interface\AddOns\Details\images\minimap]], 16, 16, false}, 3, {function() end}, false, true)
@@ -787,67 +787,62 @@ function DetailsMythicPlusFrame.EventListener.OnDetailsEvent (contextObject, eve
end)
end
end
--ignore the event if ignoring mythic dungeon special treatment
if (_detalhes.streamer_config.disable_mythic_dungeon) then
return
end
--reset spec cache if broadcaster requested
if (_detalhes.streamer_config.reset_spec_cache) then
wipe (_detalhes.cached_specs)
end
C_Timer.After (0.5, DetailsMythicPlusFrame.OnChallengeModeStart)
C_Timer.After(0.5, DetailsMythicPlusFrame.OnChallengeModeStart)
elseif (event == "COMBAT_MYTHICDUNGEON_END") then
--ignore the event if ignoring mythic dungeon special treatment
if (_detalhes.streamer_config.disable_mythic_dungeon) then
return
end
--delay to wait the encounter_end trigger first
--assuming here the party cleaned the mobs kill objective before going to kill the last boss
C_Timer.After (2, DetailsMythicPlusFrame.MythicDungeonFinished)
C_Timer.After(2, DetailsMythicPlusFrame.MythicDungeonFinished)
end
end
DetailsMythicPlusFrame:SetScript("OnEvent", function(_, event, ...)
if (event == "START_TIMER") then
DetailsMythicPlusFrame.LastTimer = GetTime()
elseif (event == "ZONE_CHANGED_NEW_AREA") then
if (DetailsMythicPlusFrame.IsDoingMythicDungeon) then
if (DetailsMythicPlusFrame.DevelopmentDebug) then
print ("Details!", event, ...)
print ("Zone changed and is Doing Mythic Dungeon")
print("Details!", event, ...)
print("Zone changed and is Doing Mythic Dungeon")
end
--ignore the event if ignoring mythic dungeon special treatment
if (_detalhes.streamer_config.disable_mythic_dungeon) then
return
end
local _, _, difficulty, _, _, _, _, currentZoneID = GetInstanceInfo()
if (currentZoneID ~= Details.MythicPlus.DungeonID) then
if (DetailsMythicPlusFrame.DevelopmentDebug) then
print ("Zone changed and the zone is different than the dungeon")
print("Zone changed and the zone is different than the dungeon")
end
--send mythic dungeon end event
_detalhes:SendEvent("COMBAT_MYTHICDUNGEON_END")
--finish the segment
DetailsMythicPlusFrame.BossDefeated (true)
--finish the mythic run
DetailsMythicPlusFrame.MythicDungeonFinished (true)
end
end
end
end)
+1 -1
View File
@@ -273,7 +273,7 @@ local unpackActorFlag = function(flag)
end
local isActorInGroup = function(class, flag)
if (bit.band (flag, IS_GROUP_OBJECT) ~= 0 and class ~= "UNKNOW" and class ~= "UNGROUPPLAYER" and class ~= "PET") then
if (bit.band(flag, IS_GROUP_OBJECT) ~= 0 and class ~= "UNKNOW" and class ~= "UNGROUPPLAYER" and class ~= "PET") then
return true
end
return false

Some files were not shown because too many files have changed in this diff Show More