/// <summary>
/// Sends PersonalShopOpenR to creature's client.
/// </summary>
/// <param name="creature"></param>
/// <param name="shop">Null for negative response</param>
public static void PersonalShopOpenR(Creature creature, PersonalShop shop)
{
var items = shop.GetPricedItems();
var packet = new Packet(Op.PersonalShopOpenR, creature.EntityId);
packet.PutByte(shop != null);
if (shop != null)
{
packet.PutLong(shop.Owner.EntityId);
packet.PutString(shop.Owner.Name);
packet.PutString(shop.Description);
packet.PutString(shop.GetBagLayout());
packet.PutByte(0);
foreach (var item in items)
{
packet.AddItemInfo(item, ItemPacketType.Private);
packet.PutInt(item.PersonalShopPrice);
}
}
creature.Client.Send(packet);
}