void InvMgr_ItemMoved(object sender, ItemMoveEventArgs e) { // TODO: when attuneable items are in, check for attuneable and set invItem attuned // TODO: old emu set the equipment material here but I don't see that ever being used if (e.ToSlotID <= (uint)InventorySlot.EquipSlotsEnd) TriggerWearChange(InventoryManager.GetEquipableType((InventorySlot)e.ToSlotID)); if (e.FromSlotID <= (uint)InventorySlot.EquipSlotsEnd) TriggerWearChange(InventoryManager.GetEquipableType((InventorySlot)e.FromSlotID)); if (e.NotifyClient) { MoveItem mi = new MoveItem() { FromSlot = e.FromSlotID, NumberInStack = e.Quantity, ToSlot = e.ToSlotID }; EQApplicationPacket<MoveItem> miPack = null; if (e.Quantity > 0) { // Moving from a stack? mi.NumberInStack = 0xFFFFFFFF; if (e.ToSlotID == 0xFFFFFFFF) miPack = new EQApplicationPacket<MoveItem>(AppOpCode.DeleteItem, mi); else miPack = new EQApplicationPacket<MoveItem>(AppOpCode.MoveItem, mi); // TODO: this right? for (int i = 0; i < e.Quantity; i++) this.Client.SendApplicationPacket(miPack); } else { mi.NumberInStack = 0xFFFFFFFF; miPack = new EQApplicationPacket<MoveItem>(AppOpCode.MoveItem, mi); this.Client.SendApplicationPacket(miPack); } } CalcStatModifiers(); }
protected void OnItemMoved(ItemMoveEventArgs e) { EventHandler<ItemMoveEventArgs> handler = ItemMoved; if (handler != null) handler(this, e); }