More debugging tools

This commit is contained in:
Tercio Jose
2024-08-02 14:42:21 -03:00
committed by andrew6180
parent 496c79401e
commit fe05d2f9de
5 changed files with 59 additions and 14 deletions
+10 -2
View File
@@ -3365,9 +3365,17 @@ function Details:SetClassIcon(texture, instance, class) --[[exported]] --~icons
end
end
local localizedClass, englishClass
local englishClass
if (self.serial ~= "") then
localizedClass, englishClass = GetPlayerInfoByGUID(self.serial or "")
local bResult, sResult = pcall(function() local lClass, eClass = GetPlayerInfoByGUID(self.serial or "") return eClass end) --will error with: nil, table and boolean
if (bResult) then
englishClass = sResult
else
local bIncludeStackTrace = true
--[[GLOBAL]] DETAILS_FAILED_ACTOR = Details:GenerateActorInfo(self, sResult, bIncludeStackTrace) --avoid the game gc and details gc from destroying the actor info
Details:Msg("Bug happend on GetPlayerInfoByGUID() class_damage.lua:3419. Use command '/details bug' to report.")
englishClass = "UNKNOW"
end
end
if (englishClass) then