Aura.Channel.World.Entities.Creature.Dispose C# (CSharp) Метод

Dispose() публичный Метод

Called when creature is removed from the server. (Killed NPC, disconnect, etc)
public Dispose ( ) : void
Результат void
		public virtual void Dispose()
		{
			ChannelServer.Instance.Events.SecondsTimeTick -= this.OnSecondsTimeTick;
			ChannelServer.Instance.Events.MabiTick -= this.OnMabiTick;
			ChannelServer.Instance.Events.PlayTimeTick -= this.OnPlayTimeTick;

			// Stop rest, so character doesn't appear sitting anymore
			// and chair props are removed.
			// Do this in dispose because we can't expect a clean logout.
			if (this.Has(CreatureStates.SitDown))
			{
				var restHandler = ChannelServer.Instance.SkillManager.GetHandler<Rest>(SkillId.Rest);
				if (restHandler != null)
					restHandler.Stop(this, this.Skills.Get(SkillId.Rest));
			}

			// Cancel any active skills
			if (this.Skills.ActiveSkill != null)
				this.Skills.CancelActiveSkill();

			this.Quests.Dispose();

			if (this.Temp.ActiveTrade != null)
				this.Temp.ActiveTrade.Cancel();

			if (this.Temp.ActiveEntrustment != null)
				this.Temp.ActiveEntrustment.Cancel();

			if (this.Temp.ActivePersonalShop != null)
				this.Temp.ActivePersonalShop.TakeDown();
		}