Parcourir la source

修复跨服聊天不显示称号

SCFC il y a 1 an
Parent
commit
ff887004f0
1 fichiers modifiés avec 11 ajouts et 2 suppressions
  1. 11 2
      script/module/chat/ChatRecord.lua

+ 11 - 2
script/module/chat/ChatRecord.lua

@@ -34,10 +34,19 @@ local function fontRecord(human,net,msgType)
             cnt = cnt + 1
 		    net[cnt].msgType = record.msgType
 			local fields = {}
-            
-            RoleLogic.makeRoleBase(record.roleBase,net[cnt].roleBase)
+           
+            -- 跨服直接赋值
+            if ChatHandler.CHAT_TYPE_MIDDLE == msgType then
+                net[cnt].roleBase = record.roleBase
+            else
+                RoleLogic.makeRoleBase(record.roleBase,net[cnt].roleBase)
+            end
 			RoleLogic.makeRoleBaseFields(fields)
 			local db = RoleDBLogic.getDb(record.roleBase.uuid,fields)
+
+            if msgType == ChatHandler.CHAT_TYPE_MIDDLE then
+                table.print_lua_table(net[cnt].roleBase)
+            end
             if db then
                 RoleLogic.makeRoleBase(db,net[cnt].roleBase)
             end