示例#1
0
 /// <summary>
 /// Ends all timers/cooldowns and removes all offers
 /// </summary>
 public void EndCycle()
 {
     if (TimerManager != null)
     {
         TimerManager.EndAllTimers();
         TimerManager = null;
     }
     if (OfferManager != null)
     {
         OfferManager.EndAllOffers();
         OfferManager = null;
     }
     if (CooldownManager != null)
     {
         CooldownManager.EndAllCooldowns();
         CooldownManager = null;
     }
 }
示例#2
0
        /// <summary>
        /// Disposes of the roleplay bots instance
        /// </summary>
        public void Dispose()
        {
            if (DRoomUser != null)
            {
                if (DRoomUser.GetBotRoleplayAI() != null)
                {
                    DRoomUser.GetBotRoleplayAI().StopActivities();
                }

                RoleplayBotManager.EjectDeployedBot(this.DRoomUser, this.DRoom, false);
            }

            Id                 = 0;
            Name               = null;
            Figure             = null;
            Gender             = null;
            Motto              = null;
            VirtualId          = 0;
            MaxHealth          = 0;
            CurHealth          = 0;
            Strength           = 0;
            Level              = 0;
            SpawnId            = 0;
            OriginalId         = 0;
            Deployed           = false;
            Dead               = false;
            Jailed             = false;
            X                  = 0;
            Y                  = 0;
            oX                 = 0;
            oY                 = 0;
            Z                  = 0;
            oZ                 = 0;
            SpawnRot           = 0;
            RoomBotInstance    = null;
            HabboInstance      = null;
            Responses          = null;
            UserFollowing      = null;
            UserAttacking      = null;
            Attacking          = false;
            Roaming            = false;
            Following          = false;
            RoamBot            = false;
            RoamCityBot        = false;
            AddableBot         = false;
            Invisible          = false;
            TeleporterEntering = null;
            TeleporterExiting  = null;
            LastTeleport       = null;
            Teleporting        = false;
            Teleported         = false;
            FollowCooldown     = 0;
            AttackCooldown     = 0;
            RoamCooldown       = 0;
            LookCooldown       = 0;

            RoamInterval   = 0;
            AttackInterval = 0;
            FollowInterval = 0;

            RoomStayInterval = 0;
            RoomStayTime     = 0;
            AIType           = 0;

            TimerManager.EndAllTimers();
            TimerManager = null;

            CooldownManager.EndAllCooldowns();
            CooldownManager = null;

            this.RoomBotInstance.Dispose();
        }