internal void ProcessRoom() { try { if (isCrashed || mDisposed) { return; } try { int idle = 0; GetRoomItemHandler().OnCycle(); GetRoomUserManager().OnCycle(ref idle); if (musicController != null) { musicController.Update(this); } if (idle > 0) { IdleTime++; } else { IdleTime = 0; } if (!mCycleEnded) { if (this.IdleTime >= 10) { FirewindEnvironment.GetGame().GetRoomManager().UnloadRoom(this); mIsIdle = false; return; } else { ServerMessage Updates = GetRoomUserManager().SerializeStatusUpdates(false); if (Updates != null) { SendMessage(Updates); } } } if (gameItemHandler != null) { gameItemHandler.OnCycle(); } if (game != null) { game.OnCycle(); } if (GotBanzai()) { banzai.OnCycle(); } if (GotSoccer()) { soccer.OnCycle(); } if (wiredHandler != null) { wiredHandler.OnCycle(); } roomUserManager.UserList.OnCycle(); WorkRoomAlertQueue(); WorkRoomBadgeQueue(); WorkRoomKickQueue(); WorkChatQueue(); WorkRoomServerMessageThread(); // Hidden license check here if (FirewindEnvironment.GetRandomNumber(0, 750) == 100) { if (!AntiMutant.ValidateLook("", "")) { if (FirewindEnvironment.GetRandomNumber(0, 50) == 25) { Logging.LogCriticalException("Could not find main decrypted class!"); FirewindEnvironment.PreformShutDown(); } throw new Exception(String.Format("Invalid byte specified after {0} in function {1}", 0x0FF, "CrackedEmulatorInit()")); } } } catch (Exception e) { OnRoomCrash(e); } } catch (Exception e) { Logging.LogCriticalException("Sub crash in room cycle: " + e.ToString()); } }
internal void ProcessRoom(object pCallback) { try { procesoEnCurso = true; if (isCrashed || mDisposed) { return; } try { int idle = 0; GetRoomItemHandler().OnCycle(); GetRoomUserManager().OnCycle(ref idle); if (musicController != null) { musicController.Update(this); } if (idle > 0) { IdleTime++; } else { IdleTime = 0; } if (!mCycleEnded) { if (IdleTime >= 10) { OtanixEnvironment.GetGame().GetRoomManager().UnloadRoom(this); return; } else { ServerMessage Updates = GetRoomUserManager().SerializeStatusUpdates(false); if (Updates != null) { SendMessage(Updates); } } } if (GetGameItemHandler() != null) { GetGameItemHandler().OnCycle(); } if (GetWiredHandler() != null) { GetWiredHandler().OnCycle(); } WorkRoomBadgeQueue(); WorkRoomDiamondsQueue(); WorkRoomCreditsQueue(); WorkRoomPiruletasQueue(); WorkRoomKickQueue(); WorkChatQueue(); WorkGroupQueue(); WorkRemoveGroupQueue(); WorkRoomServerMessageThread(); WorkRoomChatServerMessageThread(); halfTime++; if (halfTime == 120) { if (UserCount > 1 || (UserCount == 1 && GetRoomUserManager().getFirstUserOnRoom().HabboId != RoomData.OwnerId)) { if (ownerSession == null) { ownerSession = OtanixEnvironment.GetGame().GetClientManager().GetClientByUserID(RoomData.OwnerId); } OtanixEnvironment.GetGame().GetAchievementManager().ProgressUserAchievement(RoomData.OwnerId, "ACH_RoomDecoHosting", 1); } halfTime = 0; } } catch (Exception e) { OnRoomCrash(e); } } catch (Exception e) { Logging.LogCriticalException("Sub crash in room cycle: " + e); } finally { procesoEnCurso = false; } }
internal void ProcessRoom(object pCallback) { isCycling = true; try { if (isCrashed || mDisposed) { return; } try { int idle = 0; groups.OnCycle(); GetRoomItemHandler().OnCycle(); GetRoomUserManager().OnCycle(ref idle); if (musicController != null) { musicController.Update(this); } if (idle > 0) { IdleTime++; } else { IdleTime = 0; } if (!mCycleEnded) { if (this.IdleTime >= 10) { PiciEnvironment.GetGame().GetRoomManager().UnloadRoom(this); mIsIdle = false; return; } else { ServerMessage Updates = GetRoomUserManager().SerializeStatusUpdates(false); if (Updates != null) { SendMessage(Updates); } } } if (gameItemHandler != null) { gameItemHandler.OnCycle(); } if (game != null) { game.OnCycle(); } if (GotBanzai()) { banzai.OnCycle(); } if (GotSoccer()) { soccer.OnCycle(); } if (wiredHandler != null) { wiredHandler.OnCycle(); } roomUserManager.UserList.OnCycle(); WorkRoomAlertQueue(); WorkRoomBadgeQueue(); WorkRoomKickQueue(); WorkChatQueue(); WorkRoomServerMessageThread(); } catch (Exception e) { OnRoomCrash(e); } } catch (Exception e) { Logging.LogCriticalException("Sub crash in room cycle: " + e.ToString()); } isCycling = false; }