bool ItemCheckArrow()
{
#region Check Arrow
MsSQL ms = new MsSQL("SELECT * FROM char_items WHERE owner='" + Character.Information.CharacterID + "' AND slot >= '13' AND slot <= '" + Character.Information.Slots + "' AND inavatar='0' AND itemid='62' AND storagetype='0'");
if (ms.Count() == 0)
{
ms = new MsSQL("SELECT * FROM char_items WHERE owner='" + Character.Information.CharacterID + "' AND slot >= '13' AND slot <= '" + Character.Information.Slots + "' AND inavatar='0' AND itemid='3823' AND storagetype='0'");
}
else if (ms.Count() == 0)
{
ms = new MsSQL("SELECT * FROM char_items WHERE owner='" + Character.Information.CharacterID + "' AND slot >= '13' AND slot <= '" + Character.Information.Slots + "' AND inavatar='0' AND itemid='10302' AND storagetype='0'");
}
else if (ms.Count() == 0)
{
ms = new MsSQL("SELECT * FROM char_items WHERE owner='" + Character.Information.CharacterID + "' AND slot >= '13' AND slot <= '" + Character.Information.Slots + "' AND inavatar='0' AND itemid='10487' AND storagetype='0'");
}
if (ms.Count() == 0) return false;
else
{
Global.slotItem items = null;
using (System.Data.SqlClient.SqlDataReader reader = ms.Read())
{
while (reader.Read())
items = ConvertToItem(reader.GetInt32(2), reader.GetByte(5), reader.GetInt16(6), 1);
}
ms.Close();
MsSQL.InsertData("UPDATE char_items SET itemnumber='item" + 7 + "',slot='" + 7 + "' WHERE itemnumber='" + "item" + items.Slot + "' AND owner='" + Character.Information.CharacterID + "' AND itemid='" + items.ID + "'");
client.Send(Packet.MoveItem(0, items.Slot, 7, items.Amount, 0, "MOVE_INSIDE_INVENTORY"));
Character.Information.Item.sAmount = items.Amount;
Character.Information.Item.sID = items.ID;
;
return true;
}
#endregion
}