diff --git a/server/gameserver/creature.cc b/server/gameserver/creature.cc index 86848ac8..badca857 100644 --- a/server/gameserver/creature.cc +++ b/server/gameserver/creature.cc @@ -1505,11 +1505,12 @@ void Creature::AddInventory(int slot_id, int num) void Creature::DecInventory(int slot_id, int num) { - assert(num > 0); - if (!IsValidSlotId(slot_id)) { - A8_ABORT(); + if (num > 0) { + if (!IsValidSlotId(slot_id)) { + A8_ABORT(); + } + inventory_[slot_id].num -= num; } - inventory_[slot_id].num -= num; } void Creature::CheckSpecObject(int new_poly_flags)