internal void RemoveAllRooms() { using (ClonedTable class26_ = this.Rooms.GetThreadSafeTable) { IEnumerator enumerator; using (DatabaseClient @class = PhoenixEnvironment.GetDatabase().GetClient()) { enumerator = class26_.Values.GetEnumerator(); try { while (enumerator.MoveNext()) { Room class2 = (Room)enumerator.Current; class2.method_65(@class); } } finally { IDisposable disposable = enumerator as IDisposable; if (disposable != null) { disposable.Dispose(); } } } if (PhoenixEnvironment.GetConfig().data["emu.messages.roommgr"] == "1") { Console.WriteLine("[RoomMgr] Done with furniture saving, disposing rooms"); } enumerator = class26_.Values.GetEnumerator(); try { while (enumerator.MoveNext()) { Room class2 = (Room)enumerator.Current; try { class2.method_62(); } catch { } } } finally { IDisposable disposable = enumerator as IDisposable; if (disposable != null) { disposable.Dispose(); } } if (PhoenixEnvironment.GetConfig().data["emu.messages.roommgr"] == "1") { Console.WriteLine("[RoomMgr] Done disposing rooms!"); } } }
internal Dictionary <Room, int> method_22() { Dictionary <Room, int> dictionary = new Dictionary <Room, int>(); using (ClonedTable class26_ = this.Rooms.GetThreadSafeTable) { foreach (Room @class in class26_.Values) { if (@class != null) { dictionary.Add(@class, @class.UserCount); } } } return(dictionary); }
public List <Room> GetEventRoomsForCategory(int int_0) { List <Room> list = new List <Room>(); try { using (ClonedTable class26_ = this.Rooms.GetThreadSafeTable) { foreach (Room @class in class26_.Values) { if (@class.Event != null && (int_0 <= 0 || @class.Event.Category == int_0)) { list.Add(@class); } } } } catch { } return(list); }