Migrate last set of calls to FilePrinter, delete FilePrinter
This commit is contained in:
@@ -30,10 +30,11 @@ import constants.game.GameConstants;
|
||||
import constants.id.ItemId;
|
||||
import constants.inventory.ItemConstants;
|
||||
import net.packet.InPacket;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import server.ItemInformationProvider;
|
||||
import server.MakerItemFactory;
|
||||
import server.MakerItemFactory.MakerItemCreateEntry;
|
||||
import tools.FilePrinter;
|
||||
import tools.PacketCreator;
|
||||
import tools.Pair;
|
||||
|
||||
@@ -46,7 +47,7 @@ import java.util.Map;
|
||||
* @author Ronan
|
||||
*/
|
||||
public class MakerProcessor {
|
||||
|
||||
private static final Logger log = LoggerFactory.getLogger(MakerProcessor.class);
|
||||
private static final ItemInformationProvider ii = ItemInformationProvider.getInstance();
|
||||
|
||||
public static void makerAction(InPacket p, Client c) {
|
||||
@@ -150,7 +151,7 @@ public class MakerProcessor {
|
||||
|
||||
switch (createStatus) {
|
||||
case -1:// non-available for Maker itemid has been tried to forge
|
||||
FilePrinter.printError(FilePrinter.EXPLOITS, "Player " + c.getPlayer().getName() + " tried to craft itemid " + toCreate + " using the Maker skill.");
|
||||
log.warn("Chr {} tried to craft itemid {} using the Maker skill.", c.getPlayer().getName(), toCreate);
|
||||
c.sendPacket(PacketCreator.serverNotice(1, "The requested item could not be crafted on this operation."));
|
||||
c.sendPacket(PacketCreator.makerEnableActions());
|
||||
break;
|
||||
|
||||
@@ -36,11 +36,12 @@ import config.YamlConfig;
|
||||
import constants.id.ItemId;
|
||||
import constants.inventory.ItemConstants;
|
||||
import net.server.channel.Channel;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import server.DueyPackage;
|
||||
import server.ItemInformationProvider;
|
||||
import server.Trade;
|
||||
import tools.DatabaseConnection;
|
||||
import tools.FilePrinter;
|
||||
import tools.PacketCreator;
|
||||
import tools.Pair;
|
||||
|
||||
@@ -54,6 +55,7 @@ import java.util.List;
|
||||
* @author RonanLana - synchronization of Duey modules
|
||||
*/
|
||||
public class DueyProcessor {
|
||||
private static final Logger log = LoggerFactory.getLogger(DueyProcessor.class);
|
||||
|
||||
public enum Actions {
|
||||
TOSERVER_RECV_ITEM(0x00),
|
||||
@@ -204,7 +206,7 @@ public class DueyProcessor {
|
||||
|
||||
int updateRows = ps.executeUpdate();
|
||||
if (updateRows < 1) {
|
||||
FilePrinter.printError(FilePrinter.INSERT_CHAR, "Error trying to create package [mesos: " + mesos + ", " + sender + ", quick: " + quick + ", to CharacterId: " + toCid + "]");
|
||||
log.error("Error trying to create package [mesos: {}, sender: {}, quick: {}, receiver chrId: {}]", mesos, sender, quick, toCid);
|
||||
return -1;
|
||||
}
|
||||
|
||||
@@ -213,7 +215,7 @@ public class DueyProcessor {
|
||||
if (rs.next()) {
|
||||
packageId = rs.getInt(1);
|
||||
} else {
|
||||
FilePrinter.printError(FilePrinter.INSERT_CHAR, "Failed inserting package [mesos: " + mesos + ", " + sender + ", quick: " + quick + ", to CharacterId: " + toCid + "]");
|
||||
log.error("Failed inserting package [mesos: {}, sender: {}, quick: {}, receiver chrId: {}]", mesos, sender, quick, toCid);
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
@@ -287,7 +289,7 @@ public class DueyProcessor {
|
||||
fee += 5000;
|
||||
} else if (!c.getPlayer().haveItem(ItemId.QUICK_DELIVERY_TICKET)) {
|
||||
AutobanFactory.PACKET_EDIT.alert(c.getPlayer(), c.getPlayer().getName() + " tried to packet edit with Quick Delivery on duey.");
|
||||
FilePrinter.printError(FilePrinter.EXPLOITS + c.getPlayer().getName() + ".txt", c.getPlayer().getName() + " tried to use duey with Quick Delivery, mesos " + sendMesos + " and amount " + amount);
|
||||
log.warn("Chr {} tried to use duey with Quick Delivery without a ticket, mesos {} and amount {}", c.getPlayer().getName(), sendMesos, amount);
|
||||
c.disconnect(true, false);
|
||||
return;
|
||||
}
|
||||
@@ -295,7 +297,7 @@ public class DueyProcessor {
|
||||
long finalcost = (long) sendMesos + fee;
|
||||
if (finalcost < 0 || finalcost > Integer.MAX_VALUE || (amount < 1 && sendMesos == 0)) {
|
||||
AutobanFactory.PACKET_EDIT.alert(c.getPlayer(), c.getPlayer().getName() + " tried to packet edit with duey.");
|
||||
FilePrinter.printError(FilePrinter.EXPLOITS + c.getPlayer().getName() + ".txt", c.getPlayer().getName() + " tried to use duey with mesos " + sendMesos + " and amount " + amount);
|
||||
log.warn("Chr {} tried to use duey with mesos {} and amount {}", c.getPlayer().getName(), sendMesos, amount);
|
||||
c.disconnect(true, false);
|
||||
return;
|
||||
}
|
||||
@@ -394,7 +396,7 @@ public class DueyProcessor {
|
||||
|
||||
if (dp == null) {
|
||||
c.sendPacket(PacketCreator.sendDueyMSG(Actions.TOCLIENT_RECV_UNKNOWN_ERROR.getCode()));
|
||||
FilePrinter.printError(FilePrinter.EXPLOITS + c.getPlayer().getName() + ".txt", c.getPlayer().getName() + " tried to receive package from duey with id " + packageId);
|
||||
log.warn("Chr {} tried to receive package from duey with id {}", c.getPlayer().getName(), packageId);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -30,13 +30,15 @@ import client.SkillFactory;
|
||||
import client.autoban.AutobanFactory;
|
||||
import constants.game.GameConstants;
|
||||
import constants.skills.Aran;
|
||||
import tools.FilePrinter;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import tools.PacketCreator;
|
||||
|
||||
/**
|
||||
* @author RonanLana - synchronization of SP transaction modules
|
||||
*/
|
||||
public class AssignSPProcessor {
|
||||
private static final Logger log = LoggerFactory.getLogger(AssignSPProcessor.class);
|
||||
|
||||
public static boolean canSPAssign(Client c, int skillid) {
|
||||
if (skillid == Aran.HIDDEN_FULL_DOUBLE || skillid == Aran.HIDDEN_FULL_TRIPLE || skillid == Aran.HIDDEN_OVER_DOUBLE || skillid == Aran.HIDDEN_OVER_TRIPLE) {
|
||||
@@ -47,7 +49,7 @@ public class AssignSPProcessor {
|
||||
Character player = c.getPlayer();
|
||||
if ((!GameConstants.isPqSkillMap(player.getMapId()) && GameConstants.isPqSkill(skillid)) || (!player.isGM() && GameConstants.isGMSkills(skillid)) || (!GameConstants.isInJobTree(skillid, player.getJob().getId()) && !player.isGM())) {
|
||||
AutobanFactory.PACKET_EDIT.alert(player, "tried to packet edit in distributing sp.");
|
||||
FilePrinter.printError(FilePrinter.EXPLOITS + c.getPlayer().getName() + ".txt", c.getPlayer().getName() + " tried to use skill " + skillid + " without it being in their job.");
|
||||
log.warn("Chr {} tried to use skill {} without it being in their job.", c.getPlayer().getName(), skillid);
|
||||
|
||||
c.disconnect(true, false);
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user