mirror of
https://github.com/EQEmu/Server.git
synced 2026-06-28 00:57:15 +00:00
Enhance SummonItemIntoInventory to support stacking
Co-authored-by: Valorith <76063792+Valorith@users.noreply.github.com>
This commit is contained in:
@@ -4607,6 +4607,9 @@ void Client::SummonItemIntoInventory(
|
||||
return;
|
||||
}
|
||||
|
||||
// Try stacking first if the item is stackable, then fall back to finding a free slot
|
||||
if (!PutItemInInventoryWithStacking(inst)) {
|
||||
// PutItemInInventoryWithStacking failed, fall back to original behavior
|
||||
const bool is_arrow = inst->GetItem()->ItemType == EQ::item::ItemTypeArrow;
|
||||
const int16 slot_id = m_inv.FindFreeSlot(
|
||||
inst->IsClassBag(),
|
||||
@@ -4629,6 +4632,9 @@ void Client::SummonItemIntoInventory(
|
||||
);
|
||||
}
|
||||
|
||||
safe_delete(inst);
|
||||
}
|
||||
|
||||
bool Client::HasItemOnCorpse(uint32 item_id)
|
||||
{
|
||||
auto corpses = CharacterCorpsesRepository::GetWhere(database, fmt::format("charid = {}", CharacterID()));
|
||||
|
||||
Reference in New Issue
Block a user