Merge branch 'master' of http://git.axibug.com/sin365/AxibugEmuOnline
This commit is contained in:
commit
1df264be3b
@ -8,6 +8,7 @@
|
|||||||
|
|
||||||
OnRoomListAllUpdate,//房间列表全量刷新
|
OnRoomListAllUpdate,//房间列表全量刷新
|
||||||
OnRoomListSingleUpdate,//房间列表中单个更新
|
OnRoomListSingleUpdate,//房间列表中单个更新
|
||||||
|
OnRoomListSingleClose,//房间关闭
|
||||||
OnRoomGetRoomScreen,//获取到房间数据
|
OnRoomGetRoomScreen,//获取到房间数据
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -16,6 +16,7 @@ namespace AxibugEmuOnline.Client.Manager
|
|||||||
public Protobuf_Room_MiniInfo mineRoomMiniInfo { get; private set; } = null;
|
public Protobuf_Room_MiniInfo mineRoomMiniInfo { get; private set; } = null;
|
||||||
public bool InRoom => mineRoomMiniInfo != null;
|
public bool InRoom => mineRoomMiniInfo != null;
|
||||||
public bool IsHost => mineRoomMiniInfo?.HostPlayerUID == App.user.userdata.UID;
|
public bool IsHost => mineRoomMiniInfo?.HostPlayerUID == App.user.userdata.UID;
|
||||||
|
public bool IsScreenProviderUID => mineRoomMiniInfo?.ScreenProviderUID == App.user.userdata.UID;
|
||||||
public RoomGameState RoomState => mineRoomMiniInfo.GameState;
|
public RoomGameState RoomState => mineRoomMiniInfo.GameState;
|
||||||
public int MinePlayerIdx => GetMinePlayerIndex();
|
public int MinePlayerIdx => GetMinePlayerIndex();
|
||||||
public int WaitStep { get; private set; } = -1;
|
public int WaitStep { get; private set; } = -1;
|
||||||
@ -200,8 +201,16 @@ namespace AxibugEmuOnline.Client.Manager
|
|||||||
{
|
{
|
||||||
App.log.Debug("单个房间状态更新");
|
App.log.Debug("单个房间状态更新");
|
||||||
Protobuf_Room_Update_RESP msg = ProtoBufHelper.DeSerizlize<Protobuf_Room_Update_RESP>(reqData);
|
Protobuf_Room_Update_RESP msg = ProtoBufHelper.DeSerizlize<Protobuf_Room_Update_RESP>(reqData);
|
||||||
AddOrUpdateRoomList(msg.RoomMiniInfo);
|
if (msg.UpdateType == 0)
|
||||||
Eventer.Instance.PostEvent(EEvent.OnRoomListSingleUpdate, msg.RoomMiniInfo.GameRomID);
|
{
|
||||||
|
AddOrUpdateRoomList(msg.RoomMiniInfo);
|
||||||
|
Eventer.Instance.PostEvent(EEvent.OnRoomListSingleUpdate, msg.RoomMiniInfo.GameRomID);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
RemoveRoomList(msg.RoomMiniInfo.GameRomID);
|
||||||
|
Eventer.Instance.PostEvent(EEvent.OnRoomListSingleClose, msg.RoomMiniInfo.GameRomID);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
Loading…
Reference in New Issue
Block a user