Skip to content
Snippets Groups Projects
Commit 16b254a0 authored by Chris Kearney's avatar Chris Kearney
Browse files

processing aggro bug fixes

parent 45146768
No related branches found
No related tags found
No related merge requests found
...@@ -581,12 +581,13 @@ public class Player extends CreeperEntity { ...@@ -581,12 +581,13 @@ public class Player extends CreeperEntity {
}) })
.collect(Collectors.toList()); .collect(Collectors.toList());
final Room originalRoom = currentRoom;
aggresiveRoomNpcs.forEach(npc -> { aggresiveRoomNpcs.forEach(npc -> {
gameManager.writeToPlayerCurrentRoom(getPlayerId(), getPlayerName() + " has alerted a " + npc.getColorName() + "\r\n"); gameManager.writeToPlayerCurrentRoom(getPlayerId(), getPlayerName() + " has alerted a " + npc.getColorName() + "\r\n");
gameManager.getChannelUtils().write(playerId, "You can return to your previous location by typing \"back\"" + "\r\n"); gameManager.getChannelUtils().write(playerId, "You can return to your previous location by typing \"back\"" + "\r\n");
setIsActiveAlertNpcStatus(); setIsActiveAlertNpcStatus();
scheduledExecutor.schedule(() -> { scheduledExecutor.schedule(() -> {
if (!getCurrentRoom().getRoomId().equals(currentRoom.getRoomId())) { if (!getCurrentRoom().getRoomId().equals(originalRoom.getRoomId())) {
return; return;
} }
gameManager.writeToPlayerCurrentRoom(getPlayerId(), getPlayerName() + " has " + Color.BOLD_ON + Color.RED + "ANGERED" + Color.RESET + " a " + npc.getColorName() + "\r\n"); gameManager.writeToPlayerCurrentRoom(getPlayerId(), getPlayerName() + " has " + Color.BOLD_ON + Color.RED + "ANGERED" + Color.RESET + " a " + npc.getColorName() + "\r\n");
...@@ -1143,4 +1144,18 @@ public class Player extends CreeperEntity { ...@@ -1143,4 +1144,18 @@ public class Player extends CreeperEntity {
} }
} }
public class DelayNpcAggro implements Runnable {
private final Room originalRoom;
public DelayNpcAggro(Room originalRoom) {
this.originalRoom = originalRoom;
}
@Override
public void run() {
}
}
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment