Character delete patch
Removed an exploit where characters of different accounts could be deleted by a logging account session. Issue pointed out by zera.
This commit is contained in:
@@ -34,9 +34,12 @@ 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");
|
||||
c.announce(MaplePacketCreator.deleteCharResponse(cid, 0));
|
||||
c.deleteCharacter(cid);
|
||||
if(c.deleteCharacter(cid)) {
|
||||
FilePrinter.printError(FilePrinter.DELETED_CHARACTERS + c.getAccountName() + ".txt", c.getAccountName() + " deleted CID: " + cid + "\r\n");
|
||||
c.announce(MaplePacketCreator.deleteCharResponse(cid, 0));
|
||||
} else {
|
||||
c.announce(MaplePacketCreator.deleteCharResponse(cid, 0x14));
|
||||
}
|
||||
} else {
|
||||
c.announce(MaplePacketCreator.deleteCharResponse(cid, 0x14));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user