From c3ccb86306795837a0b61db13c864c89ffbeded9 Mon Sep 17 00:00:00 2001 From: xdh <xiefantasy@qq.com> Date: 星期三, 27 二月 2019 10:52:17 +0800 Subject: [PATCH] 6256 【后端】【2.0】神秘商店 --- ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerTeam.py | 14 +++++++++++++- 1 files changed, 13 insertions(+), 1 deletions(-) diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerTeam.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerTeam.py index 2c13dd3..ccd03a4 100644 --- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerTeam.py +++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerTeam.py @@ -68,6 +68,15 @@ #玩家刚登录, 什么也不做, 等待GameServer刷新自己 return +def OnPlayerLoginCrossServer(curPlayer): + ## 登录跨服服务器处理 + + if curPlayer.GetTeamID(): + curPlayer.SetTeamID(0) + GameWorld.DebugLog("登录跨服服务器重置队伍ID!") + + return + ## 游戏服务器刷新队伍(封包参数) # @param index 玩家索引 # @param tick 当前时间 @@ -121,9 +130,10 @@ playerID = curPackData.PlayerID teamID = curPackData.TeamID teamLV = curPackData.TeamLV + memCnt = curPackData.MemCnt dataDict = {"playerID":playerID, "teamLV":teamLV} - GameWorld.DebugLog("GameServer_TeamInfo playerID=%s,teamID=%s,teamLV=%s" % (playerID, teamID, teamLV), playerID) + GameWorld.DebugLog("GameServer_TeamInfo playerID=%s,teamID=%s,teamLV=%s,memCnt=%s" % (playerID, teamID, teamLV, memCnt), playerID) curPlayer = GameWorld.GetPlayerManager().FindPlayerByID(playerID) if not curPlayer or curPlayer.IsEmpty(): DR_Team("TeamInfo", teamID, dataDict, "curPlayer is None or empty") @@ -138,6 +148,8 @@ RefreshPlayerTeamID(curPlayer, teamID, teamLV, tick) + curPlayer.SetDict(ChConfig.Def_PlayerKey_TeamMemCount, memCnt) + sameMapMemCount = 0 # 同地图队员数 sameMapVIPLV = 0 # 同地图VIP加成等级 mapID = curPlayer.GetMapID() -- Gitblit v1.8.0