diff --git a/common/shareddb.cpp b/common/shareddb.cpp index cd8fd49e0..7dff17b43 100644 --- a/common/shareddb.cpp +++ b/common/shareddb.cpp @@ -565,7 +565,9 @@ bool SharedDatabase::GetInventory(uint32 char_id, Inventory* inv) { if(charges==0x7FFF) inst->SetCharges(-1); - else + else if (charges == 0 && inst->IsStackable()) // Stackable items need a minimum charge of 1 remain moveable. + inst->SetCharges(1); + else inst->SetCharges(charges); if (item->ItemClass == ItemClassCommon) @@ -1234,6 +1236,9 @@ ItemInst* SharedDatabase::CreateBaseItem(const Item_Struct* item, int16 charges) // set it to 1 charge so that it is usable on creation if (charges == 0 && item->MaxCharges == -1) charges = 1; + // Stackable items need a minimum charge of 1 to remain moveable. + if(charges <= 0 && item->Stackable) + charges = 1; inst = new ItemInst(item, charges);