public override bool Remove(short slot) { if (InventoryType == InventoryType.Cash) { if (Get(slot) is GW_ItemSlotBundle isb) { if (ItemConstants.IsExpCoupon(isb.nItemID)) { ExpCouponRate = 0; } else if (ItemConstants.IsDropCoupon(isb.nItemID)) { DropCouponRate = 0; } } } return(base.Remove(slot)); }
public override void Add(short slot, GW_ItemSlotBundle item) { if (InventoryType == InventoryType.Cash) { if (item.Template is CashItemTemplate template) { if (ItemConstants.IsExpCoupon(item.nItemID)) { ExpCouponRate = template.Rate; } else if (ItemConstants.IsDropCoupon(item.nItemID)) { DropCouponRate = template.Rate; } } } base.Add(slot, item); }