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:
@@ -76,7 +76,7 @@ public class AriantColiseum {
|
||||
}
|
||||
|
||||
for (MapleCharacter mc : players) {
|
||||
mc.announce(PacketCreator.updateAriantPQRanking(score));
|
||||
mc.sendPacket(PacketCreator.updateAriantPQRanking(score));
|
||||
}
|
||||
|
||||
setAriantScoreBoard(TimerManager.getInstance().schedule(() -> showArenaResults(), pqTimerBoard));
|
||||
@@ -144,7 +144,7 @@ public class AriantColiseum {
|
||||
private void broadcastAriantScoreUpdate() {
|
||||
if (scoreDirty) {
|
||||
for (MapleCharacter chr : score.keySet()) {
|
||||
chr.announce(PacketCreator.updateAriantPQRanking(score));
|
||||
chr.sendPacket(PacketCreator.updateAriantPQRanking(score));
|
||||
}
|
||||
scoreDirty = false;
|
||||
}
|
||||
|
||||
@@ -374,12 +374,12 @@ public class MonsterCarnival {
|
||||
MapleCharacter mc = mpc.getPlayer();
|
||||
if (mc != null) {
|
||||
if (redWin) {
|
||||
mc.getClient().announce(PacketCreator.showEffect("quest/carnival/win"));
|
||||
mc.getClient().announce(PacketCreator.playSound("MobCarnival/Win"));
|
||||
mc.sendPacket(PacketCreator.showEffect("quest/carnival/win"));
|
||||
mc.sendPacket(PacketCreator.playSound("MobCarnival/Win"));
|
||||
mc.dispelDebuffs();
|
||||
} else {
|
||||
mc.getClient().announce(PacketCreator.showEffect("quest/carnival/lose"));
|
||||
mc.getClient().announce(PacketCreator.playSound("MobCarnival/Lose"));
|
||||
mc.sendPacket(PacketCreator.showEffect("quest/carnival/lose"));
|
||||
mc.sendPacket(PacketCreator.playSound("MobCarnival/Lose"));
|
||||
mc.dispelDebuffs();
|
||||
}
|
||||
}
|
||||
@@ -388,12 +388,12 @@ public class MonsterCarnival {
|
||||
MapleCharacter mc = mpc.getPlayer();
|
||||
if (mc != null) {
|
||||
if (!redWin) {
|
||||
mc.getClient().announce(PacketCreator.showEffect("quest/carnival/win"));
|
||||
mc.getClient().announce(PacketCreator.playSound("MobCarnival/Win"));
|
||||
mc.sendPacket(PacketCreator.showEffect("quest/carnival/win"));
|
||||
mc.sendPacket(PacketCreator.playSound("MobCarnival/Win"));
|
||||
mc.dispelDebuffs();
|
||||
} else {
|
||||
mc.getClient().announce(PacketCreator.showEffect("quest/carnival/lose"));
|
||||
mc.getClient().announce(PacketCreator.playSound("MobCarnival/Lose"));
|
||||
mc.sendPacket(PacketCreator.showEffect("quest/carnival/lose"));
|
||||
mc.sendPacket(PacketCreator.playSound("MobCarnival/Lose"));
|
||||
mc.dispelDebuffs();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -112,7 +112,7 @@ public class MonsterCarnivalParty {
|
||||
final String effect = winner ? "quest/carnival/win" : "quest/carnival/lose";
|
||||
|
||||
for (final MapleCharacter chr : members) {
|
||||
chr.announce(PacketCreator.showEffect(effect));
|
||||
chr.sendPacket(PacketCreator.showEffect(effect));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user