| | |
| | | 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
|
| | |
| | | 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())
|
| | |
|