Compare commits

..

1 Commits

Author SHA1 Message Date
OMGeeky
315e34185a Only add the loot once to the killedMonsterBags
without this, the loot might be added multiple times to the UI when showing what has been dropped, allowing the player to get more items than they should be allowed to
2024-08-25 13:23:25 +02:00
2 changed files with 2 additions and 7 deletions

View File

@@ -152,12 +152,6 @@ public final class DebugInterface {
public void onClick(View arg0) {
showToast(mainActivity, "DEBUG: map=" + world.model.currentMaps.map.name , Toast.LENGTH_SHORT);
}
})
,new DebugButton("tick-10", new OnClickListener() {
@Override
public void onClick(View arg0) {
world.model.worldData.tickWorldTime(10);
}
})
}));

View File

@@ -250,7 +250,8 @@ public final class CombatController implements VisualEffectCompletedCallback {
if (!loot.hasItemsOrGold()) {
world.model.currentMaps.map.removeGroundLoot(loot);
} else if (world.model.uiSelections.isInCombat) {
killedMonsterBags.add(loot);
if(!killedMonsterBags.contains(loot))
killedMonsterBags.add(loot);
}
combatActionListeners.onPlayerKilledMonster(killedMonster);