From ec5de0b415bb3fd2c12367b1babfe0d4351a2827 Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期二, 17 三月 2026 15:03:38 +0800
Subject: [PATCH] 405 【公会】自动转让会长规则调整(优化优先传位配置;优化跨服邮件发送;)
---
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/GMShell.py | 24 +++++++++++++++---------
1 files changed, 15 insertions(+), 9 deletions(-)
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/GMShell.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/GMShell.py
index 5d74c1c..ef5a0fe 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/GMShell.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/GMShell.py
@@ -73,7 +73,7 @@
if len(inputList) != 2:
return
gmLV = GameWorld.ToIntDef(inputList[1])
- playerPF = GameWorld.GetPlatform()
+ playerPF = GameWorld.GetAppID()
# curIP = curPlayer.GetIP()
# if (curIP.find('10.30.') == 0 or curIP.find('192.168.') == 0) and playerPF == "173on_lan":
#测试修改
@@ -121,13 +121,14 @@
callFunc = GameWorld.GetExecFunc(Commands, "%s.%s"%(callFunName, "GetGMServerIDList"))
if callFunc != None:
gmServerIDList = callFunc(curPlayer)
- pack = ChServerToServerPyPack.tagSSGMCMD()
- pack.FromServerID = GameWorld.GetGameWorld().GetServerID()
- pack.ServerType = GameWorld.GetServerType()
- pack.PlayerID = curPlayer.GetPlayerID()
- pack.CMDStr = str(inputList)
- pack.CMDLen = len(pack.CMDStr)
- NetPackCommon.SendCrossServerToServerPack(pack, gmServerIDList, dirType=ShareDefine.dirType_Cross)
+ if gmServerIDList:
+ pack = ChServerToServerPyPack.tagSSGMCMD()
+ pack.FromServerID = GameWorld.GetGameWorld().GetServerID()
+ pack.ServerType = GameWorld.GetServerType()
+ pack.PlayerID = curPlayer.GetPlayerID()
+ pack.CMDStr = str(inputList)
+ pack.CMDLen = len(pack.CMDStr)
+ NetPackCommon.SendCrossServerToServerPack(pack, gmServerIDList, dirType=ShareDefine.dirType_Cross)
return
# GameObj 的 Get、Set函数
@@ -231,11 +232,16 @@
GameWorld.Log("OnSSGMCMD cmdStr=%s,fromServerID=%s" % (cmdStr, fromServerID), playerID)
crossPlayer = CrossPlayer.GetCrossPlayerMgr().FindCrossPlayer(playerID)
if not crossPlayer:
+ if GameWorld.IsCrossCenter():
+ GameWorld.ErrLog("跨服中心找不到crossPlayer!直接注册", playerID)
+ crossPlayer = CrossPlayer.GetCrossPlayerMgr().RegistPlayer(playerID) # 跨服中心不存在该玩家,直接注册
+ crossPlayer.SetMainServerID(fromServerID)
+ if not crossPlayer:
GameWorld.ErrLog("本服找不到crossPlayer!", playerID)
return
cmdList = eval(cmdStr)
callFunName = cmdList[0]
- callName = "%s.%s" % (callFunName, "OnExec")
+ callName = "%s.%s" % (callFunName, "OnExecCross")
callFunc = GameWorld.GetExecFunc(Commands, callName)
if not callFunc:
GameWorld.DebugAnswer(crossPlayer, "找不到该跨服命令! %s" % callName)
--
Gitblit v1.8.0