Added more tools to debug pets on '/details debug' and '/details mypets'
This commit is contained in:
+26
-1
@@ -664,6 +664,14 @@
|
||||
if (not damage_cache[ownerActor.serial] and ownerActor.serial ~= "") then
|
||||
damage_cache[ownerActor.serial] = ownerActor
|
||||
end
|
||||
|
||||
if (ownerActor) then
|
||||
if (Details222.Debug.DebugPets) then
|
||||
Details:Msg("Parser|DebugPets|ActorCreated|PetName:", sourceActor:Name(), "sourceName:", sourceName, "ownerName:", ownerActor:Name())
|
||||
elseif (Details222.Debug.DebugPlayerPets and sourceName == Details.playername) then
|
||||
Details:Msg("Parser|DebugPets|ActorCreated|PetName:", sourceActor:Name(), "sourceName:", sourceName, "ownerName:", ownerActor:Name())
|
||||
end
|
||||
end
|
||||
else
|
||||
--there's no owner actor
|
||||
if (sourceFlags) then
|
||||
@@ -680,6 +688,19 @@
|
||||
end
|
||||
end
|
||||
|
||||
--if a owner actor isn't found and debug pets is enabled and this is a pet or guardian
|
||||
if (not ownerActor and (Details222.Debug.DebugPets or Details222.Debug.DebugPlayerPets) and bitBand(sourceFlags, 0x00003000) ~= 0) then --OBJECT_TYPE_PETGUARDIAN
|
||||
--note: the actor wasn't found in the cache and got created
|
||||
Details:Msg("DebugPets|Parser|Owner Actor Not Found|", sourceName, sourceSerial, sourceFlags, bitBand(sourceFlags, 0x00003000) ~= 0)
|
||||
|
||||
---@type petdata?
|
||||
local petData = petContainer.GetPetInfo(sourceSerial)
|
||||
if (sourceName == "Fire Spirit") then
|
||||
Details:Msg("DebugPets|Parser|PetData|Exists?", petData, sourceName, "Dumping petData on dumpt.")
|
||||
dumpt(petData)
|
||||
end
|
||||
end
|
||||
|
||||
elseif (ownerActor) then --has (sourceActor and ownerActor)
|
||||
--sourceName is the name of the pet
|
||||
local cachedPetName = names_cache[sourceSerial]
|
||||
@@ -1675,6 +1696,10 @@
|
||||
end
|
||||
end
|
||||
|
||||
if (Details222.Debug.DebugPets) then
|
||||
|
||||
end
|
||||
|
||||
--differenciate army and apoc pets for DK
|
||||
if (spellId == 42651) then --army of the dead
|
||||
dk_pets_cache.army[petSerial] = sourceName
|
||||
@@ -5693,7 +5718,7 @@ local SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 1
|
||||
local playerLogin = CreateFrame("frame")
|
||||
playerLogin:RegisterEvent("PLAYER_LOGIN")
|
||||
playerLogin:SetScript("OnEvent", function()
|
||||
Details:StartMeUp()
|
||||
Details222.StartUp.StartMeUp()
|
||||
end)
|
||||
|
||||
function Details.parser_functions:PET_BATTLE_OPENING_START(...)
|
||||
|
||||
Reference in New Issue
Block a user