Skip to content

Commit

Permalink
Fix Autoloot
Browse files Browse the repository at this point in the history
- fixed an issue where it wasnt possible to loot coints if your item list was empty
  • Loading branch information
roddett committed Feb 18, 2023
1 parent cde66d1 commit 51a1812
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sources/monster.cpp
Expand Up @@ -1363,7 +1363,7 @@ bool Monster::executeAutoLoot(Player* player, Container* container, std::ostring

bool autoLootExecuted = false;
const AutoLootSet& autoLootList = player->getAutoLootList();
if (autoLootList.empty())
if (autoLootList.empty() && !player->getAutoLootSetting(AUTOLOOT_GOLD))
return false;

ItemList containerItems = container->getItemList();
Expand All @@ -1384,7 +1384,7 @@ bool Monster::executeAutoLoot(Player* player, Container* container, std::ostring
}

if ((itemType.worth && !player->getAutoLootSetting(AUTOLOOT_GOLD))
|| (!itemType.worth && autoLootList.find(subItem->getID()) == autoLootList.end()))
|| (autoLootList.empty() || (!itemType.worth && autoLootList.find(subItem->getID()) == autoLootList.end())))
continue;

bool begin = true;
Expand Down

0 comments on commit 51a1812

Please sign in to comment.