All packet creating methods now create Packet instead of byte[]

This commit got way too big...
- Remove deprecated methods for sending packets
- Favor OutPacket & Packet over MaplePacketLittleEndianWriter, LittleEndianWriter, and byte array
- Split up some packet creating methods into separate classes
This commit is contained in:
P0nk
2021-08-21 01:36:51 +02:00
parent b5cd6887ae
commit 8f6860d7d7
231 changed files with 6403 additions and 6927 deletions

View File

@@ -315,7 +315,7 @@ public class MapleQuest {
return false;
}
if (timeLimit > 0) {
chr.announce(PacketCreator.removeQuestTimeLimit(id));
chr.sendPacket(PacketCreator.removeQuestTimeLimit(id));
}
MapleQuestStatus newStatus = new MapleQuestStatus(this, MapleQuestStatus.Status.NOT_STARTED);
newStatus.setForfeited(chr.getQuest(this).getForfeited() + 1);
@@ -361,7 +361,7 @@ public class MapleQuest {
public boolean forceComplete(MapleCharacter chr, int npc) {
if (timeLimit > 0) {
chr.announce(PacketCreator.removeQuestTimeLimit(id));
chr.sendPacket(PacketCreator.removeQuestTimeLimit(id));
}
MapleQuestStatus newStatus = new MapleQuestStatus(this, MapleQuestStatus.Status.COMPLETED, npc);
@@ -370,7 +370,7 @@ public class MapleQuest {
newStatus.setCompletionTime(System.currentTimeMillis());
chr.updateQuestStatus(newStatus);
chr.announce(PacketCreator.showSpecialEffect(9)); // Quest completion
chr.sendPacket(PacketCreator.showSpecialEffect(9)); // Quest completion
chr.getMap().broadcastMessage(chr, PacketCreator.showForeignEffect(chr.getId(), 9), false); //use 9 instead of 12 for both
return true;
}