From 869c791e76fca86f25118d05d5b4d95708a1778a Mon Sep 17 00:00:00 2001 From: Zukero Date: Thu, 29 May 2014 00:19:39 +0200 Subject: [PATCH] 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. --- .../com/gpl/rpg/AndorsTrail/controller/MovementController.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/AndorsTrail/src/com/gpl/rpg/AndorsTrail/controller/MovementController.java b/AndorsTrail/src/com/gpl/rpg/AndorsTrail/controller/MovementController.java index fa3af12db..66aa575b7 100644 --- a/AndorsTrail/src/com/gpl/rpg/AndorsTrail/controller/MovementController.java +++ b/AndorsTrail/src/com/gpl/rpg/AndorsTrail/controller/MovementController.java @@ -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); } }