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

@@ -151,8 +151,8 @@ public class Pyramid extends PartyQuest {
public void broadcastInfo(String info, int amount) {
for (MapleCharacter chr : getParticipants()) {
chr.announce(PacketCreator.getEnergy("massacre_" + info, amount));
chr.announce(PacketCreator.pyramidGauge(count));
chr.sendPacket(PacketCreator.getEnergy("massacre_" + info, amount));
chr.sendPacket(PacketCreator.pyramidGauge(count));
}
}
@@ -177,7 +177,7 @@ public class Pyramid extends PartyQuest {
skill++;
MapleItemInformationProvider ii = MapleItemInformationProvider.getInstance();
for (MapleCharacter chr : getParticipants()) {
chr.announce(PacketCreator.getEnergy("massacre_skill", skill));
chr.sendPacket(PacketCreator.getEnergy("massacre_skill", skill));
ii.getItemEffect(2022586).applyTo(chr);
}
} else if (buffcount == 2 && total >= 1000) {
@@ -185,7 +185,7 @@ public class Pyramid extends PartyQuest {
skill++;
MapleItemInformationProvider ii = MapleItemInformationProvider.getInstance();
for (MapleCharacter chr : getParticipants()) {
chr.announce(PacketCreator.getEnergy("massacre_skill", skill));
chr.sendPacket(PacketCreator.getEnergy("massacre_skill", skill));
ii.getItemEffect(2022587).applyTo(chr);
}
} else if (buffcount == 3 && total >= 1500) {
@@ -196,7 +196,7 @@ public class Pyramid extends PartyQuest {
skill++;
MapleItemInformationProvider ii = MapleItemInformationProvider.getInstance();
for (MapleCharacter chr : getParticipants()) {
chr.announce(PacketCreator.getEnergy("massacre_skill", skill));
chr.sendPacket(PacketCreator.getEnergy("massacre_skill", skill));
ii.getItemEffect(2022588).applyTo(chr);
}
} else if (buffcount == 5 && total >= 2500) {
@@ -229,7 +229,7 @@ public class Pyramid extends PartyQuest {
exp += ((kill * 2) + (cool * 10));
}
chr.announce(PacketCreator.pyramidScore(rank, exp));
chr.sendPacket(PacketCreator.pyramidScore(rank, exp));
chr.gainExp(exp, true, true);
}
}