root/trunk/AE-go_GameServer/src/com/aionemu/gameserver/services/TeleportService.java
| 1462 | 1514 | ||
|---|---|---|---|
286 | */ | 286 | */ |
287 | private void changePosition(Player player, int worldId, int instanceId, float x, float y, float z, byte heading) | 287 | private void changePosition(Player player, int worldId, int instanceId, float x, float y, float z, byte heading) |
288 | { | 288 | { |
289 | if(player.getInstanceId() != instanceId || player.getWorldId() != worldId) | ||
290 | { | ||
291 | world.getWorldMap(player.getWorldId()).getWorldMapInstanceById(player.getInstanceId()).removePlayer( | ||
292 | player.getObjectId()); | ||
293 | world.getWorldMap(worldId).getWorldMapInstanceById(instanceId).addPlayer(player.getObjectId()); | ||
294 | } | ||
295 | world.despawn(player); | 289 | world.despawn(player); |
296 | world.setPosition(player, worldId, instanceId, x, y, z, heading); | 290 | world.setPosition(player, worldId, instanceId, x, y, z, heading); |
297 | player.getController().startProtectionActiveTask(); | 291 | player.getController().startProtectionActiveTask(); |
... | ... | ||
375 | } | 369 | } |
376 | else | 370 | else |
377 | { | 371 | { |
378 | if(player.getInstanceId() != 1 || player.getWorldId() != worldId) | 372 | world.setPosition(player, worldId, 1, x, y, z, player.getHeading()); |
379 | { | ||
380 | world.getWorldMap(player.getWorldId()).getWorldMapInstanceById(player.getInstanceId()).removePlayer( | ||
381 | player.getObjectId()); | ||
382 | world.getWorldMap(worldId).getWorldMapInstanceById(1).addPlayer(player.getObjectId()); | ||
383 | } | ||
384 | world.setPosition(player, worldId, x, y, z, player.getHeading()); | ||
385 | } | 373 | } |
386 | } | 374 | } |
387 | 375 |
Download diff