- Plugin Vanguard: got full rewrite and now it is more easy to use.

- Plugin TimeAttack: fixed problem where sometimes required a reload to start a new time.
- Plugin Damage the Game!: fixed a problem where sometimes the time didn't started after level 2.
- Custom display 'Health Potion & Stone' now also track Healing Tonic.
- Custom display 'Damage Taken by Spell' now track more spells and also melee hits.
- Menus now uses 'Friz Quadrata TT' font as default, also added an option to change it on options panel -> miscellaneous.
- 'Switch to Current' feature now switches all windows which have this option enabled.
- The message telling to use '/details reinstall' now only shows if a problem happen during the addon load process.
- Segments Saved option now can be set to 25, up from 5.
- Attempt to fix the bug with the monk spell 'Storm, Earth, and Fire'.
- Fixed 'Icon Pick' panel.
- Fixed bug when reporting friendly fire through player detail window.
- Fixed bug with report window where sometimes it was reporting on a wrong channel.
This commit is contained in:
Tercio
2015-01-16 03:44:29 -02:00
parent 23f8ca025e
commit b6d51315a5
36 changed files with 2169 additions and 1612 deletions
+21 -30
View File
File diff suppressed because one or more lines are too long
+127 -81
View File
@@ -625,7 +625,7 @@
else
if (self.id) then
esta_barra.icone_classe:SetTexCoord (0, 1, 0, 1)
esta_barra.icone_classe:SetTexCoord (0.078125, 0.921875, 0.078125, 0.921875)
esta_barra.icone_classe:SetTexture (self.icon)
else
esta_barra.icone_classe:SetTexture (instancia.row_info.icon_file)
@@ -1250,7 +1250,7 @@
end
------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-- /run _detalhes:AddDefaultCustomDisplays()
local Healthstone = {
name = Loc ["STRING_CUSTOM_HEALTHSTONE_DEFAULT"],
icon = [[Interface\ICONS\warlock_ healthstone]],
@@ -1272,7 +1272,7 @@
local AllSpells = character:GetSpellList()
local found = false
for spellid, spell in pairs (AllSpells) do
if (spellid == 6262 or spellid == 156445) then
if (spellid == 6262 or spellid == 156445 or spellid == 156438) then --healthstone, reju potion, health potion
instance_container:AddValue (character, spell.total)
total = total + spell.total
if (top < spell.total) then
@@ -1297,6 +1297,7 @@
--get the cooltip object (we dont use the convencional GameTooltip here)
local GameCooltip = GameCooltip
local R, G, B, A = 0, 0, 0, 0.75
local hs = actor:GetSpell (6262)
if (hs) then
GameCooltip:AddLine (select (1, GetSpellInfo(6262)), _detalhes:ToK(hs.total))
@@ -1310,11 +1311,19 @@
GameCooltip:AddIcon (select (3, GetSpellInfo (156445)), 1, 1, 16, 16)
GameCooltip:AddStatusBar (100, 1, R, G, B, A)
end
local pot = actor:GetSpell (156438)
if (pot) then
GameCooltip:AddLine (select (1, GetSpellInfo(156438)), _detalhes:ToK(pot.total))
GameCooltip:AddIcon (select (3, GetSpellInfo (156438)), 1, 1, 16, 16)
GameCooltip:AddStatusBar (100, 1, R, G, B, A)
end
--Cooltip code
]],
percent_script = false,
total_script = false,
script_version = 3,
script_version = 9,
}
-- /run_detalhes:AddDefaultCustomDisplays()
local have = false
@@ -1476,14 +1485,12 @@
desc = Loc ["STRING_CUSTOM_DTBS_DESC"],
source = false,
target = false,
script_version = 8,
script_version = 13,
script = [[
--> get the parameters passed
local combat, instance_container, instance = ...
--> declade the values to return
local total, top, amount = 0, 0, 0
--> get a list of all damage actors
local AllDamageCharacters = combat:GetActorList (DETAILS_ATTRIBUTE_DAMAGE)
@@ -1492,49 +1499,77 @@
--> do a loop amoung the actors
for index, character in ipairs (AllDamageCharacters) do
--> is the actor a enemy?
if (character:IsPlayer()) then
--> is the actor a enemy?
if (character:IsEnemy()) then
local AllSpells = character:GetSpellList()
local taken_from = character.damage_from
for source_name, _ in pairs (taken_from) do
local source = combat (1, source_name)
if (source) then
local AllSpells = source:GetSpellList()
for spellid, spell in pairs (AllSpells) do
if (spell.total >= 1 and spellid > 10) then
instance_container:AddValue (spell, spell.total)
total = total + spell.total
if (top < spell.total) then
top = spell.total
end
if (not NoRepeat [spellid]) then
amount = amount + 1
NoRepeat [spellid] = true
end
local on_player = spell.targets [character.nome]
if (on_player and on_player >= 1) then
instance_container:AddValue (spell, on_player)
total = total + on_player
local value = instance_container:GetValue (spell)
if (value > top) then
top = value
end
if (not NoRepeat [spellid]) then
amount = amount + 1
NoRepeat [spellid] = true
end
end
end
end
-------------
local friendlyfire = source.friendlyfire [character.nome]
if (friendlyfire and friendlyfire.total >= 1) then
for _spellid, _on_player in pairs (friendlyfire.spells) do
local _spellname = GetSpellInfo (_spellid)
local _object
local _index = instance_container._NameIndexTable [_spellname]
if (_index) then
_object = instance_container._ActorTable [_index]
else
_object = {id = _spellid, spellschool = 1}
end
instance_container:AddValue (_object, _on_player)
total = total + _on_player
local _value = instance_container:GetValue (_object)
if (_value > top) then
top = _value
end
if (not NoRepeat [_spellid]) then
amount = amount + 1
NoRepeat [_spellid] = true
end
end
end
------------
end
end
end
end
--> return
return total, top, amount
]],
tooltip = [[
--get the parameters passed
local actor, combat, instance = ...
local Loc = LibStub ("AceLocale-3.0"):GetLocale ( "Details" )
--get the cooltip object (we do not use the convencional GameTooltip here)
local GameCooltip = GameCooltip
--Cooltip code
local from_spell = actor.id
--> get a list of all damage actors
@@ -1542,60 +1577,72 @@
--> hold the targets
local Targets = {}
local total = 0
local top = 0
for index, character in ipairs (AllDamageCharacters) do
if (character:IsEnemy()) then
local AllSpells = character:GetSpellList()
for spellid, spell in pairs (AllSpells) do
if (spellid == from_spell) then
for targetname, amount in pairs (spell.targets) do
local got = false
local damage_actor = combat (1, targetname)
local heal_actor = combat (2, targetname)
if ( (damage_actor or heal_actor) and ( (damage_actor and damage_actor:IsPlayer()) or (heal_actor and heal_actor:IsPlayer()) ) ) then
for index, t in ipairs (Targets) do
if (t[1] == targetname) then
t[2] = t[2] + amount
got = true
break
end
end
if (not got) then
Targets [#Targets+1] = {targetname, amount}
end
else
for index, t in ipairs (Targets) do
if (t[1] == Loc ["STRING_TARGETS_OTHER1"]) then
t[2] = t[2] + amount
got = true
break
end
end
if (not got) then
Targets [#Targets+1] = {Loc ["STRING_TARGETS_OTHER1"], amount}
end
end
end
local spell = character.spells._ActorTable [from_spell]
if (spell) then
for targetname, amount in pairs (spell.targets) do
local got = false
local damage_actor = combat (1, targetname)
local heal_actor = combat (2, targetname)
if ( (damage_actor or heal_actor) and ( (damage_actor and damage_actor:IsPlayer()) or (heal_actor and heal_actor:IsPlayer()) ) ) then
for index, t in ipairs (Targets) do
if (t[1] == targetname) then
t[2] = t[2] + amount
if (t[2] > top) then
top = t[2]
end
got = true
break
end
end
if (not got) then
Targets [#Targets+1] = {targetname, amount}
if (amount > top) then
top = amount
end
end
else
for index, t in ipairs (Targets) do
if (t[1] == Loc ["STRING_TARGETS_OTHER1"]) then
t[2] = t[2] + amount
got = true
break
end
end
if (not got) then
Targets [#Targets+1] = {Loc ["STRING_TARGETS_OTHER1"], amount}
end
end
end
end
end
table.sort (Targets, _detalhes.Sort2)
GameCooltip:SetOption ("StatusBarTexture", "Interface\\AddOns\\Details\\images\\bar_serenity")
local bar_background = {value = 100, color = {0, 0, 0, 0.7}, texture = "Interface\\AddOns\\Details\\images\\bar4"}
for index, t in ipairs (Targets) do
GameCooltip:AddLine (t[1], _detalhes:ToK2 (t[2]))
_detalhes:AddTooltipBackgroundStatusbar()
local class = _detalhes:GetClass (t[1])
if (class) then
local texture, l, r, t, b = _detalhes:GetClassIcon (class)
GameCooltip:AddIcon ("Interface\\AddOns\\Details\\images\\classes_small_alpha", 1, 1, 14, 14, l, r, t, b)
elseif (t[1] == Loc ["STRING_TARGETS_OTHER1"]) then
GameCooltip:AddIcon ("Interface\\AddOns\\Details\\images\\classes_small_alpha", 1, 1, 14, 14, 0.25, 0.49609375, 0.75, 1)
end
GameCooltip:AddLine (_detalhes:GetOnlyName(t[1]), _detalhes:ToK (t[2]))
local class, _, _, _, _, r, g, b = _detalhes:GetClass (t[1])
GameCooltip:AddStatusBar (t[2]/top*100, 1, r, g, b, 0.6, true, bar_background)
if (class) then
local texture, l, r, t, b = _detalhes:GetClassIcon (class)
GameCooltip:AddIcon ("Interface\\AddOns\\Details\\images\\classes_small_alpha", 1, 1, 14, 14, l, r, t, b)
elseif (t[1] == Loc ["STRING_TARGETS_OTHER1"]) then
GameCooltip:AddIcon ("Interface\\AddOns\\Details\\images\\classes_small_alpha", 1, 1, 14, 14, 0.25, 0.49609375, 0.75, 1)
end
end
]],
}
@@ -1845,7 +1892,6 @@
self.custom [#self.custom+1] = MySpells
end
_detalhes:ResetCustomFunctionsCache()
end
+10 -3
View File
@@ -1622,9 +1622,16 @@ end
esta_barra.icone_classe:SetVertexColor (actor_class_color_r, actor_class_color_g, actor_class_color_b)
else
esta_barra.icone_classe:SetTexture (instancia.row_info.icon_file)
esta_barra.icone_classe:SetTexCoord (_unpack (CLASS_ICON_TCOORDS [self.classe])) --very slow method
esta_barra.icone_classe:SetVertexColor (1, 1, 1)
if (instancia.row_info.use_spec_icons and self.spec) then
esta_barra.icone_classe:SetTexture (instancia.row_info.spec_file)
esta_barra.icone_classe:SetTexCoord (_unpack (_detalhes.class_specs_coords [self.spec]))
esta_barra.icone_classe:SetVertexColor (1, 1, 1)
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:SetVertexColor (1, 1, 1)
end
end
--texture and text
+9 -3
View File
@@ -764,9 +764,15 @@ function atributo_energy:RefreshBarra (esta_barra, instancia, from_resize)
esta_barra.icone_classe:SetVertexColor (actor_class_color_r, actor_class_color_g, actor_class_color_b)
else
esta_barra.icone_classe:SetTexture (instancia.row_info.icon_file)
esta_barra.icone_classe:SetTexCoord (_unpack (CLASS_ICON_TCOORDS [self.classe])) --very slow method
esta_barra.icone_classe:SetVertexColor (1, 1, 1)
if (instancia.row_info.use_spec_icons and self.spec) then
esta_barra.icone_classe:SetTexture (instancia.row_info.spec_file)
esta_barra.icone_classe:SetTexCoord (_unpack (_detalhes.class_specs_coords [self.spec]))
esta_barra.icone_classe:SetVertexColor (1, 1, 1)
else
esta_barra.icone_classe:SetTexture (instancia.row_info.icon_file)
esta_barra.icone_classe:SetTexCoord (_unpack (CLASS_ICON_TCOORDS [self.classe])) --very slow method
esta_barra.icone_classe:SetVertexColor (1, 1, 1)
end
end
--texture and text
+9 -3
View File
@@ -823,9 +823,15 @@ function atributo_heal:RefreshBarra (esta_barra, instancia, from_resize)
esta_barra.icone_classe:SetVertexColor (actor_class_color_r, actor_class_color_g, actor_class_color_b)
else
esta_barra.icone_classe:SetTexture (instancia.row_info.icon_file)
esta_barra.icone_classe:SetTexCoord (_unpack (CLASS_ICON_TCOORDS [self.classe])) --very slow method
esta_barra.icone_classe:SetVertexColor (1, 1, 1)
if (instancia.row_info.use_spec_icons and self.spec) then
esta_barra.icone_classe:SetTexture (instancia.row_info.spec_file)
esta_barra.icone_classe:SetTexCoord (_unpack (_detalhes.class_specs_coords [self.spec])) --very slow method
esta_barra.icone_classe:SetVertexColor (1, 1, 1)
else
esta_barra.icone_classe:SetTexture (instancia.row_info.icon_file)
esta_barra.icone_classe:SetTexCoord (_unpack (CLASS_ICON_TCOORDS [self.classe])) --very slow method
esta_barra.icone_classe:SetVertexColor (1, 1, 1)
end
end
--texture and text
+3 -21
View File
@@ -1742,31 +1742,13 @@ end
------------------------------------------------------------------------------------------------------------------------
function _detalhes:HaveOneCurrentInstance()
local have = false
function _detalhes:CheckSwitchToCurrent()
for _, instance in _ipairs (_detalhes.tabela_instancias) do
if (instance.ativa and instance.baseframe and instance.segmento == 0) then
return
end
end
local lower = _detalhes:GetLowerInstanceNumber()
if (lower) then
local instance = _detalhes:GetInstance (lower)
if (instance and instance.auto_current) then
if (instance.ativa and instance.baseframe and instance.segmento ~= 0 and instance.auto_current) then
instance:TrocaTabela (0) --> muda o segmento pra current
return instance:InstanceAlert (Loc ["STRING_CHANGED_TO_CURRENT"], {[[Interface\GossipFrame\TrainerGossipIcon]], 18, 18, false}, 6)
else
for _, instance in _ipairs (_detalhes.tabela_instancias) do
if (instance.ativa and instance.baseframe and instance.segmento ~= 0 and instance.auto_current) then
instance:TrocaTabela (0) --> muda o segmento pra current
return instance:InstanceAlert (Loc ["STRING_CHANGED_TO_CURRENT"], {[[Interface\GossipFrame\TrainerGossipIcon]], 18, 18, false}, 6)
end
end
instance:InstanceAlert (Loc ["STRING_CHANGED_TO_CURRENT"], {[[Interface\AddOns\Details\images\toolbar_icons]], 18, 18, false, 32/256, 64/256, 0, 1}, 6)
end
end
end
function _detalhes:Freeze (instancia)
+3
View File
@@ -178,6 +178,9 @@ _detalhes.instance_defaults = {
},
--fast hps/dps updates
fast_ps_update = false,
--show spec icons
use_spec_icons = false,
spec_file = [[Interface\AddOns\Details\images\spec_icons_normal]],
},
--instance window color
color = {1, 1, 1, 1},
+9 -3
View File
@@ -903,9 +903,15 @@ function atributo_misc:RefreshBarra (esta_barra, instancia, from_resize)
esta_barra.icone_classe:SetVertexColor (actor_class_color_r, actor_class_color_g, actor_class_color_b)
else
esta_barra.icone_classe:SetTexture (instancia.row_info.icon_file)
esta_barra.icone_classe:SetTexCoord (_unpack (CLASS_ICON_TCOORDS [self.classe])) --very slow method
esta_barra.icone_classe:SetVertexColor (1, 1, 1)
if (instancia.row_info.use_spec_icons and self.spec) then
esta_barra.icone_classe:SetTexture (instancia.row_info.spec_file)
esta_barra.icone_classe:SetTexCoord (_unpack (_detalhes.class_specs_coords [self.spec]))
esta_barra.icone_classe:SetVertexColor (1, 1, 1)
else
esta_barra.icone_classe:SetTexture (instancia.row_info.icon_file)
esta_barra.icone_classe:SetTexCoord (_unpack (CLASS_ICON_TCOORDS [self.classe])) --very slow method
esta_barra.icone_classe:SetVertexColor (1, 1, 1)
end
end
--texture and text
+25 -6
View File
@@ -42,6 +42,7 @@
local container_enemydebufftarget_target = _detalhes.container_type.CONTAINER_ENEMYDEBUFFTARGET_CLASS
local container_pets = {}
local cached_specs = _detalhes.cached_specs
--> flags
local REACTION_HOSTILE = 0x00000040
@@ -118,7 +119,19 @@
end
--> try to get the actor class from name
local function get_actor_class (novo_objeto, nome, flag)
local function get_actor_class (novo_objeto, nome, flag, serial)
--> get spec
if (_detalhes.track_specs) then
local have_cached = cached_specs [serial]
if (have_cached) then
novo_objeto.spec = have_cached
_detalhes:ScheduleTimer ("GuessSpec", 15, {novo_objeto, self, 10})
else
_detalhes:ScheduleTimer ("GuessSpec", 3, {novo_objeto, self, 1})
end
end
local _, engClass = _UnitClass (nome)
if (engClass) then
@@ -296,6 +309,12 @@
--[[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])
--else
--print (nome, flag)
--end
--> verifica se é um pet, se for confere se tem o nome do dono, se não tiver, precisa por
local dono_do_pet
serial = serial or "ns"
@@ -342,7 +361,7 @@
if (self.tipo == container_damage) then --> CONTAINER DAMAGE
get_actor_class (novo_objeto, nome, flag)
get_actor_class (novo_objeto, nome, flag, serial)
read_actor_flag (novo_objeto, dono_do_pet, serial, flag, nome, "damage")
if (dono_do_pet) then
@@ -372,7 +391,7 @@
elseif (self.tipo == container_heal) then --> CONTAINER HEALING
get_actor_class (novo_objeto, nome, flag)
get_actor_class (novo_objeto, nome, flag, serial)
read_actor_flag (novo_objeto, dono_do_pet, serial, flag, nome, "heal")
if (dono_do_pet) then
@@ -399,7 +418,7 @@
elseif (self.tipo == container_energy) then --> CONTAINER ENERGY
get_actor_class (novo_objeto, nome, flag)
get_actor_class (novo_objeto, nome, flag, serial)
read_actor_flag (novo_objeto, dono_do_pet, serial, flag, nome, "energy")
if (dono_do_pet) then
@@ -419,7 +438,7 @@
elseif (self.tipo == container_misc) then --> CONTAINER MISC
get_actor_class (novo_objeto, nome, flag)
get_actor_class (novo_objeto, nome, flag, serial)
read_actor_flag (novo_objeto, dono_do_pet, serial, flag, nome, "misc")
--local teste_classe =
@@ -459,7 +478,7 @@
elseif (self.tipo == container_friendlyfire) then --> CONTAINER FRIENDLY FIRE
get_actor_class (novo_objeto, nome)
get_actor_class (novo_objeto, nome, serial)
end
+1
View File
@@ -279,6 +279,7 @@ function historico:resetar()
_table_wipe (_detalhes.spellcache)
_detalhes:LimparPets()
_detalhes:ResetSpecCache (true) --> forçar
-- novo container de historico
_detalhes.tabela_historico = historico:NovoHistorico() --joga fora a tabela antiga e cria uma nova
+1 -1
View File
@@ -337,7 +337,7 @@
_detalhes:InstanceCall (_detalhes.CheckPsUpdate)
_detalhes:SendEvent ("COMBAT_PLAYER_ENTER", nil, _detalhes.tabela_vigente)
_detalhes:HaveOneCurrentInstance()
_detalhes:CheckSwitchToCurrent()
end
+116
View File
@@ -15,6 +15,122 @@ function _detalhes:UpdateGears()
end
function _detalhes:TrackSpecsNow (track_everything)
local spelllist = _detalhes.SpecSpellList
if (not track_everything) then
for _, actor in _detalhes.tabela_vigente[1]:ListActors() do
if (actor:IsPlayer()) then
for spellid, spell in pairs (actor:GetSpellList()) do
if (spelllist [spell.id]) then
actor.spec = spelllist [spell.id]
_detalhes.cached_specs [actor.serial] = actor.spec
break
end
end
end
end
for _, actor in _detalhes.tabela_vigente[2]:ListActors() do
if (actor:IsPlayer()) then
for spellid, spell in pairs (actor:GetSpellList()) do
if (spelllist [spell.id]) then
actor.spec = spelllist [spell.id]
_detalhes.cached_specs [actor.serial] = actor.spec
break
end
end
end
end
else
local combatlist = {}
for _, combat in ipairs (_detalhes.tabela_historico.tabelas) do
tinsert (combatlist, combat)
end
tinsert (combatlist, _detalhes.tabela_vigente)
tinsert (combatlist, _detalhes.tabela_overall)
for _, combat in ipairs (combatlist) do
for _, actor in combat[1]:ListActors() do
if (actor:IsPlayer()) then
for spellid, spell in pairs (actor:GetSpellList()) do
if (spelllist [spell.id]) then
actor.spec = spelllist [spell.id]
_detalhes.cached_specs [actor.serial] = actor.spec
break
end
end
end
end
for _, actor in combat[2]:ListActors() do
if (actor:IsPlayer()) then
for spellid, spell in pairs (actor:GetSpellList()) do
if (spelllist [spell.id]) then
actor.spec = spelllist [spell.id]
_detalhes.cached_specs [actor.serial] = actor.spec
break
end
end
end
end
end
end
end
function _detalhes:ResetSpecCache (forced)
local isininstance = IsInInstance()
if (forced or (not isininstance and not _detalhes.in_group)) then
table.wipe (_detalhes.cached_specs)
if (_detalhes.track_specs) then
local my_spec = GetSpecialization()
if (type (my_spec) == "number") then
local spec_number = GetSpecializationInfo (my_spec)
if (type (spec_number) == "number") then
local pguid = UnitGUID (_detalhes.playername)
if (pguid) then
_detalhes.cached_specs [pguid] = spec_number
end
end
end
end
elseif (_detalhes.in_group and not isininstance) then
table.wipe (_detalhes.cached_specs)
if (_detalhes.track_specs) then
if (IsInRaid()) then
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 index = c_combat_dmg._NameIndexTable [name]
if (index) then
local actor = c_combat_dmg._ActorTable [index]
if (actor and actor.grupo and actor.spec) then
_detalhes.cached_specs [actor.serial] = actor.spec
end
else
index = c_combat_heal._NameIndexTable [name]
if (index) then
local actor = c_combat_heal._ActorTable [index]
if (actor and actor.grupo and actor.spec) then
_detalhes.cached_specs [actor.serial] = actor.spec
end
end
end
end
end
end
end
end
function _detalhes:SetWindowUpdateSpeed (interval, nosave)
if (not interval) then
interval = _detalhes.update_speed
+3
View File
@@ -646,6 +646,9 @@
_detalhes:ClearCCPetsBlackList()
end
--> reseta cache de specs
_detalhes:ResetSpecCache()
--> wipa container de escudos
_table_wipe (_detalhes.escudos)
+31 -19
View File
@@ -159,6 +159,7 @@
elseif (not who_name) then
--> no actor name, use spell name instead
who_name = "[*] "..spellname
who_serial = ""
end
if (absorbed) then
@@ -224,7 +225,7 @@
--> get actors
--> damager
local este_jogador, meu_dono = damage_cache [who_name] or damage_cache_pets [who_serial], damage_cache_petsOwners [who_serial]
local este_jogador, meu_dono = damage_cache [who_serial] or damage_cache_pets [who_serial], damage_cache_petsOwners [who_serial]
if (not este_jogador) then --> pode ser um desconhecido ou um pet
@@ -234,17 +235,21 @@
damage_cache_pets [who_serial] = este_jogador
damage_cache_petsOwners [who_serial] = meu_dono
--conferir se o dono já esta no cache
if (not damage_cache [meu_dono.nome]) then
damage_cache [meu_dono.nome] = meu_dono
if (not damage_cache [meu_dono.serial]) then
damage_cache [meu_dono.serial] = meu_dono
end
else
if (who_flags) then --> ter certeza que não é um pet
damage_cache [who_name] = este_jogador
--> se for spell actor
if (who_name:find ("[*]")) then
local _, _, icon = _GetSpellInfo (spellid or 1)
este_jogador.spellicon = icon
--print ("spell actor:", who_name, "icon:", icon)
if (who_serial ~= "") then
damage_cache [who_serial] = este_jogador
else
if (who_name:find ("%[")) then
local _, _, icon = _GetSpellInfo (spellid or 1)
este_jogador.spellicon = icon
--print ("Spell Actor:", who_name)
else
--print ("No Serial Actor:", who_name)
end
end
end
end
@@ -255,7 +260,7 @@
end
--> his target
local jogador_alvo, alvo_dono = damage_cache [alvo_name] or damage_cache_pets [alvo_serial], damage_cache_petsOwners [alvo_serial]
local jogador_alvo, alvo_dono = damage_cache [alvo_serial] or damage_cache_pets [alvo_serial], damage_cache_petsOwners [alvo_serial]
if (not jogador_alvo) then
@@ -265,12 +270,12 @@
damage_cache_pets [alvo_serial] = jogador_alvo
damage_cache_petsOwners [alvo_serial] = alvo_dono
--conferir se o dono já esta no cache
if (not damage_cache [alvo_dono.nome]) then
damage_cache [alvo_dono.nome] = alvo_dono
if (not damage_cache [alvo_dono.serial]) then
damage_cache [alvo_dono.serial] = alvo_dono
end
else
if (alvo_flags) then --> ter certeza que não é um pet
damage_cache [alvo_name] = jogador_alvo
damage_cache [alvo_serial] = jogador_alvo
end
end
@@ -522,7 +527,10 @@
------------------------------------------------------------------------------------------------
--> early checks and fixes
if (not who_name or not alvo_name) then
if (not who_name) then
--> no actor name, use spell name instead
who_name = "[*] " .. spellname
elseif (not who_name or not alvo_name) then
return --> just return
end
@@ -531,7 +539,7 @@
--print ("MISS", "|", missType, "|", isOffHand, "|", multistrike, "|", amountMissed, "|", arg1)
--> 'misser'
local este_jogador = damage_cache [who_name]
local este_jogador = damage_cache [who_serial]
if (not este_jogador) then
--este_jogador, meu_dono, who_name = _current_damage_container:PegarCombatente (nil, who_name)
este_jogador, meu_dono, who_name = _current_damage_container:PegarCombatente (who_serial, who_name, who_flags, true)
@@ -542,7 +550,7 @@
if (tanks_members_cache [alvo_serial]) then --> only track tanks
local TargetActor = damage_cache [alvo_name]
local TargetActor = damage_cache [alvo_serial]
if (TargetActor) then
local avoidance = TargetActor.avoidance
@@ -620,6 +628,10 @@
--[[statistics]]-- _detalhes.statistics.pets_summons = _detalhes.statistics.pets_summons + 1
--if (who_name:find ("Kastfall")) then
-- print ("SUMMON", who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags)
--end
if (not who_name) then
who_name = "[*] " .. spellName
end
@@ -1672,11 +1684,11 @@
if (who_name == alvo_name) then
local damage_actor = damage_cache [who_name]
local damage_actor = damage_cache [who_serial]
if (not damage_actor) then --> pode ser um desconhecido ou um pet
damage_actor = _current_damage_container:PegarCombatente (who_serial, who_name, who_flags, true)
if (who_flags) then --> se não for um pet, adicionar no cache
damage_cache [who_name] = damage_actor
damage_cache [who_serial] = damage_actor
end
end
@@ -1867,7 +1879,7 @@
--> enemy successful casts (not interrupted)
if (_bit_band (who_flags, 0x00000040) ~= 0 and who_name) then --> byte 2 = 4 (enemy)
--> damager
local este_jogador = damage_cache [who_name]
local este_jogador = damage_cache [who_serial]
if (not este_jogador) then
este_jogador = _current_damage_container:PegarCombatente (who_serial, who_name, who_flags, true)
end
+73
View File
@@ -2232,7 +2232,44 @@
for i = 1, 10 do
local robot = current_combat[1]:PegarCombatente (0x0000000000000, actors_name [math.random (1, #actors_name)], 0x114, true)
robot.grupo = true
robot.classe = actors_classes [math.random (1, #actors_classes)]
if (robot.classe == "DEATHKNIGHT") then
local specs = {250, 251, 252}
robot.spec = specs [math.random (1, #specs)]
elseif (robot.classe == "DRUID") then
local specs = {102, 103, 104, 105}
robot.spec = specs [math.random (1, #specs)]
elseif (robot.classe == "HUNTER") then
local specs = {253, 254, 255}
robot.spec = specs [math.random (1, #specs)]
elseif (robot.classe == "MAGE") then
local specs = {62, 63, 64}
robot.spec = specs [math.random (1, #specs)]
elseif (robot.classe == "MONK") then
local specs = {268, 269, 270}
robot.spec = specs [math.random (1, #specs)]
elseif (robot.classe == "PALADIN") then
local specs = {65, 66, 70}
robot.spec = specs [math.random (1, #specs)]
elseif (robot.classe == "PRIEST") then
local specs = {256, 257, 258}
robot.spec = specs [math.random (1, #specs)]
elseif (robot.classe == "ROGUE") then
local specs = {259, 260, 261}
robot.spec = specs [math.random (1, #specs)]
elseif (robot.classe == "SHAMAN") then
local specs = {262, 263, 264}
robot.spec = specs [math.random (1, #specs)]
elseif (robot.classe == "WARLOCK") then
local specs = {265, 266, 267}
robot.spec = specs [math.random (1, #specs)]
elseif (robot.classe == "WARRIOR") then
local specs = {71, 72, 73}
robot.spec = specs [math.random (1, #specs)]
end
robot.total = math.random (10000000, 60000000)
robot.damage_taken = math.random (10000000, 60000000)
robot.friendlyfire_total = math.random (10000000, 60000000)
@@ -2256,6 +2293,42 @@
local robot = current_combat[2]:PegarCombatente (0x0000000000000, actors_name [math.random (1, #actors_name)], 0x114, true)
robot.grupo = true
robot.classe = actors_classes [math.random (1, #actors_classes)]
if (robot.classe == "DEATHKNIGHT") then
local specs = {250, 251, 252}
robot.spec = specs [math.random (1, #specs)]
elseif (robot.classe == "DRUID") then
local specs = {102, 103, 104, 105}
robot.spec = specs [math.random (1, #specs)]
elseif (robot.classe == "HUNTER") then
local specs = {253, 254, 255}
robot.spec = specs [math.random (1, #specs)]
elseif (robot.classe == "MAGE") then
local specs = {62, 63, 64}
robot.spec = specs [math.random (1, #specs)]
elseif (robot.classe == "MONK") then
local specs = {268, 269, 270}
robot.spec = specs [math.random (1, #specs)]
elseif (robot.classe == "PALADIN") then
local specs = {65, 66, 70}
robot.spec = specs [math.random (1, #specs)]
elseif (robot.classe == "PRIEST") then
local specs = {256, 257, 258}
robot.spec = specs [math.random (1, #specs)]
elseif (robot.classe == "ROGUE") then
local specs = {259, 260, 261}
robot.spec = specs [math.random (1, #specs)]
elseif (robot.classe == "SHAMAN") then
local specs = {262, 263, 264}
robot.spec = specs [math.random (1, #specs)]
elseif (robot.classe == "WARLOCK") then
local specs = {265, 266, 267}
robot.spec = specs [math.random (1, #specs)]
elseif (robot.classe == "WARRIOR") then
local specs = {71, 72, 73}
robot.spec = specs [math.random (1, #specs)]
end
robot.total = math.random (10000000, 60000000)
robot.totalover = math.random (10000000, 60000000)
robot.totalabsorb = math.random (10000000, 60000000)
+147 -61
View File
@@ -910,7 +910,13 @@ function gump:IconPick (callback, close_when_select)
gump.IconPickFrame.emptyFunction = function() end
gump.IconPickFrame.callback = gump.IconPickFrame.emptyFunction
gump.IconPickFrame.preview = gump:NewImage (gump.IconPickFrame, nil, 76, 76)
gump.IconPickFrame.preview = CreateFrame ("frame", nil, UIParent)
gump.IconPickFrame.preview:SetFrameStrata ("tooltip")
gump.IconPickFrame.preview:SetSize (76, 76)
local preview_image = gump:NewImage (gump.IconPickFrame.preview, nil, 76, 76)
preview_image:SetAllPoints (gump.IconPickFrame.preview)
gump.IconPickFrame.preview.icon = preview_image
gump.IconPickFrame.preview:Hide()
gump.IconPickFrame.searchLabel = gump:NewLabel (gump.IconPickFrame, nil, "$parentSearchBoxLabel", nil, "search:", font, size, color)
gump.IconPickFrame.searchLabel:SetPoint ("topleft", gump.IconPickFrame, "topleft", 12, -20)
@@ -924,6 +930,8 @@ function gump:IconPick (callback, close_when_select)
gump.IconPickFrame.updateFunc()
else
gump.IconPickFrameScroll:Hide()
FauxScrollFrame_SetOffset (gump.IconPickFrame, 1)
gump.IconPickFrame.last_filter_index = 1
gump.IconPickFrame.updateFunc()
end
end)
@@ -971,6 +979,8 @@ function gump:IconPick (callback, close_when_select)
end
end
GetLooseMacroItemIcons (MACRO_ICON_FILENAMES)
GetLooseMacroIcons (MACRO_ICON_FILENAMES)
GetMacroIcons (MACRO_ICON_FILENAMES)
GetMacroItemIcons (MACRO_ICON_FILENAMES )
@@ -983,10 +993,8 @@ function gump:IconPick (callback, close_when_select)
gump.IconPickFrame.buttons = {}
local OnClickFunction = function (index)
local button = gump.IconPickFrame.buttons [index]
local texture = button:GetNormalTexture()
gump.IconPickFrame.callback (button.icon_texture)
local OnClickFunction = function (self)
gump.IconPickFrame.callback (self.icon:GetTexture())
if (gump.IconPickFrame.click_close) then
close_button:Click()
end
@@ -994,119 +1002,197 @@ function gump:IconPick (callback, close_when_select)
local onenter = function (self)
gump.IconPickFrame.preview:SetPoint ("bottom", self, "top", 0, 2)
gump.IconPickFrame.preview:SetTexture (self.icon_texture)
gump.IconPickFrame.preview:SetParent (self)
gump.IconPickFrame.preview.icon:SetTexture (self.icon:GetTexture())
gump.IconPickFrame.preview:Show()
self.icon:SetBlendMode ("ADD")
end
local onleave = function (self)
gump.IconPickFrame.preview:Hide()
self.icon:SetBlendMode ("BLEND")
end
local backdrop = {bgFile = [[Interface\AddOns\Details\images\background]], tile = true, tileSize = 16,
insets = {left = 0, right = 0, top = 0, bottom = 0}, edgeFile = [[Interface\DialogFrame\UI-DialogBox-Border]], edgeSize = 10}
for i = 0, 9 do
local newcheck = gump:NewDetailsButton (gump.IconPickFrame, gump.IconPickFrame, _, OnClickFunction, i+1, i+1, 30, 28, "", "", "", "", _, "DetailsIconPickFrameButton"..(i+1))
local newcheck = CreateFrame ("Button", "DetailsIconPickFrameButton"..(i+1), gump.IconPickFrame)
local image = newcheck:CreateTexture ("DetailsIconPickFrameButton"..(i+1).."Icon", "overlay")
newcheck.icon = image
image:SetPoint ("topleft", newcheck, "topleft", 2, -2); image:SetPoint ("bottomright", newcheck, "bottomright", -2, 2)
newcheck:SetSize (30, 28)
newcheck:SetBackdrop (backdrop)
newcheck:SetScript ("OnClick", OnClickFunction)
newcheck.param1 = i+1
newcheck:SetPoint ("topleft", gump.IconPickFrame, "topleft", 12 + (i*30), -40)
newcheck:SetID (i+1)
gump.IconPickFrame.buttons [#gump.IconPickFrame.buttons+1] = newcheck
newcheck.MouseOnEnterHook = onenter
newcheck.MouseOnLeaveHook = onleave
newcheck:SetScript ("OnEnter", onenter)
newcheck:SetScript ("OnLeave", onleave)
end
for i = 11, 20 do
local newcheck = gump:NewDetailsButton (gump.IconPickFrame, gump.IconPickFrame, _, OnClickFunction, i, i, 30, 28, "", "", "", "", _, "DetailsIconPickFrameButton"..i)
for i = 11, 20 do
local newcheck = CreateFrame ("Button", "DetailsIconPickFrameButton"..i, gump.IconPickFrame)
local image = newcheck:CreateTexture ("DetailsIconPickFrameButton"..i.."Icon", "overlay")
newcheck.icon = image
image:SetPoint ("topleft", newcheck, "topleft", 2, -2); image:SetPoint ("bottomright", newcheck, "bottomright", -2, 2)
newcheck:SetSize (30, 28)
newcheck:SetBackdrop (backdrop)
newcheck:SetScript ("OnClick", OnClickFunction)
newcheck.param1 = i
newcheck:SetPoint ("topleft", "DetailsIconPickFrameButton"..(i-10), "bottomleft", 0, -1)
newcheck:SetID (i)
gump.IconPickFrame.buttons [#gump.IconPickFrame.buttons+1] = newcheck
newcheck.MouseOnEnterHook = onenter
newcheck.MouseOnLeaveHook = onleave
newcheck:SetScript ("OnEnter", onenter)
newcheck:SetScript ("OnLeave", onleave)
end
for i = 21, 30 do
local newcheck = gump:NewDetailsButton (gump.IconPickFrame, gump.IconPickFrame, _, OnClickFunction, i, i, 30, 28, "", "", "", "", _, "DetailsIconPickFrameButton"..i)
local newcheck = CreateFrame ("Button", "DetailsIconPickFrameButton"..i, gump.IconPickFrame)
local image = newcheck:CreateTexture ("DetailsIconPickFrameButton"..i.."Icon", "overlay")
newcheck.icon = image
image:SetPoint ("topleft", newcheck, "topleft", 2, -2); image:SetPoint ("bottomright", newcheck, "bottomright", -2, 2)
newcheck:SetSize (30, 28)
newcheck:SetBackdrop (backdrop)
newcheck:SetScript ("OnClick", OnClickFunction)
newcheck.param1 = i
newcheck:SetPoint ("topleft", "DetailsIconPickFrameButton"..(i-10), "bottomleft", 0, -1)
newcheck:SetID (i)
gump.IconPickFrame.buttons [#gump.IconPickFrame.buttons+1] = newcheck
newcheck.MouseOnEnterHook = onenter
newcheck.MouseOnLeaveHook = onleave
newcheck:SetScript ("OnEnter", onenter)
newcheck:SetScript ("OnLeave", onleave)
end
for i = 31, 40 do
local newcheck = gump:NewDetailsButton (gump.IconPickFrame, gump.IconPickFrame, _, OnClickFunction, i, i, 30, 28, "", "", "", "", _, "DetailsIconPickFrameButton"..i)
local newcheck = CreateFrame ("Button", "DetailsIconPickFrameButton"..i, gump.IconPickFrame)
local image = newcheck:CreateTexture ("DetailsIconPickFrameButton"..i.."Icon", "overlay")
newcheck.icon = image
image:SetPoint ("topleft", newcheck, "topleft", 2, -2); image:SetPoint ("bottomright", newcheck, "bottomright", -2, 2)
newcheck:SetSize (30, 28)
newcheck:SetBackdrop (backdrop)
newcheck:SetScript ("OnClick", OnClickFunction)
newcheck.param1 = i
newcheck:SetPoint ("topleft", "DetailsIconPickFrameButton"..(i-10), "bottomleft", 0, -1)
newcheck:SetID (i)
gump.IconPickFrame.buttons [#gump.IconPickFrame.buttons+1] = newcheck
newcheck.MouseOnEnterHook = onenter
newcheck.MouseOnLeaveHook = onleave
newcheck:SetScript ("OnEnter", onenter)
newcheck:SetScript ("OnLeave", onleave)
end
for i = 41, 50 do
local newcheck = gump:NewDetailsButton (gump.IconPickFrame, gump.IconPickFrame, _, OnClickFunction, i, i, 30, 28, "", "", "", "", _, "DetailsIconPickFrameButton"..i)
local newcheck = CreateFrame ("Button", "DetailsIconPickFrameButton"..i, gump.IconPickFrame)
local image = newcheck:CreateTexture ("DetailsIconPickFrameButton"..i.."Icon", "overlay")
newcheck.icon = image
image:SetPoint ("topleft", newcheck, "topleft", 2, -2); image:SetPoint ("bottomright", newcheck, "bottomright", -2, 2)
newcheck:SetSize (30, 28)
newcheck:SetBackdrop (backdrop)
newcheck:SetScript ("OnClick", OnClickFunction)
newcheck.param1 = i
newcheck:SetPoint ("topleft", "DetailsIconPickFrameButton"..(i-10), "bottomleft", 0, -1)
newcheck:SetID (i)
gump.IconPickFrame.buttons [#gump.IconPickFrame.buttons+1] = newcheck
newcheck.MouseOnEnterHook = onenter
newcheck.MouseOnLeaveHook = onleave
newcheck:SetScript ("OnEnter", onenter)
newcheck:SetScript ("OnLeave", onleave)
end
for i = 51, 60 do
local newcheck = gump:NewDetailsButton (gump.IconPickFrame, gump.IconPickFrame, _, OnClickFunction, i, i, 30, 28, "", "", "", "", _, "DetailsIconPickFrameButton"..i)
local newcheck = CreateFrame ("Button", "DetailsIconPickFrameButton"..i, gump.IconPickFrame)
local image = newcheck:CreateTexture ("DetailsIconPickFrameButton"..i.."Icon", "overlay")
newcheck.icon = image
image:SetPoint ("topleft", newcheck, "topleft", 2, -2); image:SetPoint ("bottomright", newcheck, "bottomright", -2, 2)
newcheck:SetSize (30, 28)
newcheck:SetBackdrop (backdrop)
newcheck:SetScript ("OnClick", OnClickFunction)
newcheck.param1 = i
newcheck:SetPoint ("topleft", "DetailsIconPickFrameButton"..(i-10), "bottomleft", 0, -1)
newcheck:SetID (i)
gump.IconPickFrame.buttons [#gump.IconPickFrame.buttons+1] = newcheck
newcheck.MouseOnEnterHook = onenter
newcheck.MouseOnLeaveHook = onleave
newcheck:SetScript ("OnEnter", onenter)
newcheck:SetScript ("OnLeave", onleave)
end
local scroll = CreateFrame ("ScrollFrame", "DetailsIconPickFrameScroll", gump.IconPickFrame, "ListScrollFrameTemplate")
local ChecksFrame_Update = function (self)
--self = self or MacroPopupFrame;
local numMacroIcons = #MACRO_ICON_FILENAMES;
local macroPopupIcon, macroPopupButton;
local macroPopupOffset = FauxScrollFrame_GetOffset (scroll);
local index;
-- Icon list
local texture;
local numMacroIcons = #MACRO_ICON_FILENAMES
local macroPopupIcon, macroPopupButton
local macroPopupOffset = FauxScrollFrame_GetOffset (scroll)
local index
local texture
local filter
if (gump.IconPickFrame.searching) then
filter = string_lower (gump.IconPickFrame.searching)
end
if (filter and filter ~= "") then
local i = 1
for o = 1, numMacroIcons do
local text = string_lower (MACRO_ICON_FILENAMES [o])
if (text:find (filter)) then
macroPopupIcon = _G ["DetailsIconPickFrameButton"..i]
macroPopupButton = _G ["DetailsIconPickFrameButton"..i]
local texture = MACRO_ICON_FILENAMES [o]
macroPopupButton:ChangeIcon ("INTERFACE\\ICONS\\"..texture, "INTERFACE\\ICONS\\"..texture, "INTERFACE\\ICONS\\"..texture, "INTERFACE\\ICONS\\"..texture)
macroPopupButton.IconID = index
macroPopupButton.icon_texture = "INTERFACE\\ICONS\\"..texture
macroPopupButton:Show();
i = i + 1
if (i > 60) then
break
local ignored = 0
local tryed = 0
local found = 0
local type = type
local buttons = gump.IconPickFrame.buttons
index = 1
for i = 1, 60 do
macroPopupIcon = buttons[i].icon
macroPopupButton = buttons[i]
for o = index, numMacroIcons do
tryed = tryed + 1
texture = MACRO_ICON_FILENAMES [o]
if (type (texture) == "number") then
macroPopupIcon:SetToFileData (texture)
texture = macroPopupIcon:GetTexture()
macroPopupIcon:SetTexture (nil)
else
texture = "INTERFACE\\ICONS\\" .. texture
end
if (texture and texture:find (filter)) then
macroPopupIcon:SetTexture (texture)
macroPopupButton:Show()
found = found + 1
gump.IconPickFrame.last_filter_index = o
index = o+1
break
else
ignored = ignored + 1
end
end
end
if (i == 1) then --no resutls
macroPopupButton = _G ["DetailsIconPickFrameButton"..i]
macroPopupButton:Hide()
end
for o = i+1, 60 do
for o = found+1, 60 do
macroPopupButton = _G ["DetailsIconPickFrameButton"..o]
macroPopupButton:Hide()
end
else
for i = 1, 60 do
macroPopupIcon = _G ["DetailsIconPickFrameButton"..i]
macroPopupIcon = _G ["DetailsIconPickFrameButton"..i.."Icon"]
macroPopupButton = _G ["DetailsIconPickFrameButton"..i]
index = (macroPopupOffset * 10) + i;
index = (macroPopupOffset * 10) + i
texture = MACRO_ICON_FILENAMES [index]
if ( index <= numMacroIcons and texture ) then
macroPopupButton:ChangeIcon ("INTERFACE\\ICONS\\"..texture, "INTERFACE\\ICONS\\"..texture, "INTERFACE\\ICONS\\"..texture, "INTERFACE\\ICONS\\"..texture)
if (type (texture) == "number") then
macroPopupIcon:SetToFileData (texture)
else
macroPopupIcon:SetTexture ("INTERFACE\\ICONS\\" .. texture)
end
macroPopupIcon:SetTexCoord (4/64, 60/64, 4/64, 60/64)
macroPopupButton.IconID = index
macroPopupButton.icon_texture = "INTERFACE\\ICONS\\"..texture
macroPopupButton:Show()
else
macroPopupButton:Hide()
@@ -1115,7 +1201,7 @@ function gump:IconPick (callback, close_when_select)
end
-- Scrollbar stuff
FauxScrollFrame_Update (scroll, ceil (numMacroIcons / 10) , 5, 20 );
FauxScrollFrame_Update (scroll, ceil (numMacroIcons / 10) , 5, 20 )
end
gump.IconPickFrame.updateFunc = ChecksFrame_Update
+12
View File
@@ -203,6 +203,18 @@ function _detalhes:LoadCombatTables()
_detalhes.tabela_vigente = _detalhes.combate:NovaTabela (_, _detalhes.tabela_overall)
_detalhes.tabela_pets = _detalhes.container_pets:NovoContainer()
_detalhes:UpdateContainerCombatentes()
else
--> check integrity
local combat = _detalhes.tabela_historico.tabelas [1]
if (combat) then
if (not combat[1] or not combat[2] or not combat[3] or not combat[4]) then
--> something went wrong in last logon, let's just reset and we are good to go
_detalhes.tabela_historico = _detalhes.historico:NovoHistorico()
_detalhes.tabela_vigente = _detalhes.combate:NovaTabela (_, _detalhes.tabela_overall)
_detalhes.tabela_pets = _detalhes.container_pets:NovoContainer()
_detalhes:UpdateContainerCombatentes()
end
end
end
--> re-build all indexes and metatables
+143 -2
View File
@@ -10,6 +10,8 @@ do
local _select = select
local _unpack = unpack
local unknown_class_coords = {0.75, 1, 0.75, 1}
-- try get the class from actor name
function _detalhes:GetClass (name)
local _, class = _UnitClass (name)
@@ -20,12 +22,18 @@ do
if (index) then
local actor = container._ActorTable [index]
if (actor.classe ~= "UNGROUPPLAYER") then
return actor.classe, _detalhes:unpacks (_detalhes.class_coords [actor.classe] or {0.75, 1, 0.75, 1}, _detalhes.class_colors [actor.classe])
local left, right, top, bottom = unpack (_detalhes.class_coords [actor.classe] or unknown_class_coords)
local r, g, b = unpack (_detalhes.class_colors [actor.classe])
return actor.classe, left, right, top, bottom, r or 1, g or 1, b or 1
end
end
end
return "UNKNOW", 0.75, 1, 0.75, 1, 1, 1, 1, 1
else
return class, _detalhes:unpacks (_detalhes.class_coords [class] or {0.75, 1, 0.75, 1}, _detalhes.class_colors [class])
local left, right, top, bottom = unpack (_detalhes.class_coords [class])
local r, g, b = unpack (_detalhes.class_colors [class])
return class, left, right, top, bottom, r or 1, g or 1, b or 1
end
end
@@ -122,5 +130,138 @@ do
return false
end
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-- try get the spec from actor name
function _detalhes:GetSpec (name)
local guid = UnitGUID (name)
if (guid) then
local spec = _detalhes.cached_specs [guid]
if (spec) then
return spec
end
end
for _, container in _ipairs (_detalhes.tabela_overall) do
local index = container._NameIndexTable [name]
if (index) then
local actor = container._ActorTable [index]
return actor and actor.spec
end
end
end
function _detalhes:GuessSpec (t)
local Actor, container, tries = t[1], t[2], t[3]
if (not Actor) then
return false
end
local guid = UnitGUID (Actor.nome)
if (guid) then
local spec = _detalhes.cached_specs [guid]
if (spec) then
Actor.spec = spec
Actor.guessing_spec = nil
if (container) then
container.need_refresh = true
end
if (Actor.minha_barra and type (Actor.minha_barra) == "table") then
Actor.minha_barra.minha_tabela = nil
end
return spec
end
end
local SpecSpellList = _detalhes.SpecSpellList
if (Actor.spells) then --> correcao pros containers misc, precisa pegar os diferentes tipos de containers de lá
for spellid, _ in _pairs (Actor.spells._ActorTable) do
local spec = SpecSpellList [spellid]
if (spec) then
_detalhes.cached_specs [Actor.serial] = spec
Actor.spec = spec
Actor.guessing_spec = nil
if (container) then
container.need_refresh = true
end
if (Actor.minha_barra and type (Actor.minha_barra) == "table") then
Actor.minha_barra.minha_tabela = nil
end
return spec
end
end
end
if (Actor.classe == "HUNTER") then
local container_misc = _detalhes.tabela_vigente[4]
local index = container_misc._NameIndexTable [Actor.nome]
if (index) then
local misc_actor = container_misc._ActorTable [index]
local buffs = misc_actor.buff_uptime_spells and misc_actor.buff_uptime_spells._ActorTable
if (buffs) then
for spellid, spell in _pairs (buffs) do
local spec = SpecSpellList [spellid]
if (spec) then
_detalhes.cached_specs [Actor.serial] = spec
Actor.spec = spec
Actor.guessing_spec = nil
if (container) then
container.need_refresh = true
end
if (Actor.minha_barra and type (Actor.minha_barra) == "table") then
Actor.minha_barra.minha_tabela = nil
end
return spec
end
end
end
end
end
local spec = _detalhes:GetSpec (Actor.nome)
if (spec) then
_detalhes.cached_specs [Actor.serial] = spec
Actor.spec = spec
Actor.need_refresh = true
Actor.guessing_spec = nil
if (container) then
container.need_refresh = true
end
if (Actor.minha_barra and type (Actor.minha_barra) == "table") then
Actor.minha_barra.minha_tabela = nil
end
return spec
end
if (tries and tries < 10) then
_detalhes:ScheduleTimer ("GuessSpec", 3, {Actor, container, tries+1})
end
return false
end
end
+49
View File
@@ -567,6 +567,54 @@ end
local default_profile = {
--> spec coords
class_specs_coords = {
[252] = {0, 64/512, 0, 64/512}, --> unholy dk
[251] = {64/512, 128/512, 0, 64/512}, --> frost dk
[250] = {128/512, 192/512, 0, 64/512}, --> blood dk
[102] = {192/512, 256/512, 0, 64/512}, --> druid balance
[103] = {256/512, 320/512, 0, 64/512}, --> druid feral
[104] = {320/512, 384/512, 0, 64/512}, --> druid guardian
[105] = {384/512, 448/512, 0, 64/512}, --> druid resto
[253] = {448/512, 512/512, 0, 64/512}, --> hunter bm
[254] = {0, 64/512, 64/512, 128/512}, --> hunter marks
[255] = {64/512, 128/512, 64/512, 128/512}, --> hunter survivor
[62] = {128/512, 192/512, 64/512, 128/512}, --> mage arcane
[63] = {192/512, 256/512, 64/512, 128/512}, --> mage fire
[64] = {256/512, 320/512, 64/512, 128/512}, --> mage frost
[268] = {320/512, 384/512, 64/512, 128/512}, --> monk bm
[269] = {384/512, 448/512, 64/512, 128/512}, --> monk mw
[270] = {448/512, 512/512, 64/512, 128/512}, --> monk ww
[65] = {0, 64/512, 128/512, 192/512}, --> paladin holy
[66] = {64/512, 128/512, 128/512, 192/512}, --> paladin protect
[70] = {128/512, 192/512, 128/512, 192/512}, --> paladin ret
[256] = {192/512, 256/512, 128/512, 192/512}, --> priest disc
[257] = {256/512, 320/512, 128/512, 192/512}, --> priest holy
[258] = {320/512, 384/512, 128/512, 192/512}, --> priest shadow
[259] = {384/512, 448/512, 128/512, 192/512}, --> rogue assassination
[260] = {448/512, 512/512, 128/512, 192/512}, --> rogue combat
[261] = {0, 64/512, 192/512, 256/512}, --> rogue sub
[262] = {64/512, 128/512, 192/512, 256/512}, --> shaman elemental
[263] = {128/512, 192/512, 192/512, 256/512}, --> shamel enhancement
[264] = {192/512, 256/512, 192/512, 256/512}, --> shaman resto
[265] = {256/512, 320/512, 192/512, 256/512}, --> warlock aff
[266] = {320/512, 384/512, 192/512, 256/512}, --> warlock demo
[267] = {384/512, 448/512, 192/512, 256/512}, --> warlock destro
[71] = {448/512, 512/512, 192/512, 256/512}, --> warrior arms
[72] = {0, 64/512, 256/512, 320/512}, --> warrior fury
[73] = {64/512, 128/512, 256/512, 320/512}, --> warrior protect
},
--> class icons and colors
class_icons_small = [[Interface\AddOns\Details\images\classes_small]],
class_coords = {
@@ -807,6 +855,7 @@ local default_profile = {
--> text sizes
font_sizes = {menus = 10},
font_faces = {menus = "Friz Quadrata TT"},
ps_abbreviation = 3,
total_abbreviation = 2,
+2
View File
@@ -505,6 +505,8 @@ local _
["window_scale"] = 1,
["bars_grow_direction"] = 1,
["row_info"] = {
["use_spec_icons"] = true,
["spec_file"] = [[Interface\AddOns\Details\images\spec_icons_normal]],
["textR_outline"] = false,
["textL_outline"] = false,
["percent_type"] = 1,
+392
View File
@@ -17,7 +17,399 @@ do
}
_detalhes.SpecSpellList = {
-- Unholy Death Knight:
[165395] = 252, -- Necrosis
[49206] = 252, -- Summon Gargoyle
[63560] = 252, -- Dark Transformation
[85948] = 252, -- Festering Strike
[49572] = 252, -- Shadow Infusion
[55090] = 252, -- Scourge Strike
[46584] = 252, -- Raise Dead
[51160] = 252, -- Ebon Plaguebringer
-- Frost Death Knight:
[130735] = 251, -- Soul Reaper
[51271] = 251, -- Pillar of Frost
[49020] = 251, -- Obliterate
[49143] = 251, -- Frost Strike
[49184] = 251, -- Howling Blast
-- Blood Death Knight:
[165394] = 250, -- Runic Strikes
[114866] = 250, -- Soul Reaper
[49222] = 250, -- Bone Shield
[55233] = 250, -- Vampiric Blood
[49028] = 250, -- Dancing Rune Weapon
[48982] = 250, -- Rune Tap
[56222] = 250, -- Dark Command
-- Balance Druid:
[152221] = 102, -- Stellar Flare
[88747] = 102, -- Wild Mushroom
[33605] = 102, -- Astral Showers
[48505] = 102, -- Starfall
[112071] = 102, -- Celestial Alignment
[78675] = 102, -- Solar Beam
[93399] = 102, -- Shooting Stars
[78674] = 102, -- Starsurge
[2912] = 102, -- Starfire
-- Feral Druid:
[171746] = 103, -- Claws of Shirvallah
[22570] = 103, -- Maim
[16974] = 103, -- Predatory Swiftness
[106785] = 103, -- Swipe
[1079] = 103, -- Rip
[52610] = 103, -- Savage Roar
[5217] = 103, -- Tiger's Fury
[1822] = 103, -- Rake
-- Guardian Druid:
[155835] = 104, -- Bristling Fur
[155578] = 104, -- Guardian of Elune
[80313] = 104, -- Pulverize
[159232] = 104, -- Ursa Major
[33745] = 104, -- Lacerate
[135288] = 104, -- Tooth and Claw
[6807] = 104, -- Maul
[62606] = 104, -- Savage Defense
-- Restoration Druid:
[145518] = 105, -- Genesis
[145205] = 105, -- Wild Mushroom
[48438] = 105, -- Wild Growth
[740] = 105, -- Tranquility
[102342] = 105, -- Ironbark
[33763] = 105, -- Lifebloom
[88423] = 105, -- Nature's Cure
[8936] = 105, -- Regrowth
[18562] = 105, -- Swiftmend
-- Beast Mastery Hunter:
[19574] = 253, -- Bestial Wrath
[82692] = 253, -- Focus Fire
[53257] = 253, -- Cobra Strikes
[19574] = 253, -- Bestial Wrath
--[34026] = 253, -- Kill Command
--[83381] = 253, -- Kill Command
-- Marksmanship Hunter:
[53209] = 254, -- Chimaera Shot
[3045] = 254, -- Rapid Fire
[19434] = 254, -- Aimed Shot
-- Survival Hunter:
[3674] = 255, -- Black Arrow
[53301] = 255, -- Explosive Shot
[87935] = 255, -- Serpent Sting
-- Arcane Mage:
[153626] = 62, -- Arcane Orb
[114923] = 62, -- Nether Tempest
[157980] = 62, -- Supernova
[12042] = 62, -- Arcane Power
[12051] = 62, -- Evocation
[31589] = 62, -- Slow
[5143] = 62, -- Arcane Missiles
[1449] = 62, -- Arcane Explosion
[44425] = 62, -- Arcane Barrage
[30451] = 62, -- Arcane Blast
-- Fire Mage:
[153561] = 63, -- Meteor
[11129] = 63, -- Combustion
[157981] = 63, -- Blast Wave
[44457] = 63, -- Living Bomb
[31661] = 63, -- Dragon's Breath
[2120] = 63, -- Flamestrike
[108853] = 63, -- Inferno Blast
[2948] = 63, -- Scorch
[133] = 63, -- Fireball
[11366] = 63, -- Pyroblast
-- Frost Mage:
[153595] = 64, -- Comet Storm
[112948] = 64, -- Frost Bomb
[157997] = 64, -- Ice Nova
[84714] = 64, -- Frozen Orb
[10] = 64, -- Blizzard
[30455] = 64, -- Ice Lance
[116] = 64, -- Frostbolt
-- Brewmaster Monk:
[157676] = 268, -- Chi Explosion
[119582] = 268, -- Purifying Brew
[115308] = 268, -- Elusive Brew
[115295] = 268, -- Guard
[115181] = 268, -- Breath of Fire
[121253] = 268, -- Keg Smash
[115180] = 268, -- Dizzying Haze
-- Mistweaver Monk:
[115310] = 269, -- Revival
[116680] = 269, -- Thunder Focus Tea
[115460] = 269, -- Detonate Chi
[116670] = 269, -- Uplift
[115294] = 269, -- Mana Tea
[116849] = 269, -- Life Cocoon
[115151] = 269, -- Renewing Mist
[124682] = 269, -- Enveloping Mist
[115175] = 269, -- Soothing Mist
-- Windwalker Monk:
[152175] = 270, -- Hurricane Strike
[116095] = 270, -- Disable
[122470] = 270, -- Touch of Karma
[124280] = 270, -- Touch of Karma
[128595] = 270, -- Combat Conditioning
[101545] = 270, -- Flying Serpent Kick
[113656] = 270, -- Fists of Fury
[117418] = 270, -- Fists of Fury
-- Holy Paladin:
[156910] = 65, -- Beacon of Faith
[157007] = 65, -- Beacon of Insight
[85222] = 65, -- Light of Dawn
[31821] = 65, -- Devotion Aura
[82326] = 65, -- Holy Light
[148039] = 65, -- Sacred Shield
[53563] = 65, -- Beacon of Light
[82327] = 65, -- Holy Radiance
[2812] = 65, -- Denounce
[20473] = 65, -- Holy Shock
-- Protection Paladin:
[53600] = 66, -- Shield of the Righteous
[26573] = 66, -- Consecration
[119072] = 66, -- Holy Wrath
[31935] = 66, -- Avenger's Shield
-- Retribution Paladin:
[157048] = 70, -- Final Verdict
[20164] = 70, -- Seal of Justice
[879] = 70, -- Exorcism
[53385] = 70, -- Divine Storm
[85256] = 70, -- Templar's Verdict
-- Discipline Priest:
[152118] = 256, -- Clarity of Will
[109964] = 256, -- Spirit Shell
[62618] = 256, -- Power Word: Barrier
[33206] = 256, -- Pain Suppression
[81751] = 256, -- Atonement
[94472] = 256, -- Atonement (crit)
[47753] = 256, -- Divine Aegis
[132157] = 256, -- Holy Nova
[47750] = 256, -- Penance
-- Holy Priest:
[155245] = 257, -- Clarity of Purpose
[64843] = 257, -- Divine Hymn
[34861] = 257, -- Circle of Healing
[32546] = 257, -- Binding Heal
[596] = 257, -- Prayer of Healing
[126135] = 257, -- Lightwell
[139] = 257, -- Renew
[88625] = 257, -- Holy Word: Chastise
-- Shadow Priest:
[127632] = 258, -- Cascade
[122121] = 258, -- Divine Star
[120644] = 258, -- Halo
[15286] = 258, -- Vampiric Embrace
[32379] = 258, -- Shadow Word: Death
[73510] = 258, -- Mind Spike
[78203] = 258, -- Shadowy Apparitions
[34914] = 258, -- Vampiric Touch
[2944] = 258, -- Devouring Plague
[8092] = 258, -- Mind Blast
[15407] = 258, -- Mind Flay
-- Assassination Rogue:
[79140] = 259, -- Vendetta
[111240] = 259, -- Dispatch
[32645] = 259, -- Envenom
[1329] = 259, -- Mutilate
[79134] = 259, -- Venomous Wounds
-- Combat Rogue:
[51690] = 260, -- Killing Spree
[84617] = 260, -- Revealing Strike
-- Subtlety Rogue:
[53] = 261, -- Backstab
[16511] = 261, -- Hemorrhage
-- Elemental Shaman:
[165399] = 262, -- Elemental Overload
[165477] = 262, -- Unleashed Fury
[165339] = 262, -- Ascendance
[165462] = 262, -- Unleash Flame
[170374] = 262, -- Mastery: Molten Earth
[61882] = 262, -- Earthquake
[77756] = 262, -- Lava Surge
[86108] = 262, -- Mail Specialization
[88766] = 262, -- Fulmination
[60188] = 262, -- Elemental Fury
[29000] = 262, -- Elemental Reach
[62099] = 262, -- Shamanism
[123099] = 262, -- Spiritual Insight
[51490] = 262, -- Thunderstorm
[8042] = 262, -- Earth Shock
-- Enhancement Shaman:
[165368] = 263, -- Lightning Strikes
[117012] = 263, -- Unleashed Fury
[165341] = 263, -- Ascendance
[73680] = 263, -- Unleash Elements
[77223] = 263, -- Mastery: Enhanced Elements
[51533] = 263, -- Feral Spirit
[58875] = 263, -- Spirit Walk
[51530] = 263, -- Maelstrom Weapon
[86099] = 263, -- Mail Specialization
[1535] = 263, -- Fire Nova
[8190] = 263, -- Magma Totem
[166221] = 263, -- Enhanced Weapons
[33757] = 263, -- Windfury
[17364] = 263, -- Stormstrike
[16282] = 263, -- Flurry
[86629] = 263, -- Dual Wield
[10400] = 263, -- Flametongue
[60103] = 263, -- Lava Lash
[30814] = 263, -- Mental Quickness
[51522] = 263, -- Primal Wisdom
-- Restoration Shaman:
[157153] = 264, -- Cloudburst Totem
[157154] = 264, -- High Tide
[165391] = 264, -- Purification
[165479] = 264, -- Unleashed Fury
[165344] = 264, -- Ascendance
[77226] = 264, -- Mastery: Deep Healing
[98008] = 264, -- Spirit Link Totem
[108280] = 264, -- Healing Tide Totem
[77472] = 264, -- Healing Wave
[86100] = 264, -- Mail Specialization
[51564] = 264, -- Tidal Waves
[1064] = 264, -- Chain Heal
[16196] = 264, -- Resurgence
[974] = 264, -- Earth Shield
[52127] = 264, -- Water Shield
[77130] = 264, -- Purify Spirit
[55453] = 264, -- Telluric Currents
[95862] = 264, -- Meditation
[16213] = 264, -- Restorative Waves
[61295] = 264, -- Riptide
[112858] = 264, -- Spiritual Insight
-- Affliction Warlock:
[152109] = 265, -- Soulburn: Haunt
[165367] = 265, -- Eradication
[113860] = 265, -- Dark Soul: Misery
[77215] = 265, -- Mastery: Potent Afflictions
[86121] = 265, -- Soul Swap
[48181] = 265, -- Haunt
[980] = 265, -- Agony
[103103] = 265, -- Drain Soul
[27243] = 265, -- Seed of Corruption
[117198] = 265, -- Soul Shards
[74434] = 265, -- Soulburn
[108558] = 265, -- Nightfall
[30108] = 265, -- Unstable Affliction
-- Demonology Warlock:
[157695] = 266, -- Demonbolt
[165392] = 266, -- Demonic Tactics
[113861] = 266, -- Dark Soul: Knowledge
[77219] = 266, -- Mastery: Master Demonologist
[171975] = 266, -- Grimoire of Synergy
[30146] = 266, -- Summon Felguard
[114592] = 266, -- Wild Imps
[1949] = 266, -- Hellfire
[105174] = 266, -- Hand of Gul'dan
[6353] = 266, -- Soul Fire
[109151] = 266, -- Demonic Leap
[108869] = 266, -- Decimation
[104315] = 266, -- Demonic Fury
[124913] = 266, -- Doom
[103958] = 266, -- Metamorphosis
[122351] = 266, -- Molten Core
-- Destruction Warlock:
[157696] = 267, -- Charred Remains
[165363] = 267, -- Devastation
[113858] = 267, -- Dark Soul: Instability
[77220] = 267, -- Mastery: Emberstorm
[120451] = 267, -- Flames of Xoroth
[117896] = 267, -- Backdraft
[109784] = 267, -- Aftermath
[108683] = 267, -- Fire and Brimstone
[17877] = 267, -- Shadowburn
[80240] = 267, -- Havoc
[5740] = 267, -- Rain of Fire
[114635] = 267, -- Ember Tap
[174848] = 267, -- Searing Flames
[348] = 267, -- Immolate
[108647] = 267, -- Burning Embers
[116858] = 267, -- Chaos Bolt
[111546] = 267, -- Chaotic Energy
[17962] = 267, -- Conflagrate
[29722] = 267, -- Incinerate
-- Arms Warrior:
[165365] = 71, -- Weapon Mastery
[167105] = 71, -- Colossus Smash
[12328] = 71, -- Sweeping Strikes
[86101] = 71, -- Plate Specialization
[1464] = 71, -- Slam
[56636] = 71, -- Taste for Blood
[12294] = 71, -- Mortal Strike
[12712] = 71, -- Seasoned Soldier
[772] = 71, -- Rend
[174737] = 71, -- Enhanced Rend
-- Fury Warrior:
[165383] = 72, -- Cruelty
[12950] = 72, -- Meat Cleaver
[46915] = 72, -- Bloodsurge
[86110] = 72, -- Plate Specialization
[169679] = 72, -- Furious Strikes
[169683] = 72, -- Unquenchable Thirst
[81099] = 72, -- Single-Minded Fury
[85288] = 72, -- Raging Blow
[12323] = 72, -- Piercing Howl
[100130] = 72, -- Wild Strike
[23881] = 72, -- Bloodthirst
[23588] = 72, -- Crazed Berserker
[46917] = 72, -- Titan's Grip
[5308] = 72, -- Execute
-- Protection Warrior:
[152276] = 73, -- Gladiator's Resolve
[159362] = 73, -- Blood Craze
[165393] = 73, -- Shield Mastery
[114192] = 73, -- Mocking Banner
[76857] = 73, -- Mastery: Critical Block
[161798] = 73, -- Riposte
[84608] = 73, -- Bastion of Defense
[1160] = 73, -- Demoralizing Shout
[86535] = 73, -- Plate Specialization
[871] = 73, -- Shield Wall
[169680] = 73, -- Heavy Repercussions
[169685] = 73, -- Unyielding Strikes
[12975] = 73, -- Last Stand
[6572] = 73, -- Revenge
[20243] = 73, -- Devastate
[2565] = 73, -- Shield Block
[161608] = 73, -- Bladed Armor
[23922] = 73, -- Shield Slam
[46953] = 73, -- Sword and Board
[122509] = 73, -- Ultimatum
[29144] = 73, -- Unwavering Sentinel
[157497] = 73, -- Improved Block
}
_detalhes.ClassSpellList = {
+8 -2
View File
@@ -36,7 +36,7 @@ function gump:NewLabel2 (parent, container, member, text, font, size, color)
return newFontString
end
function gump:NewDetailsButton (parent, container, instancia, func, param1, param2, w, h, pic_up, pic_down, pic_disabled, pic_highlight, options, FrameName)
function gump:NewDetailsButton (parent, container, instancia, func, param1, param2, w, h, pic_up, pic_down, pic_disabled, pic_highlight, options, FrameName, inherits, ischeck)
if (not parent) then
return nil
@@ -46,7 +46,13 @@ function gump:NewDetailsButton (parent, container, instancia, func, param1, para
h = h or 16
options = options or {}
local new_button = CreateFrame ("Button", FrameName, parent)
local new_button
if (ischeck) then
new_button = CreateFrame ("CheckButton", FrameName, parent, inherits)
else
new_button = CreateFrame ("Button", FrameName, parent)
end
new_button:SetWidth (w)
new_button:SetHeight (h)
+1
View File
@@ -998,6 +998,7 @@
local pickicon_callback = function (texture)
box0.icontexture:SetTexture (texture)
end
local pickicon = function()
gump:IconPick (pickicon_callback, true)
+9 -1
View File
@@ -3033,6 +3033,11 @@ function _detalhes.janela_info:monta_relatorio (botao)
local amt = _detalhes.report_lines
if (not player) then
_detalhes:Msg ("Player not found.")
return
end
local report_lines
if (botao == 1) then --> botão da esquerda
@@ -3040,7 +3045,10 @@ function _detalhes.janela_info:monta_relatorio (botao)
for index, barra in _ipairs (info.barras1) do
if (barra:IsShown()) then
local spellid = barra.show
if (spellid > 10) then
if (atributo == 1 and sub_atributo == 4) then --> friendly fire
report_lines [#report_lines+1] = barra.texto_esquerdo:GetText() .. ": " .. barra.texto_direita:GetText()
elseif (spellid > 10) then
local link = GetSpellLink (spellid)
report_lines [#report_lines+1] = index .. ". " .. link .. ": " .. barra.texto_direita:GetText()
else
+167 -97
View File
@@ -1952,9 +1952,6 @@ function window:CreateFrame18()
--> auto current segment
g:NewSwitch (frame18, _, "$parentAutoCurrentSlider", "autoCurrentSlider", 60, 20, _, _, instance.auto_current)
-- Auto Current Segment
g:NewLabel (frame18, _, "$parentAutoCurrentLabel", "autoCurrentLabel", Loc ["STRING_OPTIONS_INSTANCE_CURRENT"], "GameFontHighlightLeft")
frame18.autoCurrentSlider:SetPoint ("left", frame18.autoCurrentLabel, "right", 2)
@@ -1965,72 +1962,7 @@ function window:CreateFrame18()
end
window:CreateLineBackground2 (frame18, "autoCurrentSlider", "autoCurrentLabel", Loc ["STRING_OPTIONS_INSTANCE_CURRENT_DESC"])
--> show total bar
g:NewLabel (frame18, _, "$parentTotalBarLabel", "totalBarLabel", Loc ["STRING_OPTIONS_SHOW_TOTALBAR"], "GameFontHighlightLeft")
g:NewSwitch (frame18, _, "$parentTotalBarSlider", "totalBarSlider", 60, 20, _, _, instance.total_bar.enabled)
frame18.totalBarSlider:SetPoint ("left", frame18.totalBarLabel, "right", 2)
frame18.totalBarSlider.OnSwitch = function (self, instance, value)
instance.total_bar.enabled = value
instance:InstanceReset()
_detalhes:SendOptionsModifiedEvent (DetailsOptionsWindow.instance)
end
window:CreateLineBackground2 (frame18, "totalBarSlider", "totalBarLabel", Loc ["STRING_OPTIONS_SHOW_TOTALBAR_DESC"])
--> total bar color
local totalbarcolor_callback = function (button, r, g, b, a)
_G.DetailsOptionsWindow.instance.total_bar.color[1] = r
_G.DetailsOptionsWindow.instance.total_bar.color[2] = g
_G.DetailsOptionsWindow.instance.total_bar.color[3] = b
_G.DetailsOptionsWindow.instance:InstanceReset()
_detalhes:SendOptionsModifiedEvent (DetailsOptionsWindow.instance)
end
g:NewColorPickButton (frame18, "$parentTotalBarColorPick", "totalBarColorPick", totalbarcolor_callback)
g:NewLabel (frame18, _, "$parentTotalBarColorPickLabel", "totalBarPickColorLabel", Loc ["STRING_OPTIONS_COLOR"], "GameFontHighlightLeft")
frame18.totalBarColorPick:SetPoint ("left", frame18.totalBarPickColorLabel, "right", 2, 0)
window:CreateLineBackground2 (frame18, "totalBarColorPick", "totalBarPickColorLabel", Loc ["STRING_OPTIONS_SHOW_TOTALBAR_COLOR_DESC"])
--> total bar only in group
g:NewLabel (frame18, _, "$parentTotalBarOnlyInGroupLabel", "totalBarOnlyInGroupLabel", Loc ["STRING_OPTIONS_SHOW_TOTALBAR_INGROUP"], "GameFontHighlightLeft")
g:NewSwitch (frame18, _, "$parentTotalBarOnlyInGroupSlider", "totalBarOnlyInGroupSlider", 60, 20, _, _, instance.total_bar.only_in_group)
frame18.totalBarOnlyInGroupSlider:SetPoint ("left", frame18.totalBarOnlyInGroupLabel, "right", 2)
frame18.totalBarOnlyInGroupSlider.OnSwitch = function (self, instance, value)
instance.total_bar.only_in_group = value
instance:InstanceReset()
_detalhes:SendOptionsModifiedEvent (DetailsOptionsWindow.instance)
end
window:CreateLineBackground2 (frame18, "totalBarOnlyInGroupSlider", "totalBarOnlyInGroupLabel", Loc ["STRING_OPTIONS_SHOW_TOTALBAR_INGROUP_DESC"])
--> total bar icon
local totalbar_pickicon_callback = function (texture)
instance.total_bar.icon = texture
frame18.totalBarIconTexture:SetTexture (texture)
instance:InstanceReset()
_detalhes:SendOptionsModifiedEvent (DetailsOptionsWindow.instance)
end
local totalbar_pickicon = function()
g:IconPick (totalbar_pickicon_callback, true)
_detalhes:SendOptionsModifiedEvent (DetailsOptionsWindow.instance)
end
g:NewLabel (frame18, _, "$parentTotalBarIconLabel", "totalBarIconLabel", Loc ["STRING_OPTIONS_SHOW_TOTALBAR_ICON"], "GameFontHighlightLeft")
g:NewImage (frame18, nil, 20, 20, nil, nil, "totalBarIconTexture", "$parentTotalBarIconTexture")
g:NewButton (frame18, _, "$parentTotalBarIconButton", "totalBarIconButton", 20, 20, totalbar_pickicon)
frame18.totalBarIconButton:InstallCustomTexture (nil, nil, nil, true)
frame18.totalBarIconButton:SetPoint ("left", frame18.totalBarIconLabel, "right", 2, 0)
frame18.totalBarIconTexture:SetPoint ("left", frame18.totalBarIconLabel, "right", 2, 0)
window:CreateLineBackground2 (frame18, "totalBarIconButton", "totalBarIconLabel", Loc ["STRING_OPTIONS_SHOW_TOTALBAR_ICON_DESC"])
--> instances
g:NewLabel (frame18, _, "$parentDeleteInstanceLabel", "deleteInstanceLabel", Loc ["STRING_OPTIONS_INSTANCE_DELETE"], "GameFontHighlightLeft")
@@ -2127,6 +2059,32 @@ function window:CreateFrame18()
window:CreateLineBackground2 (frame18, "MenuTextSizeSlider", "MenuTextSizeLabel", Loc ["STRING_OPTIONS_MENU_FONT_SIZE_DESC"])
--> menu text face
local onSelectFont = function (_, _, fontName)
_detalhes.font_faces.menus = fontName
end
local buildFontMenu = function()
local fontObjects = SharedMedia:HashTable ("font")
local fontTable = {}
for name, fontPath in pairs (fontObjects) do
fontTable[#fontTable+1] = {value = name, label = name, icon = font_select_icon, texcoord = font_select_texcoord, onclick = onSelectFont, font = fontPath, descfont = name, desc = Loc ["STRING_MUSIC_DETAILS_ROBERTOCARLOS"]}
end
table.sort (fontTable, function (t1, t2) return t1.label < t2.label end)
return fontTable
end
local d = g:NewDropDown (frame18, _, "$parentFontDropdown", "fontDropdown", DROPDOWN_WIDTH, 20, buildFontMenu, nil)
d.onenter_backdrop = dropdown_backdrop_onenter
d.onleave_backdrop = dropdown_backdrop_onleave
d:SetBackdrop (dropdown_backdrop)
d:SetBackdropColor (unpack (dropdown_backdrop_onleave))
g:NewLabel (frame18, _, "$parentFontLabel", "fontLabel", Loc ["STRING_OPTIONS_MENU_FONT_FACE"], "GameFontHighlightLeft")
frame18.fontDropdown:SetPoint ("left", frame18.fontLabel, "right", 2)
window:CreateLineBackground2 (frame18, "fontDropdown", "fontLabel", Loc ["STRING_OPTIONS_MENU_FONT_FACE_DESC"])
--> disable groups
g:NewLabel (frame18, _, "$parentDisableGroupsLabel", "DisableGroupsLabel", Loc ["STRING_OPTIONS_DISABLE_GROUPS"], "GameFontHighlightLeft")
g:NewSwitch (frame18, _, "$parentDisableGroupsSlider", "DisableGroupsSlider", 60, 20, _, _, _detalhes.disable_window_groups)
@@ -2223,7 +2181,6 @@ function window:CreateFrame18()
g:NewLabel (frame18, _, "$parentInstancesMiscAnchor", "instancesMiscLabel", Loc ["STRING_OPTIONS_INSTANCES"], "GameFontNormal")
g:NewLabel (frame18, _, "$parentSwitchesAnchor", "switchesAnchorLabel", Loc ["STRING_OPTIONS_SWITCH_ANCHOR"], "GameFontNormal")
g:NewLabel (frame18, _, "$parentTotalBarAnchor", "totalBarAnchorLabel", Loc ["STRING_OPTIONS_TOTALBAR_ANCHOR"], "GameFontNormal")
g:NewLabel (frame18, _, "$parentReportAnchor", "reportAnchorLabel", Loc ["STRING_OPTIONS_REPORT_ANCHOR"], "GameFontNormal")
@@ -2260,14 +2217,11 @@ function window:CreateFrame18()
{"instancesMiscLabel", 1, true},
{"deleteInstanceLabel", 2},
{"MenuTextSizeLabel", 3},
{"DisableGroupsLabel", 4},
{"DisableResetLabel", 5},
{"scrollLabel", 6},
{"totalBarAnchorLabel", 7, true},
{"totalBarIconLabel", 8},
{"totalBarPickColorLabel", 9},
{"totalBarLabel", 10},
{"totalBarOnlyInGroupLabel", 11},
{"fontLabel", 4},
{"DisableGroupsLabel", 5},
{"DisableResetLabel", 6},
{"scrollLabel", 7},
}
window:arrange_menu (frame18, right_side, window.right_start_at, -90)
@@ -5017,6 +4971,17 @@ function window:CreateFrame4()
local OnSelectIconFile = function (_, _, iconpath)
_G.DetailsOptionsWindow.instance:SetBarSettings (nil, nil, nil, nil, nil, nil, nil, nil, iconpath)
frame4.iconFileEntry:SetText (iconpath)
if (_G.DetailsOptionsWindow.instance.row_info.use_spec_icons) then
_G.DetailsOptionsWindow.instance:SetBarSpecIconSettings (false)
end
_detalhes:SendOptionsModifiedEvent (DetailsOptionsWindow.instance)
end
local OnSelectIconFileSpec = function (_, _, iconpath)
_G.DetailsOptionsWindow.instance:SetBarSpecIconSettings (true, iconpath, true)
frame4.iconFileEntry:SetText (iconpath)
_detalhes:SendOptionsModifiedEvent (DetailsOptionsWindow.instance)
end
@@ -5026,6 +4991,8 @@ function window:CreateFrame4()
local list = {
{value = [[]], label = Loc ["STRING_OPTIONS_BAR_ICONFILE1"], onclick = OnSelectIconFile, icon = icontexture, texcoord = iconcoords, iconsize = iconsize, iconcolor = {1, 1, 1, .3}},
{value = [[Interface\AddOns\Details\images\classes_small]], label = Loc ["STRING_OPTIONS_BAR_ICONFILE2"], onclick = OnSelectIconFile, icon = icontexture, texcoord = iconcoords, iconsize = iconsize},
{value = [[Interface\AddOns\Details\images\spec_icons_normal]], label = "Specialization", onclick = OnSelectIconFileSpec, icon = [[Interface\AddOns\Details\images\icons]], texcoord = {2/512, 32/512, 480/512, 510/512}, iconsize = iconsize},
{value = [[Interface\AddOns\Details\images\spec_icons_normal_alpha]], label = "Specialization Alpha", onclick = OnSelectIconFileSpec, icon = [[Interface\AddOns\Details\images\icons]], texcoord = {2/512, 32/512, 480/512, 510/512}, iconsize = iconsize},
{value = [[Interface\AddOns\Details\images\classes_small_bw]], label = Loc ["STRING_OPTIONS_BAR_ICONFILE3"], onclick = OnSelectIconFile, icon = icontexture, texcoord = iconcoords, iconsize = iconsize},
{value = [[Interface\AddOns\Details\images\classes_small_alpha]], label = Loc ["STRING_OPTIONS_BAR_ICONFILE4"], onclick = OnSelectIconFile, icon = icontexture, texcoord = iconcoords, iconsize = iconsize},
{value = [[Interface\AddOns\Details\images\classes_small_alpha_bw]], label = Loc ["STRING_OPTIONS_BAR_ICONFILE6"], onclick = OnSelectIconFile, icon = icontexture, texcoord = iconcoords, iconsize = iconsize},
@@ -5035,7 +5002,14 @@ function window:CreateFrame4()
return list
end
local d = g:NewDropDown (frame4, _, "$parentIconSelectDropdown", "IconSelectDropdown", DROPDOWN_WIDTH, 20, BuiltIconList, instance.row_info.icon_file)
local default
if (instance.row_info.use_spec_icons) then
default = _G.DetailsOptionsWindow.instance.row_info.spec_file
else
default = instance.row_info.icon_file
end
local d = g:NewDropDown (frame4, _, "$parentIconSelectDropdown", "IconSelectDropdown", DROPDOWN_WIDTH, 20, BuiltIconList, default)
d.onenter_backdrop = dropdown_backdrop_onenter
d.onleave_backdrop = dropdown_backdrop_onleave
d:SetBackdrop (dropdown_backdrop)
@@ -5050,16 +5024,33 @@ function window:CreateFrame4()
frame4.iconFileEntry.tooltip = "- Press escape to restore default value.\n- Leave empty to hide icons."
frame4.iconFileEntry:SetHook ("OnEnterPressed", function()
_G.DetailsOptionsWindow.instance:SetBarSettings (nil, nil, nil, nil, nil, nil, nil, nil, frame4.iconFileEntry.text)
local instance = _G.DetailsOptionsWindow.instance
local text = frame4.iconFileEntry.text
if (text:find ("spec_")) then
instance:SetBarSpecIconSettings (true, text, true)
else
if (instance.row_info.use_spec_icons) then
instance:SetBarSpecIconSettings (false)
end
instance:SetBarSettings (nil, nil, nil, nil, nil, nil, nil, nil, text)
end
d:Select (false)
d:Select (frame4.iconFileEntry.text)
_detalhes:SendOptionsModifiedEvent (DetailsOptionsWindow.instance)
end)
frame4.iconFileEntry:SetHook ("OnEscapePressed", function()
frame4.iconFileEntry:SetText ([[Interface\AddOns\Details\images\classes_small]])
local instance = _G.DetailsOptionsWindow.instance
if (instance.row_info.use_spec_icons) then
frame4.iconFileEntry:SetText (instance.row_info.spec_file)
else
frame4.iconFileEntry:SetText (instance.row_info.icon_file)
end
frame4.iconFileEntry:ClearFocus()
_G.DetailsOptionsWindow.instance:SetBarSettings (nil, nil, nil, nil, nil, nil, nil, nil, [[Interface\AddOns\Details\images\classes_small]])
_detalhes:SendOptionsModifiedEvent (DetailsOptionsWindow.instance)
return true
end)
@@ -6544,6 +6535,74 @@ function window:CreateFrame8()
end
window:CreateLineBackground2 (frame8, "ShowMeSlider", "ShowMeLabel", Loc ["STRING_OPTIONS_BAR_FOLLOWING_DESC"])
--> show total bar
g:NewLabel (frame8, _, "$parentTotalBarAnchor", "totalBarAnchorLabel", Loc ["STRING_OPTIONS_TOTALBAR_ANCHOR"], "GameFontNormal")
g:NewLabel (frame8, _, "$parentTotalBarLabel", "totalBarLabel", Loc ["STRING_OPTIONS_SHOW_TOTALBAR"], "GameFontHighlightLeft")
g:NewSwitch (frame8, _, "$parentTotalBarSlider", "totalBarSlider", 60, 20, _, _, instance.total_bar.enabled)
frame8.totalBarSlider:SetPoint ("left", frame8.totalBarLabel, "right", 2)
frame8.totalBarSlider.OnSwitch = function (self, instance, value)
instance.total_bar.enabled = value
instance:InstanceReset()
_detalhes:SendOptionsModifiedEvent (DetailsOptionsWindow.instance)
end
window:CreateLineBackground2 (frame8, "totalBarSlider", "totalBarLabel", Loc ["STRING_OPTIONS_SHOW_TOTALBAR_DESC"])
--> total bar color
local totalbarcolor_callback = function (button, r, g, b, a)
_G.DetailsOptionsWindow.instance.total_bar.color[1] = r
_G.DetailsOptionsWindow.instance.total_bar.color[2] = g
_G.DetailsOptionsWindow.instance.total_bar.color[3] = b
_G.DetailsOptionsWindow.instance:InstanceReset()
_detalhes:SendOptionsModifiedEvent (DetailsOptionsWindow.instance)
end
g:NewColorPickButton (frame8, "$parentTotalBarColorPick", "totalBarColorPick", totalbarcolor_callback)
g:NewLabel (frame8, _, "$parentTotalBarColorPickLabel", "totalBarPickColorLabel", Loc ["STRING_OPTIONS_COLOR"], "GameFontHighlightLeft")
frame8.totalBarColorPick:SetPoint ("left", frame8.totalBarPickColorLabel, "right", 2, 0)
window:CreateLineBackground2 (frame8, "totalBarColorPick", "totalBarPickColorLabel", Loc ["STRING_OPTIONS_SHOW_TOTALBAR_COLOR_DESC"])
--> total bar only in group
g:NewLabel (frame8, _, "$parentTotalBarOnlyInGroupLabel", "totalBarOnlyInGroupLabel", Loc ["STRING_OPTIONS_SHOW_TOTALBAR_INGROUP"], "GameFontHighlightLeft")
g:NewSwitch (frame8, _, "$parentTotalBarOnlyInGroupSlider", "totalBarOnlyInGroupSlider", 60, 20, _, _, instance.total_bar.only_in_group)
frame8.totalBarOnlyInGroupSlider:SetPoint ("left", frame8.totalBarOnlyInGroupLabel, "right", 2)
frame8.totalBarOnlyInGroupSlider.OnSwitch = function (self, instance, value)
instance.total_bar.only_in_group = value
instance:InstanceReset()
_detalhes:SendOptionsModifiedEvent (DetailsOptionsWindow.instance)
end
window:CreateLineBackground2 (frame8, "totalBarOnlyInGroupSlider", "totalBarOnlyInGroupLabel", Loc ["STRING_OPTIONS_SHOW_TOTALBAR_INGROUP_DESC"])
--> total bar icon
local totalbar_pickicon_callback = function (texture)
instance.total_bar.icon = texture
frame8.totalBarIconTexture:SetTexture (texture)
instance:InstanceReset()
_detalhes:SendOptionsModifiedEvent (DetailsOptionsWindow.instance)
end
local totalbar_pickicon = function()
g:IconPick (totalbar_pickicon_callback, true)
_detalhes:SendOptionsModifiedEvent (DetailsOptionsWindow.instance)
end
g:NewLabel (frame8, _, "$parentTotalBarIconLabel", "totalBarIconLabel", Loc ["STRING_OPTIONS_SHOW_TOTALBAR_ICON"], "GameFontHighlightLeft")
g:NewImage (frame8, nil, 20, 20, nil, nil, "totalBarIconTexture", "$parentTotalBarIconTexture")
g:NewButton (frame8, _, "$parentTotalBarIconButton", "totalBarIconButton", 20, 20, totalbar_pickicon)
frame8.totalBarIconButton:InstallCustomTexture (nil, nil, nil, true)
frame8.totalBarIconButton:SetPoint ("left", frame8.totalBarIconLabel, "right", 2, 0)
frame8.totalBarIconTexture:SetPoint ("left", frame8.totalBarIconLabel, "right", 2, 0)
window:CreateLineBackground2 (frame8, "totalBarIconButton", "totalBarIconLabel", Loc ["STRING_OPTIONS_SHOW_TOTALBAR_ICON_DESC"])
--> anchors
local x = window.left_start_at
@@ -6561,6 +6620,12 @@ function window:CreateFrame8()
{"ModelLowerEnabledLabel", 6},
{"ModelLowerAlphaLabel", 7},
{"ModelLowerSelect", 8},
{"totalBarAnchorLabel", 9, true},
{"totalBarIconLabel", 10},
{"totalBarPickColorLabel", 11},
{"totalBarLabel", 12},
{"totalBarOnlyInGroupLabel", 13},
}
window:arrange_menu (frame8, left_side, x, -90)
@@ -6759,9 +6824,6 @@ function window:CreateFrame9()
{value = [[Interface\Glues\COMMON\GLUES-WOW-BCLOGO]], label = "Burning Cruzade Logo", onclick = onSelectSecTexture, icon = [[Interface\Glues\COMMON\GLUES-WOW-BCLOGO]], texcoord = nil},
{value = [[Interface\Glues\COMMON\GLUES-WOW-CCLOGO]], label = "Cataclysm Logo", onclick = onSelectSecTexture, icon = [[Interface\Glues\COMMON\GLUES-WOW-CCLOGO]], texcoord = nil},
{value = [[Interface\Glues\COMMON\Glues-WOW-WoltkLogo]], label = "WotLK Logo", onclick = onSelectSecTexture, icon = [[Interface\Glues\COMMON\Glues-WOW-WoltkLogo]], texcoord = nil},
--{value = [[]], label = "", onclick = onSelectSecTexture, icon = [[]], texcoord = nil},
},
["CREDITS"] = {
@@ -7284,7 +7346,7 @@ function window:CreateFrame10()
titulo_performance_general_desc.width = 320
--------------- Memory
local s = g:NewSlider (frame10, _, "$parentSliderSegmentsSave", "segmentsSliderToSave", SLIDER_WIDTH, 20, 1, 5, 1, _detalhes.segments_amount_to_save)
local s = g:NewSlider (frame10, _, "$parentSliderSegmentsSave", "segmentsSliderToSave", SLIDER_WIDTH, 20, 1, 25, 1, _detalhes.segments_amount_to_save)
s:SetBackdrop (slider_backdrop)
s:SetBackdropColor (unpack (slider_backdrop_color))
s:SetThumbSize (50)
@@ -8711,9 +8773,15 @@ end --> if not window
_G.DetailsOptionsWindow4BackdropSizeHeight.MyObject:SetValue (editing_instance.row_info.backdrop.size)
_G.DetailsOptionsWindow4BackdropColorPick.MyObject:SetColor (unpack (editing_instance.row_info.backdrop.color))
_G.DetailsOptionsWindow4IconFileEntry:SetText (editing_instance.row_info.icon_file)
_G.DetailsOptionsWindow4IconSelectDropdown.MyObject:Select (false)
_G.DetailsOptionsWindow4IconSelectDropdown.MyObject:Select (editing_instance.row_info.icon_file)
local default
if (editing_instance.row_info.use_spec_icons) then
default = editing_instance.row_info.spec_file
else
default = editing_instance.row_info.icon_file
end
_G.DetailsOptionsWindow4IconSelectDropdown.MyObject:Select (default)
_G.DetailsOptionsWindow4IconFileEntry:SetText (default)
--> window 5
@@ -8815,6 +8883,15 @@ end --> if not window
_G.DetailsOptionsWindow8ShowMeSlider.MyObject:SetFixedParameter (editing_instance)
_G.DetailsOptionsWindow8ShowMeSlider.MyObject:SetValue (editing_instance.following.enabled)
_G.DetailsOptionsWindow8TotalBarSlider.MyObject:SetFixedParameter (editing_instance)
_G.DetailsOptionsWindow8TotalBarSlider.MyObject:SetValue (editing_instance.total_bar.enabled)
_G.DetailsOptionsWindow8TotalBarColorPick.MyObject:SetColor (unpack (editing_instance.total_bar.color))
_G.DetailsOptionsWindow8TotalBarOnlyInGroupSlider.MyObject:SetFixedParameter (editing_instance)
_G.DetailsOptionsWindow8TotalBarOnlyInGroupSlider.MyObject:SetValue (editing_instance.total_bar.only_in_group)
_G.DetailsOptionsWindow8TotalBarIconTexture.MyObject:SetTexture (editing_instance.total_bar.icon)
--> window 10
_G.DetailsOptionsWindow10SliderMemory.MyObject:SetValue (_detalhes.memory_threshold)
_G.DetailsOptionsWindow10PanicModeSlider.MyObject:SetValue (_detalhes.segments_panic_mode)
@@ -9018,17 +9095,10 @@ end --> if not window
_G.DetailsOptionsWindow18AutoCurrentSlider.MyObject:SetFixedParameter (editing_instance)
_G.DetailsOptionsWindow18AutoCurrentSlider.MyObject:SetValue (editing_instance.auto_current)
_G.DetailsOptionsWindow18TotalBarSlider.MyObject:SetFixedParameter (editing_instance)
_G.DetailsOptionsWindow18TotalBarSlider.MyObject:SetValue (editing_instance.total_bar.enabled)
_G.DetailsOptionsWindow18TotalBarColorPick.MyObject:SetColor (unpack (editing_instance.total_bar.color))
_G.DetailsOptionsWindow18TotalBarOnlyInGroupSlider.MyObject:SetFixedParameter (editing_instance)
_G.DetailsOptionsWindow18TotalBarOnlyInGroupSlider.MyObject:SetValue (editing_instance.total_bar.only_in_group)
_G.DetailsOptionsWindow18TotalBarIconTexture.MyObject:SetTexture (editing_instance.total_bar.icon)
_G.DetailsOptionsWindow18MenuTextSizeSlider.MyObject:SetValue (_detalhes.font_sizes.menus)
_G.DetailsOptionsWindow18FontDropdown.MyObject:Select (_detalhes.font_faces.menus)
--> window 19
_G.DetailsOptionsWindow19MinimapSlider.MyObject:SetValue (not _detalhes.minimap.hide)
_G.DetailsOptionsWindow19MinimapActionDropdown.MyObject:Select (_detalhes.minimap.onclick_what_todo)
+62 -14
View File
@@ -1556,6 +1556,7 @@ local resize_scripts_onenter = function (self)
GameCooltip:SetType ("tooltip")
GameCooltip:AddFromTable (resizeTooltip)
GameCooltip:SetOption ("TextSize", _detalhes.font_sizes.menus)
GameCooltip:SetOption ("TextFont", _detalhes.font_faces.menus)
GameCooltip:SetOption ("NoLastSelectedBar", true)
GameCooltip:SetWallpaper (1, [[Interface\SPELLBOOK\Spellbook-Page-1]], menu_wallpaper_tex, menu_wallpaper_color, true)
GameCooltip:SetBackdrop (1, _detalhes.tooltip_backdrop, nil, _detalhes.tooltip_border_color)
@@ -1607,6 +1608,7 @@ local lockFunctionOnEnter = function (self)
GameCooltip:AddFromTable (lockButtonTooltip)
GameCooltip:SetOption ("NoLastSelectedBar", true)
GameCooltip:SetOption ("TextSize", _detalhes.font_sizes.menus)
GameCooltip:SetOption ("TextFont", _detalhes.font_faces.menus)
GameCooltip:SetWallpaper (1, [[Interface\SPELLBOOK\Spellbook-Page-1]], menu_wallpaper_tex, menu_wallpaper_color, true)
GameCooltip:SetBackdrop (1, _detalhes.tooltip_backdrop, nil, _detalhes.tooltip_border_color)
GameCooltip:SetOwner (self)
@@ -1691,6 +1693,7 @@ local unSnapButtonOnEnter = function (self)
GameCooltip:Reset()
GameCooltip:AddFromTable (unSnapButtonTooltip)
GameCooltip:SetOption ("TextSize", _detalhes.font_sizes.menus)
GameCooltip:SetOption ("TextFont", _detalhes.font_faces.menus)
GameCooltip:SetWallpaper (1, [[Interface\SPELLBOOK\Spellbook-Page-1]], menu_wallpaper_tex, menu_wallpaper_color, true)
GameCooltip:SetBackdrop (1, _detalhes.tooltip_backdrop, nil, _detalhes.tooltip_border_color)
GameCooltip:ShowCooltip (self, "tooltip")
@@ -2435,13 +2438,13 @@ function _detalhes:InstanceAlert (msg, icon, time, clickfunc)
if (icon) then
if (type (icon) == "table") then
local texture, w, h, animate, l, r, t, b, r, g, b, a = unpack (icon)
local texture, w, h, animate, left, right, top, bottom, r, g, b, a = unpack (icon)
self.alert.icon:SetTexture (texture)
self.alert.icon:SetWidth (w or 14)
self.alert.icon:SetHeight (h or 14)
if (l and r and t and b) then
self.alert.icon:SetTexCoord (l, r, t, b)
if (left and right and top and bottom) then
self.alert.icon:SetTexCoord (left, right, top, bottom)
end
if (animate) then
self.alert.rotate:Play()
@@ -3475,6 +3478,44 @@ function _detalhes:SetBarModel (upper_enabled, upper_model, upper_alpha, lower_e
_detalhes:AtualizaGumpPrincipal (-1, true)
end
-- ~spec ~icons
function _detalhes:SetBarSpecIconSettings (enabled, iconfile, fulltrack)
if (type (enabled) ~= "boolean") then
enabled = self.row_info.use_spec_icons
end
if (not iconfile) then
iconfile = self.row_info.spec_file
end
self.row_info.use_spec_icons = enabled
self.row_info.spec_file = iconfile
if (enabled) then
if (not _detalhes.track_specs) then
_detalhes.track_specs = true
_detalhes:TrackSpecsNow (fulltrack)
end
else
local have_enabled
for _, instance in _ipairs (_detalhes.tabela_instancias) do
if (instance:IsEnabled() and instance.row_info.use_spec_icons) then
have_enabled = true
break
end
end
if (not have_enabled) then
_detalhes.track_specs = false
_detalhes:ResetSpecCache (true) --> forçar
end
end
self:InstanceReset()
self:InstanceRefreshRows()
self:ReajustaGump()
end
function _detalhes:SetBarSettings (height, texture, colorclass, fixedcolor, backgroundtexture, backgroundcolorclass, backgroundfixedcolor, alpha, iconfile, barstart, spacement)
--> bar start
@@ -3691,6 +3732,10 @@ function _detalhes:InstanceRefreshRows (instancia)
local icon_texture = self.row_info.icon_file
local start_after_icon = self.row_info.start_after_icon
if (self.row_info.use_spec_icons) then
icon_texture = self.row_info.spec_file
end
--custom right text
local custom_right_text_enabled = self.row_info.textR_enable_custom_text
local custom_right_text = self.row_info.textR_custom_text
@@ -4648,6 +4693,7 @@ local build_mode_list = function (self, elapsed)
CoolTip:SetColor ("main", "transparent")
CoolTip:SetOption ("TextSize", _detalhes.font_sizes.menus)
CoolTip:SetOption ("TextFont", _detalhes.font_faces.menus)
CoolTip:SetOption ("ButtonHeightModSub", -2)
CoolTip:SetOption ("ButtonHeightMod", -5)
@@ -4804,14 +4850,15 @@ local build_mode_list = function (self, elapsed)
end
CoolTip:SetOption ("TextSize", _detalhes.font_sizes.menus)
CoolTip:SetOption ("TextFont", _detalhes.font_faces.menus)
end
end
if (ClosedInstances > 0 or _detalhes:GetNumInstancesAmount() < _detalhes:GetMaxInstancesAmount()) then
GameCooltip:AddLine ("$div", nil, 2, nil, -5, -11)
end
GameCooltip:AddLine (Loc ["STRING_MENU_CLOSE_INSTANCE"], nil, 2, "white", nil, _detalhes.font_sizes.menus, font)
GameCooltip:AddLine (Loc ["STRING_MENU_CLOSE_INSTANCE"], nil, 2, "white", nil, _detalhes.font_sizes.menus, _detalhes.font_faces.menus)
GameCooltip:AddIcon ([[Interface\Buttons\UI-Panel-MinimizeButton-Up]], 2, 1, 14, 14, 0.2, 0.8, 0.2, 0.8)
GameCooltip:AddMenu (2, _detalhes.close_instancia_func, instancia.baseframe.cabecalho.fechar)
@@ -5145,6 +5192,8 @@ local build_segment_list = function (self, elapsed)
_detalhes:SetMenuOwner (self, instancia)
CoolTip:SetOption ("TextSize", _detalhes.font_sizes.menus)
CoolTip:SetOption ("TextFont", _detalhes.font_faces.menus)
CoolTip:SetOption ("SubMenuIsTooltip", true)
CoolTip:SetOption ("ButtonHeightMod", -4)
@@ -5327,6 +5376,7 @@ function _detalhes:ChangeSkin (skin_name)
----------> call widgets handlers
self:SetBarSettings (self.row_info.height)
self:SetBarBackdropSettings()
self:SetBarSpecIconSettings()
--> update toolbar
self:ToolbarSide()
@@ -6440,13 +6490,11 @@ end
GameCooltip:SetOption ("ButtonsYMod", -7)
GameCooltip:SetOption ("HeighMod", 8)
local font = SharedMedia:Fetch ("font", "Friz Quadrata TT")
GameCooltip:AddLine (Loc ["STRING_ERASE_DATA"], nil, 1, "white", nil, _detalhes.font_sizes.menus, font)
GameCooltip:AddLine (Loc ["STRING_ERASE_DATA"], nil, 1, "white", nil, _detalhes.font_sizes.menus, _detalhes.font_faces.menus)
GameCooltip:AddIcon ([[Interface\Buttons\UI-StopButton]], 1, 1, 14, 14, 0, 1, 0, 1, "red")
GameCooltip:AddMenu (1, _detalhes.tabela_historico.resetar)
GameCooltip:AddLine (Loc ["STRING_ERASE_DATA_OVERALL"], nil, 1, "white", nil, _detalhes.font_sizes.menus, font)
GameCooltip:AddLine (Loc ["STRING_ERASE_DATA_OVERALL"], nil, 1, "white", nil, _detalhes.font_sizes.menus, _detalhes.font_faces.menus)
GameCooltip:AddIcon ([[Interface\Buttons\UI-StopButton]], 1, 1, 14, 14, 0, 1, 0, 1, "orange")
GameCooltip:AddMenu (1, _detalhes.tabela_historico.resetar_overall)
@@ -6524,16 +6572,16 @@ end
--GameCooltip:SetOption ("FixedHeight", 30)
GameCooltip:SetOption ("HeighMod", 9)
local font = SharedMedia:Fetch ("font", "Friz Quadrata TT")
GameCooltip:AddLine (Loc ["STRING_MENU_CLOSE_INSTANCE"], nil, 1, "white", nil, _detalhes.font_sizes.menus, font)
GameCooltip:AddLine (Loc ["STRING_MENU_CLOSE_INSTANCE"], nil, 1, "white", nil, _detalhes.font_sizes.menus, _detalhes.font_faces.menus)
GameCooltip:AddIcon ([[Interface\Buttons\UI-Panel-MinimizeButton-Up]], 1, 1, 14, 14, 0.2, 0.8, 0.2, 0.8)
GameCooltip:AddMenu (1, close_button_onclick, self)
GameCooltip:AddLine (Loc ["STRING_MENU_CLOSE_INSTANCE_DESC"], nil, 2, "white", nil, _detalhes.font_sizes.menus, font)
GameCooltip:AddLine (Loc ["STRING_MENU_CLOSE_INSTANCE_DESC"], nil, 2, "white", nil, _detalhes.font_sizes.menus, _detalhes.font_faces.menus)
GameCooltip:AddIcon ([[Interface\CHATFRAME\UI-ChatIcon-Minimize-Up]], 2, 1, 18, 18)
GameCooltip:AddLine (Loc ["STRING_MENU_CLOSE_INSTANCE_DESC2"], nil, 2, "white", nil, _detalhes.font_sizes.menus, font)
GameCooltip:AddLine (Loc ["STRING_MENU_CLOSE_INSTANCE_DESC2"], nil, 2, "white", nil, _detalhes.font_sizes.menus, _detalhes.font_faces.menus)
GameCooltip:AddIcon ([[Interface\PaperDollInfoFrame\UI-GearManager-LeaveItem-Transparent]], 2, 1, 18, 18)
GameCooltip:SetWallpaper (1, [[Interface\SPELLBOOK\Spellbook-Page-1]], menu_wallpaper_tex, menu_wallpaper_color, true)
@@ -7014,7 +7062,7 @@ function gump:CriaCabecalho (baseframe, instancia)
GameCooltip:SetOption ("ButtonsYMod", -7)
GameCooltip:SetOption ("HeighMod", 8)
GameCooltip:AddLine ("Report Results", nil, 1, "white", nil, _detalhes.font_sizes.menus, SharedMedia:Fetch ("font", "Friz Quadrata TT"))
GameCooltip:AddLine ("Report Results", nil, 1, "white", nil, _detalhes.font_sizes.menus, _detalhes.font_faces.menus)
GameCooltip:AddIcon ([[Interface\Addons\Details\Images\report_button]], 1, 1, 12, 19)
GameCooltip:AddMenu (1, _detalhes.Reportar, instancia, nil, "INSTANCE" .. instancia.meu_id)
+51 -65
View File
@@ -3,6 +3,7 @@ local Loc = LibStub ("AceLocale-3.0"):GetLocale ( "Details" )
local _detalhes = _G._detalhes
local gump = _detalhes.gump
local _
--lua locals
local _cstr = tostring --> lua local
local _math_ceil = math.ceil --> lua local
@@ -17,18 +18,8 @@ local _IsInGuild = IsInGuild --> wow api locals
local _GetChannelList = GetChannelList --> wow api locals
local _UIParent = UIParent --> wow api locals
--> got weird errors with globals, not sure why
local _UIDropDownMenu_SetSelectedID = UIDropDownMenu_SetSelectedID --> wow api locals
local _UIDropDownMenu_CreateInfo = UIDropDownMenu_CreateInfo --> wow api locals
local _UIDropDownMenu_AddButton = UIDropDownMenu_AddButton --> wow api locals
local _UIDropDownMenu_Initialize = UIDropDownMenu_Initialize --> wow api locals
local _UIDropDownMenu_SetWidth = UIDropDownMenu_SetWidth --> wow api locals
local _UIDropDownMenu_SetButtonWidth = UIDropDownMenu_SetButtonWidth --> wow api locals
local _UIDropDownMenu_SetSelectedValue = UIDropDownMenu_SetSelectedValue --> wow api locals
local _UIDropDownMenu_JustifyText = UIDropDownMenu_JustifyText --> wow api locals
local _UISpecialFrames = UISpecialFrames --> wow api locals
--> details API functions -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
function _detalhes:SendReportLines (lines)
@@ -150,7 +141,7 @@ local _UISpecialFrames = UISpecialFrames --> wow api locals
if (type (param2) == "string") then
id = param2
end
if (_detalhes.last_report_id and id and _detalhes.last_report_id == id) then
_detalhes.last_report_id = nil
_detalhes.janela_report.fechar:Click()
@@ -257,18 +248,18 @@ BG Leader: 255 216 183
General/Trade: 255 189 192
--]]
local iconsize = {16, 16}
local iconsize = {16, 16}
local lista = {
{Loc ["STRING_REPORTFRAME_PARTY"], "PARTY", function() return GetNumSubgroupMembers() > 0 end, {iconsize = iconsize, icon = [[Interface\FriendsFrame\UI-Toast-ToastIcons]], coords = {0.53125, 0.7265625, 0.078125, 0.40625}, color = {0.66, 0.65, 1}}},
{Loc ["STRING_REPORTFRAME_RAID"], "RAID", _IsInRaid, {iconsize = iconsize, icon = [[Interface\FriendsFrame\UI-Toast-ToastIcons]], coords = {0.53125, 0.7265625, 0.078125, 0.40625}, color = {1, 0.49, 0}}},
{Loc ["STRING_REPORTFRAME_GUILD"], "GUILD", _IsInGuild, {iconsize = iconsize, icon = [[Interface\FriendsFrame\UI-Toast-ToastIcons]], coords = {0.8046875, 0.96875, 0.125, 0.390625}, color = {0.25, 0.98, 0.25}}},
{Loc ["STRING_REPORTFRAME_OFFICERS"], "OFFICER", _IsInGuild, {iconsize = iconsize, icon = [[Interface\FriendsFrame\UI-Toast-ToastIcons]], coords = {0.8046875, 0.96875, 0.125, 0.390625}, color = {0.25, 0.74, 0.25}}},
{Loc ["STRING_REPORTFRAME_WHISPER"], "WHISPER", nil, {iconsize = iconsize, icon = [[Interface\FriendsFrame\UI-Toast-ToastIcons]], coords = {0.0546875, 0.1953125, 0.625, 0.890625}, color = {1, 0.49, 1}}},
{Loc ["STRING_REPORTFRAME_WHISPERTARGET"], "WHISPER2", nil, {iconsize = iconsize, icon = [[Interface\FriendsFrame\UI-Toast-ToastIcons]], coords = {0.0546875, 0.1953125, 0.625, 0.890625}, color = {1, 0.49, 1}}},
{Loc ["STRING_REPORTFRAME_SAY"], "SAY", nil, {iconsize = iconsize, icon = [[Interface\FriendsFrame\UI-Toast-ToastIcons]], coords = {0.0390625, 0.203125, 0.09375, 0.375}, color = {1, 1, 1}}},
{Loc ["STRING_REPORTFRAME_COPY"], "COPY", nil, {iconsize = iconsize, icon = [[Interface\Buttons\UI-GuildButton-PublicNote-Disabled]], coords = {0, 1, 0, 1}, color = {1, 1, 1}}},
}
local lista = {
{Loc ["STRING_REPORTFRAME_PARTY"], "PARTY", function() return GetNumSubgroupMembers() > 0 end, {iconsize = iconsize, icon = [[Interface\FriendsFrame\UI-Toast-ToastIcons]], coords = {0.53125, 0.7265625, 0.078125, 0.40625}, color = {0.66, 0.65, 1}}},
{Loc ["STRING_REPORTFRAME_RAID"], "RAID", _IsInRaid, {iconsize = iconsize, icon = [[Interface\FriendsFrame\UI-Toast-ToastIcons]], coords = {0.53125, 0.7265625, 0.078125, 0.40625}, color = {1, 0.49, 0}}},
{Loc ["STRING_REPORTFRAME_GUILD"], "GUILD", _IsInGuild, {iconsize = iconsize, icon = [[Interface\FriendsFrame\UI-Toast-ToastIcons]], coords = {0.8046875, 0.96875, 0.125, 0.390625}, color = {0.25, 0.98, 0.25}}},
{Loc ["STRING_REPORTFRAME_OFFICERS"], "OFFICER", _IsInGuild, {iconsize = iconsize, icon = [[Interface\FriendsFrame\UI-Toast-ToastIcons]], coords = {0.8046875, 0.96875, 0.125, 0.390625}, color = {0.25, 0.74, 0.25}}},
{Loc ["STRING_REPORTFRAME_WHISPER"], "WHISPER", nil, {iconsize = iconsize, icon = [[Interface\FriendsFrame\UI-Toast-ToastIcons]], coords = {0.0546875, 0.1953125, 0.625, 0.890625}, color = {1, 0.49, 1}}},
{Loc ["STRING_REPORTFRAME_WHISPERTARGET"], "WHISPER2", nil, {iconsize = iconsize, icon = [[Interface\FriendsFrame\UI-Toast-ToastIcons]], coords = {0.0546875, 0.1953125, 0.625, 0.890625}, color = {1, 0.49, 1}}},
{Loc ["STRING_REPORTFRAME_SAY"], "SAY", nil, {iconsize = iconsize, icon = [[Interface\FriendsFrame\UI-Toast-ToastIcons]], coords = {0.0390625, 0.203125, 0.09375, 0.375}, color = {1, 1, 1}}},
{Loc ["STRING_REPORTFRAME_COPY"], "COPY", nil, {iconsize = iconsize, icon = [[Interface\Buttons\UI-GuildButton-PublicNote-Disabled]], coords = {0, 1, 0, 1}, color = {1, 1, 1}}},
}
local on_click = function (self, fixedParam, selectedOutput)
_detalhes.report_where = selectedOutput
@@ -286,10 +277,7 @@ local lista = {
local channels = {_GetChannelList()} --> coloca o resultado em uma tabela .. {id1, canal1, id2, canal2}
for i = 1, #channels, 2 do --> total de canais
output_array [#output_array + 1] = {iconsize = iconsize, value = "CHANNEL|"..channels [i+1], label = channels [i]..". "..channels [i+1], onclick = on_click, icon = [[Interface\FriendsFrame\UI-Toast-ToastIcons]], texcoord = {0.3046875, 0.4453125, 0.109375, 0.390625}, iconcolor = {149/255, 112/255, 112/255}}
--lista [#lista+1] = {channels [i]..". "..channels [i+1], "CHANNEL|"..channels [i+1]}
end
local bnet_friends = {}
@@ -304,51 +292,12 @@ local lista = {
return output_array
end
este_gump.dropdown_func = build_list
local select_output = gump:NewDropDown (este_gump, _, "$parentOutputDropdown", "select", 185, 20, build_list, 1)
select_output:SetPoint ("topleft", este_gump, "topleft", 107, -55)
este_gump.select = select_output.widget
local function initialize (self, level)
local info = _UIDropDownMenu_CreateInfo()
for i = 9, #lista do
lista [i] = nil
end
local channels = {_GetChannelList()} --> coloca o resultado em uma tabela .. {id1, canal1, id2, canal2}
for i = 1, #channels, 2 do --> total de canais
lista [#lista+1] = {channels [i]..". "..channels [i+1], "CHANNEL|"..channels [i+1]}
end
local BnetFriends = BNGetNumFriends()
for i = 1, BnetFriends do
local presenceID, presenceName, battleTag, isBattleTagPresence, toonName, toonID, client, isOnline, lastOnline, isAFK, isDND, messageText, noteText, isRIDFriend, broadcastTime, canSoR = BNGetFriendInfo (i)
if (isOnline) then
lista [#lista+1] = {presenceName, "REALID|" .. presenceID, nil, [[Interface\FriendsFrame\Battlenet-Battleneticon]]}
end
end
--BNSendWhisper
for index, v in _pairs (lista) do
if (not v[3] or (type (v[3]) == "function" and v[3]())) then
info = _UIDropDownMenu_CreateInfo()
info.text = v[1]
info.value = v[2]
if (v[4]) then
info.icon = v[4]
end
info.func = OnClick
_UIDropDownMenu_AddButton (info, level)
end
end
end
function select_output:CheckValid()
local last_selected = _detalhes.report_where
@@ -581,11 +530,48 @@ local lista = {
local este_gump = _CreateFrame ("Frame", "DetailsReportWindow", _UIParent)
este_gump:SetPoint ("CENTER", UIParent, "CENTER")
este_gump:SetFrameStrata ("HIGH")
este_gump:SetScript ("OnShow", function (self)
local dropdown = este_gump.select.MyObject
local where = _detalhes.report_where
local list = este_gump.dropdown_func()
local found
for index, option in ipairs (list) do
if (option.value == where) then
dropdown:Select (where)
found = true
break
end
end
if (not found) then
if (_IsInRaid()) then
dropdown:Select ("RAID")
_detalhes.report_where = "RAID"
elseif (GetNumSubgroupMembers() > 0) then
dropdown:Select ("PARTY")
_detalhes.report_where = "PARTY"
elseif (_IsInGuild()) then
dropdown:Select ("GUILD")
_detalhes.report_where = "GUILD"
else
dropdown:Select ("SAY")
_detalhes.report_where = "SAY"
end
end
end)
_tinsert (_UISpecialFrames, este_gump:GetName())
este_gump:SetScript ("OnHide", function (self)
_detalhes.janela_report.ativa = false
_detalhes.last_report_id = nil
end)
este_gump:SetWidth (320)
+98 -16
View File
@@ -19,7 +19,7 @@ function _detalhes:OpenWelcomeWindow ()
window = CreateFrame ("frame", "DetailsWelcomeWindow", UIParent)
window:SetPoint ("center", UIParent, "center", -200, 0)
window:SetWidth (512)
window:SetHeight (256)
window:SetHeight (265)
window:SetMovable (true)
window:SetScript ("OnMouseDown", function() window:StartMoving() end)
window:SetScript ("OnMouseUp", function() window:StopMovingOrSizing() end)
@@ -56,8 +56,9 @@ function _detalhes:OpenWelcomeWindow ()
cancel:SetNormalTexture ([[Interface\Buttons\UI-GroupLoot-Pass-Up]])
cancel:SetScript ("OnClick", function() window:Hide() end)
local cancelText = cancel:CreateFontString (nil, "overlay", "GameFontNormal")
cancelText:SetTextColor (1, 1, 1)
cancelText:SetPoint ("left", cancel, "right", 2, 0)
cancelText:SetText ("Skip")
cancelText:SetText (Loc ["STRING_WELCOME_69"])
local forward = CreateFrame ("button", nil, window)
forward:SetWidth (26)
@@ -274,7 +275,7 @@ local window_openned_at = time()
nickname:SetPoint ("center", avatar_bg, "center", 0, -15)
end
local nicknamelabel = g:NewLabel (window, nil, "$parentNickNameLabel", "nicknameLabel", Loc ["STRING_OPTIONS_NICKNAME"] .. ":", "GameFontHighlightLeft")
local nicknamelabel = g:NewLabel (window, nil, "$parentNickNameLabel", "nicknameLabel", Loc ["STRING_OPTIONS_NICKNAME"] .. ":", "GameFontNormal")
local nicknamebox = g:NewTextEntry (window, nil, "$parentNicknameEntry", "nicknameEntry", 140, 20, onPressEnter)
nicknamebox:HighlightText()
@@ -430,7 +431,7 @@ local window_openned_at = time()
skins_image:SetTexCoord (0, 0.41796875, 0, 0.259765625) --0, 0, 214 133
--import settings
local import_label = g:NewLabel (window, _, "$parentImportSettingsLabel", "ImportLabel", Loc ["STRING_WELCOME_46"])
local import_label = g:NewLabel (window, _, "$parentImportSettingsLabel", "ImportLabel", Loc ["STRING_WELCOME_46"] .. ":", "GameFontNormal")
import_label:SetPoint ("topleft", window, "topleft", 30, -160)
local convert_table = {
@@ -520,8 +521,8 @@ local window_openned_at = time()
import_dropdown.tooltip = Loc ["STRING_WELCOME_57"]
--wallpapaer and skin
local wallpaper_label_switch = g:NewLabel (window, _, "$parentBackgroundLabel", "enablewallpaperLabel", Loc ["STRING_WELCOME_44"])
wallpaper_label_switch:SetPoint ("topleft", window, "topleft", 30, -180)
local wallpaper_label_switch = g:NewLabel (window, _, "$parentBackgroundLabel", "enablewallpaperLabel", Loc ["STRING_WELCOME_44"] .. ":", "GameFontNormal")
wallpaper_label_switch:SetPoint ("topleft", window, "topleft", 30, -200)
--skin
local onSelectSkin = function (_, _, skin_name)
@@ -541,20 +542,64 @@ local window_openned_at = time()
local skin_dropdown = g:NewDropDown (window, _, "$parentSkinDropdown", "skinDropdown", 140, 20, buildSkinMenu, instance1.skin)
skin_dropdown.tooltip = Loc ["STRING_WELCOME_58"]
local skin_label = g:NewLabel (window, _, "$parentSkinLabel", "skinLabel", Loc ["STRING_OPTIONS_INSTANCE_SKIN"])
local skin_label = g:NewLabel (window, _, "$parentSkinLabel", "skinLabel", Loc ["STRING_OPTIONS_INSTANCE_SKIN"] .. ":", "GameFontNormal")
skin_dropdown:SetPoint ("left", skin_label, "right", 2)
skin_label:SetPoint ("topleft", window, "topleft", 30, -140)
--skin_dropdown:Select ("WoW Interface")
--> icon type
local OnSelectIconFile = function (_, _, iconpath)
instance1:SetBarSettings (nil, nil, nil, nil, nil, nil, nil, nil, iconpath)
if (instance1.row_info.use_spec_icons) then
instance1:SetBarSpecIconSettings (false)
end
end
local OnSelectIconFileSpec = function (_, _, iconpath)
instance1:SetBarSpecIconSettings (true, iconpath, true)
end
local iconsize = {16, 16}
local icontexture = [[Interface\WorldStateFrame\ICONS-CLASSES]]
local iconcoords = {0.25, 0.50, 0, 0.25}
local list = {
{value = [[]], label = Loc ["STRING_OPTIONS_BAR_ICONFILE1"], onclick = OnSelectIconFile, icon = icontexture, texcoord = iconcoords, iconsize = iconsize, iconcolor = {1, 1, 1, .3}},
{value = [[Interface\AddOns\Details\images\classes_small]], label = Loc ["STRING_OPTIONS_BAR_ICONFILE2"], onclick = OnSelectIconFile, icon = icontexture, texcoord = iconcoords, iconsize = iconsize},
{value = [[Interface\AddOns\Details\images\spec_icons_normal]], label = "Specialization", onclick = OnSelectIconFileSpec, icon = [[Interface\AddOns\Details\images\icons]], texcoord = {2/512, 32/512, 480/512, 510/512}, iconsize = iconsize},
{value = [[Interface\AddOns\Details\images\spec_icons_normal_alpha]], label = "Specialization Alpha", onclick = OnSelectIconFileSpec, icon = [[Interface\AddOns\Details\images\icons]], texcoord = {2/512, 32/512, 480/512, 510/512}, iconsize = iconsize},
{value = [[Interface\AddOns\Details\images\classes_small_bw]], label = Loc ["STRING_OPTIONS_BAR_ICONFILE3"], onclick = OnSelectIconFile, icon = icontexture, texcoord = iconcoords, iconsize = iconsize},
{value = [[Interface\AddOns\Details\images\classes_small_alpha]], label = Loc ["STRING_OPTIONS_BAR_ICONFILE4"], onclick = OnSelectIconFile, icon = icontexture, texcoord = iconcoords, iconsize = iconsize},
{value = [[Interface\AddOns\Details\images\classes_small_alpha_bw]], label = Loc ["STRING_OPTIONS_BAR_ICONFILE6"], onclick = OnSelectIconFile, icon = icontexture, texcoord = iconcoords, iconsize = iconsize},
{value = [[Interface\AddOns\Details\images\classes]], label = Loc ["STRING_OPTIONS_BAR_ICONFILE5"], onclick = OnSelectIconFile, icon = icontexture, texcoord = iconcoords, iconsize = iconsize},
}
local BuiltIconList = function()
return list
end
local default
if (instance1.row_info.use_spec_icons) then
default = instance1.row_info.spec_file
else
default = instance1.row_info.icon_file
end
local d = g:NewDropDown (window, _, "$parentIconSelectDropdown", "IconSelectDropdown", 140, 20, BuiltIconList, default)
g:NewLabel (window, _, "$parentIconsAnchor", "rowIconsLabel", Loc ["STRING_OPTIONS_TEXT_ROWICONS_ANCHOR"], "GameFontNormal")
d:SetPoint ("left", window.rowIconsLabel, "right", 2)
window.rowIconsLabel:SetPoint ("topleft", window, "topleft", 30, -180)
--wallpapper
--> agora cria os 2 dropdown da categoria e wallpaper
local onSelectSecTexture = function (_, _, texturePath)
if (texturePath:find ("TALENTFRAME")) then
instance:InstanceWallpaper (texturePath, nil, nil, {0, 1, 0, 0.703125})
instance1:InstanceWallpaper (texturePath, nil, nil, {0, 1, 0, 0.703125}, nil, nil, {1, 1, 1, 1})
elseif (texturePath:find ("EncounterJournal")) then
instance1:InstanceWallpaper (texturePath, nil, nil, {0.06, 0.68, 0.1, 0.57}, nil, nil, {1, 1, 1, 1})
else
instance:InstanceWallpaper (texturePath, nil, nil, {0, 1, 0, 1})
instance1:InstanceWallpaper (texturePath, nil, nil, {0, 1, 0, 1}, nil, nil, {1, 1, 1, 1})
end
end
@@ -584,6 +629,39 @@ local window_openned_at = time()
{value = [[Interface\ARCHEOLOGY\ArchRare-TyrandesFavoriteDoll]], label = "Tyrandes Favorite Doll", onclick = onSelectSecTexture, icon = [[Interface\ARCHEOLOGY\ArchRare-TyrandesFavoriteDoll]], texcoord = nil},
{value = [[Interface\ARCHEOLOGY\ArchRare-ZinRokhDestroyer]], label = "ZinRokh Destroyer", onclick = onSelectSecTexture, icon = [[Interface\ARCHEOLOGY\ArchRare-ZinRokhDestroyer]], texcoord = nil},
},
["RAIDS"] = {
{value = [[Interface\EncounterJournal\UI-EJ-LOREBG-BlackrockCaverns]], label = "Blackrock Caverns", onclick = onSelectSecTexture, icon = [[Interface\EncounterJournal\UI-EJ-LOREBG-BlackrockCaverns]], texcoord = nil},
{value = [[Interface\EncounterJournal\UI-EJ-LOREBG-BlackrockSpire]], label = "Blackrock Spire", onclick = onSelectSecTexture, icon = [[Interface\EncounterJournal\UI-EJ-LOREBG-BlackrockSpire]], texcoord = nil},
{value = [[Interface\EncounterJournal\UI-EJ-LOREBG-DragonSoul]], label = "Dragon Soul", onclick = onSelectSecTexture, icon = [[Interface\EncounterJournal\UI-EJ-LOREBG-DragonSoul]], texcoord = nil},
{value = [[Interface\EncounterJournal\UI-EJ-LOREBG-EndTime]], label = "End Time", onclick = onSelectSecTexture, icon = [[Interface\EncounterJournal\UI-EJ-LOREBG-EndTime]], texcoord = nil},
{value = [[Interface\EncounterJournal\UI-EJ-LOREBG-Firelands1]], label = "Firelands", onclick = onSelectSecTexture, icon = [[Interface\EncounterJournal\UI-EJ-LOREBG-Firelands1]], texcoord = nil},
{value = [[Interface\EncounterJournal\UI-EJ-LOREBG-HallsofReflection]], label = "Halls of Reflection", onclick = onSelectSecTexture, icon = [[Interface\EncounterJournal\UI-EJ-LOREBG-HallsofReflection]], texcoord = nil},
{value = [[Interface\EncounterJournal\UI-EJ-LOREBG-HellfireCitadel]], label = "Hellfire Citadel", onclick = onSelectSecTexture, icon = [[Interface\EncounterJournal\UI-EJ-LOREBG-HellfireCitadel]], texcoord = nil},
{value = [[Interface\EncounterJournal\UI-EJ-LOREBG-Pandaria]], label = "Pandaria", onclick = onSelectSecTexture, icon = [[Interface\EncounterJournal\UI-EJ-LOREBG-Pandaria]], texcoord = nil},
{value = [[Interface\EncounterJournal\UI-EJ-LOREBG-RagefireChasm]], label = "Ragefire Chasm", onclick = onSelectSecTexture, icon = [[Interface\EncounterJournal\UI-EJ-LOREBG-RagefireChasm]], texcoord = nil},
{value = [[Interface\EncounterJournal\UI-EJ-LOREBG-SiegeofOrgrimmar]], label = "Siege of Orgrimmar", onclick = onSelectSecTexture, icon = [[Interface\EncounterJournal\UI-EJ-LOREBG-SiegeofOrgrimmar]], texcoord = nil},
{value = [[Interface\EncounterJournal\UI-EJ-LOREBG-TheNexus]], label = "The Nexus", onclick = onSelectSecTexture, icon = [[Interface\EncounterJournal\UI-EJ-LOREBG-TheNexus]], texcoord = nil},
{value = [[Interface\EncounterJournal\UI-EJ-LOREBG-TheOculus]], label = "The Oculus", onclick = onSelectSecTexture, icon = [[Interface\EncounterJournal\UI-EJ-LOREBG-TheOculus]], texcoord = nil},
{value = [[Interface\EncounterJournal\UI-EJ-LOREBG-TheStonecore]], label = "The Stonecore", onclick = onSelectSecTexture, icon = [[Interface\EncounterJournal\UI-EJ-LOREBG-TheStonecore]], texcoord = nil},
{value = [[Interface\EncounterJournal\UI-EJ-LOREBG-ThunderKingRaid]], label = "Throne of Thunder", onclick = onSelectSecTexture, icon = [[Interface\EncounterJournal\UI-EJ-LOREBG-ThunderKingRaid]], texcoord = nil},
},
["LOGOS"] = {
{value = [[Interface\Timer\Alliance-Logo]], label = "For the Alliance", onclick = onSelectSecTexture, icon = [[Interface\Timer\Alliance-Logo]], texcoord = nil},
{value = [[Interface\Timer\Horde-Logo]], label = "For the Horde", onclick = onSelectSecTexture, icon = [[Interface\Timer\Horde-Logo]], texcoord = nil},
{value = [[Interface\Destiny\EndscreenImage]], label = "Pandaria Logo", onclick = onSelectSecTexture, icon = [[Interface\Destiny\EndscreenImage]], texcoord = nil},
{value = [[Interface\ARCHEOLOGY\ARCH-RACE-ORC]], label = "Orc Crest", onclick = onSelectSecTexture, icon = [[Interface\ARCHEOLOGY\ARCH-RACE-ORC]], texcoord = nil},
{value = [[Interface\ARCHEOLOGY\ARCH-RACE-DWARF]], label = "Dwarf Crest", onclick = onSelectSecTexture, icon = [[Interface\ARCHEOLOGY\ARCH-RACE-DWARF]], texcoord = nil},
{value = [[Interface\ARCHEOLOGY\ARCH-RACE-NIGHTELF]], label = "Night Elf Crest", onclick = onSelectSecTexture, icon = [[Interface\ARCHEOLOGY\ARCH-RACE-NIGHTELF]], texcoord = nil},
{value = [[Interface\ARCHEOLOGY\Arch-Race-Pandaren]], label = "Padaren Crest", onclick = onSelectSecTexture, icon = [[Interface\ARCHEOLOGY\Arch-Race-Pandaren]], texcoord = nil},
{value = [[Interface\ARCHEOLOGY\ARCH-RACE-TROLL]], label = "Troll Crest", onclick = onSelectSecTexture, icon = [[Interface\ARCHEOLOGY\ARCH-RACE-TROLL]], texcoord = nil},
{value = [[Interface\FlavorImages\BloodElfLogo-small]], label = "Blood Elf Crest", onclick = onSelectSecTexture, icon = [[Interface\FlavorImages\BloodElfLogo-small]], texcoord = nil},
{value = [[Interface\Glues\COMMON\Glues-Logo]], label = "Wow Logo", onclick = onSelectSecTexture, icon = [[Interface\Glues\COMMON\Glues-Logo]], texcoord = nil},
{value = [[Interface\Glues\COMMON\GLUES-WOW-BCLOGO]], label = "Burning Cruzade Logo", onclick = onSelectSecTexture, icon = [[Interface\Glues\COMMON\GLUES-WOW-BCLOGO]], texcoord = nil},
{value = [[Interface\Glues\COMMON\GLUES-WOW-CCLOGO]], label = "Cataclysm Logo", onclick = onSelectSecTexture, icon = [[Interface\Glues\COMMON\GLUES-WOW-CCLOGO]], texcoord = nil},
{value = [[Interface\Glues\COMMON\Glues-WOW-WoltkLogo]], label = "WotLK Logo", onclick = onSelectSecTexture, icon = [[Interface\Glues\COMMON\Glues-WOW-WoltkLogo]], texcoord = nil},
},
["CREDITS"] = {
{value = [[Interface\Glues\CREDITS\Arakkoa2]], label = "Arakkoa", onclick = onSelectSecTexture, icon = [[Interface\Glues\CREDITS\Arakkoa2]], texcoord = nil},
@@ -717,8 +795,10 @@ local window_openned_at = time()
local backgroundTable = {
{value = "ARCHEOLOGY", label = "Archeology", onclick = onSelectMainTexture, icon = [[Interface\ARCHEOLOGY\Arch-Icon-Marker]]},
{value = "CREDITS", label = "Burning Crusade", onclick = onSelectMainTexture, icon = [[Interface\ICONS\TEMP]]},
{value = "LOGOS", label = "Logos", onclick = onSelectMainTexture, icon = [[Interface\WorldStateFrame\ColumnIcon-FlagCapture0]]},
{value = "DRESSUP", label = "Race Background", onclick = onSelectMainTexture, icon = [[Interface\ICONS\INV_Chest_Cloth_17]]},
{value = "RAIDS", label = "Dungeons & Raids", onclick = onSelectMainTexture, icon = [[Interface\COMMON\friendship-FistHuman]]},
{value = "DEATHKNIGHT", label = "Death Knight", onclick = onSelectMainTexture, icon = _detalhes.class_icons_small, texcoord = _detalhes.class_coords ["DEATHKNIGHT"]},
{value = "DRESSUP", label = "Class Background", onclick = onSelectMainTexture, icon = [[Interface\ICONS\INV_Chest_Cloth_17]]},
{value = "DRUID", label = "Druid", onclick = onSelectMainTexture, icon = _detalhes.class_icons_small, texcoord = _detalhes.class_coords ["DRUID"]},
{value = "HUNTER", label = "Hunter", onclick = onSelectMainTexture, icon = _detalhes.class_icons_small, texcoord = _detalhes.class_coords ["HUNTER"]},
{value = "MAGE", label = "Mage", onclick = onSelectMainTexture, icon = _detalhes.class_icons_small, texcoord = _detalhes.class_coords ["MAGE"]},
@@ -799,7 +879,7 @@ local window_openned_at = time()
end
end)
pages [#pages+1] = {import_label, import_dropdown, skins_frame_alert, bg55, texto55, texto555, skins_image, changemind, texto_appearance, skin_dropdown, skin_label, wallpaper_label_switch, wallpaper_switch, wallpaper_dropdown1, wallpaper_dropdown2, }
pages [#pages+1] = {import_label, import_dropdown, skins_frame_alert, bg55, texto55, texto555, skins_image, changemind, texto_appearance, skin_dropdown, skin_label, wallpaper_label_switch, wallpaper_switch, wallpaper_dropdown1, wallpaper_dropdown2, window.rowIconsLabel, window.IconSelectDropdown}
for _, widget in ipairs (pages[#pages]) do
widget:Hide()
@@ -928,7 +1008,7 @@ local window_openned_at = time()
dance_text:SetPoint ("topleft", window, "topleft", 30, -175)
--------------- Update Speed
g:NewLabel (window, _, "$parentUpdateSpeedLabel", "updatespeedLabel", Loc ["STRING_WELCOME_14"] .. ":")
g:NewLabel (window, _, "$parentUpdateSpeedLabel", "updatespeedLabel", Loc ["STRING_WELCOME_14"] .. ":", "GameFontNormal")
window.updatespeedLabel:SetPoint (31, -150)
--
@@ -963,7 +1043,7 @@ local window_openned_at = time()
window.updatespeedSlider.tooltip = Loc ["STRING_WELCOME_15"]
--------------- Animate Rows
g:NewLabel (window, _, "$parentAnimateLabel", "animateLabel", Loc ["STRING_WELCOME_16"] .. ":")
g:NewLabel (window, _, "$parentAnimateLabel", "animateLabel", Loc ["STRING_WELCOME_16"] .. ":", "GameFontNormal")
window.animateLabel:SetPoint (31, -170)
--
g:NewSwitch (window, _, "$parentAnimateSlider", "animateSlider", 60, 20, _, _, _detalhes.use_row_animations) -- ltext, rtext, defaultv
@@ -975,7 +1055,7 @@ local window_openned_at = time()
--------------- Fast Hps/Dps Updates
--[
g:NewLabel (window, _, "$parentDpsHpsLabel", "DpsHpsLabel", Loc ["STRING_WELCOME_63"] .. ":")
g:NewLabel (window, _, "$parentDpsHpsLabel", "DpsHpsLabel", Loc ["STRING_WELCOME_63"] .. ":", "GameFontNormal")
window.DpsHpsLabel:SetPoint (31, -190)
--
g:NewSwitch (window, _, "$parentDpsHpsSlider", "DpsHpsSlider", 60, 20, _, _, _detalhes:GetInstance(1).row_info.fast_ps_update) -- ltext, rtext, defaultv
@@ -986,7 +1066,7 @@ local window_openned_at = time()
window.DpsHpsSlider.tooltip = Loc ["STRING_WELCOME_64"]
--]]
--------------- Max Segments
g:NewLabel (window, _, "$parentSliderLabel", "segmentsLabel", Loc ["STRING_WELCOME_21"] .. ":")
g:NewLabel (window, _, "$parentSliderLabel", "segmentsLabel", Loc ["STRING_WELCOME_21"] .. ":", "GameFontNormal")
window.segmentsLabel:SetPoint (31, -210)
--
g:NewSlider (window, _, "$parentSlider", "segmentsSlider", 120, 20, 1, 25, 1, _detalhes.segments_amount) -- min, max, step, defaultv
@@ -1006,7 +1086,7 @@ local window_openned_at = time()
local mech_icon2 = window:CreateTexture (nil, "overlay")
mech_icon2:SetTexture ([[Interface\Vehicles\UI-Vehicles-Trim-Alliance]])
mech_icon2:SetPoint ("topright", window, "topright", -10, -142)
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)
@@ -1369,6 +1449,8 @@ local window_openned_at = time()
end
end
_detalhes:GetInstance(1):SetDisplay (0, 1, 1)
local bar1 = _detalhes:GetInstance(1):GetRow(1)
frame_alert.alert:SetPoint ("topleft", bar1, "topleft", -60, 8)
BIN
View File
Binary file not shown.
Binary file not shown.
Binary file not shown.
+46 -32
View File
@@ -41,7 +41,7 @@ local function CreatePluginFrames (data)
elseif (event == "REFRESH") then --> requested a refresh window
DmgRank:Refresh()
elseif (event == "COMBAT_PLAYER_TIMESTARTED") then --> combat started
elseif (event == "COMBAT_PLAYER_ENTER") then --> combat started
--print ("recebeu event start")
local combat = select (1, ...)
DmgRank:Start()
@@ -402,53 +402,55 @@ local function CreatePluginFrames (data)
--> Exec function
local DoDmgRank = function (self, elapsed)
DmgRank.Time.Elapsed = DmgRank.Time.Elapsed + elapsed
update = update + elapsed
if (_GetTime() > DmgRank.Time.EndTime) then --> reached the end time
if (DmgRank.Time.Working and not DmgRank.Time.Done) then
DmgRank:Cancel()
DmgRank:Finish()
else
DmgRank.Time.Working = false
DmgRank.Time.Done = true
DmgRank.Frame:SetScript ("OnUpdate", nil)
end
else
--> aqui vem as funções que verificam se o jogador esta em grupo ou se tem algum buff proibido
DmgRank.Time.Tick = DmgRank.Time.Tick + elapsed
if (DmgRank.Time.Tick > 1) then
DmgRank.Time.Tick = 0
if (not _UFC ("player")) then --> isn't in combat
print (Loc ["STRING_CANCELLED_NOT_COMBAT"])
DmgRank:Cancel()
elseif (_IsInRaid() or _IsInGroup()) then
print (Loc ["STRING_CANCELLED_IN_GROUP"])
DmgRank:Cancel()
else
--> check for not allowed buffs:
for i = 1, 41 do
local auraName, _, _, _, _, _, _, _, _, _, spellId = _UnitAura ("player", i)
if (spellId and (spellId == 2825 or spellId == 80353 or spellId == 90355)) then --> bloodlust//timewarp//ancient hysteria
print (Loc ["STRING_CANCELLED_AURA"] .. auraName)
DmgRank:Cancel()
end
end
DmgRank:Finish()
end
else
if (update > 0.050) then
if (not player) then
player = _detalhes:GetActor()
end
if (player) then
local minutos, segundos = _math_floor (DmgRank.Time.Elapsed/60), _math_floor (DmgRank.Time.Elapsed%60)
if (segundos < 10) then
segundos = "0"..segundos
end
local mili = _cstr ("%.2f", DmgRank.Time.Elapsed - _math_floor (DmgRank.Time.Elapsed))*100
if (mili < 10) then
mili = "0"..mili
end
DmgRank.TimeMinutes:SetText ("0".. minutos .. ":")
DmgRank.TimeSeconds:SetText (segundos ..":")
DmgRank.TimeMiliSeconds:SetText (mili)
local DamageGoal = DmgRank.TimeGoal [DmgRank.rank.level].damage
if (player.total > DamageGoal) then --> yeah, you didit
DmgRank.MainDamageDisplay:SetTextColor (0.3, 1, 0.1)
else
DmgRank.MainDamageDisplay:SetTextColor (1, 1, 1)
end
DmgRank.MainDamageDisplay:SetText (_detalhes:comma_value (player.total))
update = 0
end
end
end
@@ -479,22 +481,31 @@ local function CreatePluginFrames (data)
--> When the time is gone
function DmgRank:Finish()
local DamageGoal = DmgRank.TimeGoal [DmgRank.rank.level].damage --> damage
if (player.total > DamageGoal) then --> yeah, you didit
DmgRank:LevelUpRank()
else
DmgRank:FailedLevelUpRank()
DmgRank.Frame:SetScript ("OnUpdate", nil)
if (player) then
local DamageGoal = DmgRank.TimeGoal [DmgRank.rank.level].damage --> damage
if (player.total > DamageGoal) then --> yeah, you didit
DmgRank:LevelUpRank()
else
DmgRank:FailedLevelUpRank()
end
end
DmgRank.Time.Working = false
DmgRank.Time.Done = true
end
--> When a new combat is received by the PlugIn
function DmgRank:Start()
if (DmgRank.Time and DmgRank.Time.Working) then
DmgRank:Msg ("Plugin already in use.")
return
end
if (not DmgRank.TimeGoal[DmgRank.rank.level].damage) then
DmgRank:Msg ("There is no goal for this level.")
return
end
@@ -506,17 +517,22 @@ local function CreatePluginFrames (data)
DmgRank.Time = {}
DmgRank.Time.StartTime = _GetTime()
DmgRank.Time.EndTime = DmgRank.Time.StartTime + DmgRank.TimeGoal[DmgRank.rank.level].time
DmgRank.Time.Elapsed = 0
DmgRank.Time.EndTime = DmgRank.Time.StartTime + DmgRank.TimeGoal [DmgRank.rank.level].time
DmgRank.Time.Elapsed = 3
DmgRank.Time.Done = nil
DmgRank.Time.Working = true
DmgRank.Time.Tick = 0
player = _detalhes:GetActor() --> param 1 = combat | param 2 = attribute | param 3 = player name
update = 0
DmgRank.Frame:SetScript ("OnUpdate", DoDmgRank)
DmgRank.starting = DmgRank:ScheduleTimer ("StartUpdate", 3)
end
function DmgRank:StartUpdate()
player = _detalhes:GetActor()
DmgRank.Frame:SetScript ("OnUpdate", DoDmgRank)
end
end
function DmgRank:OnEvent (_, event, ...)
@@ -541,12 +557,10 @@ function DmgRank:OnEvent (_, event, ...)
CreatePluginFrames()
--> Register needed events
_G._detalhes:RegisterEvent (DmgRank, "COMBAT_PLAYER_TIMESTARTED")
_G._detalhes:RegisterEvent (DmgRank, "COMBAT_PLAYER_ENTER")
end
end
elseif (event == "PLAYER_LOGOUT") then
_detalhes_databaseDmgRank = DmgRank.rank
end
end
@@ -146,8 +146,13 @@ local function CreatePluginFrames()
TimeAmount2:SetPoint ("left", TimeDesc, "right", 4, 0)
--> main time/damage/dps texts
local clock = DetailsFrameWork:NewLabel (TimeAttackFrame, TimeAttackFrame, nil, "TIMER", "00:00:00", "GameFontHighlightLarge")
clock:SetPoint ("center", TimeAttackFrame, 0, -20)
local clock = DetailsFrameWork:NewLabel (TimeAttackFrame, TimeAttackFrame, nil, "TIMER", "00:", "GameFontHighlightLarge")
clock:SetPoint ("center", TimeAttackFrame, -25, -20)
local clock2 = DetailsFrameWork:NewLabel (TimeAttackFrame, TimeAttackFrame, nil, "TIMER", "00:", "GameFontHighlightLarge")
clock2:SetPoint ("center", TimeAttackFrame, 0, -20)
local clock3 = DetailsFrameWork:NewLabel (TimeAttackFrame, TimeAttackFrame, nil, "TIMER", "00", "GameFontHighlightLarge")
clock3:SetPoint ("center", TimeAttackFrame, 23, -20)
local damage = DetailsFrameWork:NewLabel (TimeAttackFrame, TimeAttackFrame, nil, "DAMAGE", "00.000.000", "GameFontHighlightLarge")
damage:SetPoint ("center", TimeAttackFrame, 0, -40)
local persecond = DetailsFrameWork:NewLabel (TimeAttackFrame, TimeAttackFrame, nil, "DPS", "000.000", "GameFontHighlightLarge")
@@ -776,7 +781,7 @@ local function CreatePluginFrames()
--> Cancel function
function TimeAttack:Cancel()
if (TimeAttack.Time and TimeAttack.Time.Working) then
if (TimeAttack.Time) then
TimeAttack.Time.Working = false
TimeAttack.Time.Done = true
end
@@ -792,6 +797,8 @@ local function CreatePluginFrames()
if (TimeAttack.Time.Working and not TimeAttack.Time.Done) then
TimeAttack:Cancel()
TimeAttack:Finish()
else
TimeAttack:Cancel()
end
else
--> aqui vem as funções que verificam se o jogador esta em grupo ou se tem algum buff proibido
@@ -802,28 +809,24 @@ local function CreatePluginFrames()
TimeAttack:Cancel()
end
else
if (update > 0.050) then
--> Update Timer Here
local minutos, segundos = _math_floor (TimeAttack.Time.Elapsed/60), _math_floor (TimeAttack.Time.Elapsed%60)
local minutos, segundos = _math_floor (TimeAttack.Time.Elapsed/60), _math_floor (TimeAttack.Time.Elapsed%60)
if (segundos < 10) then
segundos = "0"..segundos
end
local mili = _cstr ("%.2f", TimeAttack.Time.Elapsed-_math_floor (TimeAttack.Time.Elapsed))*100
if (mili < 10) then
mili = "0"..mili
end
clock:SetText ("0".. minutos .. ":"..segundos ..":"..mili)
damage:SetText (TimeAttack:comma_value (player.total))
if (TimeAttack.Time.Elapsed > 3) then
persecond:SetText (TimeAttack:comma_value (_math_floor (player.total/TimeAttack.Time.Elapsed)))
end
update = 0
if (segundos < 10) then
segundos = "0"..segundos
end
local mili = _cstr ("%.2f", TimeAttack.Time.Elapsed-_math_floor (TimeAttack.Time.Elapsed))*100
if (mili < 10) then
mili = "0"..mili
end
clock:SetText ("0".. minutos .. ":")
clock2:SetText (segundos ..":")
clock3:SetText (mili)
damage:SetText (TimeAttack:comma_value (player.total))
if (TimeAttack.Time.Elapsed > 3) then
persecond:SetText (TimeAttack:comma_value (_math_floor (player.total/TimeAttack.Time.Elapsed)))
end
end
end
@@ -859,7 +862,7 @@ local function CreatePluginFrames()
function TimeAttack:Start()
if (TimeAttack.Time and TimeAttack.Time.Working) then
return
TimeAttack:Cancel()
end
TimeAttack.Time = {}
File diff suppressed because it is too large Load Diff
@@ -9,7 +9,4 @@
embeds.xml
#@end-no-lib-strip@
enUS.lua
ptBR.lua
Details_Vanguard.lua
+29 -2
View File
@@ -283,6 +283,11 @@ function _G._detalhes:Start()
end
self:ScheduleTimer ("AnnounceStartup", 5)
if (_detalhes.failed_to_load) then
_detalhes:CancelTimer (_detalhes.failed_to_load)
_detalhes.failed_to_load = nil
end
--function self:RunAutoHideMenu()
-- local lower_instance = _detalhes:GetLowerInstanceNumber()
-- local instance = self:GetInstance (lower_instance)
@@ -325,6 +330,25 @@ function _G._detalhes:Start()
--> check is this is the first run of this version
if (self.is_version_first_run) then
if (_detalhes_database.last_version and _detalhes.userversion == "v3.8c") then
if (not _detalhes:GetTutorialCVar ("UPDATE_WARNING_SPECICONS1")) then
_detalhes:SetTutorialCVar ("UPDATE_WARNING_SPECICONS1", true)
local func = function()
local window1 = _detalhes:GetInstance(1)
if (window1 and window1:IsEnabled()) then
window1:SetBarSpecIconSettings (true, [[Interface\AddOns\Details\images\spec_icons_normal]], true)
end
local window2 = _detalhes:GetInstance(2)
if (window2 and window2:IsEnabled()) then
window2:SetBarSpecIconSettings (true, [[Interface\AddOns\Details\images\spec_icons_normal]], true)
end
_detalhes:CreateTestBars()
end
_detalhes:GetFramework():ShowTutorialAlertFrame ("Spec Icons!", "Now Available, click here!", func)
end
end
local enable_reset_warning = true
local lower_instance = _detalhes:GetLowerInstanceNumber()
@@ -358,15 +382,18 @@ function _G._detalhes:Start()
dev_icon:SetWidth (40)
dev_icon:SetHeight (40)
dev_icon:SetPoint ("bottomleft", instance.baseframe, "bottomleft", 4, 8)
dev_icon:SetTexture ([[Interface\DialogFrame\UI-Dialog-Icon-AlertOther]])
dev_icon:SetAlpha (.3)
local dev_text = instance.bgdisplay:CreateFontString (nil, "overlay", "GameFontHighlightSmall")
dev_text:SetHeight (64)
dev_text:SetPoint ("left", dev_icon, "right", 5, 0)
dev_text:SetTextColor (1, 1, 1)
dev_text:SetText ("Details is Under\nDevelopment")
dev_text:SetAlpha (.3)
if (self.tutorial.logons < 50) then
dev_text:SetText ("Details is Under\nDevelopment")
dev_icon:SetTexture ([[Interface\DialogFrame\UI-Dialog-Icon-AlertOther]])
end
--version
self.gump:Fade (instance._version, 0)