mirror of
https://github.com/EQEmu/Server.git
synced 2026-04-11 17:12:25 +00:00
Enhance SummonItemIntoInventory to support stacking
Co-authored-by: Valorith <76063792+Valorith@users.noreply.github.com>
This commit is contained in:
parent
85d84bff75
commit
a62aba3fc3
@ -4607,6 +4607,9 @@ void Client::SummonItemIntoInventory(
|
|||||||
return;
|
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 bool is_arrow = inst->GetItem()->ItemType == EQ::item::ItemTypeArrow;
|
||||||
const int16 slot_id = m_inv.FindFreeSlot(
|
const int16 slot_id = m_inv.FindFreeSlot(
|
||||||
inst->IsClassBag(),
|
inst->IsClassBag(),
|
||||||
@ -4627,6 +4630,9 @@ void Client::SummonItemIntoInventory(
|
|||||||
is_attuned,
|
is_attuned,
|
||||||
slot_id
|
slot_id
|
||||||
);
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
safe_delete(inst);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Client::HasItemOnCorpse(uint32 item_id)
|
bool Client::HasItemOnCorpse(uint32 item_id)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user