public void Store(bool pStart, bool pSells = true, ushort pItemID = 0, string pName = "")
{
if (pStart && (this.State == PlayerState.Resting || this.State == PlayerState.Vendor))
{
Log.WriteLine(LogLevel.Warn, "Tried to go in home twice {0}", this);
return;
}
else if (!pStart && this.House == null)
{
Log.WriteLine(LogLevel.Warn, "Tried to exit house while not in one {0}", this);
}
if (pStart)
{
this.State = PlayerState.Vendor;
this.House = new House(this, pSells ? House.HouseType.SellingVendor : Game.House.HouseType.BuyingVendor, pItemID, pName);
/*
Handler8.SendBeginRestResponse(this.Client, 0x0a81);
using (var broad = Handler8.BeginDisplayRest(this))
{
this.Broadcast(broad);
}
*/
}
else
{
this.State = PlayerState.Normal;
this.House = null;
/*
Handler8.SendEndRestResponse(this.Client);
using (var broad = Handler8.EndDisplayRest(this))
{
this.Broadcast(broad);
}
*/
}
}