- Added Rallying Cry on warrior cooldown list.
- Healthstone now is considered both healing and cooldown attributes. - Fixed the sort method for custom displays, now the bars wuth same value is correctly sort by alphabetical. - Fixed non-combat switch by role where changing role wasn't changing the attribute. - Fixed the icons hiding and showing with Alpha Modify Types. - NickTag now don't check if a received name is invalid.
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
-- NickTag:SetNickname (name) -> set the player nick name, after set nicktag will broadcast the nick over addon guild channel.
|
||||
--
|
||||
|
||||
local major, minor = "NickTag-1.0", 5
|
||||
local major, minor = "NickTag-1.0", 6
|
||||
local NickTag, oldminor = LibStub:NewLibrary (major, minor)
|
||||
|
||||
if (not NickTag) then
|
||||
@@ -231,12 +231,15 @@ end
|
||||
storedPersona [CONST_INDEX_REVISION] = receivedPersona [CONST_INDEX_REVISION]
|
||||
|
||||
--> we need to check if the received nickname fit in our rules.
|
||||
local allowNickName = NickTag:CheckName (receivedPersona [CONST_INDEX_NICKNAME])
|
||||
if (allowNickName) then
|
||||
storedPersona [CONST_INDEX_NICKNAME] = receivedPersona [CONST_INDEX_NICKNAME]
|
||||
else
|
||||
storedPersona [CONST_INDEX_NICKNAME] = LibStub ("AceLocale-3.0"):GetLocale ("NickTag-1.0")["STRING_INVALID_NAME"]
|
||||
end
|
||||
--local allowNickName = NickTag:CheckName (receivedPersona [CONST_INDEX_NICKNAME])
|
||||
--if (allowNickName) then
|
||||
-- storedPersona [CONST_INDEX_NICKNAME] = receivedPersona [CONST_INDEX_NICKNAME]
|
||||
--else
|
||||
--storedPersona [CONST_INDEX_NICKNAME] = LibStub ("AceLocale-3.0"):GetLocale ("NickTag-1.0")["STRING_INVALID_NAME"]
|
||||
--end
|
||||
|
||||
storedPersona [CONST_INDEX_NICKNAME] = receivedPersona [CONST_INDEX_NICKNAME]
|
||||
|
||||
--> update the rest
|
||||
storedPersona [CONST_INDEX_AVATAR_PATH] = receivedPersona [CONST_INDEX_AVATAR_PATH]
|
||||
storedPersona [CONST_INDEX_AVATAR_TEXCOORD] = receivedPersona [CONST_INDEX_AVATAR_TEXCOORD]
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
_ = nil
|
||||
_detalhes = LibStub("AceAddon-3.0"):NewAddon("_detalhes", "AceTimer-3.0", "AceComm-3.0", "AceSerializer-3.0", "NickTag-1.0", "LibHotCorners")
|
||||
_detalhes.userversion = "v1.17.3"
|
||||
_detalhes.userversion = "v1.17.4"
|
||||
_detalhes.version = "Alpha 020"
|
||||
_detalhes.realversion = 20
|
||||
|
||||
|
||||
+13
-13
@@ -129,7 +129,7 @@ function atributo_custom:RefreshWindow (instance, combat, force, export)
|
||||
total = atributo_custom._TargetActorsProcessedTotal
|
||||
top = atributo_custom._TargetActorsProcessedTop
|
||||
end
|
||||
|
||||
|
||||
if (amount == 0) then
|
||||
if (force) then
|
||||
if (instance:IsGroupMode()) then
|
||||
@@ -163,7 +163,6 @@ end
|
||||
--> refresh functions
|
||||
|
||||
function atributo_custom:Refresh (instance, instance_container, combat, force, total, top)
|
||||
|
||||
local qual_barra = 1
|
||||
local barras_container = instance.barras
|
||||
local percentage_type = instance.row_info.percent_type
|
||||
@@ -277,7 +276,6 @@ end
|
||||
atributo_custom._TargetActorsProcessedAmt = 0
|
||||
atributo_custom._TargetActorsProcessedTotal = 0
|
||||
atributo_custom._TargetActorsProcessedTop = 0
|
||||
|
||||
instance_container:ResetCustomActorContainer()
|
||||
end
|
||||
|
||||
@@ -321,6 +319,7 @@ end
|
||||
|
||||
instance_container:SetValue (actor, actortotal)
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
@@ -465,7 +464,7 @@ end
|
||||
for _, targetactor in _ipairs (spell.targets._ActorTable) do
|
||||
if (roster [targetactor.nome]) then
|
||||
--> add amount
|
||||
instance_container:AddValue (targetactor, targetactor.total)
|
||||
instance_container:AddValue (targetactor, targetactor.total, true)
|
||||
atributo_custom._TargetActorsProcessedTotal = atributo_custom._TargetActorsProcessedTotal + targetactor.total
|
||||
--> add to processed container
|
||||
if (not atributo_custom._TargetActorsProcessed [targetactor.nome]) then
|
||||
@@ -481,7 +480,7 @@ end
|
||||
if (targetactor) then
|
||||
targetactor = spell.targets._ActorTable [targetactor]
|
||||
--> add amount
|
||||
instance_container:AddValue (targetactor, targetactor.total)
|
||||
instance_container:AddValue (targetactor, targetactor.total, true)
|
||||
atributo_custom._TargetActorsProcessedTotal = atributo_custom._TargetActorsProcessedTotal + targetactor.total
|
||||
--> add to processed container
|
||||
if (not atributo_custom._TargetActorsProcessed [targetactor.nome]) then
|
||||
@@ -496,7 +495,7 @@ end
|
||||
if (targetactor) then
|
||||
targetactor = spell.targets._ActorTable [targetactor]
|
||||
--> add amount
|
||||
instance_container:AddValue (targetactor, targetactor.total)
|
||||
instance_container:AddValue (targetactor, targetactor.total, true)
|
||||
atributo_custom._TargetActorsProcessedTotal = atributo_custom._TargetActorsProcessedTotal + targetactor.total
|
||||
--> add to processed container
|
||||
if (not atributo_custom._TargetActorsProcessed [targetactor.nome]) then
|
||||
@@ -644,7 +643,7 @@ end
|
||||
for _, targetactor in _ipairs (spell.targets._ActorTable) do
|
||||
if (roster [targetactor.nome]) then
|
||||
--> add amount
|
||||
instance_container:AddValue (targetactor, targetactor.total)
|
||||
instance_container:AddValue (targetactor, targetactor.total, true)
|
||||
atributo_custom._TargetActorsProcessedTotal = atributo_custom._TargetActorsProcessedTotal + targetactor.total
|
||||
--> add to processed container
|
||||
if (not atributo_custom._TargetActorsProcessed [targetactor.nome]) then
|
||||
@@ -660,7 +659,7 @@ end
|
||||
if (targetactor) then
|
||||
targetactor = spell.targets._ActorTable [targetactor]
|
||||
--> add amount
|
||||
instance_container:AddValue (targetactor, targetactor.total)
|
||||
instance_container:AddValue (targetactor, targetactor.total, true)
|
||||
atributo_custom._TargetActorsProcessedTotal = atributo_custom._TargetActorsProcessedTotal + targetactor.total
|
||||
--> add to processed container
|
||||
if (not atributo_custom._TargetActorsProcessed [targetactor.nome]) then
|
||||
@@ -675,7 +674,7 @@ end
|
||||
if (targetactor) then
|
||||
targetactor = spell.targets._ActorTable [targetactor]
|
||||
--> add amount
|
||||
instance_container:AddValue (targetactor, targetactor.total)
|
||||
instance_container:AddValue (targetactor, targetactor.total, true)
|
||||
atributo_custom._TargetActorsProcessedTotal = atributo_custom._TargetActorsProcessedTotal + targetactor.total
|
||||
--> add to processed container
|
||||
if (not atributo_custom._TargetActorsProcessed [targetactor.nome]) then
|
||||
@@ -754,9 +753,9 @@ end
|
||||
end
|
||||
|
||||
local row_value = _math_floor ((self.value / top) * 100)
|
||||
|
||||
--tooltip function--
|
||||
|
||||
|
||||
-- update tooltip function--
|
||||
|
||||
actor_class_color_r, actor_class_color_g, actor_class_color_b = self:GetBarColor()
|
||||
|
||||
self:RefreshBarra2 (row, instance, previous_table, is_forced, row_value, index, row_container)
|
||||
@@ -926,7 +925,7 @@ end
|
||||
|
||||
function atributo_custom:ResetCustomActorContainer()
|
||||
for _, actor in _ipairs (self._ActorTable) do
|
||||
actor.value = 0
|
||||
actor.value = _detalhes:GetAlphabeticalOrderNumber (actor.nome)
|
||||
end
|
||||
end
|
||||
|
||||
@@ -936,6 +935,7 @@ end
|
||||
end
|
||||
|
||||
function atributo_custom:AddValue (actor, actortotal, checktop)
|
||||
--print (debugstack())
|
||||
local actor_table = self:GetActorTable (actor)
|
||||
actor_table.my_actor = actor
|
||||
actor_table.value = actor_table.value + actortotal
|
||||
|
||||
@@ -1179,21 +1179,35 @@ function _detalhes:SwitchTo (switch_table, nosave)
|
||||
end
|
||||
|
||||
--backtable indexes: [1]: mode [2]: attribute [3]: sub attribute [4]: segment [5]: raidmode index [6]: solomode index
|
||||
function _detalhes:CheckSwitchOnCombatEnd (nowipe)
|
||||
function _detalhes:CheckSwitchOnCombatEnd (nowipe, warning)
|
||||
|
||||
self:SwitchBack()
|
||||
|
||||
local role = _UnitGroupRolesAssigned ("player")
|
||||
|
||||
local got_switch = false
|
||||
|
||||
if (role == "DAMAGER" and self.switch_damager) then
|
||||
self:SwitchTo (self.switch_damager)
|
||||
got_switch = true
|
||||
|
||||
elseif (role == "HEALER" and self.switch_healer) then
|
||||
self:SwitchTo (self.switch_healer)
|
||||
got_switch = true
|
||||
|
||||
elseif (role == "TANK" and self.switch_tank) then
|
||||
self:SwitchTo (self.switch_tank, true)
|
||||
got_switch = true
|
||||
|
||||
elseif (role == "NONE" and _detalhes.last_assigned_role ~= "NONE") then
|
||||
self:SwitchBack()
|
||||
got_switch = true
|
||||
|
||||
end
|
||||
|
||||
if (warning and got_switch) then
|
||||
local attribute_name = self:GetInstanceAttributeText()
|
||||
self:InstanceAlert (string.format (Loc ["STRING_SWITCH_WARNING"], attribute_name), {[[Interface\AddOns\Details\images\sword]], 18, 18, false}, 4)
|
||||
end
|
||||
|
||||
if (self.switch_all_roles_after_wipe and not nowipe) then
|
||||
@@ -1205,36 +1219,51 @@ function _detalhes:CheckSwitchOnCombatEnd (nowipe)
|
||||
|
||||
end
|
||||
|
||||
function _detalhes:CheckSwitchOnLogon()
|
||||
function _detalhes:CheckSwitchOnLogon (warning)
|
||||
for index, instancia in ipairs (_detalhes.tabela_instancias) do
|
||||
if (instancia.ativa) then
|
||||
instancia:CheckSwitchOnCombatEnd (true)
|
||||
instancia:CheckSwitchOnCombatEnd (true, warning)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
function _detalhes:CheckSwitchOnCombatStart()
|
||||
function _detalhes:CheckSegmentForSwitchOnCombatStart()
|
||||
|
||||
end
|
||||
|
||||
function _detalhes:CheckSwitchOnCombatStart (check_segment)
|
||||
|
||||
self:SwitchBack()
|
||||
|
||||
local all_roles = self.switch_all_roles_in_combat
|
||||
|
||||
local role = _UnitGroupRolesAssigned ("player")
|
||||
local got_switch = false
|
||||
|
||||
if (role == "DAMAGER" and self.switch_damager_in_combat) then
|
||||
self:SwitchTo (self.switch_damager_in_combat)
|
||||
got_switch = true
|
||||
|
||||
elseif (role == "HEALER" and self.switch_healer_in_combat) then
|
||||
self:SwitchTo (self.switch_healer_in_combat)
|
||||
got_switch = true
|
||||
|
||||
elseif (role == "TANK" and self.switch_tank_in_combat) then
|
||||
self:SwitchTo (self.switch_tank_in_combat)
|
||||
got_switch = true
|
||||
|
||||
elseif (self.switch_all_roles_in_combat) then
|
||||
self:SwitchTo (self.switch_all_roles_in_combat)
|
||||
got_switch = true
|
||||
|
||||
end
|
||||
|
||||
if (check_segment and got_switch) then
|
||||
if (self:GetSegment() ~= 0) then
|
||||
self:TrocaTabela (0)
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
function _detalhes:ExportSkin()
|
||||
|
||||
+1
-1
@@ -331,7 +331,7 @@
|
||||
for index, instancia in ipairs (_detalhes.tabela_instancias) do
|
||||
if (instancia.ativa) then
|
||||
--instancia:SetCombatAlpha (nil, nil, true) --passado para o regen disable
|
||||
instancia:CheckSwitchOnCombatStart()
|
||||
instancia:CheckSwitchOnCombatStart (true)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@@ -2730,6 +2730,20 @@
|
||||
end
|
||||
end
|
||||
|
||||
function _detalhes.parser_functions:ROLE_CHANGED_INFORM (...)
|
||||
if (_detalhes.last_assigned_role ~= _UnitGroupRolesAssigned ("player")) then
|
||||
_detalhes:CheckSwitchOnLogon (true)
|
||||
_detalhes.last_assigned_role = _UnitGroupRolesAssigned ("player")
|
||||
end
|
||||
end
|
||||
|
||||
function _detalhes.parser_functions:PLAYER_ROLES_ASSIGNED (...)
|
||||
if (_detalhes.last_assigned_role ~= _UnitGroupRolesAssigned ("player")) then
|
||||
_detalhes:CheckSwitchOnLogon (true)
|
||||
_detalhes.last_assigned_role = _UnitGroupRolesAssigned ("player")
|
||||
end
|
||||
end
|
||||
|
||||
function _detalhes.parser_functions:GROUP_ROSTER_UPDATE (...)
|
||||
if (not _detalhes.in_group) then
|
||||
_detalhes.in_group = IsInGroup() or IsInRaid()
|
||||
|
||||
+9
-1
@@ -41,9 +41,17 @@
|
||||
|
||||
--> get the fractional number representing the alphabetical letter
|
||||
function _detalhes:GetAlphabeticalOrderNumber (who_name)
|
||||
--local name = _upper (who_name)
|
||||
--local byte = _string_byte (name)
|
||||
--local abs = _math_abs (byte-91)
|
||||
--local n = math.floor (abs)/1000000
|
||||
--print (name, byte, abs, n)
|
||||
--return n
|
||||
return _math_abs (_string_byte (_upper (who_name))-91)/1000000
|
||||
end
|
||||
|
||||
|
||||
--/script print (tonumber (4/1000000)) - 4e-006
|
||||
--0.000004
|
||||
--> set all table keys to lower
|
||||
local temptable = {}
|
||||
function _detalhes:LowerizeKeys (_table)
|
||||
|
||||
@@ -953,6 +953,8 @@ do
|
||||
|
||||
_detalhes.DefensiveCooldownSpellsNoBuff = {
|
||||
|
||||
[6262] = {120, 1, 1}, --healthstone
|
||||
|
||||
--["DEATHKNIGHT"] = {},
|
||||
[48707] = {45, 5, 1}, -- Anti-Magic Shell
|
||||
[48743] = {120, 0, 1}, --Death Pact
|
||||
@@ -1001,8 +1003,9 @@ do
|
||||
[6229] = {30, 30, 1}, -- Twilight Ward 1 = self
|
||||
|
||||
--["WARRIOR"] = {},
|
||||
[114203] = {180, 15}, -- Demoralizing Banner
|
||||
[114203] = {180, 15}, -- Demoralizing Banner
|
||||
[114028] = {60, 5}, -- Mass Spell Reflection
|
||||
[97462] = {180, 10}, -- Rallying Cry
|
||||
}
|
||||
|
||||
_detalhes.DefensiveCooldownSpells = {
|
||||
|
||||
+51
-22
@@ -1230,25 +1230,33 @@ local lockButtonTooltip = {
|
||||
}
|
||||
|
||||
local lockFunctionOnEnter = function (self)
|
||||
OnEnterMainWindow (self.instancia, self)
|
||||
|
||||
if (self.instancia.modo ~= _detalhes._detalhes_props["MODO_ALONE"]) then
|
||||
self.label:SetTextColor (1, 1, 1, .6)
|
||||
if (self.instancia.modo ~= _detalhes._detalhes_props["MODO_ALONE"] and not self.mostrando) then
|
||||
OnEnterMainWindow (self.instancia, self)
|
||||
|
||||
self.mostrando = true
|
||||
|
||||
self.label:SetTextColor (1, 1, 1, .6)
|
||||
|
||||
GameCooltip:Reset()
|
||||
GameCooltip:SetType ("tooltip")
|
||||
GameCooltip:AddFromTable (lockButtonTooltip)
|
||||
GameCooltip:SetWallpaper (1, [[Interface\SPELLBOOK\Spellbook-Page-1]], {.6, 0.1, 0, 0.64453125}, {1, 1, 1, 0.1}, true)
|
||||
GameCooltip:ShowCooltip (self, "tooltip")
|
||||
|
||||
GameCooltip:SetOwner (self)
|
||||
GameCooltip:ShowCooltip()
|
||||
end
|
||||
end
|
||||
|
||||
local lockFunctionOnLeave = function (self)
|
||||
OnLeaveMainWindow (self.instancia, self)
|
||||
self.label:SetTextColor (.3, .3, .3, .6)
|
||||
self.mostrando = false
|
||||
GameCooltip:Hide()
|
||||
|
||||
if (self.mostrando) then
|
||||
|
||||
OnLeaveMainWindow (self.instancia, self)
|
||||
self.label:SetTextColor (.3, .3, .3, .6)
|
||||
self.mostrando = false
|
||||
_G.GameCooltip:ShowMe (false)
|
||||
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
local lockFunctionOnClick = function (button)
|
||||
@@ -3679,9 +3687,7 @@ end
|
||||
|
||||
local SetIconAlphaCacheButtonsTable = {}
|
||||
function _detalhes:SetIconAlpha (alpha, hide, no_animations)
|
||||
|
||||
table.wipe (SetIconAlphaCacheButtonsTable)
|
||||
|
||||
|
||||
if (self.attribute_text.enabled) then
|
||||
if (not self.menu_attribute_string) then --> create on demand
|
||||
self:AttributeMenu()
|
||||
@@ -3698,22 +3704,41 @@ function _detalhes:SetIconAlpha (alpha, hide, no_animations)
|
||||
end
|
||||
end
|
||||
|
||||
table.wipe (SetIconAlphaCacheButtonsTable)
|
||||
SetIconAlphaCacheButtonsTable [1] = self.baseframe.cabecalho.modo_selecao
|
||||
SetIconAlphaCacheButtonsTable [2] = self.baseframe.cabecalho.segmento
|
||||
SetIconAlphaCacheButtonsTable [3] = self.baseframe.cabecalho.atributo
|
||||
SetIconAlphaCacheButtonsTable [4] = self.baseframe.cabecalho.report
|
||||
SetIconAlphaCacheButtonsTable [5] = self.baseframe.cabecalho.fechar
|
||||
SetIconAlphaCacheButtonsTable [6] = self.baseframe.cabecalho.novo
|
||||
SetIconAlphaCacheButtonsTable [7] = self.baseframe.cabecalho.reset
|
||||
|
||||
for index, button in _ipairs (SetIconAlphaCacheButtonsTable) do
|
||||
if (self.menu_icons [index]) then
|
||||
if (hide) then
|
||||
gump:Fade (button, _unpack (_detalhes.windows_fade_in))
|
||||
else
|
||||
if (no_animations) then
|
||||
button:SetAlpha (alpha)
|
||||
else
|
||||
gump:Fade (button, "ALPHAANIM", alpha)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
table.wipe (SetIconAlphaCacheButtonsTable)
|
||||
SetIconAlphaCacheButtonsTable [1] = self.baseframe.cabecalho.fechar
|
||||
SetIconAlphaCacheButtonsTable [2] = self.baseframe.cabecalho.novo
|
||||
SetIconAlphaCacheButtonsTable [3] = self.baseframe.cabecalho.reset
|
||||
|
||||
for index, button in _ipairs (SetIconAlphaCacheButtonsTable) do
|
||||
if (hide) then
|
||||
gump:Fade (button, _unpack (_detalhes.windows_fade_in))
|
||||
else
|
||||
if (no_animations) then
|
||||
button:SetAlpha (alpha)
|
||||
if (self.menu2_icons [index]) then
|
||||
if (hide) then
|
||||
gump:Fade (button, _unpack (_detalhes.windows_fade_in))
|
||||
else
|
||||
gump:Fade (button, "ALPHAANIM", alpha)
|
||||
if (no_animations) then
|
||||
button:SetAlpha (alpha)
|
||||
else
|
||||
gump:Fade (button, "ALPHAANIM", alpha)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -5695,6 +5720,10 @@ function gump:CriaCabecalho (baseframe, instancia)
|
||||
baseframe.cabecalho.fechar:SetScript ("OnLeave", close_button_onleave)
|
||||
|
||||
baseframe.cabecalho.fechar:SetScript ("OnClick", close_button_onclick)
|
||||
|
||||
baseframe.cabecalho.fechar:SetScript ("OnShow", function()
|
||||
--print (debugstack())
|
||||
end)
|
||||
|
||||
--> bola do canto esquedo superior --> primeiro criar a armação para apoiar as texturas
|
||||
baseframe.cabecalho.ball_point = baseframe.cabecalho.fechar:CreateTexture (nil, "overlay")
|
||||
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -134,6 +134,9 @@ function _G._detalhes:Start()
|
||||
self.memorycleanup = self:ScheduleRepeatingTimer ("CheckMemoryPeriodically", self.intervalo_memoria)
|
||||
self.next_memory_check = time()+self.intervalo_memoria
|
||||
|
||||
--> role
|
||||
self.last_assigned_role = UnitGroupRolesAssigned ("player")
|
||||
|
||||
--> start parser
|
||||
|
||||
--> load parser capture options
|
||||
@@ -163,6 +166,9 @@ function _G._detalhes:Start()
|
||||
self.listener:RegisterEvent ("PET_BATTLE_OPENING_START")
|
||||
self.listener:RegisterEvent ("PET_BATTLE_CLOSE")
|
||||
|
||||
self.listener:RegisterEvent ("PLAYER_ROLES_ASSIGNED")
|
||||
self.listener:RegisterEvent ("ROLE_CHANGED_INFORM")
|
||||
|
||||
self.parser_frame:RegisterEvent ("COMBAT_LOG_EVENT_UNFILTERED")
|
||||
|
||||
--> group
|
||||
|
||||
Reference in New Issue
Block a user