internal TeamManager GetRoomTeamManager() { if (this.TeamManager == null) { this.TeamManager = new TeamManager(this); } return this.TeamManager; }
internal void CycleUser(RoomUser user) { if (user.Freezed) { user.FreezeCounter++; user.GetClient().GetHabbo().GetEffectsInventoryComponent().method_2(12, true); if (user.FreezeCounter > 10) { user.bool_5 = !user.bool_5; user.Freezed = false; user.FreezeCounter = 0; if (user.FreezeLives > 0) { ActivateShield(user); } else if (user.FreezeLives <= 0) { user.GetClient().GetHabbo().GetEffectsInventoryComponent().method_2(-1, true); this.room.GetGameManager().AddPointToTeam(user.team, -10, user); TeamManager teamManagerForFreeze = this.room.GetRoomTeamManager(); teamManagerForFreeze.OnUserLeave(user); user.team = Team.None; if (this.exitTeleport != null) { //this.room.GetGameMap().TeleportToItem(user, this.exitTeleport); user.X = this.exitTeleport.GetX; user.Y = this.exitTeleport.Int32_1; user.UpdateNeeded = true; } /*foreach (RoomItem Item in user.GetClient().GetHabbo().CurrentRoom.Hashtable_0.Values) * { * if (Item.GetBaseItem().Name == "es_exit") * { * user.int_3 = Item.Int32_0; * user.int_4 = Item.Int32_1; * user.UpdateNeeded = true; * } * }*/ user.Freezed = false; user.UpdateNeeded = true; if ((((teamManagerForFreeze.BlueTeam.Count <= 0) && (teamManagerForFreeze.RedTeam.Count <= 0)) && (teamManagerForFreeze.GreenTeam.Count <= 0)) && (teamManagerForFreeze.YellowTeam.Count > 0)) { this.StopGame(); } else if ((((teamManagerForFreeze.BlueTeam.Count > 0) && (teamManagerForFreeze.RedTeam.Count <= 0)) && (teamManagerForFreeze.GreenTeam.Count <= 0)) && (teamManagerForFreeze.YellowTeam.Count <= 0)) { this.StopGame(); } else if ((((teamManagerForFreeze.BlueTeam.Count <= 0) && (teamManagerForFreeze.RedTeam.Count > 0)) && (teamManagerForFreeze.GreenTeam.Count <= 0)) && (teamManagerForFreeze.YellowTeam.Count <= 0)) { this.StopGame(); } else if ((((teamManagerForFreeze.BlueTeam.Count <= 0) && (teamManagerForFreeze.RedTeam.Count <= 0)) && (teamManagerForFreeze.GreenTeam.Count > 0)) && (teamManagerForFreeze.YellowTeam.Count <= 0)) { this.StopGame(); } } } } if (user.shieldActive) { user.shieldCounter--; if (user.shieldCounter <= 0) { user.shieldActive = false; user.shieldCounter = 0; int Effect = (int)user.team + 39; user.GetClient().GetHabbo().GetEffectsInventoryComponent().method_2(Effect, true); } } }