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:
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user