private void HandleRecvImbueItem(Packet parsed) { ImbueItemInfo p = PacketManager.RecvImbueItem(parsed); if (ClientImbueItemInfo != null) { ClientImbueItemInfo(this, new ClientImbueItemEventArgs(p)); } }
void c_ClientImbueItemInfo(object sender, ClientImbueItemEventArgs e) { Client c = (Client)sender; ImbueItemInfo i = e.Info; BaseItem item = null; try { item = c.MyCharacter.Bags[i.Bag - 1].Items.Single(x => (x.ItemID == i.ItemID && x.Slot == i.Slot) && (x.bType <= 7)); byte[] SendAcceptImbueItem = PacketManager.SendAcceptImbueItem(ImbueState.Success); if (item != null) { c.Send(SendAcceptImbueItem); } } catch { byte[] SendAcceptImbueItem = PacketManager.SendAcceptImbueItem(ImbueState.ThisItemCannotBeImbued); c.Send(SendAcceptImbueItem); } }
public ClientImbueItemEventArgs(ImbueItemInfo i) { this.imbueinfo = i; }