Rename and clean up MapleLifeFactory
This commit is contained in:
@@ -26,7 +26,7 @@ package client.command.commands.gm3;
|
||||
import client.Character;
|
||||
import client.Client;
|
||||
import client.command.Command;
|
||||
import server.life.MapleLifeFactory;
|
||||
import server.life.LifeFactory;
|
||||
import server.life.MapleNPC;
|
||||
import tools.PacketCreator;
|
||||
|
||||
@@ -42,7 +42,7 @@ public class NpcCommand extends Command {
|
||||
player.yellowMessage("Syntax: !npc <npcid>");
|
||||
return;
|
||||
}
|
||||
MapleNPC npc = MapleLifeFactory.getNPC(Integer.parseInt(params[0]));
|
||||
MapleNPC npc = LifeFactory.getNPC(Integer.parseInt(params[0]));
|
||||
if (npc != null) {
|
||||
npc.setPosition(player.getPosition());
|
||||
npc.setCy(player.getPosition().y);
|
||||
|
||||
@@ -26,7 +26,7 @@ package client.command.commands.gm3;
|
||||
import client.Character;
|
||||
import client.Client;
|
||||
import client.command.Command;
|
||||
import server.life.MapleLifeFactory;
|
||||
import server.life.LifeFactory;
|
||||
import server.life.MapleMonster;
|
||||
|
||||
public class SpawnCommand extends Command {
|
||||
@@ -42,16 +42,16 @@ public class SpawnCommand extends Command {
|
||||
return;
|
||||
}
|
||||
|
||||
MapleMonster monster = MapleLifeFactory.getMonster(Integer.parseInt(params[0]));
|
||||
MapleMonster monster = LifeFactory.getMonster(Integer.parseInt(params[0]));
|
||||
if (monster == null) {
|
||||
return;
|
||||
}
|
||||
if (params.length == 2) {
|
||||
for (int i = 0; i < Integer.parseInt(params[1]); i++) {
|
||||
player.getMap().spawnMonsterOnGroundBelow(MapleLifeFactory.getMonster(Integer.parseInt(params[0])), player.getPosition());
|
||||
player.getMap().spawnMonsterOnGroundBelow(LifeFactory.getMonster(Integer.parseInt(params[0])), player.getPosition());
|
||||
}
|
||||
} else {
|
||||
player.getMap().spawnMonsterOnGroundBelow(MapleLifeFactory.getMonster(Integer.parseInt(params[0])), player.getPosition());
|
||||
player.getMap().spawnMonsterOnGroundBelow(LifeFactory.getMonster(Integer.parseInt(params[0])), player.getPosition());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user