Remove "Maple" prefix from MaplePacketCreator name
This commit is contained in:
@@ -25,7 +25,7 @@ package server.events.gm;
|
||||
import client.MapleCharacter;
|
||||
import server.TimerManager;
|
||||
import server.maps.MapleMap;
|
||||
import tools.MaplePacketCreator;
|
||||
import tools.PacketCreator;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.LinkedList;
|
||||
@@ -55,9 +55,9 @@ public class MapleCoconut extends MapleEvent {
|
||||
for (int i = 0; i < 506; i++) {
|
||||
coconuts.add(new MapleCoconuts(i));
|
||||
}
|
||||
map.broadcastMessage(MaplePacketCreator.hitCoconut(true, 0, 0));
|
||||
map.broadcastMessage(PacketCreator.hitCoconut(true, 0, 0));
|
||||
setCoconutsHittable(true);
|
||||
map.broadcastMessage(MaplePacketCreator.getClock(300));
|
||||
map.broadcastMessage(PacketCreator.getClock(300));
|
||||
|
||||
TimerManager.getInstance().schedule(() -> {
|
||||
if (map.getId() == 109080000) {
|
||||
@@ -66,22 +66,22 @@ public class MapleCoconut extends MapleEvent {
|
||||
} else if (getMapleScore() > getStoryScore()) {
|
||||
for (MapleCharacter chr : map.getCharacters()) {
|
||||
if (chr.getTeam() == 0) {
|
||||
chr.getClient().announce(MaplePacketCreator.showEffect("event/coconut/victory"));
|
||||
chr.getClient().announce(MaplePacketCreator.playSound("Coconut/Victory"));
|
||||
chr.getClient().announce(PacketCreator.showEffect("event/coconut/victory"));
|
||||
chr.getClient().announce(PacketCreator.playSound("Coconut/Victory"));
|
||||
} else {
|
||||
chr.getClient().announce(MaplePacketCreator.showEffect("event/coconut/lose"));
|
||||
chr.getClient().announce(MaplePacketCreator.playSound("Coconut/Failed"));
|
||||
chr.getClient().announce(PacketCreator.showEffect("event/coconut/lose"));
|
||||
chr.getClient().announce(PacketCreator.playSound("Coconut/Failed"));
|
||||
}
|
||||
}
|
||||
warpOut();
|
||||
} else {
|
||||
for (MapleCharacter chr : map.getCharacters()) {
|
||||
if (chr.getTeam() == 1) {
|
||||
chr.getClient().announce(MaplePacketCreator.showEffect("event/coconut/victory"));
|
||||
chr.getClient().announce(MaplePacketCreator.playSound("Coconut/Victory"));
|
||||
chr.getClient().announce(PacketCreator.showEffect("event/coconut/victory"));
|
||||
chr.getClient().announce(PacketCreator.playSound("Coconut/Victory"));
|
||||
} else {
|
||||
chr.getClient().announce(MaplePacketCreator.showEffect("event/coconut/lose"));
|
||||
chr.getClient().announce(MaplePacketCreator.playSound("Coconut/Failed"));
|
||||
chr.getClient().announce(PacketCreator.showEffect("event/coconut/lose"));
|
||||
chr.getClient().announce(PacketCreator.playSound("Coconut/Failed"));
|
||||
}
|
||||
}
|
||||
warpOut();
|
||||
@@ -91,33 +91,33 @@ public class MapleCoconut extends MapleEvent {
|
||||
}
|
||||
|
||||
public void bonusTime() {
|
||||
map.broadcastMessage(MaplePacketCreator.getClock(120));
|
||||
map.broadcastMessage(PacketCreator.getClock(120));
|
||||
TimerManager.getInstance().schedule(() -> {
|
||||
if (getMapleScore() == getStoryScore()) {
|
||||
for (MapleCharacter chr : map.getCharacters()) {
|
||||
chr.getClient().announce(MaplePacketCreator.showEffect("event/coconut/lose"));
|
||||
chr.getClient().announce(MaplePacketCreator.playSound("Coconut/Failed"));
|
||||
chr.getClient().announce(PacketCreator.showEffect("event/coconut/lose"));
|
||||
chr.getClient().announce(PacketCreator.playSound("Coconut/Failed"));
|
||||
}
|
||||
warpOut();
|
||||
} else if (getMapleScore() > getStoryScore()) {
|
||||
for (MapleCharacter chr : map.getCharacters()) {
|
||||
if (chr.getTeam() == 0) {
|
||||
chr.getClient().announce(MaplePacketCreator.showEffect("event/coconut/victory"));
|
||||
chr.getClient().announce(MaplePacketCreator.playSound("Coconut/Victory"));
|
||||
chr.getClient().announce(PacketCreator.showEffect("event/coconut/victory"));
|
||||
chr.getClient().announce(PacketCreator.playSound("Coconut/Victory"));
|
||||
} else {
|
||||
chr.getClient().announce(MaplePacketCreator.showEffect("event/coconut/lose"));
|
||||
chr.getClient().announce(MaplePacketCreator.playSound("Coconut/Failed"));
|
||||
chr.getClient().announce(PacketCreator.showEffect("event/coconut/lose"));
|
||||
chr.getClient().announce(PacketCreator.playSound("Coconut/Failed"));
|
||||
}
|
||||
}
|
||||
warpOut();
|
||||
} else {
|
||||
for (MapleCharacter chr : map.getCharacters()) {
|
||||
if (chr.getTeam() == 1) {
|
||||
chr.getClient().announce(MaplePacketCreator.showEffect("event/coconut/victory"));
|
||||
chr.getClient().announce(MaplePacketCreator.playSound("Coconut/Victory"));
|
||||
chr.getClient().announce(PacketCreator.showEffect("event/coconut/victory"));
|
||||
chr.getClient().announce(PacketCreator.playSound("Coconut/Victory"));
|
||||
} else {
|
||||
chr.getClient().announce(MaplePacketCreator.showEffect("event/coconut/lose"));
|
||||
chr.getClient().announce(MaplePacketCreator.playSound("Coconut/Failed"));
|
||||
chr.getClient().announce(PacketCreator.showEffect("event/coconut/lose"));
|
||||
chr.getClient().announce(PacketCreator.playSound("Coconut/Failed"));
|
||||
}
|
||||
}
|
||||
warpOut();
|
||||
|
||||
@@ -24,7 +24,7 @@ package server.events.gm;
|
||||
|
||||
import client.MapleCharacter;
|
||||
import server.TimerManager;
|
||||
import tools.MaplePacketCreator;
|
||||
import tools.PacketCreator;
|
||||
|
||||
import java.util.concurrent.ScheduledFuture;
|
||||
|
||||
@@ -49,13 +49,13 @@ public class MapleFitness {
|
||||
|
||||
public void startFitness() {
|
||||
chr.getMap().startEvent();
|
||||
chr.getClient().announce(MaplePacketCreator.getClock(900));
|
||||
chr.getClient().announce(PacketCreator.getClock(900));
|
||||
this.timeStarted = System.currentTimeMillis();
|
||||
this.time = 900000;
|
||||
checkAndMessage();
|
||||
|
||||
chr.getMap().getPortal("join00").setPortalStatus(true);
|
||||
chr.getClient().announce(MaplePacketCreator.serverNotice(0, "The portal has now opened. Press the up arrow key at the portal to enter."));
|
||||
chr.getClient().announce(PacketCreator.serverNotice(0, "The portal has now opened. Press the up arrow key at the portal to enter."));
|
||||
}
|
||||
|
||||
public boolean isTimerStarted() {
|
||||
@@ -84,29 +84,29 @@ public class MapleFitness {
|
||||
}
|
||||
if (chr.getMap().getId() >= 109040000 && chr.getMap().getId() <= 109040004) {
|
||||
if (getTimeLeft() > 9000 && getTimeLeft() < 11000) {
|
||||
chr.getClient().announce(MaplePacketCreator.serverNotice(0, "You have 10 sec left. Those of you unable to beat the game, we hope you beat it next time! Great job everyone!! See you later~"));
|
||||
chr.getClient().announce(PacketCreator.serverNotice(0, "You have 10 sec left. Those of you unable to beat the game, we hope you beat it next time! Great job everyone!! See you later~"));
|
||||
} else if (getTimeLeft() > 99000 && getTimeLeft() < 101000) {
|
||||
chr.getClient().announce(MaplePacketCreator.serverNotice(0, "Alright, you don't have much time remaining. Please hurry up a little!"));
|
||||
chr.getClient().announce(PacketCreator.serverNotice(0, "Alright, you don't have much time remaining. Please hurry up a little!"));
|
||||
} else if (getTimeLeft() > 239000 && getTimeLeft() < 241000) {
|
||||
chr.getClient().announce(MaplePacketCreator.serverNotice(0, "The 4th stage is the last one for [The Maple Physical Fitness Test]. Please don't give up at the last minute and try your best. The reward is waiting for you at the very top!"));
|
||||
chr.getClient().announce(PacketCreator.serverNotice(0, "The 4th stage is the last one for [The Maple Physical Fitness Test]. Please don't give up at the last minute and try your best. The reward is waiting for you at the very top!"));
|
||||
} else if (getTimeLeft() > 299000 && getTimeLeft() < 301000) {
|
||||
chr.getClient().announce(MaplePacketCreator.serverNotice(0, "The 3rd stage offers traps where you may see them, but you won't be able to step on them. Please be careful of them as you make your way up."));
|
||||
chr.getClient().announce(PacketCreator.serverNotice(0, "The 3rd stage offers traps where you may see them, but you won't be able to step on them. Please be careful of them as you make your way up."));
|
||||
} else if (getTimeLeft() > 359000 && getTimeLeft() < 361000) {
|
||||
chr.getClient().announce(MaplePacketCreator.serverNotice(0, "For those who have heavy lags, please make sure to move slowly to avoid falling all the way down because of lags."));
|
||||
chr.getClient().announce(PacketCreator.serverNotice(0, "For those who have heavy lags, please make sure to move slowly to avoid falling all the way down because of lags."));
|
||||
} else if (getTimeLeft() > 499000 && getTimeLeft() < 501000) {
|
||||
chr.getClient().announce(MaplePacketCreator.serverNotice(0, "Please remember that if you die during the event, you'll be eliminated from the game. If you're running out of HP, either take a potion or recover HP first before moving on."));
|
||||
chr.getClient().announce(PacketCreator.serverNotice(0, "Please remember that if you die during the event, you'll be eliminated from the game. If you're running out of HP, either take a potion or recover HP first before moving on."));
|
||||
} else if (getTimeLeft() > 599000 && getTimeLeft() < 601000) {
|
||||
chr.getClient().announce(MaplePacketCreator.serverNotice(0, "The most important thing you'll need to know to avoid the bananas thrown by the monkeys is *Timing* Timing is everything in this!"));
|
||||
chr.getClient().announce(PacketCreator.serverNotice(0, "The most important thing you'll need to know to avoid the bananas thrown by the monkeys is *Timing* Timing is everything in this!"));
|
||||
} else if (getTimeLeft() > 659000 && getTimeLeft() < 661000) {
|
||||
chr.getClient().announce(MaplePacketCreator.serverNotice(0, "The 2nd stage offers monkeys throwing bananas. Please make sure to avoid them by moving along at just the right timing."));
|
||||
chr.getClient().announce(PacketCreator.serverNotice(0, "The 2nd stage offers monkeys throwing bananas. Please make sure to avoid them by moving along at just the right timing."));
|
||||
} else if (getTimeLeft() > 699000 && getTimeLeft() < 701000) {
|
||||
chr.getClient().announce(MaplePacketCreator.serverNotice(0, "Please remember that if you die during the event, you'll be eliminated from the game. You still have plenty of time left, so either take a potion or recover HP first before moving on."));
|
||||
chr.getClient().announce(PacketCreator.serverNotice(0, "Please remember that if you die during the event, you'll be eliminated from the game. You still have plenty of time left, so either take a potion or recover HP first before moving on."));
|
||||
} else if (getTimeLeft() > 779000 && getTimeLeft() < 781000) {
|
||||
chr.getClient().announce(MaplePacketCreator.serverNotice(0, "Everyone that clears [The Maple Physical Fitness Test] on time will be given an item, regardless of the order of finish, so just relax, take your time, and clear the 4 stages."));
|
||||
chr.getClient().announce(PacketCreator.serverNotice(0, "Everyone that clears [The Maple Physical Fitness Test] on time will be given an item, regardless of the order of finish, so just relax, take your time, and clear the 4 stages."));
|
||||
} else if (getTimeLeft() > 839000 && getTimeLeft() < 841000) {
|
||||
chr.getClient().announce(MaplePacketCreator.serverNotice(0, "There may be a heavy lag due to many users at stage 1 all at once. It won't be difficult, so please make sure not to fall down because of heavy lag."));
|
||||
chr.getClient().announce(PacketCreator.serverNotice(0, "There may be a heavy lag due to many users at stage 1 all at once. It won't be difficult, so please make sure not to fall down because of heavy lag."));
|
||||
} else if (getTimeLeft() > 869000 && getTimeLeft() < 871000) {
|
||||
chr.getClient().announce(MaplePacketCreator.serverNotice(0, "[MapleStory Physical Fitness Test] consists of 4 stages, and if you happen to die during the game, you'll be eliminated from the game, so please be careful of that."));
|
||||
chr.getClient().announce(PacketCreator.serverNotice(0, "[MapleStory Physical Fitness Test] consists of 4 stages, and if you happen to die during the game, you'll be eliminated from the game, so please be careful of that."));
|
||||
}
|
||||
} else {
|
||||
resetTimes();
|
||||
|
||||
@@ -23,7 +23,7 @@ package server.events.gm;
|
||||
|
||||
import client.MapleCharacter;
|
||||
import server.TimerManager;
|
||||
import tools.MaplePacketCreator;
|
||||
import tools.PacketCreator;
|
||||
|
||||
import java.util.concurrent.ScheduledFuture;
|
||||
|
||||
@@ -48,12 +48,12 @@ public class MapleOla {
|
||||
|
||||
public void startOla() { // TODO: Messages
|
||||
chr.getMap().startEvent();
|
||||
chr.getClient().announce(MaplePacketCreator.getClock(360));
|
||||
chr.getClient().announce(PacketCreator.getClock(360));
|
||||
this.timeStarted = System.currentTimeMillis();
|
||||
this.time = 360000;
|
||||
|
||||
chr.getMap().getPortal("join00").setPortalStatus(true);
|
||||
chr.getClient().announce(MaplePacketCreator.serverNotice(0, "The portal has now opened. Press the up arrow key at the portal to enter."));
|
||||
chr.getClient().announce(PacketCreator.serverNotice(0, "The portal has now opened. Press the up arrow key at the portal to enter."));
|
||||
}
|
||||
|
||||
public boolean isTimerStarted() {
|
||||
|
||||
@@ -28,7 +28,7 @@ import provider.MapleDataTool;
|
||||
import provider.wz.WZFiles;
|
||||
import server.TimerManager;
|
||||
import server.maps.MapleMap;
|
||||
import tools.MaplePacketCreator;
|
||||
import tools.PacketCreator;
|
||||
import tools.Randomizer;
|
||||
|
||||
import java.util.ArrayList;
|
||||
@@ -69,9 +69,9 @@ public final class MapleOxQuiz {
|
||||
}
|
||||
}
|
||||
final int number = gm;
|
||||
map.broadcastMessage(MaplePacketCreator.showOXQuiz(round, question, true));
|
||||
map.broadcastMessage(PacketCreator.showOXQuiz(round, question, true));
|
||||
TimerManager.getInstance().schedule(() -> {
|
||||
map.broadcastMessage(MaplePacketCreator.showOXQuiz(round, question, true));
|
||||
map.broadcastMessage(PacketCreator.showOXQuiz(round, question, true));
|
||||
List<MapleCharacter> chars = new ArrayList<>(map.getCharacters());
|
||||
|
||||
for (MapleCharacter chr : chars) {
|
||||
@@ -92,7 +92,7 @@ public final class MapleOxQuiz {
|
||||
}
|
||||
//send question
|
||||
if (map.getCharacters().size() - number <= 2) {
|
||||
map.broadcastMessage(MaplePacketCreator.serverNotice(6, "The event has ended"));
|
||||
map.broadcastMessage(PacketCreator.serverNotice(6, "The event has ended"));
|
||||
map.getPortal("join00").setPortalStatus(true);
|
||||
map.setOx(null);
|
||||
map.setOxQuiz(false);
|
||||
|
||||
@@ -24,7 +24,7 @@ package server.events.gm;
|
||||
import client.MapleCharacter;
|
||||
import server.TimerManager;
|
||||
import server.maps.MapleMap;
|
||||
import tools.MaplePacketCreator;
|
||||
import tools.PacketCreator;
|
||||
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
@@ -58,8 +58,8 @@ public class MapleSnowball {
|
||||
|
||||
for (MapleCharacter chr : characters) {
|
||||
if (chr != null) {
|
||||
chr.announce(MaplePacketCreator.rollSnowBall(false, 1, map.getSnowball(0), map.getSnowball(1)));
|
||||
chr.announce(MaplePacketCreator.getClock(600));
|
||||
chr.announce(PacketCreator.rollSnowBall(false, 1, map.getSnowball(0), map.getSnowball(1)));
|
||||
chr.announce(PacketCreator.getClock(600));
|
||||
}
|
||||
}
|
||||
hittable = true;
|
||||
@@ -67,13 +67,13 @@ public class MapleSnowball {
|
||||
if (map.getSnowball(team).getPosition() > map.getSnowball(team == 0 ? 1 : 0).getPosition()) {
|
||||
for (MapleCharacter chr : characters) {
|
||||
if (chr != null)
|
||||
chr.announce(MaplePacketCreator.rollSnowBall(false, 3, map.getSnowball(0), map.getSnowball(0)));
|
||||
chr.announce(PacketCreator.rollSnowBall(false, 3, map.getSnowball(0), map.getSnowball(0)));
|
||||
}
|
||||
winner = true;
|
||||
} else if (map.getSnowball(team == 0 ? 1 : 0).getPosition() > map.getSnowball(team).getPosition()) {
|
||||
for (MapleCharacter chr : characters) {
|
||||
if (chr != null)
|
||||
chr.announce(MaplePacketCreator.rollSnowBall(false, 4, map.getSnowball(0), map.getSnowball(0)));
|
||||
chr.announce(PacketCreator.rollSnowBall(false, 4, map.getSnowball(0), map.getSnowball(0)));
|
||||
}
|
||||
winner = true;
|
||||
} //Else
|
||||
@@ -116,7 +116,7 @@ public class MapleSnowball {
|
||||
}, 10000);
|
||||
} else
|
||||
this.snowmanhp -= damage;
|
||||
map.broadcastMessage(MaplePacketCreator.rollSnowBall(false, 1, map.getSnowball(0), map.getSnowball(1)));
|
||||
map.broadcastMessage(PacketCreator.rollSnowBall(false, 1, map.getSnowball(0), map.getSnowball(1)));
|
||||
}
|
||||
|
||||
if (this.hits == 0) {
|
||||
@@ -129,16 +129,16 @@ public class MapleSnowball {
|
||||
map.getSnowball(team == 0 ? 1 : 0).message(3);
|
||||
|
||||
this.hits = 3;
|
||||
map.broadcastMessage(MaplePacketCreator.rollSnowBall(false, 0, map.getSnowball(0), map.getSnowball(1)));
|
||||
map.broadcastMessage(MaplePacketCreator.rollSnowBall(false, 1, map.getSnowball(0), map.getSnowball(1)));
|
||||
map.broadcastMessage(PacketCreator.rollSnowBall(false, 0, map.getSnowball(0), map.getSnowball(1)));
|
||||
map.broadcastMessage(PacketCreator.rollSnowBall(false, 1, map.getSnowball(0), map.getSnowball(1)));
|
||||
}
|
||||
map.broadcastMessage(MaplePacketCreator.hitSnowBall(what, damage));
|
||||
map.broadcastMessage(PacketCreator.hitSnowBall(what, damage));
|
||||
}
|
||||
|
||||
public void message(int message) {
|
||||
for (MapleCharacter chr : characters) {
|
||||
if (chr != null)
|
||||
chr.announce(MaplePacketCreator.snowballMessage(team, message));
|
||||
chr.announce(PacketCreator.snowballMessage(team, message));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user