用户名修改客户端事件

This commit is contained in:
sin365 2024-12-13 19:10:52 +08:00
parent e9428e2cc6
commit 183ec611e1
2 changed files with 23 additions and 1 deletions

View File

@ -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

View File

@ -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);
}