From bc481bef4898177ca700ae46c753b117f375b7c0 Mon Sep 17 00:00:00 2001 From: Tercio Jose Date: Mon, 26 Sep 2022 22:10:46 -0300 Subject: [PATCH] Fixed unknown .displayName after startup --- functions/classes.lua | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/functions/classes.lua b/functions/classes.lua index 93852f90..b0a86fed 100644 --- a/functions/classes.lua +++ b/functions/classes.lua @@ -117,8 +117,12 @@ do end function Details:SetDisplayName(actor, newDisplayName) - local thisActor = self.displayName and self or actor - thisActor.displayName = newDisplayName + if (not newDisplayName) then + newDisplayName = actor + self.displayName = newDisplayName + else + actor.displayName = newDisplayName + end end function _detalhes:GetOnlyName (string)