mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2025-04-29 10:06:30 +00:00
Address modular build not returning parts upon switching some out (#614)
This commit is contained in:
parent
8cdb388915
commit
3cf243b1d7
@ -5514,13 +5514,15 @@ void GameMessages::HandleMoveItemBetweenInventoryTypes(RakNet::BitStream* inStre
|
|||||||
|
|
||||||
auto* item = inv->FindItemById(objectID);
|
auto* item = inv->FindItemById(objectID);
|
||||||
|
|
||||||
if (item == nullptr)
|
if (!item) {
|
||||||
{
|
// Attempt to find the item by lot in inventory A since A is the source inventory.
|
||||||
item = inv->FindItemByLot(templateID);
|
item = inv->FindItemByLot(templateID, static_cast<eInventoryType>(inventoryTypeA));
|
||||||
|
if (!item) {
|
||||||
if (item == nullptr)
|
// As a final resort, try to find the item in its default inventory based on type.
|
||||||
{
|
item = inv->FindItemByLot(templateID);
|
||||||
return;
|
if (!item) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user