Scaling fixes; Added player bar color

This commit is contained in:
Tercio Jose
2022-01-15 14:32:25 -03:00
parent 009d96cbda
commit 28f28f2212
14 changed files with 393 additions and 288 deletions
+16 -1
View File
@@ -125,7 +125,22 @@
function combate:GetDeaths()
return self.last_events_tables
end
function combate:GetPlayerDeaths(deadPlayerName)
local allDeaths = self:GetDeaths()
local deaths = {}
for i = 1, #allDeaths do
local thisDeath = allDeaths[i]
local thisPlayerName = thisDeath[3]
if (deadPlayerName == thisPlayerName) then
deaths[#deaths+1] = thisDeath
end
end
return deaths
end
function combate:GetCombatId()
return self.combat_id
end
+23 -23
View File
@@ -327,40 +327,39 @@
return table1 [4] < table2 [4]
end
--[[exported]] function Details:GetBarColor (actor)
--[[exported]] function Details:GetBarColor(actor)
actor = actor or self
if (actor.monster) then
return _unpack (Details.class_colors.ENEMY)
return _unpack(Details.class_colors.ENEMY)
elseif (actor.customColor) then
return unpack(actor.customColor)
return _unpack(actor.customColor)
elseif (actor.spellicon) then
return 0.729, 0.917, 1
elseif (actor.owner) then
return _unpack (Details.class_colors [actor.owner.classe or "UNKNOW"])
return _unpack(Details.class_colors[actor.owner.classe or "UNKNOW"])
elseif (actor.arena_team and Details.color_by_arena_team) then
if (actor.arena_team == 0) then
return _unpack (Details.class_colors.ARENA_GREEN)
return _unpack(Details.class_colors.ARENA_GREEN)
else
return _unpack (Details.class_colors.ARENA_YELLOW)
return _unpack(Details.class_colors.ARENA_YELLOW)
end
--elseif (actor.enemy and not actor.arena_enemy) then
-- return 0.94117, 0.1, 0.1, 1
else
if (not is_player_class [actor.classe] and actor.flag_original and _bit_band (actor.flag_original, 0x00000020) ~= 0) then --> neutral
return _unpack (Details.class_colors.NEUTRAL)
return _unpack(Details.class_colors.NEUTRAL)
elseif (actor.color) then
return _unpack(actor.color)
else
return _unpack (Details.class_colors [actor.classe or "UNKNOW"])
return _unpack(Details.class_colors [actor.classe or "UNKNOW"])
end
end
end
--[[exported]] function Details:GetSpellLink (spellid)
if (_type (spellid) ~= "number") then
return spellid
@@ -2842,29 +2841,30 @@ local InBarIconPadding = 6
set_text_size (bar, instance)
end
--[[ exported]] function Details:SetBarColors (bar, instance, r, g, b, a)
--[[ exported]] function Details:SetBarColors(bar, instance, r, g, b, a)
a = a or 1
if (instance.row_info.texture_class_colors) then
if (instance.bars_inverted) then
bar.right_to_left_texture:SetVertexColor (r, g, b, a)
bar.right_to_left_texture:SetVertexColor(r, g, b, a)
else
bar.textura:SetVertexColor (r, g, b, a)
bar.textura:SetVertexColor(r, g, b, a)
end
end
if (instance.row_info.texture_background_class_color) then
bar.background:SetVertexColor (r, g, b, a)
bar.background:SetVertexColor(r, g, b, a)
end
if (instance.row_info.textL_class_colors) then
bar.lineText1:SetTextColor (r, g, b, a)
bar.lineText1:SetTextColor(r, g, b, a)
end
if (instance.row_info.textR_class_colors) then
bar.lineText2:SetTextColor (r, g, b, a)
bar.lineText3:SetTextColor (r, g, b, a)
bar.lineText4:SetTextColor (r, g, b, a)
bar.lineText2:SetTextColor(r, g, b, a)
bar.lineText3:SetTextColor(r, g, b, a)
bar.lineText4:SetTextColor(r, g, b, a)
end
end
@@ -2954,11 +2954,11 @@ end
end
--> icon
self:SetClassIcon (thisLine.icone_classe, instance, class)
self:SetClassIcon(thisLine.icone_classe, instance, class)
--> texture color
self:SetBarColors (thisLine, instance, actor_class_color_r, actor_class_color_g, actor_class_color_b)
self:SetBarColors(thisLine, instance, actor_class_color_r, actor_class_color_g, actor_class_color_b)
--> left text
self:SetBarLeftText (thisLine, instance, enemy, arena_enemy, arena_ally, UsingCustomLeftText)
self:SetBarLeftText(thisLine, instance, enemy, arena_enemy, arena_ally, UsingCustomLeftText)
end
+94 -92
View File
@@ -25,12 +25,14 @@ local _GetNumSubgroupMembers = GetNumSubgroupMembers
local _UnitAura = UnitAura
local _UnitGUID = UnitGUID
local _UnitName = UnitName
local format = _G.format
local UnitIsUnit = UnitIsUnit
local _string_replace = _detalhes.string.replace --details api
local _detalhes = _G._detalhes
local Details = _detalhes
local AceLocale = LibStub ("AceLocale-3.0")
local Loc = AceLocale:GetLocale ( "Details" )
@@ -195,57 +197,49 @@ end
local backgroundColor = {0, 0, 0, 1}
local backgroud_bar_damage = {value = 100, texture = [[Interface\AddOns\Details\images\bar_serenity]], color = {1, 0, 0, 0.1}}
--local backgroud_bar_heal = {value = 100, texture = [[Interface\AddOns\Details\images\bar_background]], color = {0, 0, 0, 1}}
function _detalhes:ToolTipDead (instancia, morte, esta_barra, keydown)
local eventos = morte [1]
local hora_da_morte = morte [2]
local hp_max = morte [5]
function Details:ShowDeathTooltip(combatObject, deathTable)
local events = deathTable[1]
local timeOfDeath = deathTable[2]
local maxHP = deathTable[5]
local battleress = false
local lastcooldown = false
local GameCooltip = GameCooltip
GameCooltip:Reset()
GameCooltip:SetType ("tooltipbar")
GameCooltip:AddLine (Loc ["STRING_REPORT_LEFTCLICK"], nil, 1, _unpack (self.click_to_report_color))
GameCooltip:AddIcon ([[Interface\TUTORIALFRAME\UI-TUTORIAL-FRAME]], 1, 1, 12, 16, 0.015625, 0.13671875, 0.4375, 0.59765625)
GameCooltip:AddStatusBar (0, 1, 1, 1, 1, 1, false, {value = 100, color = {.3, .3, .3, 1}, specialSpark = false, texture = [[Interface\AddOns\Details\images\bar_serenity]]})
local barTypeColors = Details.death_log_colors
--death parser
for index, event in _ipairs (eventos) do
local hp = _math_floor (event[5]/hp_max*100)
if (hp > 100) then
for i, event in _ipairs (events) do
local currentHP = event[5]
local hp = floor(currentHP / maxHP * 100)
if (hp > 100) then
hp = 100
end
local evtype = event [1]
local spellname, _, spellicon = _GetSpellInfo (event [2])
local amount = event [3]
local time = event [4]
local source = event [6]
local combatObject = instancia:GetShowingCombat()
local evtype = event[1]
local spellName, _, spellIcon = _GetSpellInfo(event[2])
local amount = event[3]
local time = event[4]
local source = event[6]
if (time + 12 > hora_da_morte) then
if (time + 12 > timeOfDeath) then
if (type (evtype) == "boolean") then
--> is damage or heal
if (evtype) then
--> damage
local overkill = event [10] or 0
--is damage or heal?
if (evtype) then --bool true
--damage
local overkill = event[10] or 0
local critical = event[11] and (" " .. TEXT_MODE_A_STRING_RESULT_CRITICAL) or "" -- (Critical)
local crushing = event[12] and (" " .. TEXT_MODE_A_STRING_RESULT_CRUSHING) or "" -- (Crushing)
local critOrCrush = critical .. crushing
if (overkill > 0) then
--> deprecated as the parser now removes the overkill damage from total damage
--> this should now sum the overkill from [10] with the damage from [3]
--check the type of overkill that should be shown
@@ -255,115 +249,123 @@ function _detalhes:ToolTipDead (instancia, morte, esta_barra, keydown)
-- amount = amount - overkill
--end
overkill = " (" .. _detalhes:ToK (overkill) .. " |cFFFF8800overkill|r)"
GameCooltip:AddLine ("" .. _cstr ("%.1f", time - hora_da_morte) .. "s |cFFFFFF00" .. spellname .. "|r (|cFFC6B0D9" .. source .. "|r)", "-" .. _detalhes:ToK (amount) .. critOrCrush .. overkill .. " (" .. hp .. "%)", 1, "white", "white")
overkill = " (" .. _detalhes:ToK(overkill) .. " |cFFFF8800overkill|r)"
GameCooltip:AddLine("" .. format("%.1f", time - timeOfDeath) .. "s |cFFFFFF00" .. spellName .. "|r (|cFFC6B0D9" .. source .. "|r)", "-" .. _detalhes:ToK(amount) .. critOrCrush .. overkill .. " (" .. hp .. "%)", 1, "white", "white")
else
overkill = ""
GameCooltip:AddLine ("" .. _cstr ("%.1f", time - hora_da_morte) .. "s " .. spellname .. " (|cFFC6B0D9" .. source .. "|r)", "-" .. _detalhes:ToK (amount) .. critOrCrush .. overkill .. " (" .. hp .. "%)", 1, "white", "white")
GameCooltip:AddLine("" .. format("%.1f", time - timeOfDeath) .. "s " .. spellName .. " (|cFFC6B0D9" .. source .. "|r)", "-" .. _detalhes:ToK(amount) .. critOrCrush .. overkill .. " (" .. hp .. "%)", 1, "white", "white")
end
GameCooltip:AddIcon (spellicon)
if (event [9]) then
--> friendly fire
GameCooltip:AddStatusBar (hp, 1, barTypeColors.friendlyfire, true, backgroud_bar_damage)
--iconTexture, frame, side, iconWidth, iconHeight, L, R, T, B
GameCooltip:AddIcon(spellIcon, nil, nil, nil, nil, .1, .9, .1, .9)
if (event[9]) then
--friendly fire
GameCooltip:AddStatusBar(hp, 1, barTypeColors.friendlyfire, true, backgroud_bar_damage)
else
--> from a enemy
GameCooltip:AddStatusBar (hp, 1, barTypeColors.damage, true, backgroud_bar_damage)
--from a enemy
GameCooltip:AddStatusBar(hp, 1, barTypeColors.damage, true, backgroud_bar_damage)
end
else
--> heal
--heal
if (amount > _detalhes.deathlog_healingdone_min) then
if (combatObject.is_arena) then
if (amount > _detalhes.deathlog_healingdone_min_arena) then
GameCooltip:AddLine("" .. _cstr ("%.1f", time - hora_da_morte) .. "s " .. spellname .. " (|cFFC6B0D9" .. source .. "|r)", "+" .. _detalhes:ToK (amount) .. " (" .. hp .. "%)", 1, "white", "white")
GameCooltip:AddIcon(spellicon)
GameCooltip:AddLine("" .. format("%.1f", time - timeOfDeath) .. "s " .. spellName .. " (|cFFC6B0D9" .. source .. "|r)", "+" .. _detalhes:ToK(amount) .. " (" .. hp .. "%)", 1, "white", "white")
GameCooltip:AddIcon(spellIcon, nil, nil, nil, nil, .1, .9, .1, .9)
GameCooltip:AddStatusBar(hp, 1, barTypeColors.heal, true)
end
else
GameCooltip:AddLine("" .. _cstr ("%.1f", time - hora_da_morte) .. "s " .. spellname .. " (|cFFC6B0D9" .. source .. "|r)", "+" .. _detalhes:ToK (amount) .. " (" .. hp .. "%)", 1, "white", "white")
GameCooltip:AddIcon(spellicon)
GameCooltip:AddLine("" .. format("%.1f", time - timeOfDeath) .. "s " .. spellName .. " (|cFFC6B0D9" .. source .. "|r)", "+" .. _detalhes:ToK(amount) .. " (" .. hp .. "%)", 1, "white", "white")
GameCooltip:AddIcon(spellIcon, nil, nil, nil, nil, .1, .9, .1, .9)
GameCooltip:AddStatusBar(hp, 1, barTypeColors.heal, true)
end
end
end
elseif (type (evtype) == "number") then
if (evtype == 1) then
--> cooldown
GameCooltip:AddLine ("" .. _cstr ("%.1f", time - hora_da_morte) .. "s " .. spellname .. " (" .. source .. ")", "cooldown (" .. hp .. "%)", 1, "white", "white")
GameCooltip:AddIcon (spellicon)
GameCooltip:AddStatusBar (100, 1, barTypeColors.cooldown, true)
--cooldown
GameCooltip:AddLine("" .. format("%.1f", time - timeOfDeath) .. "s " .. spellName .. " (" .. source .. ")", "cooldown (" .. hp .. "%)", 1, "white", "white")
GameCooltip:AddIcon(spellIcon, nil, nil, nil, nil, .1, .9, .1, .9)
GameCooltip:AddStatusBar(100, 1, barTypeColors.cooldown, true)
elseif (evtype == 2 and not battleress) then
--> battle ress
--battle ress
battleress = event
elseif (evtype == 3) then
--> last cooldown used
--last cooldown used
lastcooldown = event
elseif (evtype == 4) then
--> debuff
GameCooltip:AddLine ("" .. _cstr ("%.1f", time - hora_da_morte) .. "s [x" .. amount .. "] " .. spellname .. " (" .. source .. ")", "debuff (" .. hp .. "%)", 1, "white", "white")
GameCooltip:AddIcon (spellicon)
GameCooltip:AddStatusBar (100, 1, barTypeColors.debuff, true)
--debuff
GameCooltip:AddLine("" .. format("%.1f", time - timeOfDeath) .. "s [x" .. amount .. "] " .. spellName .. " (" .. source .. ")", "debuff (" .. hp .. "%)", 1, "white", "white")
GameCooltip:AddIcon(spellIcon)
GameCooltip:AddStatusBar(100, 1, barTypeColors.debuff, true)
end
end
end
end
GameCooltip:AddLine (morte [6] .. " " .. Loc ["STRING_TIME_OF_DEATH"] , "-- -- -- ", 1, "white")
GameCooltip:AddIcon ("Interface\\AddOns\\Details\\images\\small_icons", 1, 1, nil, nil, .75, 1, 0, 1)
GameCooltip:AddStatusBar (0, 1, .5, .5, .5, .5, false, {value = 100, color = {.5, .5, .5, 1}, specialSpark = false, texture = [[Interface\AddOns\Details\images\bar4_vidro]]})
GameCooltip:AddLine(deathTable[6] .. " " .. Loc["STRING_TIME_OF_DEATH"] , "-- -- -- ", 1, "white")
GameCooltip:AddIcon("Interface\\AddOns\\Details\\images\\small_icons", 1, 1, nil, nil, .75, 1, 0, 1)
GameCooltip:AddStatusBar(0, 1, .5, .5, .5, .5, false, {value = 100, color = {.5, .5, .5, 1}, specialSpark = false, texture = [[Interface\AddOns\Details\images\bar4_vidro]]})
if (battleress) then
local nome_magia, _, icone_magia = _GetSpellInfo (battleress [2])
GameCooltip:AddLine ("+" .. _cstr ("%.1f", battleress[4] - hora_da_morte) .. "s " .. nome_magia .. " (" .. battleress[6] .. ")", "", 1, "white")
GameCooltip:AddIcon ("Interface\\Glues\\CharacterSelect\\Glues-AddOn-Icons", 1, 1, nil, nil, .75, 1, 0, 1)
GameCooltip:AddStatusBar (0, 1, .5, .5, .5, .5, false, {value = 100, color = {.5, .5, .5, 1}, specialSpark = false, texture = [[Interface\AddOns\Details\images\bar4_vidro]]})
local spellName, _, spellIcon = _GetSpellInfo (battleress[2])
GameCooltip:AddLine("+" .. format("%.1f", battleress[4] - timeOfDeath) .. "s " .. spellName .. " (" .. battleress[6] .. ")", "", 1, "white")
GameCooltip:AddIcon("Interface\\Glues\\CharacterSelect\\Glues-AddOn-Icons", 1, 1, nil, nil, .75, 1, 0, 1)
GameCooltip:AddStatusBar(0, 1, .5, .5, .5, .5, false, {value = 100, color = {.5, .5, .5, 1}, specialSpark = false, texture = [[Interface\AddOns\Details\images\bar4_vidro]]})
end
if (lastcooldown) then
if (lastcooldown[3] == 1) then
local nome_magia, _, icone_magia = _GetSpellInfo (lastcooldown [2])
GameCooltip:AddLine (_cstr ("%.1f", lastcooldown[4] - hora_da_morte) .. "s " .. nome_magia .. " (" .. Loc ["STRING_LAST_COOLDOWN"] .. ")")
GameCooltip:AddIcon (icone_magia)
if (lastcooldown[3] == 1) then
local spellName, _, spellIcon = _GetSpellInfo (lastcooldown[2])
GameCooltip:AddLine(format("%.1f", lastcooldown[4] - timeOfDeath) .. "s " .. spellName .. " (" .. Loc ["STRING_LAST_COOLDOWN"] .. ")")
GameCooltip:AddIcon(spellIcon)
else
GameCooltip:AddLine (Loc ["STRING_NOLAST_COOLDOWN"])
GameCooltip:AddIcon ([[Interface\CHARACTERFRAME\UI-Player-PlayTimeUnhealthy]], 1, 1, 18, 18)
GameCooltip:AddLine(Loc ["STRING_NOLAST_COOLDOWN"])
GameCooltip:AddIcon([[Interface\CHARACTERFRAME\UI-Player-PlayTimeUnhealthy]], 1, 1, 18, 18)
end
GameCooltip:AddStatusBar (0, 1, 1, 1, 1, 1, false, {value = 100, color = {.3, .3, .3, 1}, specialSpark = false, texture = [[Interface\AddOns\Details\images\bar_serenity]]})
GameCooltip:AddStatusBar(0, 1, 1, 1, 1, 1, false, {value = 100, color = {.3, .3, .3, 1}, specialSpark = false, texture = [[Interface\AddOns\Details\images\bar_serenity]]})
end
GameCooltip:SetOption ("StatusBarHeightMod", -6)
GameCooltip:SetOption ("FixedWidth", (type (_detalhes.death_tooltip_width) == "number" and _detalhes.death_tooltip_width) or 300)
GameCooltip:SetOption("StatusBarHeightMod", -6)
GameCooltip:SetOption("FixedWidth", (type(_detalhes.death_tooltip_width) == "number" and _detalhes.death_tooltip_width) or 300)
GameCooltip:SetOption("TextSize", _detalhes.tooltip.fontsize)
GameCooltip:SetOption("TextFont", _detalhes.tooltip.fontface)
GameCooltip:SetOption("LeftBorderSize", -4)
GameCooltip:SetOption("RightBorderSize", 5)
GameCooltip:SetOption("StatusBarTexture", [[Interface\AddOns\Details\images\bar4_reverse]])
GameCooltip:SetOption("StatusBarTexture", [[Interface\AddOns\Details\images\BantoBar]])
GameCooltip:SetWallpaper(1, [[Interface\SPELLBOOK\Spellbook-Page-1]], {.6, 0.1, 0.64453125, 0}, {.8, .8, .8, 0.2}, true)
GameCooltip:SetBackdrop(1, _detalhes.tooltip_backdrop, backgroundColor, _detalhes.tooltip_border_color)
end
function _detalhes:ToolTipDead (instancia, morte, esta_barra)
local GameCooltip = GameCooltip
Details:ShowDeathTooltip(instancia:GetShowingCombat(), morte)
GameCooltip:SetOption ("TextSize", _detalhes.tooltip.fontsize)
GameCooltip:SetOption ("TextFont", _detalhes.tooltip.fontface)
GameCooltip:SetOption ("LeftBorderSize", -4)
GameCooltip:SetOption ("RightBorderSize", 5)
GameCooltip:SetOption ("StatusBarTexture", [[Interface\AddOns\Details\images\bar4_reverse]])
GameCooltip:SetOption ("StatusBarTexture", [[Interface\AddOns\Details\images\BantoBar]])
GameCooltip:SetWallpaper (1, [[Interface\SPELLBOOK\Spellbook-Page-1]], {.6, 0.1, 0.64453125, 0}, {.8, .8, .8, 0.2}, true)
GameCooltip:SetBackdrop (1, _detalhes.tooltip_backdrop, backgroundColor, _detalhes.tooltip_border_color)
local myPoint = _detalhes.tooltip.anchor_point
local anchorPoint = _detalhes.tooltip.anchor_relative
local x_Offset = _detalhes.tooltip.anchor_offset[1]
local y_Offset = _detalhes.tooltip.anchor_offset[2]
if (_detalhes.tooltip.anchored_to == 1) then
GameCooltip:SetHost (esta_barra, myPoint, anchorPoint, x_Offset, y_Offset)
else
GameCooltip:SetHost (DetailsTooltipAnchor, myPoint, anchorPoint, x_Offset, y_Offset)
end
GameCooltip:ShowCooltip()
end
local function RefreshBarraMorte (morte, barra, instancia)
+67 -60
View File
@@ -175,22 +175,22 @@
--> check is didn't changed the spec:
if (_detalhes.streamer_config.quick_detection) then
--> validate the spec more times if on quick detection
_detalhes:ScheduleTimer ("ReGuessSpec", 2, {novo_objeto, self})
_detalhes:ScheduleTimer ("ReGuessSpec", 4, {novo_objeto, self})
_detalhes:ScheduleTimer ("ReGuessSpec", 6, {novo_objeto, self})
_detalhes:ScheduleTimer("ReGuessSpec", 2, {novo_objeto})
_detalhes:ScheduleTimer("ReGuessSpec", 4, {novo_objeto})
_detalhes:ScheduleTimer("ReGuessSpec", 6, {novo_objeto})
end
_detalhes:ScheduleTimer ("ReGuessSpec", 15, {novo_objeto, self})
_detalhes:ScheduleTimer("ReGuessSpec", 15, {novo_objeto})
--print (nome, "spec em cache:", have_cached)
else
if (_detalhes.streamer_config.quick_detection) then
--> shoot detection early if in quick detection
_detalhes:ScheduleTimer ("GuessSpec", 1, {novo_objeto, self, 1})
_detalhes:ScheduleTimer("GuessSpec", 1, {novo_objeto, nil, 1})
else
_detalhes:ScheduleTimer ("GuessSpec", 3, {novo_objeto, self, 1})
_detalhes:ScheduleTimer("GuessSpec", 3, {novo_objeto, nil, 1})
end
end
end
local _, engClass = _UnitClass (nome or "")
if (engClass) then
@@ -207,71 +207,69 @@
return
end
end
novo_objeto.classe = "UNKNOW"
return true
end
end
--> read the actor flag
local read_actor_flag = function (novo_objeto, dono_do_pet, serial, flag, nome, container_type)
local read_actor_flag = function(actorObject, dono_do_pet, serial, flag, nome, container_type)
if (flag) then
--> um player
--> this is player actor
if (_bit_band (flag, OBJECT_TYPE_PLAYER) ~= 0) then
if (not _detalhes.ignore_nicktag) then
novo_objeto.displayName = _detalhes:GetNickname (nome, false, true) --> serial, default, silent
if (novo_objeto.displayName and novo_objeto.displayName ~= "") then
actorObject.displayName = _detalhes:GetNickname (nome, false, true) --> serial, default, silent
if (actorObject.displayName and actorObject.displayName ~= "") then
--don't display empty nicknames
if (novo_objeto.displayName:find(" ")) then
if (actorObject.displayName:find(" ")) then
if (_detalhes.remove_realm_from_name) then
novo_objeto.displayName = nome:gsub (("%-.*"), "")
actorObject.displayName = nome:gsub (("%-.*"), "")
else
novo_objeto.displayName = nome
actorObject.displayName = nome
end
end
end
end
if (not novo_objeto.displayName) then
if (not actorObject.displayName) then
if (_detalhes.remove_realm_from_name) then
novo_objeto.displayName = nome:gsub (("%-.*"), "")
actorObject.displayName = nome:gsub(("%-.*"), "")
else
novo_objeto.displayName = nome
actorObject.displayName = nome
end
end
if (_detalhes.all_players_are_group or _detalhes.immersion_enabled) then
novo_objeto.grupo = true
actorObject.grupo = true
end
--special spells to add into the group view
local spellId = Details.SpecialSpellActorsName[novo_objeto.nome]
local spellId = Details.SpecialSpellActorsName[actorObject.nome]
if (spellId) then
novo_objeto.grupo = true
actorObject.grupo = true
if (Details.KyrianWeaponSpellIds[spellId]) then
novo_objeto.spellicon = GetSpellTexture(Details.KyrianWeaponActorSpellId)
novo_objeto.nome = Details.KyrianWeaponActorName
novo_objeto.displayName = Details.KyrianWeaponActorName
novo_objeto.customColor = Details.KyrianWeaponColor
actorObject.spellicon = GetSpellTexture(Details.KyrianWeaponActorSpellId)
actorObject.nome = Details.KyrianWeaponActorName
actorObject.displayName = Details.KyrianWeaponActorName
actorObject.customColor = Details.KyrianWeaponColor
nome = Details.KyrianWeaponActorName
else
novo_objeto.spellicon = GetSpellTexture(spellId)
actorObject.spellicon = GetSpellTexture(spellId)
end
end
if ((_bit_band (flag, IS_GROUP_OBJECT) ~= 0 and novo_objeto.classe ~= "UNKNOW" and novo_objeto.classe ~= "UNGROUPPLAYER") or _detalhes:IsInCache (serial)) then
novo_objeto.grupo = true
if ((_bit_band (flag, IS_GROUP_OBJECT) ~= 0 and actorObject.classe ~= "UNKNOW" and actorObject.classe ~= "UNGROUPPLAYER") or _detalhes:IsInCache (serial)) then
actorObject.grupo = true
if (_detalhes:IsATank (serial)) then
novo_objeto.isTank = true
actorObject.isTank = true
end
else
if (_detalhes.pvp_as_group and (_detalhes.tabela_vigente and _detalhes.tabela_vigente.is_pvp) and _detalhes.is_in_battleground) then
novo_objeto.grupo = true
actorObject.grupo = true
end
end
@@ -279,32 +277,35 @@
if (_detalhes.duel_candidates [serial]) then
--> check if is recent
if (_detalhes.duel_candidates [serial]+20 > GetTime()) then
novo_objeto.grupo = true
novo_objeto.enemy = true
actorObject.grupo = true
actorObject.enemy = true
end
end
if (_detalhes.is_in_arena) then
local my_team_color = GetBattlefieldArenaFaction and GetBattlefieldArenaFaction() or 0
--local my_team_color = GetBattlefieldArenaFaction and GetBattlefieldArenaFaction() or 0
if (novo_objeto.grupo) then --> is ally
novo_objeto.arena_ally = true
novo_objeto.arena_team = 0 --my_team_color | forcing the player team to always be the same color
else --> is enemy
novo_objeto.enemy = true
novo_objeto.arena_enemy = true
novo_objeto.arena_team = 1 -- - my_team_color
--my team
if (actorObject.grupo) then
actorObject.arena_ally = true
actorObject.arena_team = 0 -- former my_team_color | forcing the player team to always be the same color
--enemy team
else
actorObject.enemy = true
actorObject.arena_enemy = true
actorObject.arena_team = 1 -- former my_team_color
end
local arena_props = _detalhes.arena_table [nome]
if (arena_props) then
novo_objeto.role = arena_props.role
actorObject.role = arena_props.role
if (arena_props.role == "NONE") then
local role = UnitGroupRolesAssigned and UnitGroupRolesAssigned(nome)
if (role and role ~= "NONE") then
novo_objeto.role = role
actorObject.role = role
end
end
else
@@ -316,10 +317,10 @@
local spec = GetArenaOpponentSpec and GetArenaOpponentSpec (i)
if (spec) then
local id, name, description, icon, role, class = DetailsFramework.GetSpecializationInfoByID (spec) --thanks pas06
novo_objeto.role = role
novo_objeto.classe = class
novo_objeto.enemy = true
novo_objeto.arena_enemy = true
actorObject.role = role
actorObject.classe = class
actorObject.enemy = true
actorObject.arena_enemy = true
found = true
end
end
@@ -327,47 +328,53 @@
local role = UnitGroupRolesAssigned and UnitGroupRolesAssigned (nome)
if (role and role ~= "NONE") then
novo_objeto.role = role
actorObject.role = role
found = true
end
if (not found and nome == _detalhes.playername) then
local role = UnitGroupRolesAssigned ("player")
if (role and role ~= "NONE") then
novo_objeto.role = role
actorObject.role = role
end
end
end
novo_objeto.grupo = true
actorObject.grupo = true
end
--player custom bar color
--at this position in the code, the color will replace colors from arena matches
if (Details.use_self_color) then
actorObject.customColor = Details.class_colors.SELF
end
--> um pet
elseif (dono_do_pet) then
novo_objeto.owner = dono_do_pet
novo_objeto.ownerName = dono_do_pet.nome
elseif (dono_do_pet) then
actorObject.owner = dono_do_pet
actorObject.ownerName = dono_do_pet.nome
if (_IsInInstance() and _detalhes.remove_realm_from_name) then
novo_objeto.displayName = nome:gsub (("%-.*"), ">")
actorObject.displayName = nome:gsub (("%-.*"), ">")
else
novo_objeto.displayName = nome
actorObject.displayName = nome
end
--local pet_npc_template = _detalhes:GetNpcIdFromGuid (serial)
--if (pet_npc_template == 86933) then --viviane
-- novo_objeto.grupo = true
-- actorObject.grupo = true
--end
else
--> anything else that isn't a player or a pet
novo_objeto.displayName = nome
actorObject.displayName = nome
--[=[
--Chromie - From 'The Deaths of Chromie'
if (serial and type (serial) == "string") then
if (serial:match ("^Creature%-0%-%d+%-%d+%-%d+%-122663%-%w+$")) then
novo_objeto.grupo = true
actorObject.grupo = true
end
end
--]=]
@@ -381,7 +388,7 @@
if (_bit_band (flag, OBJECT_TYPE_PETGUARDIAN) == 0) then
--> isn't a pet or guardian
novo_objeto.monster = true
actorObject.monster = true
end
if (serial and type (serial) == "string") then