Rename and clean up MapleLifeFactory

This commit is contained in:
P0nk
2021-09-09 22:04:57 +02:00
parent 1f349d1dae
commit 38c700ca48
113 changed files with 309 additions and 308 deletions

View File

@@ -26,7 +26,7 @@ package client.command.commands.gm4;
import client.Character;
import client.Client;
import client.command.Command;
import server.life.MapleLifeFactory;
import server.life.LifeFactory;
import server.life.MapleMonster;
public class CakeCommand extends Command {
@@ -37,7 +37,7 @@ public class CakeCommand extends Command {
@Override
public void execute(Client c, String[] params) {
Character player = c.getPlayer();
MapleMonster monster = MapleLifeFactory.getMonster(9400606);
MapleMonster monster = LifeFactory.getMonster(9400606);
if (params.length == 1) {
double mobHp = Double.parseDouble(params[0]);
int newHp = (mobHp <= 0) ? Integer.MAX_VALUE : ((mobHp > Integer.MAX_VALUE) ? Integer.MAX_VALUE : (int) mobHp);

View File

@@ -26,7 +26,7 @@ package client.command.commands.gm4;
import client.Character;
import client.Client;
import client.command.Command;
import server.life.MapleLifeFactory;
import server.life.LifeFactory;
public class PapCommand extends Command {
{
@@ -38,6 +38,6 @@ public class PapCommand extends Command {
Character player = c.getPlayer();
// thanks Conrad for noticing mobid typo here
player.getMap().spawnMonsterOnGroundBelow(MapleLifeFactory.getMonster(8500001), player.getPosition());
player.getMap().spawnMonsterOnGroundBelow(LifeFactory.getMonster(8500001), player.getPosition());
}
}

View File

@@ -26,7 +26,7 @@ package client.command.commands.gm4;
import client.Character;
import client.Client;
import client.command.Command;
import server.life.MapleLifeFactory;
import server.life.LifeFactory;
public class PianusCommand extends Command {
{
@@ -36,6 +36,6 @@ public class PianusCommand extends Command {
@Override
public void execute(Client c, String[] params) {
Character player = c.getPlayer();
player.getMap().spawnMonsterOnGroundBelow(MapleLifeFactory.getMonster(8510000), player.getPosition());
player.getMap().spawnMonsterOnGroundBelow(LifeFactory.getMonster(8510000), player.getPosition());
}
}

View File

@@ -26,7 +26,7 @@ package client.command.commands.gm4;
import client.Character;
import client.Client;
import client.command.Command;
import server.life.MapleLifeFactory;
import server.life.LifeFactory;
public class PinkbeanCommand extends Command {
{
@@ -36,7 +36,7 @@ public class PinkbeanCommand extends Command {
@Override
public void execute(Client c, String[] params) {
Character player = c.getPlayer();
player.getMap().spawnMonsterOnGroundBelow(MapleLifeFactory.getMonster(8820001), player.getPosition());
player.getMap().spawnMonsterOnGroundBelow(LifeFactory.getMonster(8820001), player.getPosition());
}
}

View File

@@ -27,7 +27,7 @@ import client.Character;
import client.Client;
import client.command.Command;
import net.server.channel.Channel;
import server.life.MapleLifeFactory;
import server.life.LifeFactory;
import server.life.MapleMonster;
import server.maps.MapleMap;
import tools.DatabaseConnection;
@@ -60,7 +60,7 @@ public class PmobCommand extends Command {
int ypos = checkpos.y;
int fh = player.getMap().getFootholds().findBelow(checkpos).getId();
MapleMonster mob = MapleLifeFactory.getMonster(mobId);
MapleMonster mob = LifeFactory.getMonster(mobId);
if (mob != null && !mob.getName().equals("MISSINGNO")) {
mob.setPosition(checkpos);
mob.setCy(ypos);

View File

@@ -27,7 +27,7 @@ import client.Character;
import client.Client;
import client.command.Command;
import net.server.channel.Channel;
import server.life.MapleLifeFactory;
import server.life.LifeFactory;
import server.life.MapleNPC;
import server.maps.MapleMap;
import tools.DatabaseConnection;
@@ -59,7 +59,7 @@ public class PnpcCommand extends Command {
return;
}
MapleNPC npc = MapleLifeFactory.getNPC(npcId);
MapleNPC npc = LifeFactory.getNPC(npcId);
Point checkpos = player.getMap().getGroundBelow(player.getPosition());
int xpos = checkpos.x;
@@ -85,7 +85,7 @@ public class PnpcCommand extends Command {
ps.executeUpdate();
for (Channel ch : player.getWorldServer().getChannels()) {
npc = MapleLifeFactory.getNPC(npcId);
npc = LifeFactory.getNPC(npcId);
npc.setPosition(checkpos);
npc.setCy(ypos);
npc.setRx0(xpos + 50);

View File

@@ -26,7 +26,7 @@ package client.command.commands.gm4;
import client.Character;
import client.Client;
import client.command.Command;
import server.life.MapleLifeFactory;
import server.life.LifeFactory;
public class ZakumCommand extends Command {
{
@@ -36,9 +36,9 @@ public class ZakumCommand extends Command {
@Override
public void execute(Client c, String[] params) {
Character player = c.getPlayer();
player.getMap().spawnFakeMonsterOnGroundBelow(MapleLifeFactory.getMonster(8800000), player.getPosition());
player.getMap().spawnFakeMonsterOnGroundBelow(LifeFactory.getMonster(8800000), player.getPosition());
for (int x = 8800003; x < 8800011; x++) {
player.getMap().spawnMonsterOnGroundBelow(MapleLifeFactory.getMonster(x), player.getPosition());
player.getMap().spawnMonsterOnGroundBelow(LifeFactory.getMonster(x), player.getPosition());
}
}
}