diff --git a/src/engine/server/world/WorldServer.java b/src/engine/server/world/WorldServer.java index 9627657b..86b23490 100644 --- a/src/engine/server/world/WorldServer.java +++ b/src/engine/server/world/WorldServer.java @@ -731,6 +731,16 @@ public class WorldServer { delta = 60000; } + boolean enemiesClose = false; + for(AbstractWorldObject awo : WorldGrid.getObjectsInRangePartial(playerCharacter.loc,MBServerStatics.CHARACTER_LOAD_RANGE,MBServerStatics.MASK_PLAYER)) + { + PlayerCharacter enemy = (PlayerCharacter) awo; + if(enemy.getGuild().equals(playerCharacter.getGuild()) == false && enemy.getGuild().getNation().equals(playerCharacter.getGuild().getNation()) == false) + enemiesClose = true; + } + if(enemiesClose) + delta += 60000; + playerCharacter.stopMovement(playerCharacter.getLoc()); UpdateStateMsg updateStateMsg = new UpdateStateMsg(); updateStateMsg.setPlayer(playerCharacter);