Shaladownlands Launch

This commit is contained in:
Tercio Jose
2020-11-23 17:03:08 -03:00
parent 3d5095bd2c
commit ea9ad32a7f
18 changed files with 375 additions and 88 deletions
+17 -17
View File
@@ -1,14 +1,14 @@
--> customized display script
local _detalhes = _G._detalhes
local gump = _detalhes.gump
local _
_detalhes.custom_function_cache = {}
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--> local pointers
local _cstr = string.format --lua local
local _math_floor = math.floor --lua local
local _table_sort = table.sort --lua local
@@ -24,7 +24,7 @@
local _unpack = unpack --lua local
local _type = type --lua local
local _pcall = pcall -- lua local
local _GetSpellInfo = _detalhes.getspellinfo -- api local
local _IsInRaid = IsInRaid -- api local
local _IsInGroup = IsInGroup -- api local
@@ -32,34 +32,34 @@
local _GetNumPartyMembers = GetNumPartyMembers or GetNumSubgroupMembers -- api local
local _GetNumRaidMembers = GetNumRaidMembers or GetNumGroupMembers -- api local
local _GetUnitName = GetUnitName -- api local
local _string_replace = _detalhes.string.replace --details api
local Loc = LibStub ("AceLocale-3.0"):GetLocale ( "Details" )
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--> constants
local atributo_custom = _detalhes.atributo_custom
atributo_custom.mt = {__index = atributo_custom}
local combat_containers = {
["damagedone"] = 1,
["healdone"] = 2,
}
--> hold the mini custom objects
atributo_custom._InstanceActorContainer = {}
atributo_custom._InstanceLastCustomShown = {}
atributo_custom._InstanceLastCombatShown = {}
atributo_custom._TargetActorsProcessed = {}
local ToKFunctions = _detalhes.ToKFunctions
local SelectedToKFunction = ToKFunctions [1]
local FormatTooltipNumber = ToKFunctions [8]
local TooltipMaximizedMethod = 1
local UsingCustomRightText = false
local UsingCustomLeftText = false
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--> core
@@ -78,22 +78,22 @@
--> save the custom name in the instance
instance.customName = custom_object:GetName()
--> get the container holding the custom actor objects for this instance
local instance_container = atributo_custom:GetInstanceCustomActorContainer (instance)
local last_shown = atributo_custom._InstanceLastCustomShown [instance:GetId()]
if (last_shown and last_shown ~= custom_object:GetName()) then
instance_container:WipeCustomActorContainer()
end
atributo_custom._InstanceLastCustomShown [instance:GetId()] = custom_object:GetName()
local last_combat_shown = atributo_custom._InstanceLastCombatShown [instance:GetId()]
if (last_combat_shown and last_combat_shown ~= combat) then
instance_container:WipeCustomActorContainer()
end
atributo_custom._InstanceLastCombatShown [instance:GetId()] = combat
--> declare the main locals
local total = 0
local top = 0
@@ -104,9 +104,9 @@
--> be save reseting the values on every refresh
instance_container:ResetCustomActorContainer()
local func
if (_detalhes.custom_function_cache [instance.customName]) then
func = _detalhes.custom_function_cache [instance.customName]
else
+4 -1
View File
@@ -4708,7 +4708,10 @@ function atributo_damage:MontaDetalhesDamageDone (spellid, barra, instancia)
table.wipe (data)
--> GERAL
local media = esta_magia.total/total_hits
local media = 0
if (total_hits > 0) then
media = esta_magia.total/total_hits
end
local this_dps = nil
if (esta_magia.counter > esta_magia.c_amt) then
+16 -10
View File
@@ -535,12 +535,21 @@
novo_objeto.flag_original = flag
novo_objeto.serial = serial
--> seta a classe default para desconhecido, assim nenhum objeto fica com classe nil
novo_objeto.classe = "UNKNOW"
local forceClass
--get the aID (actor id)
if (serial:match("^C")) then
novo_objeto.aID = tostring(Details:GetNpcIdFromGuid(serial))
if (Details.immersion_special_units) then
novo_objeto.grupo = Details.Immersion.IsNpcInteresting(novo_objeto.aID)
local shouldBeInGroup, class = Details.Immersion.IsNpcInteresting(novo_objeto.aID)
novo_objeto.grupo = shouldBeInGroup
if (class) then
novo_objeto.classe = class
forceClass = novo_objeto.classe
end
end
elseif (serial:match("^P")) then
@@ -559,14 +568,6 @@
end
end
--> seta a classe default para desconhecido, assim nenhum objeto fica com classe nil
novo_objeto.classe = "UNKNOW"
--8/11 00:57:49.096 SPELL_DAMAGE,
--Creature-0-2084-1220-24968-110715-00002BF677,"Archmage Modera",0x2111,0x0,
--Creature-0-2084-1220-24968-94688-00002BF6A7,"Diseased Grub",0x10a48,0x0,
--220128,"Frost Nova",0x10,Creature-0-2084-1220-24968-94688-00002BF6A7,0000000000000000,63802,311780,0,0,1,0,0,0,4319.26,4710.75,110,10271,-1,16,0,0,0,nil,nil,nil
-- tipo do container
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
@@ -716,8 +717,13 @@
_detalhes_global.debug_chr_log = _detalhes_global.debug_chr_log .. logLine
end
end
end
--only happens with npcs from immersion feature
if (forceClass) then
novo_objeto.classe = forceClass
end
return novo_objeto, dono_do_pet, nome
else
return nil, nil, nil