Rename and clean up MapleNPC

This commit is contained in:
P0nk
2021-09-09 22:09:31 +02:00
parent 3aa455a757
commit e48c25a200
11 changed files with 29 additions and 29 deletions

View File

@@ -26,9 +26,9 @@ package client.command.commands.gm2;
import client.Character;
import client.Client;
import client.command.Command;
import server.life.MapleNPC;
import server.life.MaplePlayerNPC;
import server.life.Monster;
import server.life.NPC;
import server.maps.MapleMapObject;
import java.util.HashSet;
@@ -43,13 +43,13 @@ public class WhereaMiCommand extends Command {
Character player = c.getPlayer();
HashSet<Character> chars = new HashSet<>();
HashSet<MapleNPC> npcs = new HashSet<>();
HashSet<NPC> npcs = new HashSet<>();
HashSet<MaplePlayerNPC> playernpcs = new HashSet<>();
HashSet<Monster> mobs = new HashSet<>();
for (MapleMapObject mmo : player.getMap().getMapObjects()) {
if (mmo instanceof MapleNPC) {
MapleNPC npc = (MapleNPC) mmo;
if (mmo instanceof NPC) {
NPC npc = (NPC) mmo;
npcs.add(npc);
} else if (mmo instanceof Character) {
Character mc = (Character) mmo;
@@ -81,7 +81,7 @@ public class WhereaMiCommand extends Command {
if (!npcs.isEmpty()) {
player.yellowMessage("NPCs on this map:");
for (MapleNPC npc : npcs) {
for (NPC npc : npcs) {
player.dropMessage(5, ">> " + npc.getName() + " - " + npc.getId() + " - Oid: " + npc.getObjectId());
}
}

View File

@@ -27,7 +27,7 @@ import client.Character;
import client.Client;
import client.command.Command;
import server.life.LifeFactory;
import server.life.MapleNPC;
import server.life.NPC;
import tools.PacketCreator;
public class NpcCommand extends Command {
@@ -42,7 +42,7 @@ public class NpcCommand extends Command {
player.yellowMessage("Syntax: !npc <npcid>");
return;
}
MapleNPC npc = LifeFactory.getNPC(Integer.parseInt(params[0]));
NPC npc = LifeFactory.getNPC(Integer.parseInt(params[0]));
if (npc != null) {
npc.setPosition(player.getPosition());
npc.setCy(player.getPosition().y);

View File

@@ -28,7 +28,7 @@ import client.Client;
import client.command.Command;
import net.server.channel.Channel;
import server.life.LifeFactory;
import server.life.MapleNPC;
import server.life.NPC;
import server.maps.MapleMap;
import tools.DatabaseConnection;
import tools.PacketCreator;
@@ -59,7 +59,7 @@ public class PnpcCommand extends Command {
return;
}
MapleNPC npc = LifeFactory.getNPC(npcId);
NPC npc = LifeFactory.getNPC(npcId);
Point checkpos = player.getMap().getGroundBelow(player.getPosition());
int xpos = checkpos.x;