Rename and clean up MaplePlayerNPCPositioner
This commit is contained in:
@@ -30,8 +30,8 @@ import constants.game.GameConstants;
|
|||||||
import net.server.Server;
|
import net.server.Server;
|
||||||
import net.server.channel.Channel;
|
import net.server.channel.Channel;
|
||||||
import net.server.world.World;
|
import net.server.world.World;
|
||||||
import server.life.positioner.MaplePlayerNPCPositioner;
|
|
||||||
import server.life.positioner.PlayerNPCPodium;
|
import server.life.positioner.PlayerNPCPodium;
|
||||||
|
import server.life.positioner.PlayerNPCPositioner;
|
||||||
import server.maps.AbstractMapleMapObject;
|
import server.maps.AbstractMapleMapObject;
|
||||||
import server.maps.MapleMap;
|
import server.maps.MapleMap;
|
||||||
import server.maps.MapleMapObject;
|
import server.maps.MapleMapObject;
|
||||||
@@ -391,7 +391,7 @@ public class MaplePlayerNPC extends AbstractMapleMapObject {
|
|||||||
if (GameConstants.isPodiumHallOfFameMap(map.getId())) {
|
if (GameConstants.isPodiumHallOfFameMap(map.getId())) {
|
||||||
pos = PlayerNPCPodium.getNextPlayerNpcPosition(map);
|
pos = PlayerNPCPodium.getNextPlayerNpcPosition(map);
|
||||||
} else {
|
} else {
|
||||||
pos = MaplePlayerNPCPositioner.getNextPlayerNpcPosition(map);
|
pos = PlayerNPCPositioner.getNextPlayerNpcPosition(map);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pos == null) {
|
if (pos == null) {
|
||||||
|
|||||||
@@ -35,11 +35,9 @@ import java.util.LinkedList;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* @author RonanLana
|
* @author RonanLana
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
public class MaplePlayerNPCPositioner {
|
public class PlayerNPCPositioner {
|
||||||
|
|
||||||
private static boolean isPlayerNpcNearby(List<Point> otherPos, Point searchPos, int xLimit, int yLimit) {
|
private static boolean isPlayerNpcNearby(List<Point> otherPos, Point searchPos, int xLimit, int yLimit) {
|
||||||
int xLimit2 = xLimit / 2, yLimit2 = yLimit / 2;
|
int xLimit2 = xLimit / 2, yLimit2 = yLimit / 2;
|
||||||
@@ -136,7 +134,9 @@ public class MaplePlayerNPCPositioner {
|
|||||||
|
|
||||||
private static Point reorganizePlayerNpcs(MapleMap map, int newStep, List<MapleMapObject> mmoList) {
|
private static Point reorganizePlayerNpcs(MapleMap map, int newStep, List<MapleMapObject> mmoList) {
|
||||||
if (!mmoList.isEmpty()) {
|
if (!mmoList.isEmpty()) {
|
||||||
if(YamlConfig.config.server.USE_DEBUG) System.out.println("Reorganizing pnpc map, step " + newStep);
|
if (YamlConfig.config.server.USE_DEBUG) {
|
||||||
|
System.out.println("Reorganizing pnpc map, step " + newStep);
|
||||||
|
}
|
||||||
|
|
||||||
List<MaplePlayerNPC> playerNpcs = new ArrayList<>(mmoList.size());
|
List<MaplePlayerNPC> playerNpcs = new ArrayList<>(mmoList.size());
|
||||||
for (MapleMapObject mmo : mmoList) {
|
for (MapleMapObject mmo : mmoList) {
|
||||||
Reference in New Issue
Block a user