public override void Buy(model.Player player, int buyslot) { if (player.GetFreeSlot() != -1 && player.Gold >= templ[buyslot].BuyPrice) { LKCamelot.script.item.Item tempitem = null; if (buyslot == 0) { tempitem = new script.item.LifeDrug().Inventory(player); player.client.SendPacket(new LKCamelot.model.AddItemToInventory2( tempitem).Compile()); } if (buyslot == 1) { tempitem = new script.item.MagicDrug().Inventory(player); player.client.SendPacket(new LKCamelot.model.AddItemToInventory2( tempitem).Compile()); } if (buyslot == 2) { tempitem = new script.item.FullLifeDrug().Inventory(player); player.client.SendPacket(new LKCamelot.model.AddItemToInventory2( tempitem).Compile()); } if (buyslot == 3) { tempitem = new script.item.FullMagicDrug().Inventory(player); player.client.SendPacket(new LKCamelot.model.AddItemToInventory2( tempitem).Compile()); } LKCamelot.model.World.NewItems.TryAdd(tempitem.m_Serial, tempitem); player.Gold -= (uint)templ[buyslot].BuyPrice; } }