From f2cf64ffabcd15d5497aee8914b8d37d8b9a88b0 Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期六, 07 二月 2026 15:39:43 +0800
Subject: [PATCH] 66 【公会】基础主体-服务端(公会GM命令支持跨服 CreateFamily、Family、Zhenbaoge;跨服公会聊天支持,包含公会聊天缓存;查看玩家A705回包增加公会所在服务器ID信息;)

---
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerFamily.py |   25 +++++++++++++++++++++++++
 1 files changed, 25 insertions(+), 0 deletions(-)

diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerFamily.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerFamily.py
index 1ec448f..5c1faa5 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerFamily.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerFamily.py
@@ -31,6 +31,7 @@
 import PlayerMail
 import PlayerTask
 import CrossPlayer
+import PlayerTalk
 import DirtyList
 import DBDataMgr
 import DBFamily
@@ -164,6 +165,7 @@
     ## 玩家上线,游戏服跨服通用,流程上当做以前GameServer处理公会一样,处理后再通知地图(现在的游戏服)
     PlayerLoginRefreshFamily(crossPlayer)
     Sync_RequestAddFamilyInfo(crossPlayer, False)
+    PlayerTalk.NotifyTalkCache(crossPlayer, [IPY_GameWorld.tcFamily]) # 公会聊天缓存
     #PlayerFamilyTaofa.OnPlayerLogin(curPlayer) 讨伐待修改
     return
 
@@ -2014,6 +2016,29 @@
     CrossPlayer.SendFakePackByFamily(familyID, clientPack)
     return
 
+def OnFamilyTalk(curPlayer, familyID, talkPack, tick):
+    clientData, tick = None, 0
+    reqDataEx = {"talkBuffer":talkPack.GetBuffer()}
+    FamilyPyPackForwarding(curPlayer, clientData, tick, "__OnFamilyTalk", reqCD=0, reqDataEx=reqDataEx)
+    return
+def __OnFamilyTalk(crossPlayer, clientData, tick, fromServerID=0, reqDataEx=None):
+    talkBuffer = reqDataEx["talkBuffer"]
+    playerID = crossPlayer.GetPlayerID()
+    familyID = crossPlayer.GetFamilyID()
+    if not familyID or not talkBuffer:
+        return
+    clientPack = ChPyNetSendPack.tagMCTalk()
+    clientPack.ReadData(talkBuffer)
+    
+    CrossPlayer.SendFakePackByFamily(familyID, clientPack)
+    
+    # 聊天缓存
+    channelType = clientPack.ChannelType
+    content = clientPack.Content
+    bubbleBox = clientPack.BubbleBox
+    PlayerTalk.DoTalkCache(channelType, playerID, content, bubbleBox, familyID)
+    return
+
 ## -------------------------------------- 游戏服本服处理 --------------------------------------------
 '''
 为方便本服、跨服互通公会逻辑统一,公会相关数据处理统一使用 CrossPlayer,视为以前的GameServer处理,这样本服跨服的公会管理通用

--
Gitblit v1.8.0