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/GM/Commands/CreateFamily.py | 30 ++++++++++++++++++------------
1 files changed, 18 insertions(+), 12 deletions(-)
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/CreateFamily.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/CreateFamily.py
index 834e6c7..56f9470 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/CreateFamily.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/CreateFamily.py
@@ -27,27 +27,20 @@
def GetGMServerIDList(curPlayer):
## 获取命令额外发送到其他服务器,如跨服
crossServerID = DBDataMgr.GetFamilyMgr().GetCurCrossServerID()
- GameWorld.DebugAnswer(curPlayer, "本服公会互通跨服ID:%s" % crossServerID)
if crossServerID:
+ GameWorld.DebugAnswer(curPlayer, "本服公会已互通跨服ID:%s" % crossServerID)
return [crossServerID]
+ GameWorld.DebugAnswer(curPlayer, "本服公会未互通")
return []
-
-def OnExecCross(crossPlayer, gmList):
- ## 跨服执行命令
- playerID = crossPlayer.GetPlayerID()
- familyMgr = DBDataMgr.GetFamilyMgr()
- familyID = familyMgr.GetPlayerFamilyID(playerID)
- zoneID = familyMgr.GetFamilyZoneID(familyID)
- GameWorld.DebugAnswer(crossPlayer, "跨服公会ID:%s,zoneID=%s" % (familyID, zoneID))
- OnExec(crossPlayer, gmList)
- return
def OnExec(curPlayer, gmList):
## 游戏服执行命令
+ isMainServer = GameWorld.IsMainServer()
if not gmList:
- if GameWorld.IsCrossServer():
+ if not isMainServer:
return
+ GameWorld.DebugAnswer(curPlayer, "-----%s-----" % GameWorld.GetCurrentDataTimeStr())
GameWorld.DebugAnswer(curPlayer, "创建假人公会: CreatFamily 个数 [总战力 ServerID 等级 成员数 是否审核 官职限制]")
GameWorld.DebugAnswer(curPlayer, "删除假人公会: CreatFamily 0")
GameWorld.DebugAnswer(curPlayer, "输出公会列表: CreatFamily pl [条数 从第x名]")
@@ -56,10 +49,23 @@
GameWorld.DebugAnswer(curPlayer, "添加公会成员: CreatFamily m 人数 [公会ID]")
return
+ if isMainServer:
+ crossServerID = DBDataMgr.GetFamilyMgr().GetCurCrossServerID()
+ if crossServerID:
+ # 本服公会已互通不再执行本服命令
+ return
+
crossPlayer = CrossPlayer.GetCrossPlayerMgr().FindCrossPlayer(curPlayer.GetPlayerID())
if not crossPlayer:
return
+ if GameWorld.IsCrossServer():
+ playerID = crossPlayer.GetPlayerID()
+ familyMgr = DBDataMgr.GetFamilyMgr()
+ familyID = familyMgr.GetPlayerFamilyID(playerID)
+ zoneID = familyMgr.GetFamilyZoneID(familyID)
+ GameWorld.DebugAnswer(crossPlayer, "跨服公会ID:%s,zoneID=%s" % (familyID, zoneID))
+
value1 = gmList[0]
if value1 == "pl":
__printFamilyList(crossPlayer, gmList)
--
Gitblit v1.8.0