diff --git a/AxibugEmuOnline.Client/Assets/Script/AppMain/Manager/AppRoom.cs b/AxibugEmuOnline.Client/Assets/Script/AppMain/Manager/AppRoom.cs index a5ff4b06..5f14db93 100644 --- a/AxibugEmuOnline.Client/Assets/Script/AppMain/Manager/AppRoom.cs +++ b/AxibugEmuOnline.Client/Assets/Script/AppMain/Manager/AppRoom.cs @@ -5,6 +5,7 @@ using AxibugEmuOnline.Client.Network; using AxibugProtobuf; using AxiReplay; using Google.Protobuf; +using System; using System.Collections.Generic; using System.Linq; @@ -451,6 +452,25 @@ namespace AxibugEmuOnline.Client.Manager //解压 byte[] data = Helper.DecompressByteArray(msg.RawBitmap.ToArray()); } + + public void ChangeCurrRoomPlayerName(long uid) + { + UserDataBase userdata = App.user.GetUserByUid(uid); + if (userdata == null) + return; + + if (mineRoomMiniInfo == null) + { + if (mineRoomMiniInfo.Player1UID == uid) + mineRoomMiniInfo.Player1NickName = userdata.NickName; + else if (mineRoomMiniInfo.Player2UID == uid) + mineRoomMiniInfo.Player2NickName = userdata.NickName; + else if (mineRoomMiniInfo.Player3UID == uid) + mineRoomMiniInfo.Player3NickName = userdata.NickName; + else if (mineRoomMiniInfo.Player4UID == uid) + mineRoomMiniInfo.Player4NickName = userdata.NickName; + } + } } public static class RoomEX diff --git a/AxibugEmuOnline.Client/Assets/Script/AppMain/Manager/UserDataManager.cs b/AxibugEmuOnline.Client/Assets/Script/AppMain/Manager/UserDataManager.cs index 3298cbb9..e59935aa 100644 --- a/AxibugEmuOnline.Client/Assets/Script/AppMain/Manager/UserDataManager.cs +++ b/AxibugEmuOnline.Client/Assets/Script/AppMain/Manager/UserDataManager.cs @@ -207,7 +207,9 @@ namespace AxibugEmuOnline.Client.Manager if (userdata == null) return; userdata.NickName = msg.UserInfo.NickName; - //TODO其他 + + App.roomMgr.ChangeCurrRoomPlayerName(msg.UID); + Eventer.Instance.PostEvent(EEvent.OnOtherUserInfoUpdate, msg.UID); }