Rename and clean up AbstractLoadedMapleLife
This commit is contained in:
@@ -23,7 +23,7 @@ package server.life;
|
||||
|
||||
import server.maps.AbstractAnimatedMapleMapObject;
|
||||
|
||||
public abstract class AbstractLoadedMapleLife extends AbstractAnimatedMapleMapObject {
|
||||
public abstract class AbstractLoadedLife extends AbstractAnimatedMapleMapObject {
|
||||
private final int id;
|
||||
private int f;
|
||||
private boolean hide;
|
||||
@@ -33,11 +33,11 @@ public abstract class AbstractLoadedMapleLife extends AbstractAnimatedMapleMapOb
|
||||
private int rx0;
|
||||
private int rx1;
|
||||
|
||||
public AbstractLoadedMapleLife(int id) {
|
||||
public AbstractLoadedLife(int id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public AbstractLoadedMapleLife(AbstractLoadedMapleLife life) {
|
||||
public AbstractLoadedLife(AbstractLoadedLife life) {
|
||||
this(life.getId());
|
||||
this.f = life.f;
|
||||
this.hide = life.hide;
|
||||
@@ -54,7 +54,7 @@ public class MapleLifeFactory {
|
||||
return ret;
|
||||
}
|
||||
|
||||
public static AbstractLoadedMapleLife getLife(int id, String type) {
|
||||
public static AbstractLoadedLife getLife(int id, String type) {
|
||||
if (type.equalsIgnoreCase("n")) {
|
||||
return getNPC(id);
|
||||
} else if (type.equalsIgnoreCase("m")) {
|
||||
|
||||
@@ -64,7 +64,7 @@ import java.util.concurrent.ScheduledFuture;
|
||||
import java.util.concurrent.atomic.AtomicInteger;
|
||||
import java.util.concurrent.atomic.AtomicLong;
|
||||
|
||||
public class MapleMonster extends AbstractLoadedMapleLife {
|
||||
public class MapleMonster extends AbstractLoadedLife {
|
||||
|
||||
private ChangeableStats ostats = null; //unused, v83 WZs offers no support for changeable stats.
|
||||
private MapleMonsterStats stats;
|
||||
|
||||
@@ -26,7 +26,7 @@ import server.MapleShopFactory;
|
||||
import server.maps.MapleMapObjectType;
|
||||
import tools.PacketCreator;
|
||||
|
||||
public class MapleNPC extends AbstractLoadedMapleLife {
|
||||
public class MapleNPC extends AbstractLoadedLife {
|
||||
private final MapleNPCStats stats;
|
||||
|
||||
public MapleNPC(int id, MapleNPCStats stats) {
|
||||
|
||||
@@ -109,7 +109,7 @@ public class MapleMapFactory {
|
||||
}
|
||||
|
||||
private static void loadLifeRaw(MapleMap map, int id, String type, int cy, int f, int fh, int rx0, int rx1, int x, int y, int hide, int mobTime, int team) {
|
||||
AbstractLoadedMapleLife myLife = loadLife(id, type, cy, f, fh, rx0, rx1, x, y, hide);
|
||||
AbstractLoadedLife myLife = loadLife(id, type, cy, f, fh, rx0, rx1, x, y, hide);
|
||||
if (myLife instanceof MapleMonster) {
|
||||
MapleMonster monster = (MapleMonster) myLife;
|
||||
|
||||
@@ -338,8 +338,8 @@ public class MapleMapFactory {
|
||||
return map;
|
||||
}
|
||||
|
||||
private static AbstractLoadedMapleLife loadLife(int id, String type, int cy, int f, int fh, int rx0, int rx1, int x, int y, int hide) {
|
||||
AbstractLoadedMapleLife myLife = MapleLifeFactory.getLife(id, type);
|
||||
private static AbstractLoadedLife loadLife(int id, String type, int cy, int f, int fh, int rx0, int rx1, int x, int y, int hide) {
|
||||
AbstractLoadedLife myLife = MapleLifeFactory.getLife(id, type);
|
||||
myLife.setCy(cy);
|
||||
myLife.setF(f);
|
||||
myLife.setFh(fh);
|
||||
|
||||
Reference in New Issue
Block a user