Aura.Channel.World.Shops.PersonalShop.SetUp C# (CSharp) Метод

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

Sets up shop, spawning the prop.
public SetUp ( string title, string description ) : bool
title string
description string
Результат bool
		public bool SetUp(string title, string description)
		{
			if (!this.IsReadyForBusiness)
				return false;

			this.Title = title;
			this.Description = description;

			var rnd = RandomProvider.Get();
			var pos = this.Owner.GetPosition();
			var location = new Location(this.Owner.RegionId, GetPlacementPosition(pos, this.Owner.Direction));
			var direction = MabiMath.ByteToRadian(this.Owner.Direction);

			// Spawn prop
			var propId = GetShopPropId(this.Bag);
			this.Prop = new Prop(propId, location.RegionId, location.X, location.Y, (float)direction);
			this.Prop.Info.Color1 = this.Bag.Info.Color1;
			this.Prop.Info.Color2 = this.Bag.Info.Color2;
			this.Prop.Info.Color3 = this.Bag.Info.Color3;
			this.Prop.Extensions.AddSilent(new ConfirmationPropExtension("default", "이 개인상점을 여시겠습니까?", "개인상점 열기"));
			this.Region.AddProp(this.Prop);

			// Move that body
			Send.UseMotion(this.Owner, 11, 4);

			// Update prop with owner and title
			this.Prop.Xml.SetAttributeValue("PSPID", this.Owner.EntityId);
			this.Prop.Xml.SetAttributeValue("PSTTL", title);
			Send.PropUpdate(this.Prop);

			return true;
		}