Improved Delete Character

Improved the Delete Character feature, now aiming to clean all leftovers
of the character from the DB. Only works with the ENABLE_PIC flag
activated.
This commit is contained in:
ronancpl
2017-06-01 21:46:16 -03:00
parent a6ac40a351
commit fee0aa7e39
52 changed files with 352 additions and 93 deletions

View File

@@ -88,7 +88,7 @@ public final class CreateCharHandler extends AbstractMaplePacketHandler {
for (int i = 0; i < items.length; i++){
if (!isLegal(items[i])) {
AutobanFactory.PACKET_EDIT.alert(newchar, name + " tried to packet edit in character creation.");
FilePrinter.printError(FilePrinter.EXPLOITS + newchar + ".txt", "Tried to packet edit in char creation.");
FilePrinter.printError(FilePrinter.EXPLOITS + newchar + ".txt", "Tried to packet edit in char creation.");
c.disconnect(true, false);
return;
}

View File

@@ -34,7 +34,7 @@ public final class DeleteCharHandler extends AbstractMaplePacketHandler {
String pic = slea.readMapleAsciiString();
int cid = slea.readInt();
if (c.checkPic(pic)) {
FilePrinter.printError(FilePrinter.DELETED_CHARACTERS + c.getAccountName() + ".txt", c.getAccountName() + " deleted CID: " + cid + "\r\n");
FilePrinter.printError(FilePrinter.DELETED_CHARACTERS + c.getAccountName() + ".txt", c.getAccountName() + " deleted CID: " + cid + "\r\n");
c.announce(MaplePacketCreator.deleteCharResponse(cid, 0));
c.deleteCharacter(cid);
} else {

View File

@@ -16,10 +16,10 @@ public final class RegisterPicHandler extends AbstractMaplePacketHandler {
slea.readByte();
int charId = slea.readInt();
String macs = slea.readMapleAsciiString();
String hwid = slea.readMapleAsciiString();
String hwid = slea.readMapleAsciiString();
c.updateMacs(macs);
c.updateHWID(hwid);
c.updateHWID(hwid);
if (c.hasBannedMac() || c.hasBannedHWID()) {
c.getSession().close(true);