public static void LoadClaimableItems(Client.GameState client) { MySqlCommand cmd = new MySqlCommand(MySqlCommandType.SELECT); cmd.Select("claimitems").Where("GainerUID", client.Entity.UID); MySqlReader r = new MySqlReader(cmd); while (r.Read()) { DetainedItem item = new DetainedItem(true); item.ItemUID = r.ReadUInt32("ItemUID"); item.UID = item.ItemUID; item.Page = (byte)DetainedItem.ClaimPage; item.Item = ConquerItemTable.LoadItem(item.ItemUID); item.ConquerPointsCost = r.ReadUInt32("ConquerPointsCost"); item.OwnerUID = r.ReadUInt32("OwnerUID"); item.GainerName = r.ReadString("GainerName"); item.GainerUID = r.ReadUInt32("GainerUID"); item.OwnerName = r.ReadString("OwnerName"); item.Date = DateTime.FromBinary(r.ReadInt64("Date")); item.DaysLeft = (uint)(TimeSpan.FromTicks(DateTime.Now.Ticks).Days - TimeSpan.FromTicks(item.Date.Ticks).Days); if (item.OwnerUID == 500) { item.MakeItReadyToClaim(); item.GainerUID = r.ReadUInt32("GainerUID"); item.OwnerUID = r.ReadUInt32("OwnerUID"); } client.ClaimableItem.Add(item.UID, item); } r.Close(); r.Dispose(); /*ClaimItemCollection items = new ClaimItemCollection(); items.LoadAndCloseReader(ClaimItem.FetchByParameter("GainerUID", client.Entity.UID)); for (int x = 0; x < items.Count; x++) { DetainedItem item = new DetainedItem(true); item.ItemUID = items[x].ItemUID; item.UID = item.ItemUID - 1; item.Page = (byte)DetainedItem.ClaimPage; item.Item = ConquerItemTable.LoadItem(item.ItemUID); item.ConquerPointsCost = items[x].ConquerPointsCost; item.OwnerUID = items[x].OwnerUID; item.GainerName = items[x].GainerName; item.GainerUID = items[x].GainerUID; item.OwnerName = items[x].OwnerName; item.Date = DateTime.FromBinary((long)items[x].DateX); item.DaysLeft = (uint)(TimeSpan.FromTicks(DateTime.Now.Ticks).Days - TimeSpan.FromTicks(item.Date.Ticks).Days); if (item.OwnerUID == 500) { item.MakeItReadyToClaim(); item.GainerUID = items[x].GainerUID; item.OwnerUID = items[x].OwnerUID; } client.ClaimableItem.Add(item.UID, item); }*/ }