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:
@@ -40,26 +40,26 @@ public class MapScriptMethods extends AbstractPlayerInteraction {
|
||||
switch (c.getPlayer().getMapId()) {
|
||||
case 913040100:
|
||||
lockUI();
|
||||
c.announce(PacketCreator.showIntro("Effect/Direction.img/cygnusJobTutorial/Scene0"));
|
||||
c.sendPacket(PacketCreator.showIntro("Effect/Direction.img/cygnusJobTutorial/Scene0"));
|
||||
break;
|
||||
case 913040101:
|
||||
c.announce(PacketCreator.showIntro("Effect/Direction.img/cygnusJobTutorial/Scene1"));
|
||||
c.sendPacket(PacketCreator.showIntro("Effect/Direction.img/cygnusJobTutorial/Scene1"));
|
||||
break;
|
||||
case 913040102:
|
||||
c.announce(PacketCreator.showIntro("Effect/Direction.img/cygnusJobTutorial/Scene2"));
|
||||
c.sendPacket(PacketCreator.showIntro("Effect/Direction.img/cygnusJobTutorial/Scene2"));
|
||||
break;
|
||||
case 913040103:
|
||||
c.announce(PacketCreator.showIntro("Effect/Direction.img/cygnusJobTutorial/Scene3"));
|
||||
c.sendPacket(PacketCreator.showIntro("Effect/Direction.img/cygnusJobTutorial/Scene3"));
|
||||
break;
|
||||
case 913040104:
|
||||
c.announce(PacketCreator.showIntro("Effect/Direction.img/cygnusJobTutorial/Scene4"));
|
||||
c.sendPacket(PacketCreator.showIntro("Effect/Direction.img/cygnusJobTutorial/Scene4"));
|
||||
break;
|
||||
case 913040105:
|
||||
c.announce(PacketCreator.showIntro("Effect/Direction.img/cygnusJobTutorial/Scene5"));
|
||||
c.sendPacket(PacketCreator.showIntro("Effect/Direction.img/cygnusJobTutorial/Scene5"));
|
||||
break;
|
||||
case 913040106:
|
||||
lockUI();
|
||||
c.announce(PacketCreator.showIntro("Effect/Direction.img/cygnusJobTutorial/Scene6"));
|
||||
c.sendPacket(PacketCreator.showIntro("Effect/Direction.img/cygnusJobTutorial/Scene6"));
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -68,20 +68,20 @@ public class MapScriptMethods extends AbstractPlayerInteraction {
|
||||
switch (c.getPlayer().getMapId()) {
|
||||
case 914090010:
|
||||
lockUI();
|
||||
c.announce(PacketCreator.showIntro("Effect/Direction1.img/aranTutorial/Scene0"));
|
||||
c.sendPacket(PacketCreator.showIntro("Effect/Direction1.img/aranTutorial/Scene0"));
|
||||
break;
|
||||
case 914090011:
|
||||
c.announce(PacketCreator.showIntro("Effect/Direction1.img/aranTutorial/Scene1" + c.getPlayer().getGender()));
|
||||
c.sendPacket(PacketCreator.showIntro("Effect/Direction1.img/aranTutorial/Scene1" + c.getPlayer().getGender()));
|
||||
break;
|
||||
case 914090012:
|
||||
c.announce(PacketCreator.showIntro("Effect/Direction1.img/aranTutorial/Scene2" + c.getPlayer().getGender()));
|
||||
c.sendPacket(PacketCreator.showIntro("Effect/Direction1.img/aranTutorial/Scene2" + c.getPlayer().getGender()));
|
||||
break;
|
||||
case 914090013:
|
||||
c.announce(PacketCreator.showIntro("Effect/Direction1.img/aranTutorial/Scene3"));
|
||||
c.sendPacket(PacketCreator.showIntro("Effect/Direction1.img/aranTutorial/Scene3"));
|
||||
break;
|
||||
case 914090100:
|
||||
lockUI();
|
||||
c.announce(PacketCreator.showIntro("Effect/Direction1.img/aranTutorial/HandedPoleArm" + c.getPlayer().getGender()));
|
||||
c.sendPacket(PacketCreator.showIntro("Effect/Direction1.img/aranTutorial/HandedPoleArm" + c.getPlayer().getGender()));
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -89,30 +89,30 @@ public class MapScriptMethods extends AbstractPlayerInteraction {
|
||||
public void startExplorerExperience() {
|
||||
if (c.getPlayer().getMapId() == 1020100) //Swordman
|
||||
{
|
||||
c.announce(PacketCreator.showIntro("Effect/Direction3.img/swordman/Scene" + c.getPlayer().getGender()));
|
||||
c.sendPacket(PacketCreator.showIntro("Effect/Direction3.img/swordman/Scene" + c.getPlayer().getGender()));
|
||||
} else if (c.getPlayer().getMapId() == 1020200) //Magician
|
||||
{
|
||||
c.announce(PacketCreator.showIntro("Effect/Direction3.img/magician/Scene" + c.getPlayer().getGender()));
|
||||
c.sendPacket(PacketCreator.showIntro("Effect/Direction3.img/magician/Scene" + c.getPlayer().getGender()));
|
||||
} else if (c.getPlayer().getMapId() == 1020300) //Archer
|
||||
{
|
||||
c.announce(PacketCreator.showIntro("Effect/Direction3.img/archer/Scene" + c.getPlayer().getGender()));
|
||||
c.sendPacket(PacketCreator.showIntro("Effect/Direction3.img/archer/Scene" + c.getPlayer().getGender()));
|
||||
} else if (c.getPlayer().getMapId() == 1020400) //Rogue
|
||||
{
|
||||
c.announce(PacketCreator.showIntro("Effect/Direction3.img/rogue/Scene" + c.getPlayer().getGender()));
|
||||
c.sendPacket(PacketCreator.showIntro("Effect/Direction3.img/rogue/Scene" + c.getPlayer().getGender()));
|
||||
} else if (c.getPlayer().getMapId() == 1020500) //Pirate
|
||||
{
|
||||
c.announce(PacketCreator.showIntro("Effect/Direction3.img/pirate/Scene" + c.getPlayer().getGender()));
|
||||
c.sendPacket(PacketCreator.showIntro("Effect/Direction3.img/pirate/Scene" + c.getPlayer().getGender()));
|
||||
}
|
||||
}
|
||||
|
||||
public void goAdventure() {
|
||||
lockUI();
|
||||
c.announce(PacketCreator.showIntro("Effect/Direction3.img/goAdventure/Scene" + c.getPlayer().getGender()));
|
||||
c.sendPacket(PacketCreator.showIntro("Effect/Direction3.img/goAdventure/Scene" + c.getPlayer().getGender()));
|
||||
}
|
||||
|
||||
public void goLith() {
|
||||
lockUI();
|
||||
c.announce(PacketCreator.showIntro("Effect/Direction3.img/goLith/Scene" + c.getPlayer().getGender()));
|
||||
c.sendPacket(PacketCreator.showIntro("Effect/Direction3.img/goLith/Scene" + c.getPlayer().getGender()));
|
||||
}
|
||||
|
||||
public void explorerQuest(short questid, String questName) {
|
||||
@@ -134,13 +134,13 @@ public class MapScriptMethods extends AbstractPlayerInteraction {
|
||||
if (status.equals(infoex)) {
|
||||
etm.append("Earned the ").append(questName).append(" title!");
|
||||
smp.append("You have earned the <").append(questName).append(">").append(rewardstring);
|
||||
getPlayer().announce(PacketCreator.getShowQuestCompletion(quest.getId()));
|
||||
getPlayer().sendPacket(PacketCreator.getShowQuestCompletion(quest.getId()));
|
||||
} else {
|
||||
getPlayer().announce(PacketCreator.earnTitleMessage(status + "/" + infoex + " regions explored."));
|
||||
getPlayer().sendPacket(PacketCreator.earnTitleMessage(status + "/" + infoex + " regions explored."));
|
||||
etm.append("Trying for the ").append(questName).append(" title.");
|
||||
smp.append("You made progress on the ").append(questName).append(" title. ").append(status).append("/").append(infoex);
|
||||
}
|
||||
getPlayer().announce(PacketCreator.earnTitleMessage(etm.toString()));
|
||||
getPlayer().sendPacket(PacketCreator.earnTitleMessage(etm.toString()));
|
||||
showInfoText(smp.toString());
|
||||
}
|
||||
|
||||
@@ -157,11 +157,11 @@ public class MapScriptMethods extends AbstractPlayerInteraction {
|
||||
}
|
||||
String status = Integer.toString(qs.getMedalProgress());
|
||||
getPlayer().announceUpdateQuest(DelayedQuestUpdate.UPDATE, qs, true);
|
||||
getPlayer().announce(PacketCreator.earnTitleMessage(status + "/5 Completed"));
|
||||
getPlayer().announce(PacketCreator.earnTitleMessage("The One Who's Touched the Sky title in progress."));
|
||||
getPlayer().sendPacket(PacketCreator.earnTitleMessage(status + "/5 Completed"));
|
||||
getPlayer().sendPacket(PacketCreator.earnTitleMessage("The One Who's Touched the Sky title in progress."));
|
||||
if (Integer.toString(qs.getMedalProgress()).equals(qs.getInfoEx(0))) {
|
||||
showInfoText("The One Who's Touched the Sky" + rewardstring);
|
||||
getPlayer().announce(PacketCreator.getShowQuestCompletion(quest.getId()));
|
||||
getPlayer().sendPacket(PacketCreator.getShowQuestCompletion(quest.getId()));
|
||||
} else {
|
||||
showInfoText("The One Who's Touched the Sky title in progress. " + status + "/5 Completed");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user