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/PlayerTalk.py | 20 +++++++++++++-------
1 files changed, 13 insertions(+), 7 deletions(-)
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerTalk.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerTalk.py
index 93b4b61..8d4e576 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerTalk.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerTalk.py
@@ -25,6 +25,7 @@
import IpyGameDataPY
import PlayerControl
import PlayerFamily
+import CrossPlayer
import DBDataMgr
import math
@@ -35,7 +36,8 @@
}
def OnPlayerLogin(curPlayer):
- NotifyTalkCache(curPlayer)
+ crossPlayer = CrossPlayer.GetCrossPlayerMgr().FindCrossPlayer(curPlayer.GetPlayerID())
+ NotifyTalkCache(crossPlayer, [IPY_GameWorld.tcWorld])
return
#// B3 20 聊天 #tagCSTalk
@@ -94,10 +96,10 @@
if channelType == IPY_GameWorld.tcWorld:
NetPackCommon.SendFackPackOnline(clientPack)
+ DoTalkCache(channelType, playerID, content, bubbleBox, familyID)
elif channelType == IPY_GameWorld.tcFamily:
- PlayerFamily.Broadcast_FamilyPack(familyID, clientPack)
+ PlayerFamily.OnFamilyTalk(curPlayer, familyID, clientPack, tick)
- DoTalkCache(channelType, playerID, content, bubbleBox, familyID)
return
def __CheckTalk(curPlayer, channelType, content, tick, checkGMForbidenTalk=True):
@@ -164,13 +166,17 @@
return
-def NotifyTalkCache(curPlayer):
+def NotifyTalkCache(crossPlayer, channelTypeList):
##上线通知聊天缓存
-
+ # @param channelTypeList: 指定需要通知聊天缓存频道列表,不同频道的缓存可能存储在不同的服务器,如公会在公会数据所在服等
+ if not crossPlayer:
+ return
for channelType in ChannelCacheMax.keys():
+ if channelType not in channelTypeList:
+ continue
cacheList = []
if channelType == IPY_GameWorld.tcFamily:
- familyID = curPlayer.GetFamilyID()
+ familyID = crossPlayer.GetFamilyID()
if not familyID:
continue
familyActonMgr = DBDataMgr.GetFamilyActionMgr().GetFamilyAction(familyID, ShareDefine.Def_ActionType_TalkCache)
@@ -227,6 +233,6 @@
clientPack.ChannelType = channelType
clientPack.InfoList = packCacheList
clientPack.Count = len(clientPack.InfoList)
- NetPackCommon.SendFakePack(curPlayer, clientPack)
+ CrossPlayer.SendFakePack(crossPlayer, clientPack)
return
--
Gitblit v1.8.0