From 545986a8fdde345b28cf3004be84c6cfe79a3dc1 Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期五, 19 四月 2019 11:29:12 +0800
Subject: [PATCH] 6459 【后端】【2.0】缥缈仙域开发单(跨服分区逻辑优化,支持跨服妖王分区状态同步)

---
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/UpdatePlayerName.py |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/UpdatePlayerName.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/UpdatePlayerName.py
index 0602621..9117a39 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/UpdatePlayerName.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/UpdatePlayerName.py
@@ -59,7 +59,7 @@
 def UpdatePlayerName(index, clientData, tick):
     
     curPlayer = GameWorld.GetPlayerManager().GetPlayerByIndex(index)
-    if GameWorld.IsMergeServer():
+    if GameWorld.IsCrossServer():
         #itemuse_lzxkoy_0:不可在跨服环境下使用改名功能。
         PlayerControl.NotifyCode(curPlayer, "itemuse_lzxkoy_0")
         return
@@ -146,7 +146,8 @@
     newName = sendPack.GetNewName()
     
     curPlayer.SetPlayerName(newName)
-
+    GameWorld.GetPlayerManager().UpdatePlayerNameIndex(curPlayerName, newName)
+    GameWorld.GetMapCopyPlayerManager().UpdatePlayerNameIndex(curPlayerName, newName)
     #EventReport.WriteEvent_change_name(curPlayer, curPlayerName, newName)
     GameWorld.Log("UpdatePlayerName MapServer改名成功, newName = %s"%newName, curPlayer.GetID())
         

--
Gitblit v1.8.0