Migrate last set of calls to FilePrinter, delete FilePrinter
This commit is contained in:
@@ -27,16 +27,19 @@ import config.YamlConfig;
|
||||
import constants.id.NpcId;
|
||||
import net.AbstractPacketHandler;
|
||||
import net.packet.InPacket;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import scripting.npc.NPCScriptManager;
|
||||
import server.life.NPC;
|
||||
import server.life.PlayerNPC;
|
||||
import server.maps.MapObject;
|
||||
import tools.FilePrinter;
|
||||
import tools.PacketCreator;
|
||||
|
||||
public final class NPCTalkHandler extends AbstractPacketHandler {
|
||||
private static final Logger log = LoggerFactory.getLogger(NPCTalkHandler.class);
|
||||
|
||||
@Override
|
||||
public final void handlePacket(InPacket p, Client c) {
|
||||
public void handlePacket(InPacket p, Client c) {
|
||||
if (!c.getPlayer().isAlive()) {
|
||||
c.sendPacket(PacketCreator.enableActions());
|
||||
return;
|
||||
@@ -73,7 +76,7 @@ public final class NPCTalkHandler extends AbstractPacketHandler {
|
||||
boolean hasNpcScript = NPCScriptManager.getInstance().start(c, npc.getId(), oid, null);
|
||||
if (!hasNpcScript) {
|
||||
if (!npc.hasShop()) {
|
||||
FilePrinter.printError(FilePrinter.NPC_UNCODED, "NPC " + npc.getName() + "(" + npc.getId() + ") is not coded.");
|
||||
log.warn("NPC {} ({}) is not coded", npc.getName(), npc.getId());
|
||||
return;
|
||||
} else if (c.getPlayer().getShop() != null) {
|
||||
c.sendPacket(PacketCreator.enableActions());
|
||||
|
||||
Reference in New Issue
Block a user