Removed portraits from tooltips and OpenRaidLib update

This commit is contained in:
Tercio Jose
2022-12-07 17:55:01 -03:00
parent 15bf37fbba
commit 9cad7e3185
6 changed files with 136 additions and 171 deletions
+28 -26
View File
@@ -86,6 +86,20 @@ function openRaidLib.GetBorrowedTalentVersion()
end
end
local getDragonflightTalentsExportedString = function()
local exportStream = ExportUtil.MakeExportDataStream()
local configId = C_ClassTalents.GetActiveConfigID()
if (configId) then
local configInfo = C_Traits.GetConfigInfo(configId)
local currentSpecID = PlayerUtil.GetCurrentSpecID()
local treeInfo = C_Traits.GetTreeInfo(configId, configInfo.treeIDs[1])
local treeHash = C_Traits.GetTreeHash(treeInfo.ID)
local serializationVersion = C_Traits.GetLoadoutSerializationVersion()
end
end
local getDragonflightTalentsAsIndexTable = function()
local allTalents = {}
local configId = C_ClassTalents.GetActiveConfigID()
@@ -312,6 +326,8 @@ function openRaidLib.GearManager.GetPlayerGemsAndEnchantInfo()
--hold equipmentSlotId of equipments without an enchant
local slotsWithoutEnchant = {}
local gearWithEnchantIds = {}
for equipmentSlotId = 1, 17 do
local itemLink = GetInventoryItemLink("player", equipmentSlotId)
if (itemLink) then
@@ -322,34 +338,20 @@ function openRaidLib.GearManager.GetPlayerGemsAndEnchantInfo()
--enchant
--check if the slot can receive enchat and if the equipment has an enchant
local enchantAttribute = LIB_OPEN_RAID_ENCHANT_SLOTS[equipmentSlotId]
if (enchantAttribute) then --this slot can receive an enchat
local nEnchantId = 0
--check if this slot is relevant for the class, some slots can have enchants only for Agility which won't matter for Priests as an example
--if the value is an integer it points to an attribute (int, dex, str), otherwise it's true (boolean)
local slotIsRelevant = true
if (type(enchantAttribute) == "number") then
if (specMainAttribute ~= enchantAttribute) then
slotIsRelevant = false
end
if (enchantAttribute) then --this slot can receive an enchat
if (enchantId and enchantId ~= "") then
local number = tonumber(enchantId)
nEnchantId = number
gearWithEnchantIds[#gearWithEnchantIds+1] = nEnchantId
else
gearWithEnchantIds[#gearWithEnchantIds+1] = 0
end
if (slotIsRelevant) then
--does the slot has any enchant?
if (not enchantId or enchantId == "0" or enchantId == "") then
slotsWithoutEnchant[#slotsWithoutEnchant+1] = equipmentSlotId
else
--convert to integer
local enchantIdInt = tonumber(enchantId)
if (enchantIdInt) then
--does the enchant is relevent for the character?
if (not LIB_OPEN_RAID_ENCHANT_IDS[enchantIdInt]) then
slotsWithoutEnchant[#slotsWithoutEnchant+1] = equipmentSlotId
end
else
--the enchat has an invalid id
slotsWithoutEnchant[#slotsWithoutEnchant+1] = equipmentSlotId
end
end
--6400 and above is dragonflight enchantId number space
if (nEnchantId < 6300 and not LIB_OPEN_RAID_DEATHKNIGHT_RUNEFORGING_ENCHANT_IDS[nEnchantId]) then
slotsWithoutEnchant[#slotsWithoutEnchant+1] = equipmentSlotId
end
end
@@ -367,7 +369,7 @@ function openRaidLib.GearManager.GetPlayerGemsAndEnchantInfo()
slotsWithoutGems[#slotsWithoutGems+1] = equipmentSlotId
--check if the gem is not a valid gem (deprecated gem)
elseif (not LIB_OPEN_RAID_GEM_IDS[gemId]) then
elseif (gemId < 180000) then
slotsWithoutGems[#slotsWithoutGems+1] = equipmentSlotId
end
end
+6 -6
View File
@@ -64,7 +64,7 @@ if (WOW_PROJECT_ID ~= WOW_PROJECT_MAINLINE and not isExpansion_Dragonflight()) t
end
local major = "LibOpenRaid-1.0"
local CONST_LIB_VERSION = 82
local CONST_LIB_VERSION = 84
if (not LIB_OPEN_RAID_MAX_VERSION) then
LIB_OPEN_RAID_MAX_VERSION = CONST_LIB_VERSION
@@ -1586,11 +1586,11 @@ openRaidLib.internalCallback.RegisterCallback("onLeaveCombat", openRaidLib.UnitI
--build the table with the gear information
local playerGearInfo = {}
playerGearInfo[#playerGearInfo+1] = itemLevel --[1]
playerGearInfo[#playerGearInfo+1] = gearDurability --[2]
playerGearInfo[#playerGearInfo+1] = weaponEnchant --[3]
playerGearInfo[#playerGearInfo+1] = slotsWithoutEnchant --[4]
playerGearInfo[#playerGearInfo+1] = slotsWithoutGems --[5]
playerGearInfo[#playerGearInfo+1] = itemLevel --[1] - one index
playerGearInfo[#playerGearInfo+1] = gearDurability --[2] - one index
playerGearInfo[#playerGearInfo+1] = weaponEnchant --[3] - one index
playerGearInfo[#playerGearInfo+1] = slotsWithoutEnchant --[4] - undefined
playerGearInfo[#playerGearInfo+1] = slotsWithoutGems --[5] - undefined
return playerGearInfo
end
@@ -114,15 +114,14 @@ do
--when the value is a number, the slot only receives enchants for a specific attribute
LIB_OPEN_RAID_ENCHANT_SLOTS = {
--[INVSLOT_NECK] = true,
[INVSLOT_BACK] = true, --for all
[INVSLOT_CHEST] = true, --for all
[INVSLOT_FINGER1] = true, --for all
[INVSLOT_FINGER2] = true, --for all
[INVSLOT_MAINHAND] = true, --for all
[INVSLOT_FEET] = 2, --agility only
[INVSLOT_WRIST] = 1, --intellect only
[INVSLOT_HAND] = 3, --strenth only
[INVSLOT_BACK] = true,
[INVSLOT_CHEST] = true,
[INVSLOT_FINGER1] = true,
[INVSLOT_FINGER2] = true,
[INVSLOT_MAINHAND] = true,
[INVSLOT_FEET] = true,
[INVSLOT_WRIST] = true,
[INVSLOT_HAND] = true,
}
-- how to get the enchantId:
@@ -130,55 +129,18 @@ do
-- local enchandId = select(3, strsplit(":", itemLink))
-- print("enchantId:", enchandId)
LIB_OPEN_RAID_ENCHANT_IDS = {
--need to get this data to dragonflight
--FEET
--[6207] = INVSLOT_FEET, --[Enchant Boots - Speed of Soul]
--[6211] = INVSLOT_FEET, --[Enchant Boots - Eternal Agility] + 15 agi
--[6212] = INVSLOT_FEET, --[Enchant Boots - Agile Soulwalker] + 10 agi
--empty as the lib now get the enchant id and compare with expansion enchantId number space
}
--WRIST
--[6222] = INVSLOT_WRIST, [Enchant Bracers - Shaded Hearthing]
--[6219] = INVSLOT_WRIST, --[Enchant Bracers - Illuminated Soul] + 10 int
--[6220] = INVSLOT_WRIST, --[Enchant Bracers - Eternal Intellect] + 15 int
--HAND
--[6205] = INVSLOT_HAND, --[Enchant Gloves - Shadowlands Gathering]
--[6209] = INVSLOT_HAND, --[Enchant Gloves - Strength of Soul] +10 str
--[6210] = INVSLOT_HAND, --[Enchant Gloves - Eternal Strength] +15 str
--FINGER
--[6164] = INVSLOT_FINGER1, --[Enchant Ring - Tenet of Critical Strike] +16
--[6166] = INVSLOT_FINGER1, --[Enchant Ring - Tenet of Haste] +16
--[6168] = INVSLOT_FINGER1, --[Enchant Ring - Tenet of Mastery] +16
--[6170] = INVSLOT_FINGER1, --[Enchant Ring - Tenet of Versatility] +16
--BACK
--[6202] = INVSLOT_BACK, --[Enchant Cloak - Fortified Speed] +20 stam +30 speed
--[6203] = INVSLOT_BACK, --[Enchant Cloak - Fortified Avoidance] +20 stam +30 avoidance
--[6204] = INVSLOT_BACK, --[Enchant Cloak - Fortified Leech]
--[6208] = INVSLOT_BACK, --[Enchant Cloak - Soul Vitality]
--CHEST
--[6213] = INVSLOT_CHEST, --[Enchant Chest - Eternal Bulwark] +25 armor +20 agi or str
--[6214] = INVSLOT_CHEST, --[Enchant Chest - Eternal Skirmish] +20 agi or str +more white damage
--[6217] = INVSLOT_CHEST, --[Enchant Chest - Eternal Bounds] +20 int + 6% mana
--[6216] = INVSLOT_CHEST, --[Enchant Chest - Sacred Stats] +20 all stats
--[6230] = INVSLOT_CHEST, --[Enchant Chest - Eternal Stats] +30 all stats
--MAINHAND
--[6223] = INVSLOT_MAINHAND, --[Enchant Weapon - Lightless Force] + shadow wave damage
--[6226] = INVSLOT_MAINHAND, --[Enchant Weapon - Eternal Grace] + burst of healing done
--[6227] = INVSLOT_MAINHAND, --[Enchant Weapon - Ascended Vigor] + healing received increased
--[6228] = INVSLOT_MAINHAND, --[Enchant Weapon - Sinful Revelation] + 6% bleed damage
--[6229] = INVSLOT_MAINHAND, --[Enchant Weapon - Celestial Guidance] + 5% agility
--[6243] = INVSLOT_MAINHAND, --[Runeforging: Rune of Hysteria]
--[3370] = INVSLOT_MAINHAND, --[Runeforging: Rune of Razorice]
--[6241] = INVSLOT_MAINHAND, --[Runeforging: Rune of Sanguination]
--[6242] = INVSLOT_MAINHAND, --[Runeforging: Rune of Spellwarding]
--[6245] = INVSLOT_MAINHAND, --[Runeforging: Rune of the Apocalypse]
--[3368] = INVSLOT_MAINHAND, --[Runeforging: Rune of the Fallen Crusader]
--[3847] = INVSLOT_MAINHAND, --[Runeforging: Rune of the Stoneskin Gargoyle]
--[6244] = INVSLOT_MAINHAND, --[Runeforging: Rune of Unending Thirst]
LIB_OPEN_RAID_DEATHKNIGHT_RUNEFORGING_ENCHANT_IDS = {
[6243] = INVSLOT_MAINHAND, --[Runeforging: Rune of Hysteria]
[3370] = INVSLOT_MAINHAND, --[Runeforging: Rune of Razorice]
[6241] = INVSLOT_MAINHAND, --[Runeforging: Rune of Sanguination]
[6242] = INVSLOT_MAINHAND, --[Runeforging: Rune of Spellwarding]
[6245] = INVSLOT_MAINHAND, --[Runeforging: Rune of the Apocalypse]
[3368] = INVSLOT_MAINHAND, --[Runeforging: Rune of the Fallen Crusader]
[3847] = INVSLOT_MAINHAND, --[Runeforging: Rune of the Stoneskin Gargoyle]
[6244] = INVSLOT_MAINHAND, --[Runeforging: Rune of Unending Thirst]
}
--how to get the gemId:
@@ -401,9 +363,9 @@ do
[392966] = {cooldown = 90, duration = 20, specs = {73}, talent = false, charges = 1, class = "WARRIOR", type = 2}, --Spell Block
[384318] = {cooldown = 90, duration = 0, specs = {71, 72, 73}, talent = false, charges = 1, class = "WARRIOR", type = 1}, --Thunderous Roar
[46968] = {cooldown = 40, duration = 0, specs = {}, talent = false, charges = 1, class = "WARRIOR", type = 8}, --Shockwave
[23920] = {cooldown = 25, duration = 5, specs = {}, talent = false, charges = 1, class = "WARRIOR", type = 5}, --Shockwave
[107570] = {cooldown = 30, duration = 4, specs = {}, talent = false, charges = 1, class = "WARRIOR", type = 8}, --Storm Bolt
[23920] = {cooldown = 25, duration = 0, specs = {}, talent = false, charges = 1, class = "WARRIOR", type = 5}, --Spell Refleciton
[385060] = {cooldown = 45, duration = 0, specs = {}, talent = false, charges = 1, class = "WARRIOR", type = 5}, --Odyn's Fury (can remove root with Avatar)
--warlock
-- 265 - Affliction
@@ -422,6 +384,7 @@ do
[265187] = {cooldown = 90, duration = 15, specs = {266}, talent = false, charges = 1, class = "WARLOCK", type = 1}, --Summon Demonic Tyrant
[1122] = {cooldown = 180, duration = 30, specs = {267}, talent = false, charges = 1, class = "WARLOCK", type = 1}, --Summon Infernal
[104773] = {cooldown = 180, duration = 8, specs = {265, 266, 267}, talent = false, charges = 1, class = "WARLOCK", type = 2}, --Unending Resolve
[48020] = {cooldown = 30, duration = 0, specs = {265, 266, 267}, talent = false, charges = 1, class = "WARLOCK", type = 5}, --Demonic Circle: Teleport
--shaman
-- 262 - Elemental
@@ -496,6 +459,7 @@ do
[264735] = {cooldown = 180, duration = 0, specs = {253, 254, 255}, talent = false, charges = 1, class = "HUNTER", type = 2}, --Survival of the Fittest
[187698] = {cooldown = 30, duration = 0, specs = {}, talent = false, charges = 1, class = "HUNTER", type = 8}, --Tar Trap
[392060] = {cooldown = 60, duration = 3, specs = {}, talent = false, charges = 1, class = "HUNTER", type = 8}, --Wailing Arrow
[781] = {cooldown = 20, duration = 0, specs = {}, talent = false, charges = 1, class = "HUNTER", type = 5}, --Disengage
--druid
-- 102 - Balance
@@ -596,6 +560,7 @@ do
[205021] = {cooldown = 78, duration = 5, specs = {64}, talent = false, charges = 1, class = "MAGE", type = 1}, --Ray of Frost
[113724] = {cooldown = 45, duration = 10, specs = {62, 63, 64}, talent = false, charges = 1, class = "MAGE", type = 8}, --Ring of Frost
[31661] = {cooldown = 45, duration = 0, specs = {}, talent = false, charges = 1, class = "MAGE", type = 8}, --Dragon's Breath
[1953] = {cooldown = 15, duration = 0, specs = {}, talent = false, charges = 1, class = "MAGE", type = 5}, --Blink
-- This needs more work to actually function
--[342245] = {cooldown = 60, duration = 0, specs = {}, talent = false, charges = 1, class = "MAGE", type = 2}, --Alter Time
+29 -29
View File
@@ -3320,7 +3320,7 @@ function atributo_damage:ToolTip_DamageDone (instancia, numero, barra, keydown)
end
end
--MOSTRA INIMIGOS
--targets (enemies)
local topEnemy = ActorTargetsSortTable[1] and ActorTargetsSortTable[1][2] or 0
if (instancia.sub_atributo == 1 or instancia.sub_atributo == 6) then
--small blank space
@@ -3348,7 +3348,7 @@ function atributo_damage:ToolTip_DamageDone (instancia, numero, barra, keydown)
local enemyTable = ActorTargetsSortTable[i]
GameCooltip:AddLine(enemyTable[1], FormatTooltipNumber(_, enemyTable[2]) .." ("..format("%.1f", enemyTable[2] / ActorDamageWithPet * 100).."%)")
local portraitTexture = Details222.Textures.GetPortraitTextureForNpcID(enemyTable[3])
local portraitTexture-- = Details222.Textures.GetPortraitTextureForNpcID(enemyTable[3]) --disabled atm
if (portraitTexture) then
GameCooltip:AddIcon(portraitTexture, 1, 1, icon_size.W, icon_size.H)
else
@@ -4570,59 +4570,59 @@ function atributo_damage:MontaInfoDamageDone()
local topDamage = enemyTable[1] and enemyTable[1][2] or 0
local barra
for index, tabela in ipairs(enemyTable) do
barra = barras [index]
local thisLine
for index, thisEnemyTable in ipairs(enemyTable) do
thisLine = barras[index]
if (not barra) then --se a barra no existir, criar ela ento
barra = gump:CriaNovaBarraInfo2 (instance, index)
barra.textura:SetStatusBarColor(1, 1, 1, 1) --isso aqui a parte da seleo e desceleo
if (not thisLine) then --se a barra no existir, criar ela ento
thisLine = gump:CriaNovaBarraInfo2 (instance, index)
thisLine.textura:SetStatusBarColor(1, 1, 1, 1) --isso aqui a parte da seleo e desceleo
end
if (index == 1) then
barra.textura:SetValue(100)
thisLine.textura:SetValue(100)
else
barra.textura:SetValue(tabela[2] / topDamage * 100)
thisLine.textura:SetValue(thisEnemyTable[2] / topDamage * 100)
end
barra.lineText1:SetText(index .. ". " .. Details:GetOnlyName(tabela[1])) --seta o texto da esqueda
barra.lineText4:SetText(Details:comma_value (tabela[2]) .. " (" .. format("%.1f", tabela[3]) .. "%)") --seta o texto da direita
thisLine.lineText1:SetText(index .. ". " .. Details:GetOnlyName(thisEnemyTable[1])) --left text
thisLine.lineText4:SetText(Details:comma_value (thisEnemyTable[2]) .. " (" .. format("%.1f", thisEnemyTable[3]) .. "%)") --right text
barra.icone:SetTexture([[Interface\AddOns\Details\images\classes_small_alpha]]) --CLASSE
thisLine.icone:SetTexture([[Interface\AddOns\Details\images\classes_small_alpha]]) --class icon
local texCoords = Details.class_coords [tabela[4]]
local texCoords = Details.class_coords[thisEnemyTable[4]]
if (not texCoords) then
texCoords = Details.class_coords ["UNKNOW"]
texCoords = Details.class_coords["UNKNOW"]
end
barra.icone:SetTexCoord(unpack(texCoords))
thisLine.icone:SetTexCoord(unpack(texCoords))
local color = Details.class_colors [tabela[4]]
local color = Details.class_colors[thisEnemyTable[4]]
if (color) then
barra.textura:SetStatusBarColor(unpack(color))
thisLine.textura:SetStatusBarColor(unpack(color))
else
barra.textura:SetStatusBarColor(1, 1, 1)
thisLine.textura:SetStatusBarColor(1, 1, 1)
end
Details:name_space_info (barra)
Details:name_space_info(thisLine)
if (barra.mouse_over) then --atualizar o tooltip
if (barra.isAlvo) then
if (thisLine.mouse_over) then --atualizar o tooltip
if (thisLine.isAlvo) then
GameTooltip:Hide()
GameTooltip:SetOwner(barra, "ANCHOR_TOPRIGHT")
if (not barra.minha_tabela:MontaTooltipDamageTaken (barra, index)) then
GameTooltip:SetOwner(thisLine, "ANCHOR_TOPRIGHT")
if (not thisLine.minha_tabela:MontaTooltipDamageTaken(thisLine, index)) then
return
end
GameTooltip:Show()
end
end
barra.minha_tabela = self --grava o jogador na tabela
barra.nome_inimigo = tabela [1] --salva o nome do inimigo na barra --isso necessrio?
thisLine.minha_tabela = self --grava o jogador na tabela
thisLine.nome_inimigo = thisEnemyTable[1] --salva o nome do inimigo na barra --isso necessrio?
-- no rank do spell id colocar o que?
barra.spellid = "enemies"
thisLine.spellid = "enemies"
barra:Show() --mostra a barra
thisLine:Show() --mostra a barra
end
else
local combatObject = instance:GetShowingCombat()
@@ -4663,9 +4663,9 @@ function atributo_damage:MontaInfoDamageDone()
local targetName = targetTable[1]
local targetActorObject = damageContainer:GetActor(targetName)
local npcId = DetailsFramework:GetNpcIdFromGuid(targetActorObject:GetGUID())
if (targetActorObject) then
local npcId = DetailsFramework:GetNpcIdFromGuid(targetActorObject:GetGUID())
local portraitTexture = Details222.Textures.GetPortraitTextureForNpcID(npcId)
if (portraitTexture) then
Details222.Textures.FormatPortraitAsTexture(portraitTexture, barra.icone)
+48 -50
View File
@@ -69,6 +69,8 @@
local OBJECT_TYPE_PLAYER = 0x00000400
local OBJECT_TYPE_PETS = OBJECT_TYPE_PET + OBJECT_TYPE_GUARDIAN
local debugPetname = false
local KirinTor = GetFactionInfoByID (1090) or "1"
local Valarjar = GetFactionInfoByID (1948) or "1"
local HighmountainTribe = GetFactionInfoByID (1828) or "1"
@@ -199,7 +201,7 @@
if (engClass) then
novo_objeto.classe = engClass
return
else
else
if (flag) then
--conferir se o jogador um player
if (_bit_band (flag, OBJECT_TYPE_PLAYER) ~= 0) then
@@ -434,27 +436,28 @@
end
local pet_blacklist = {}
local petBlackList = {}
local pet_tooltip_frame = _G.DetailsPetOwnerFinder
local pet_text_object = _G ["DetailsPetOwnerFinderTextLeft2"] --not in use
local follower_text_object = _G ["DetailsPetOwnerFinderTextLeft3"] --not in use
local find_pet_found_owner = function(ownerName, serial, nome, flag, self)
local ownerGuid = UnitGUID(ownerName)
local petOwnerFound = function(ownerName, petGUID, petName, petFlags, self, ownerGUID)
local ownerGuid = ownerGUID or UnitGUID(ownerName)
if (ownerGuid) then
_detalhes.tabela_pets:Adicionar (serial, nome, flag, ownerGuid, ownerName, 0x00000417)
local nome_dele, dono_nome, dono_serial, dono_flag = _detalhes.tabela_pets:PegaDono (serial, nome, flag)
local dono_do_pet
if (nome_dele and dono_nome) then
nome = nome_dele
dono_do_pet = self:PegarCombatente (dono_serial, dono_nome, dono_flag, true, nome)
_detalhes.tabela_pets:Adicionar(petGUID, petName, petFlags, ownerGuid, ownerName, 0x00000417)
local petNameWithOwner, ownerName, ownerGUID, ownerFlags = _detalhes.tabela_pets:PegaDono(petGUID, petName, petFlags)
local petOwnerActorObject
if (petNameWithOwner and ownerName) then
petName = petNameWithOwner
petOwnerActorObject = self:PegarCombatente(ownerGUID, ownerName, ownerFlags, true)
end
return nome, dono_do_pet
return petName, petOwnerActorObject
end
end
--check pet owner name with correct declension for ruRU locale (from user 'denis-kam' on github)
local find_name_declension = function(petTooltip, playerName)
--2 - male, 3 - female
@@ -468,22 +471,21 @@
end
end
end
return false
end
local find_pet_owner = function(serial, nome, flag, self)
local find_pet_owner = function(petGUID, petName, petFlags, self)
if (not _detalhes.tabela_vigente) then
return
end
if (bIsDragonflight) then
pet_tooltip_frame:SetOwner(WorldFrame, "ANCHOR_NONE")
pet_tooltip_frame:SetHyperlink ("unit:" .. (serial or ""))
pet_tooltip_frame:SetHyperlink("unit:" .. (petGUID or ""))
local tooltipData = pet_tooltip_frame:GetTooltipData()
if (tooltipData and tooltipData.lines[1]) then
if (tooltipData.lines[1].leftText == nome) then
if (tooltipData.lines[1].leftText == petName) then
for i = 2, #tooltipData.lines do
local tooltipLine = tooltipData.lines[i]
local args = tooltipLine.args
@@ -492,8 +494,7 @@
local guidVal = args[4].guidVal
local guidCache = Details:GetParserPlayerCache()
if (guidCache[guidVal]) then
find_pet_found_owner(guidCache[guidVal], serial, nome, flag, self)
return
return petOwnerFound(guidCache[guidVal], petGUID, petName, petFlags, self, guidVal)
end
end
end
@@ -517,21 +518,21 @@
--this is equivalent to remove 's from the owner on enUS
if (CONST_CLIENT_LANGUAGE == "ruRU") then
if (find_name_declension (text1, playerName)) then
return find_pet_found_owner (pName, serial, nome, flag, self)
return petOwnerFound (pName, petGUID, petName, petFlags, self)
else
--print("not found declension (1):", pName, nome)
if (text1:find(playerName)) then
return find_pet_found_owner (pName, serial, nome, flag, self)
return petOwnerFound (pName, petGUID, petName, petFlags, self)
end
end
else
if (text1:find(playerName)) then
return find_pet_found_owner (pName, serial, nome, flag, self)
return petOwnerFound (pName, petGUID, petName, petFlags, self)
else
local ownerName = (string.match(text1, string.gsub(UNITNAME_TITLE_PET, "%%s", "(%.*)")) or string.match(text1, string.gsub(UNITNAME_TITLE_MINION, "%%s", "(%.*)")) or string.match(text1, string.gsub(UNITNAME_TITLE_GUARDIAN, "%%s", "(%.*)")))
if (ownerName) then
if (_detalhes.tabela_vigente.raid_roster[ownerName]) then
return find_pet_found_owner (ownerName, serial, nome, flag, self)
return petOwnerFound (ownerName, petGUID, petName, petFlags, self)
end
end
end
@@ -549,21 +550,21 @@
if (CONST_CLIENT_LANGUAGE == "ruRU") then
if (find_name_declension (text2, playerName)) then
return find_pet_found_owner (pName, serial, nome, flag, self)
return petOwnerFound (pName, petGUID, petName, petFlags, self)
else
--print("not found declension (2):", pName, nome)
if (text2:find(playerName)) then
return find_pet_found_owner (pName, serial, nome, flag, self)
return petOwnerFound (pName, petGUID, petName, petFlags, self)
end
end
else
if (text2:find(playerName)) then
return find_pet_found_owner (pName, serial, nome, flag, self)
return petOwnerFound (pName, petGUID, petName, petFlags, self)
else
local ownerName = (string.match(text2, string.gsub(UNITNAME_TITLE_PET, "%%s", "(%.*)")) or string.match(text2, string.gsub(UNITNAME_TITLE_MINION, "%%s", "(%.*)")) or string.match(text2, string.gsub(UNITNAME_TITLE_GUARDIAN, "%%s", "(%.*)")))
if (ownerName) then
if (_detalhes.tabela_vigente.raid_roster[ownerName]) then
return find_pet_found_owner (ownerName, serial, nome, flag, self)
return petOwnerFound (ownerName, petGUID, petName, petFlags, self)
end
end
end
@@ -621,40 +622,37 @@
--verifica se um pet, se for confere se tem o nome do dono, se no tiver, precisa por
local dono_do_pet
serial = serial or "ns"
if (container_pets [serial]) then -- um pet reconhecido
--[[statistics]]-- _detalhes.statistics.container_pet_calls = _detalhes.statistics.container_pet_calls + 1
local nome_dele, dono_nome, dono_serial, dono_flag = _detalhes.tabela_pets:PegaDono (serial, nome, flag)
if (nome_dele and dono_nome) then
nome = nome_dele
dono_do_pet = self:PegarCombatente (dono_serial, dono_nome, dono_flag, true)
if (container_pets[serial]) then -- um pet reconhecido
--[[statistics]]-- _detalhes.statistics.container_pet_calls = _detalhes.statistics.container_pet_calls + 1
local petName, ownerName, ownerGUID, ownerFlag = _detalhes.tabela_pets:PegaDono (serial, nome, flag)
if (petName and ownerName) then
nome = petName
dono_do_pet = self:PegarCombatente(ownerGUID, ownerName, ownerFlag, true)
end
elseif (not pet_blacklist [serial]) then --verifica se um pet
pet_blacklist [serial] = true
elseif (not petBlackList[serial]) then --verifica se um pet
petBlackList[serial] = true
--try to find the owner
if (flag and _bit_band (flag, OBJECT_TYPE_PETGUARDIAN) ~= 0) then
if (flag and _bit_band(flag, OBJECT_TYPE_PETGUARDIAN) ~= 0) then
--[[statistics]]-- _detalhes.statistics.container_unknow_pet = _detalhes.statistics.container_unknow_pet + 1
local find_nome, find_owner = find_pet_owner (serial, nome, flag, self)
local find_nome, find_owner = find_pet_owner(serial, nome, flag, self)
if (find_nome and find_owner) then
nome, dono_do_pet = find_nome, find_owner
end
end
end
--pega o index no mapa
local index = self._NameIndexTable [nome]
local index = self._NameIndexTable[nome]
--retorna o actor
if (index) then
return self._ActorTable [index], dono_do_pet, nome
return self._ActorTable[index], dono_do_pet, nome
--no achou, criar
elseif (criar) then
local novo_objeto = self.funcao_de_criacao (_, serial, nome)
local novo_objeto = self.funcao_de_criacao(_, serial, nome)
novo_objeto.nome = nome
novo_objeto.flag_original = flag
novo_objeto.serial = serial
@@ -666,7 +664,7 @@
--get the aID (actor id)
if (serial:match("^C")) then
novo_objeto.aID = tostring(Details:GetNpcIdFromGuid(serial))
if (Details.immersion_special_units) then
local shouldBeInGroup, class = Details.Immersion.IsNpcInteresting(novo_objeto.aID)
novo_objeto.grupo = shouldBeInGroup
@@ -879,7 +877,7 @@
_detalhes:UpdatePetsOnParser()
end
function _detalhes:ClearCCPetsBlackList()
table.wipe(pet_blacklist)
table.wipe(petBlackList)
end
function container_combatentes:FuncaoDeCriacao (tipo)
+2 -2
View File
@@ -5270,7 +5270,7 @@ local SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 1
if (Details.show_warning_id1) then
if (Details.show_warning_id1_amount < 2) then
Details.show_warning_id1_amount = Details.show_warning_id1_amount + 1
Details:Msg("|cFFFFFF00you might find differences on damage done, this is due to a bug in the game client, nothing related to Details! itself (" .. Details.show_warning_id1_amount .. " / 10).")
--Details:Msg("|cFFFFFF00you might find differences on damage done, this is due to a bug in the game client, nothing related to Details! itself (" .. Details.show_warning_id1_amount .. " / 10).")
end
end
end)
@@ -5385,7 +5385,7 @@ local SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 1
if (Details.show_warning_id1) then
if (Details.show_warning_id1_amount < 2) then
Details.show_warning_id1_amount = Details.show_warning_id1_amount + 1
Details:Msg("|cFFFFFF00you may find differences on damage done, this is due to a bug in the game client, nothing related to Details! itself (" .. Details.show_warning_id1_amount .. " / 10).")
--Details:Msg("|cFFFFFF00you may find differences on damage done, this is due to a bug in the game client, nothing related to Details! itself (" .. Details.show_warning_id1_amount .. " / 10).")
end
end
end)