Rename and clean up AbstractLoadedMapleLife

This commit is contained in:
P0nk
2021-09-09 22:03:38 +02:00
parent 0ca463f70a
commit 1f349d1dae
5 changed files with 9 additions and 9 deletions

View File

@@ -23,7 +23,7 @@ package server.life;
import server.maps.AbstractAnimatedMapleMapObject; import server.maps.AbstractAnimatedMapleMapObject;
public abstract class AbstractLoadedMapleLife extends AbstractAnimatedMapleMapObject { public abstract class AbstractLoadedLife extends AbstractAnimatedMapleMapObject {
private final int id; private final int id;
private int f; private int f;
private boolean hide; private boolean hide;
@@ -33,11 +33,11 @@ public abstract class AbstractLoadedMapleLife extends AbstractAnimatedMapleMapOb
private int rx0; private int rx0;
private int rx1; private int rx1;
public AbstractLoadedMapleLife(int id) { public AbstractLoadedLife(int id) {
this.id = id; this.id = id;
} }
public AbstractLoadedMapleLife(AbstractLoadedMapleLife life) { public AbstractLoadedLife(AbstractLoadedLife life) {
this(life.getId()); this(life.getId());
this.f = life.f; this.f = life.f;
this.hide = life.hide; this.hide = life.hide;

View File

@@ -54,7 +54,7 @@ public class MapleLifeFactory {
return ret; return ret;
} }
public static AbstractLoadedMapleLife getLife(int id, String type) { public static AbstractLoadedLife getLife(int id, String type) {
if (type.equalsIgnoreCase("n")) { if (type.equalsIgnoreCase("n")) {
return getNPC(id); return getNPC(id);
} else if (type.equalsIgnoreCase("m")) { } else if (type.equalsIgnoreCase("m")) {

View File

@@ -64,7 +64,7 @@ import java.util.concurrent.ScheduledFuture;
import java.util.concurrent.atomic.AtomicInteger; import java.util.concurrent.atomic.AtomicInteger;
import java.util.concurrent.atomic.AtomicLong; 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 ChangeableStats ostats = null; //unused, v83 WZs offers no support for changeable stats.
private MapleMonsterStats stats; private MapleMonsterStats stats;

View File

@@ -26,7 +26,7 @@ import server.MapleShopFactory;
import server.maps.MapleMapObjectType; import server.maps.MapleMapObjectType;
import tools.PacketCreator; import tools.PacketCreator;
public class MapleNPC extends AbstractLoadedMapleLife { public class MapleNPC extends AbstractLoadedLife {
private final MapleNPCStats stats; private final MapleNPCStats stats;
public MapleNPC(int id, MapleNPCStats stats) { public MapleNPC(int id, MapleNPCStats stats) {

View File

@@ -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) { 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) { if (myLife instanceof MapleMonster) {
MapleMonster monster = (MapleMonster) myLife; MapleMonster monster = (MapleMonster) myLife;
@@ -338,8 +338,8 @@ public class MapleMapFactory {
return map; 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) { private static AbstractLoadedLife 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); AbstractLoadedLife myLife = MapleLifeFactory.getLife(id, type);
myLife.setCy(cy); myLife.setCy(cy);
myLife.setF(f); myLife.setF(f);
myLife.setFh(fh); myLife.setFh(fh);