收到房间数据后不再判断slot信息是否改变,全量推送

This commit is contained in:
ALIENJACK\alien 2025-01-26 14:50:33 +08:00
parent 34fccd457a
commit 7ed40210fd

View File

@ -331,7 +331,6 @@ namespace AxibugEmuOnline.Client.Manager
Eventer.Instance.PostEvent(EEvent.OnOtherPlayerJoinRoom, newJoin);
}
bool bChangeSlot = false;
for (int i = 0; i < 4; i++)
{
var oldSlot = oldslotArr[i];
@ -344,68 +343,65 @@ namespace AxibugEmuOnline.Client.Manager
oldSlot.PlayerLocalJoyIdx != newSlot.PlayerLocalJoyIdx
)
{
bChangeSlot = true;
if (newSlot.PlayerUID > 0)
{
OverlayManager.PopTip($"[{newSlot.PlayerNickName}]使用:P{i}");
}
}
}
if (bChangeSlot)
{
Eventer.Instance.PostEvent(EEvent.OnRoomSlotDataChanged);
}
//for (int i = 0; i < 4; i++)
//{
// long OldPlayer = oldRoomPlayer[i];
// long NewPlayer = newRoomPlayer[i];
// if (OldPlayer == NewPlayer)
// continue;
// //位置之前有人,但是离开了
// if (OldPlayer > 0)
// {
// Eventer.Instance.PostEvent(EEvent.OnOtherPlayerLeavnRoom, i, OldPlayer);
// UserDataBase oldplayer = App.user.GetUserByUid(OldPlayer);
// string oldPlayName = oldplayer != null ? oldplayer.NickName : "Player";
// OverlayManager.PopTip($"[{oldPlayName}]离开房间,手柄位:P{i}");
// if (NewPlayer > 0)//而且害换了一个玩家
// {
// Eventer.Instance.PostEvent(EEvent.OnOtherPlayerJoinRoom, i, NewPlayer);
// mineRoomMiniInfo.GetPlayerNameByPlayerIdx((uint)i, out string PlayerName);
// OverlayManager.PopTip($"[{PlayerName}]进入房间,手柄位:P{i}");
// }
// }
// else //之前没人
// {
// Eventer.Instance.PostEvent(EEvent.OnOtherPlayerJoinRoom, i, NewPlayer);
// mineRoomMiniInfo.GetPlayerNameByPlayerIdx((uint)i, out string PlayerName);
// OverlayManager.PopTip($"[{PlayerName}]进入房间,手柄位:P{i}");
// }
// //位置之前有人,但是离开了
// if (OldPlayer > 0)
// {
// Eventer.Instance.PostEvent(EEvent.OnOtherPlayerLeavnRoom, i, OldPlayer);
// UserDataBase oldplayer = App.user.GetUserByUid(OldPlayer);
// string oldPlayName = oldplayer != null ? oldplayer.NickName : "Player";
// OverlayManager.PopTip($"[{oldPlayName}]离开房间,手柄位:P{i}");
// if (NewPlayer > 0)//而且害换了一个玩家
// {
// Eventer.Instance.PostEvent(EEvent.OnOtherPlayerJoinRoom, i, NewPlayer);
// mineRoomMiniInfo.GetPlayerNameByPlayerIdx((uint)i, out string PlayerName);
// OverlayManager.PopTip($"[{PlayerName}]进入房间,手柄位:P{i}");
// }
// }
// else //之前没人
// {
// Eventer.Instance.PostEvent(EEvent.OnOtherPlayerJoinRoom, i, NewPlayer);
// mineRoomMiniInfo.GetPlayerNameByPlayerIdx((uint)i, out string PlayerName);
// OverlayManager.PopTip($"[{PlayerName}]进入房间,手柄位:P{i}");
// }
//}
}
Eventer.Instance.PostEvent(EEvent.OnRoomSlotDataChanged);
//for (int i = 0; i < 4; i++)
//{
// long OldPlayer = oldRoomPlayer[i];
// long NewPlayer = newRoomPlayer[i];
// if (OldPlayer == NewPlayer)
// continue;
// //位置之前有人,但是离开了
// if (OldPlayer > 0)
// {
// Eventer.Instance.PostEvent(EEvent.OnOtherPlayerLeavnRoom, i, OldPlayer);
// UserDataBase oldplayer = App.user.GetUserByUid(OldPlayer);
// string oldPlayName = oldplayer != null ? oldplayer.NickName : "Player";
// OverlayManager.PopTip($"[{oldPlayName}]离开房间,手柄位:P{i}");
// if (NewPlayer > 0)//而且害换了一个玩家
// {
// Eventer.Instance.PostEvent(EEvent.OnOtherPlayerJoinRoom, i, NewPlayer);
// mineRoomMiniInfo.GetPlayerNameByPlayerIdx((uint)i, out string PlayerName);
// OverlayManager.PopTip($"[{PlayerName}]进入房间,手柄位:P{i}");
// }
// }
// else //之前没人
// {
// Eventer.Instance.PostEvent(EEvent.OnOtherPlayerJoinRoom, i, NewPlayer);
// mineRoomMiniInfo.GetPlayerNameByPlayerIdx((uint)i, out string PlayerName);
// OverlayManager.PopTip($"[{PlayerName}]进入房间,手柄位:P{i}");
// }
// //位置之前有人,但是离开了
// if (OldPlayer > 0)
// {
// Eventer.Instance.PostEvent(EEvent.OnOtherPlayerLeavnRoom, i, OldPlayer);
// UserDataBase oldplayer = App.user.GetUserByUid(OldPlayer);
// string oldPlayName = oldplayer != null ? oldplayer.NickName : "Player";
// OverlayManager.PopTip($"[{oldPlayName}]离开房间,手柄位:P{i}");
// if (NewPlayer > 0)//而且害换了一个玩家
// {
// Eventer.Instance.PostEvent(EEvent.OnOtherPlayerJoinRoom, i, NewPlayer);
// mineRoomMiniInfo.GetPlayerNameByPlayerIdx((uint)i, out string PlayerName);
// OverlayManager.PopTip($"[{PlayerName}]进入房间,手柄位:P{i}");
// }
// }
// else //之前没人
// {
// Eventer.Instance.PostEvent(EEvent.OnOtherPlayerJoinRoom, i, NewPlayer);
// mineRoomMiniInfo.GetPlayerNameByPlayerIdx((uint)i, out string PlayerName);
// OverlayManager.PopTip($"[{PlayerName}]进入房间,手柄位:P{i}");
// }
//}
}
/// <summary>