Added actor:IsFriendlyNpc()

This commit is contained in:
Tercio Jose
2021-03-01 16:19:00 -03:00
parent 2daf700d02
commit b1dd10f166
8 changed files with 97 additions and 8 deletions
+16
View File
@@ -91,6 +91,8 @@
local tooltip_temp_table = {}
local OBJECT_TYPE_FRIENDLY_NPC = 0x00000A18
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--> exported functions
@@ -205,6 +207,20 @@
end
return false
end
function Details:IsFriendlyNpc()
local flag = self.flag_original
if (flag) then
if (bit.band(flag, 0x00000008) ~= 0) then
if (bit.band(flag, 0x00000010) ~= 0) then
if (bit.band(flag, 0x00000800) ~= 0) then
return true
end
end
end
end
return false
end
--[[ exported]] function Details:IsEnemy()
if (self.flag_original) then
+20
View File
@@ -117,6 +117,26 @@ function atributo_heal:NovaTabela (serial, nome, link)
end
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--> npc healing taken
--local npchealingtaken_tooltip_background = {value = 100, color = {0.1960, 0.1960, 0.1960, 0.9097}, texture = [[Interface\AddOns\Details\images\bar_background2]]}
--tooltip function
local function RefreshNpcHealingTakenBar(tabela, barra, instancia)
atributo_damage:UpdateNpcHealingTaken(tabela, tabela.minha_barra, barra.colocacao, instancia)
end
local on_switch_NHT_show = function(instance) --npc healing taken
instance:TrocaTabela(instance, true, 1, 8)
return true
end
--local NHT_search_code = [[]]
function _detalhes.SortGroupHeal (container, keyName2)
keyName = keyName2
return _table_sort (container, _detalhes.SortKeyGroupHeal)
+1 -1
View File
@@ -605,7 +605,7 @@ function atributo_misc:DeadAtualizarBarra (morte, whichRowLine, colocacao, insta
esta_barra.icone_classe:SetTexCoord (_unpack (_detalhes.class_specs_coords [spec]))
else
esta_barra.icone_classe:SetTexture (instancia.row_info.icon_file)
esta_barra.icone_classe:SetTexCoord (_unpack (CLASS_ICON_TCOORDS [morte[4]]))
esta_barra.icone_classe:SetTexCoord (_unpack (CLASS_ICON_TCOORDS [morte[4]])) --no tcoords on morte[4]
end
else
esta_barra.icone_classe:SetTexture (instancia.row_info.icon_file)
+8
View File
@@ -74,6 +74,9 @@
local TheNightfallen = GetFactionInfoByID (1859) or "1"
local TheWardens = GetFactionInfoByID (1894) or "1"
local SPELLID_SANGUINE_HEAL = 226510
local sanguineActorName = GetSpellInfo(SPELLID_SANGUINE_HEAL)
local IsFactionNpc = {
[KirinTor] = true,
[Valarjar] = true,
@@ -700,6 +703,11 @@
end
--sanguine affix
if (nome == sanguineActorName) then
novo_objeto.grupo = true
end
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-- grava o objeto no mapa do container
local size = #self._ActorTable+1