السلام عليكم ورحمة الله وبركاته
امنع اي حد يرمي اي حاجه و هو قاعد في المتجر
ده مش حل مشكله ولا هي مشكله لكن احنا بنحاول ننوع في المواضيع وبعدين ممكن يكون حد محتاجه
في الباكت هاندل ابحث عن
كود:
private static void DropItem(ItemUsage itemUsage, GameState client)
اقفله من السالب و بدله بالكود ده
كود:
private static void DropItem(ItemUsage itemUsage, GameState client)
{
if (client.Booth != null)
{
// client.Send(new NpcReply(6, " Sorry Friend You Cant Drop it") { OptionID = 0xff }.ToArray());
client.Send(new NpcReply(6, "Sorry you cant drop items while you in Booth") { OptionID = 0xff }.ToArray());
}
else
{
IConquerItem item = null;
if (client.Inventory.TryGetItem(itemUsage.UID, out item) && (item.ID != 0))
{
ConquerItemInformation information = new ConquerItemInformation(item.ID, 0);
if ((item.Lock == 0) && !item.Suspicious)
{
if ((information.BaseInformation.Type == ConquerItemBaseInformation.ItemType.Dropable) && !item.Bound)
{
ushort x = client.Entity.X;
ushort y = client.Entity.Y;
if (client.Map.SelectCoordonates(ref x, ref y))
{
FloorItem item2 = new FloorItem(true)
{
Item = item,
ItemID = item.ID,
ItemColor = item.Color,
MapID = client.Map.ID,
MapObjType = MapObjectType.Item,
X = x,
Y = y,
Type = 1,
OnFloor = Time32.Now,
UID = FloorItem.FloorUID.Next
};
while (client.Map.Npcs.ContainsKey(item2.UID))
{
item2.UID = FloorItem.FloorUID.Next;
}
client.SendScreenSpawn(item2, true);
client.Map.AddFloorItem(item2);
client.Inventory.Remove(item, Enums.ItemUse.Remove);
}
}
else
{
client.Inventory.Remove(item, Enums.ItemUse.Remove);
}
}
}
}
}
بس كده انتهينا