From 67f13859705bbac0842ee4107d63f5c1bda2511d Mon Sep 17 00:00:00 2001
From: hch <305670599@qq.com>
Date: 星期四, 24 十月 2024 15:54:31 +0800
Subject: [PATCH] 10263 【越南】后端支持NPC仿真实玩家战斗和快速战斗

---
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/PlayerMirror.py |   17 ++++++++---------
 1 files changed, 8 insertions(+), 9 deletions(-)

diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/PlayerMirror.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/PlayerMirror.py
index 7758852..692a354 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/PlayerMirror.py
+++ b/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)
\ No newline at end of file
+    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)
\ No newline at end of file

--
Gitblit v1.8.0