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

@@ -330,7 +330,7 @@ public class MapleParty {
MapleParty party = player.getParty();
if (party == null) {
if (player.getLevel() < 10 && !YamlConfig.config.server.USE_PARTY_FOR_STARTERS) {
player.announce(PacketCreator.partyStatusMessage(10));
player.sendPacket(PacketCreator.partyStatusMessage(10));
return false;
} else if (player.getAriantColiseum() != null) {
player.dropMessage(5, "You cannot request a party creation while participating the Ariant Battle Arena.");
@@ -347,12 +347,12 @@ public class MapleParty {
player.updatePartySearchAvailability(false);
player.partyOperationUpdate(party, null);
player.announce(PacketCreator.partyCreated(party, partyplayer.getId()));
player.sendPacket(PacketCreator.partyCreated(party, partyplayer.getId()));
return true;
} else {
if (!silentCheck) {
player.announce(PacketCreator.partyStatusMessage(16));
player.sendPacket(PacketCreator.partyStatusMessage(16));
}
return false;
@@ -380,15 +380,15 @@ public class MapleParty {
return true;
} else {
if (!silentCheck) {
player.announce(PacketCreator.partyStatusMessage(17));
player.sendPacket(PacketCreator.partyStatusMessage(17));
}
}
} else {
player.announce(PacketCreator.serverNotice(5, "You couldn't join the party since it had already been disbanded."));
player.sendPacket(PacketCreator.serverNotice(5, "You couldn't join the party since it had already been disbanded."));
}
} else {
if (!silentCheck) {
player.announce(PacketCreator.serverNotice(5, "You can't join the party as you are already in one."));
player.sendPacket(PacketCreator.serverNotice(5, "You can't join the party as you are already in one."));
}
}