diff --git a/Libs/DF/fw.lua b/Libs/DF/fw.lua index ec72e4ae..d9ec1634 100644 --- a/Libs/DF/fw.lua +++ b/Libs/DF/fw.lua @@ -5124,6 +5124,10 @@ function _G.__benchmark(bNotPrintResult) end end +function DF:DebugTexture(texture, left, right, top, bottom) + return DF:PreviewTexture(texture, left, right, top, bottom) +end + function DF:PreviewTexture(texture, left, right, top, bottom) if (texture and type(texture) == "table" and texture.GetObjectType and texture:GetObjectType() == "Texture") then DF:Msg("PreviewTexture: you have passed a texture object (uiobject) instead of the texture atlas, filename or id.") diff --git a/classes/container_actors.lua b/classes/container_actors.lua index 00440e54..5707db3d 100644 --- a/classes/container_actors.lua +++ b/classes/container_actors.lua @@ -83,7 +83,7 @@ function Details222.Pets.AkaarisSoulOwner(petGUID) do local ownerGUID = tooltipData.guid --tooltipData.guid seems to exists on all akari soul tooltips and point to the owner guid if (ownerGUID) then - if (ownerGUID:find("^P")) then + if (ownerGUID:find("^Pl")) then local playerGUID = ownerGUID local actorObject = Details:GetActorFromCache(playerGUID) --quick cache only exists during conbat if (actorObject) then @@ -105,7 +105,7 @@ function Details222.Pets.AkaarisSoulOwner(petGUID) local lineData = tooltipData.lines[i] if (lineData.unitToken) then --unit token seems to exists when the add belongs to the "player" local ownerGUID = UnitGUID(lineData.unitToken) - if (ownerGUID and ownerGUID:find("^P")) then + if (ownerGUID and ownerGUID:find("^Pl")) then local playerGUID = ownerGUID local actorObject = Details:GetActorFromCache(playerGUID) --quick cache only exists during conbat if (actorObject) then diff --git a/functions/pack.lua b/functions/pack.lua index de800772..c4ef34d3 100644 --- a/functions/pack.lua +++ b/functions/pack.lua @@ -371,8 +371,10 @@ local packActorSerial = function(actor) local npcId = GetCreatureIDFromGUID(serial) or 0 return "C" .. npcId - elseif (GUIDIsPlayer(serial) == 0) then + elseif (GUIDIsPlayer(serial)) then return "P" + elseif (GUIDIsPet(serial)) then + return "Pe" end end @@ -382,6 +384,9 @@ local unpackActorSerial = function(serialNumber) return Details.packfunctions.CreatePlayerGUID(0, 0, 0, Details.packFunctions.GenerateSerialNumber()) + elseif (serialNumber:match("^Pe")) then + return Details.packfunctions.CreatePetGUID(0, serialNumber:gsub("Pe", ""), Details.packFunctions.GenerateSerialNumber()) + elseif (serialNumber:match("^C")) then return Details.packfunctions.CreateNPCGUID(0, 0, serialNumber:gsub("C", ""), Details.packFunctions.GenerateSerialNumber()) end