hxp
2024-10-18 59c0f7a3818d8663f5fb4f7249f586d7a7d12eb6
10263 【越南】【英文】后端支持NPC仿真实玩家战斗和快速战斗
8个文件已修改
31 ■■■■■ 已修改文件
ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerPackData.py 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Attack/MirrorAttack.py 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/DataRecordPack.py 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/EventReport.py 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/PlayerMirror.py 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerBackup.py 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerBillboard.py 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerGuaji.py 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerPackData.py
@@ -318,6 +318,7 @@
        packObj = packDataMgr.GetPlayerPackObj(playerID)
        # 已经有的数据先推送回去
        if packObj:
            GameWorld.DebugLog("跨服有缓存玩家打包数据,直接推给子服! playerID=%s" % playerID)
            packDataDict[playerID] = packObj.PackData
            dataMsg = {"playerID":playerID, "packData":packObj.PackData, "msgInfo":msgInfo}
            CrossRealmMsg.SendMsgToClientServer(ShareDefine.CrossServerMsg_PushPlayerPackData, dataMsg, [serverGroupID])
@@ -349,18 +350,16 @@
    msgInfo = msgData["msgInfo"]
    pullPlayerIDList = msgData["pullPlayerIDList"]
    
    needPullPlayerIDList = []
    packDataMgr = PyDataManager.GetDBPlayerPackDataManager()
    for playerID in pullPlayerIDList:
        packObj = packDataMgr.GetPlayerPackObj(playerID)
        if packObj:
            # 本服有数据,直接推给跨服
            GameWorld.DebugLog("本服有缓存玩家打包数据,直接推给跨服! playerID=%s" % playerID)
            dataMsg = {"playerID":playerID, "packData":packObj.PackData, "msgInfo":msgInfo}
            CrossRealmMsg.SendMsgToCrossServer(ShareDefine.ClientServerMsg_PlayerPackData, dataMsg)
        else:
            needPullPlayerIDList.append(playerID)
            DoPullPlayerPackData(playerID, msgInfo)
            
    DoPullPlayerPackData(needPullPlayerIDList, msgInfo)
    return
def CrossServerMsg_PushPlayerPackData(msgData):
@@ -415,6 +414,7 @@
        CrossRealmMsg.SendMsgToCrossServer(ShareDefine.ClientServerMsg_PlayerPackData, dataMsg)
        return
    
    PyDataManager.GetDBPlayerPackDataManager().UpdPlayerPackData(playerID, packData)
    # 本服需要,汇总结果
    ReuestPlayerPackDataRet(msgInfo, playerID, packData)
    return
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Attack/MirrorAttack.py
@@ -446,6 +446,9 @@
    playerID = 0
    if curPlayer:
        playerID = curPlayer.GetPlayerID()
        if curPlayer.GetDictByKey(ChConfig.Def_PlayerKey_MirrorBattleID):
            GameWorld.DebugLog("镜像战斗场景中,无法请求!", playerID)
            return
        curTime = int(time.time())
        # 请求cd验证
        requestTime = curPlayer.GetDictByKey(ChConfig.Def_PlayerKey_MirrorBattleTime)
@@ -476,7 +479,7 @@
                   "requestTime":requestTime, "requestID":requestID, "requestMapID":requestMapID, "playerID":playerID})
    GameWorld.GetPlayerManager().GameServer_QueryPlayerResult(0, 0, 0, "ReuestPlayerPackData", sendMsg, len(sendMsg))
    GameWorld.DebugLog("请求创建镜像战斗: %s" % sendMsg, playerID)
    return
    return True
def OnMirrorBattleInit(msgInfo, packDataDict, curPlayer=None):
    ''' 镜像战斗初始化 
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/DataRecordPack.py
@@ -121,6 +121,8 @@
def SendEventPack(eventTypeStr, dataDict, curPlayer=None):
    if curPlayer:
        if not GameWorld.IsNormalPlayer(curPlayer):
            return
        pid = curPlayer.NomalDictGetProperty(ChConfig.Def_Player_Dict_PlayerFromPID)
        dataDict["pid"] = pid
        dataDict["fightPower"] = PlayerControl.GetFightPower(curPlayer)
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/EventReport.py
@@ -127,6 +127,8 @@
    
    playerInfo = ""
    if curPlayer:
        if not GameWorld.IsNormalPlayer(curPlayer):
            return
        #UTF8 需要转成url编码才可用
        playerInfo = urllib.urlencode({"RoleID": curPlayer.GetName(),
                          "AccountID": GameWorld.GetPlatformAccID(curPlayer.GetAccID()),
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/PlayerMirror.py
@@ -72,10 +72,12 @@
        for i, batPlayerID in enumerate(factionIDListB):
            battlePlayerList.append({"playerID":batPlayerID, "faction":2, "posX":posX + 5, "posY":posY + i * 5})
            
        GameWorld.DebugAnswer(curPlayer, "创建镜像: %s VS %s" % (factionIDListA, factionIDListB))
        requestID = playerID
        MirrorAttack.OnRequestCreateMirrorBattle(mapID, lineID, requestID, battlePlayerList, isSysbg, curPlayer)
        if MirrorAttack.OnRequestCreateMirrorBattle(mapID, lineID, requestID, battlePlayerList, isSysbg, curPlayer):
            GameWorld.DebugAnswer(curPlayer, "请求创建镜像: %s VS %s" % (factionIDListA, factionIDListB))
        else:
            GameWorld.DebugAnswer(curPlayer, "请求创建镜像失败: %s VS %s" % (factionIDListA, factionIDListB))
    elif value1 == "s":
        battle = MirrorAttack.GetMirrorBattle(curPlayer)
        if battle:
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerBackup.py
@@ -30,7 +30,7 @@
        #GameWorld.DebugLog("未启用备档")
        return
    
    if curPlayer.GetRealPlayerID() != 0:
    if not GameWorld.IsNormalPlayer(curPlayer):
        return
    curTime = int(time.time())
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerBillboard.py
@@ -62,6 +62,8 @@
def __CanPlayerBillboardComm(curPlayer):
    ## 玩家可否上榜通用检查
    if not GameWorld.IsNormalPlayer(curPlayer):
        return False
    if not GameFuncComm.GetFuncCanUse(curPlayer, ShareDefine.GameFuncID_Billboard):
        GameWorld.DebugLog("排行榜未开启,无法上榜!curLV=%s" % (curPlayer.GetLV()), curPlayer.GetPlayerID())
        return False
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerGuaji.py
@@ -59,7 +59,7 @@
    if GameWorld.IsCrossServer():
        return
    
    if curPlayer.GetRealPlayerID() != 0:
    if not GameWorld.IsNormalPlayer(curPlayer):
        return
    
    if not GameFuncComm.GetFuncCanUse(curPlayer, ShareDefine.GameFuncID_Guaji):