From 27bc9586f194150f48f914b937c5a98f73a6650e Mon Sep 17 00:00:00 2001 From: hxp <ale99527@vip.qq.com> Date: 星期三, 09 一月 2019 19:32:20 +0800 Subject: [PATCH] 5722 【后端】【1.5】跨服BOSS开发(支持拾取物品、货币、好物品记录) --- ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerControl.py | 13 ++++++++++++- 1 files changed, 12 insertions(+), 1 deletions(-) diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerControl.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerControl.py index 8b53f37..6ffbb43 100644 --- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerControl.py +++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerControl.py @@ -1574,6 +1574,10 @@ GameWorld.DebugLog("跨服服务器不允许该操作!") return + if GetCrossRealmState(curPlayer): + GameWorld.ErrLog("玩家当前为跨服状态,不允许再次请求进入跨服!", curPlayer.GetPlayerID()) + return + if not CrossRealmPlayer.IsCrossServerOpen(): NotifyCode(curPlayer, "CrossMatching18") return @@ -2071,7 +2075,8 @@ if PlayerTJG.GetIsTJG(curPlayer): GameWorld.DebugLog("脱机的玩家不处理分流!", curPlayer.GetPlayerID()) return tagLineID - + if GameWorld.IsCrossServer(): + return tagLineID # 非常规地图之间的切换不处理 if curMapID not in PyGameData.g_commMapLinePlayerCountDict or tagMapID not in PyGameData.g_commMapLinePlayerCountDict: return tagLineID @@ -3008,6 +3013,12 @@ GameWorld.Log('玩家获得金钱异常 , value = %s , priceType = %s ,' % (value, priceType)) return + if GameWorld.IsCrossServer(): + serverGroupID = GetPlayerServerGroupID(curPlayer) + msgInfo = {"PlayerID":curPlayer.GetPlayerID(), "MoneyType":priceType, "Value":value, "GiveType":giveType, "AddDataDict":addDataDict} + GameWorld.SendMsgToClientServer(ShareDefine.CrossServerMsg_GiveMoney, msgInfo, [serverGroupID]) + return True + if priceType == IPY_GameWorld.TYPE_Price_Gold_Money: if curPlayer.GetGold() + value > ChConfig.Def_PlayerTotalMoney_Gold: #超过金钱上限 -- Gitblit v1.8.0