mirror of
https://github.com/EQEmu/Server.git
synced 2026-06-22 19:58:24 +00:00
Merge pull request #9 from Valorith/claude/review-inventory-full-jKPLd
Fix inventory overflow bug overwriting equipment slot 0
This commit is contained in:
@@ -1847,7 +1847,7 @@ int16 EQ::InventoryProfile::FindFirstFreeSlotThatFitsItem(const EQ::ItemData *it
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return 0;
|
return INVALID_INDEX;
|
||||||
}
|
}
|
||||||
|
|
||||||
//This function has the same flaw as noted above
|
//This function has the same flaw as noted above
|
||||||
|
|||||||
+2
-1
@@ -4679,7 +4679,8 @@ bool Client::PutItemInInventoryWithStacking(EQ::ItemInstance *inst)
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (free_id != INVALID_INDEX) {
|
// Protect equipment slots (0-22) from being overwritten
|
||||||
|
if (free_id != INVALID_INDEX && !EQ::ValueWithin(free_id, EQ::invslot::EQUIPMENT_BEGIN, EQ::invslot::EQUIPMENT_END)) {
|
||||||
if (PutItemInInventory(free_id, *inst, true)) {
|
if (PutItemInInventory(free_id, *inst, true)) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user