hch
2024-10-08 9e53b08d7312c5ad7e272cfc8135c242aac09034
10263 【越南】后端支持NPC仿真实玩家战斗和快速战斗
1个文件已修改
17 ■■■■ 已修改文件
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/PlayerMirror.py 17 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/PlayerMirror.py
@@ -31,13 +31,12 @@
    # playerData为base64后的数据
    mirrorPlayer = GameWorld.GetGameWorld().CreateMirrorPlayer(playerData, curPlayer.GetPosX(), curPlayer.GetPosY())
    
    GameWorld.Log("mirrorPlayer.GetRealPlayerID %s"%mirrorPlayer.GetRealPlayerID())
    #CreateMirrorPlayer 中会调用到 ChPlayer.PlayerLogin
    #是否镜像玩家 判断 mirrorPlayer.GetRealPlayerID()是否为0
    #python自己处理,以下逻辑,可以在DoPlayerLogin函数最后 判断是镜像玩家后统一处理
    index = mirrorPlayer.GetIndex()
    tick = GameWorld.GetGameWorld().GetTick()
    PlayerEventCounter.GameServer_InitOK(index, tick)
    ChPlayer.LoadMapOK(index, tick)
    GameServerRefresh.GameSever_PlayerInitOK(index, tick)
    if mirrorPlayer:
        GameWorld.Log("mirrorPlayer.GetRealPlayerID %s"%mirrorPlayer.GetRealPlayerID())
        index = mirrorPlayer.GetIndex()
        tick = GameWorld.GetGameWorld().GetTick()
        ChPlayer.PlayerLogin(index, tick)
        PlayerEventCounter.GameServer_InitOK(index, tick)
        ChPlayer.LoadMapOK(index, tick)
        GameServerRefresh.GameSever_PlayerInitOK(index, tick)