Aura.Channel.World.Entities.RpCharacter.End C# (CSharp) Метод

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

Ends RP session.
public End ( ) : void
Результат void
		public void End()
		{
			var actor = this.Actor;
			var rpCharacter = this;
			var client = rpCharacter.Client;

			Send.EndRP(actor, actor.RegionId);
			rpCharacter.Region.RemoveCreature(rpCharacter);

			// Set Controlling before adding the actor to the region again,
			// otherwise the client isn't added to the region's client list
			// used for broadcasting.

			client.Controlling = actor;
			client.Creatures.Remove(rpCharacter.EntityId);

			var actorRegion = ChannelServer.Instance.World.GetRegion(actor.RegionId);
			actorRegion.AddCreature(actor);

			actor.Unlock(Locks.Default, true);

			Send.PetUnregister(actor, rpCharacter);
			Send.Disappear(rpCharacter);

			var playerCreature = actor as PlayerCreature;
			playerCreature.StartLookAround();
		}
	}