Fixed bug when loot bags are on mapchange areas.

You will now be able to pick up a bag when you reach the loot bag
without being transported to a new map.
If you are transported to a new map on a loot bag, you will be offered
to pick up this bag.
This commit is contained in:
Zukero
2014-05-29 00:19:39 +02:00
parent 7a02014e1b
commit 869c791e76

View File

@@ -233,7 +233,8 @@ public final class MovementController implements TimedMessageTask.Callback {
controllers.mapController.handleMapEventsAfterMovement(currentMap, newPosition, player.lastPosition);
if (!world.model.uiSelections.isInCombat) {
Loot loot = currentMap.getBagAt(newPosition);
//currentMap can be outdated due to mapchange events processed above.
Loot loot = world.model.currentMap.getBagAt(newPosition);
if (loot != null) controllers.itemController.playerSteppedOnLootBag(loot);
}
}