From 183ec611e1df1ccb30aeccc67d9972b42e33d511 Mon Sep 17 00:00:00 2001 From: sin365 <353374337@qq.com> Date: Fri, 13 Dec 2024 19:10:52 +0800 Subject: [PATCH] =?UTF-8?q?=E7=94=A8=E6=88=B7=E5=90=8D=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E5=AE=A2=E6=88=B7=E7=AB=AF=E4=BA=8B=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Assets/Script/AppMain/Manager/AppRoom.cs | 20 +++++++++++++++++++ .../Script/AppMain/Manager/UserDataManager.cs | 4 +++- 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/AxibugEmuOnline.Client/Assets/Script/AppMain/Manager/AppRoom.cs b/AxibugEmuOnline.Client/Assets/Script/AppMain/Manager/AppRoom.cs index a5ff4b0..5f14db9 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 3298cbb..e59935a 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); }