From 31c49247fe0656416cf5cfc4f5b290d40b919d15 Mon Sep 17 00:00:00 2001
From: hch <305670599@qq.com>
Date: 星期五, 26 七月 2019 21:16:50 +0800
Subject: [PATCH] 860312 白蓝装从出售改成分解

---
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/UpdatePlayerName.py |   11 +++++++----
 1 files changed, 7 insertions(+), 4 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 8dbd291..9117a39 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/UpdatePlayerName.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/UpdatePlayerName.py
@@ -33,6 +33,7 @@
 
 ## 合服首登
 def ResetChangeNameCnt(curPlayer):
+    return #暂屏蔽
     GameWorld.DebugLog('        玩家合服首次登录 改名次数重置为0')
     PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_Player_UpdatePlayerNameCnt, 0)
     Sync_UpdatePlayerNameCount(curPlayer)
@@ -58,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
@@ -73,6 +74,7 @@
     itemIndex = clientData.ItemIndex - 1 #客户端发的默认+了1
     serverID = clientData.ServerID
     if itemIndex == -1: #-1则默认扣钱否则扣道具
+        return
         moneyType, moneyCount = GetCostMoney(curPlayer)
         if not PlayerControl.HaveMoney(curPlayer, moneyType, moneyCount):
             #金钱不足
@@ -144,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())
         
@@ -170,8 +173,8 @@
             ItemCommon.DelItem(curPlayer, curItem, 1, True, 'UpdatePlayerName')
     
     #改名次数+1
-    updatePlayerNameCnt = curPlayer.NomalDictGetProperty(ChConfig.Def_Player_UpdatePlayerNameCnt)
-    PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_Player_UpdatePlayerNameCnt, updatePlayerNameCnt + 1)  
+    #updatePlayerNameCnt = curPlayer.NomalDictGetProperty(ChConfig.Def_Player_UpdatePlayerNameCnt)
+    #PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_Player_UpdatePlayerNameCnt, updatePlayerNameCnt + 1)  
     
     PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_Player_Dict_UpdatePlayerNameItemIndex, 0)
     return

--
Gitblit v1.8.0