public void Execute() { if (this.m_player != null) { if (this.m_player.CurrentRoom != null) { RoomMgr.ExitRoom(this.m_player.CurrentRoom, this.m_player); } BaseWaitingRoom room = RoomMgr.WaitingRoom; if (room.AddPlayer(this.m_player)) { List <BaseRoom> list = RoomMgr.GetWaitingRoom(this.m_hallType, 0, 9, 0); this.m_player.Out.SendUpdateRoomList(list); GamePlayer[] players = room.GetPlayersSafe(); GamePlayer[] array = players; for (int i = 0; i < array.Length; i++) { GamePlayer p = array[i]; if (p != this.m_player) { this.m_player.Out.SendSceneAddPlayer(p); } } } } }
public void Execute() { if (m_player.CurrentRoom != null) { m_player.CurrentRoom.RemovePlayerUnsafe(m_player); } BaseWaitingRoom room = RoomMgr.WaitingRoom; if (room.AddPlayer(m_player)) { BaseRoom[] list = RoomMgr.Rooms; List <BaseRoom> tempList = new List <BaseRoom>(); //int maxRoomInList = 7; for (int i = 0; i < list.Length; i++) { if (!list[i].IsEmpty) { tempList.Add(list[i]); //m_player.Out.SendUpdateRoomList(list[i]); } } m_player.Out.SendUpdateRoomList(tempList); GamePlayer[] players = room.GetPlayersSafe(); foreach (GamePlayer p in players) { if (p != m_player) { m_player.Out.SendSceneAddPlayer(p); } } } }
public void Execute() { if (this.m_player.CurrentRoom != null) { this.m_player.CurrentRoom.RemovePlayerUnsafe(this.m_player); } BaseWaitingRoom waitingRoom = RoomMgr.WaitingRoom; if (waitingRoom.AddPlayer(this.m_player)) { BaseRoom[] rooms = RoomMgr.Rooms; List <BaseRoom> list = new List <BaseRoom>(); for (int i = 0; i < rooms.Length; i++) { if (!rooms[i].IsEmpty) { if (this.m_player.ScreenStyle == 1 && (rooms[i].RoomType == eRoomType.Match || rooms[i].RoomType == eRoomType.Freedom)) { list.Add(rooms[i]); } if (this.m_player.ScreenStyle == 2 && (rooms[i].RoomType == eRoomType.Dungeon || rooms[i].RoomType == eRoomType.Freshman)) { list.Add(rooms[i]); } } } this.m_player.Out.SendUpdateRoomList(list); GamePlayer[] playersSafe = waitingRoom.GetPlayersSafe(); GamePlayer[] array = playersSafe; for (int j = 0; j < array.Length; j++) { GamePlayer gamePlayer = array[j]; if (gamePlayer != this.m_player) { this.m_player.Out.SendSceneAddPlayer(gamePlayer); } } } }