mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-11-10 01:09:50 +00:00
Fix a crash
--HG-- branch : item_group
This commit is contained in:
parent
6c9bbb8c0b
commit
54ff3a88d5
1 changed files with 2 additions and 1 deletions
|
@ -264,9 +264,10 @@ bool CItemGroupManager::moveGroup(std::string name, INVENTORIES::TInventory dst)
|
||||||
INVENTORIES::TInventory inventory = (INVENTORIES::TInventory)i;
|
INVENTORIES::TInventory inventory = (INVENTORIES::TInventory)i;
|
||||||
if (inventory != dst && pIM->isInventoryAvailable(inventory))
|
if (inventory != dst && pIM->isInventoryAvailable(inventory))
|
||||||
{
|
{
|
||||||
|
|
||||||
for(auto &item : matchingItems(group, inventory))
|
for(auto &item : matchingItems(group, inventory))
|
||||||
{
|
{
|
||||||
|
//If an item is currently equipped, don't move it (or else crash !!)
|
||||||
|
if(pIM->isBagItemWeared(item.indexInBag)) continue;
|
||||||
CAHManager::getInstance()->runActionHandler("move_item", item.pCS, moveParams);
|
CAHManager::getInstance()->runActionHandler("move_item", item.pCS, moveParams);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue