Ver código fonte

Fix EventDispatcher call first WalkingManager

Maneco2 2 anos atrás
pai
commit
73cdca8123

+ 1 - 4
src/main/java/com/l2jserver/gameserver/model/actor/L2Npc.java

@@ -1085,11 +1085,8 @@ public class L2Npc extends L2Character {
 		if (isTeleporting()) {
 			EventDispatcher.getInstance().notifyEventAsync(new OnNpcTeleport(this), this);
 		} else {
-			EventDispatcher.getInstance().notifyEventAsync(new OnNpcSpawn(this), this);
-		}
-		
-		if (!isTeleporting()) {
 			WalkingManager.getInstance().onSpawn(this);
+			EventDispatcher.getInstance().notifyEventAsync(new OnNpcSpawn(this), this);
 		}
 	}