6459 【后端】【2.0】缥缈仙域开发单(增加请求进入跨服CD,暂定5秒)
3个文件已修改
25 ■■■■ 已修改文件
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerControl.py 21 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/RemoteQuery/GY_Query_CrossRealmReg.py 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py
@@ -3067,6 +3067,7 @@
Def_PlayerKey_TransMoneyType = 'TransMoneyType'  # 扣除的金钱类型
Def_PlayerKey_TransTick = 'TransTick'  # 传送tick
Def_PlayerKey_SyncVIPKillNPCLVInfo = 'SyncVIPKillNPCLVInfo'  # 击杀NPC增加VIP杀怪等级经验信息同步开关
Def_PlayerKey_RequestEnterCrossServerTick = 'RequestEnterCrossServerTick'    # 上次请求进入跨服tick
Def_PlayerKey_FamilyArrestQueryState = 'ArrestQueryState'  # 家族悬赏任务完成查询状态
Def_PlayerKey_Frist_Lock = "Frist_Lock"  # 是否接受了任务1
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerControl.py
@@ -1592,6 +1592,18 @@
    if mapID not in ChConfig.Def_CrossMapIDList:
        return
    
    tick = GameWorld.GetGameWorld().GetTick()
    lastRequestTick = curPlayer.GetDictByKey(ChConfig.Def_PlayerKey_RequestEnterCrossServerTick)
    if lastRequestTick and tick - lastRequestTick < 5000:
        GameWorld.DebugLog("    请求进入跨服CD中!", playerID)
        NotifyCode(curPlayer, "RequestEnterCrossServerCD")
        return
    crossRegisterMap = curPlayer.NomalDictGetProperty(ChConfig.Def_PlayerKey_CrossRegisterMap)
    if crossRegisterMap:
        GameWorld.ErrLog("跨服已经在上传数据,不重复提交!crossRegisterMap=%s,mapID=%s" % (crossRegisterMap, mapID), playerID)
        return
    if GameWorld.IsCrossServer():
        GameWorld.DebugLog("跨服服务器不允许该操作!")
        return
@@ -1626,7 +1638,6 @@
        if ret != ShareDefine.EntFBAskRet_OK:
            return
        
        tick = GameWorld.GetGameWorld().GetTick()
        if not FBLogic.OnEnterFBEvent(curPlayer, mapID, lineID, tick):
            GameWorld.DebugLog("    OnEnterFBEvent False!", curPlayer.GetPlayerID())
            NotifyCode(curPlayer, "SingleEnterDefaul")
@@ -1645,9 +1656,11 @@
        if extendInfo:
            msgDict.update(extendInfo)
        GameWorld.SendMsgToCrossServer(ShareDefine.ClientServerMsg_EnterFB, msgDict)
        return
    GY_Query_CrossRealmReg.RegisterEnterCrossServer(curPlayer, mapID, lineID=lineID)
    else:
        isSend = GY_Query_CrossRealmReg.RegisterEnterCrossServer(curPlayer, mapID, lineID=lineID)
        if not isSend:
            return
    curPlayer.SetDict(ChConfig.Def_PlayerKey_RequestEnterCrossServerTick, tick)
    return
##玩家进入副本
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/RemoteQuery/GY_Query_CrossRealmReg.py
@@ -111,7 +111,7 @@
    curPlayer.SendMergeRegisterPlayerAfterChange(CrossRealmPlayer.GetCrossPlayerName(curPlayer), mapID, dataMapID, copyMapID, posX, posY)
    GameWorld.Log("    发送跨服玩家数据注册: registerMap=%s,lineID=%s,zoneID=%s,mapID=%s,dataMapID=%s,copyMapID=%s,posX=%s,posY=%s,GetVsRoomId=%s" 
                  % (registerMap, lineID, zoneID, mapID, dataMapID, copyMapID, posX, posY, curPlayer.GetVsRoomId()), playerID)
    return
    return True
## 跨服赛报名结果(上传数据)
#  @param index 玩家索引
@@ -122,6 +122,7 @@
    curPlayer = GameWorld.GetPlayerManager().GetPlayerByIndex(index)
    registerMap = curPlayer.NomalDictGetProperty(ChConfig.Def_PlayerKey_CrossRegisterMap)
    PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PlayerKey_CrossRegisterMap, 0)
    curPlayer.SetDict(ChConfig.Def_PlayerKey_RequestEnterCrossServerTick, 0)
    playerID = curPlayer.GetPlayerID()
    result = registerResult.GetResult()
    GameWorld.Log("GameServer_MergeRegisterResult registerMap=%s,result=%s" % (registerMap, result), playerID)