Turn map id magic numbers into constants

This commit is contained in:
P0nk
2021-11-07 14:26:34 +01:00
parent c022c3595f
commit b15a7e61d4
51 changed files with 615 additions and 341 deletions

View File

@@ -31,6 +31,7 @@ import client.status.MonsterStatus;
import client.status.MonsterStatusEffect;
import config.YamlConfig;
import constants.id.ItemId;
import constants.id.MapId;
import constants.inventory.ItemConstants;
import constants.skills.*;
import net.packet.Packet;
@@ -908,7 +909,7 @@ public class StatEffect {
MapleMap target;
Portal pt;
if (moveTo == 999999999) {
if (moveTo == MapId.NONE) {
if (sourceid != ItemId.ANTI_BANISH_SCROLL) {
target = applyto.getMap().getReturnMap();
pt = target.getRandomPlayerSpawnpoint();

View File

@@ -23,6 +23,7 @@
package server.events.gm;
import client.Character;
import constants.id.MapId;
import server.TimerManager;
import server.maps.MapleMap;
import tools.PacketCreator;
@@ -59,7 +60,7 @@ public class Coconut extends Event {
map.broadcastMessage(PacketCreator.getClock(300));
TimerManager.getInstance().schedule(() -> {
if (map.getId() == 109080000) {
if (map.getId() == MapId.EVENT_COCONUT_HARVEST) {
if (getMapleScore() == getStoryScore()) {
bonusTime();
} else if (getMapleScore() > getStoryScore()) {
@@ -132,9 +133,9 @@ public class Coconut extends Event {
for (Character chr : chars) {
if ((getMapleScore() > getStoryScore() && chr.getTeam() == 0) || (getStoryScore() > getMapleScore() && chr.getTeam() == 1)) {
chr.changeMap(109050000);
chr.changeMap(MapId.EVENT_WINNER);
} else {
chr.changeMap(109050001);
chr.changeMap(MapId.EVENT_EXIT);
}
}
map.setCoconut(null);

View File

@@ -23,6 +23,7 @@
package server.events.gm;
import client.Character;
import constants.id.MapId;
import server.TimerManager;
import tools.PacketCreator;
@@ -41,7 +42,7 @@ public class Fitness {
public Fitness(final Character chr) {
this.chr = chr;
this.schedule = TimerManager.getInstance().schedule(() -> {
if (chr.getMapId() >= 109040000 && chr.getMapId() <= 109040004) {
if (MapId.isPhysicalFitness(chr.getMapId())) {
chr.changeMap(chr.getMap().getReturnMap());
}
}, 900000);
@@ -82,7 +83,7 @@ public class Fitness {
if (chr.getFitness() == null) {
resetTimes();
}
if (chr.getMap().getId() >= 109040000 && chr.getMap().getId() <= 109040004) {
if (MapId.isPhysicalFitness(chr.getMapId())) {
if (getTimeLeft() > 9000 && getTimeLeft() < 11000) {
chr.sendPacket(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) {

View File

@@ -22,6 +22,7 @@
package server.events.gm;
import client.Character;
import constants.id.MapId;
import server.TimerManager;
import tools.PacketCreator;
@@ -39,7 +40,7 @@ public class Ola {
public Ola(final Character chr) {
this.chr = chr;
this.schedule = TimerManager.getInstance().schedule(() -> {
if (chr.getMapId() >= 109030001 && chr.getMapId() <= 109030303) {
if (MapId.isOlaOla(chr.getMapId())) {
chr.changeMap(chr.getMap().getReturnMap());
}
resetTimes();

View File

@@ -22,6 +22,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
package server.events.gm;
import client.Character;
import constants.id.MapId;
import server.TimerManager;
import server.maps.MapleMap;
import tools.PacketCreator;
@@ -152,10 +153,10 @@ public class Snowball {
public void warpOut() {
TimerManager.getInstance().schedule(() -> {
if (winner == true) {
map.warpOutByTeam(team, 109050000);
if (winner) {
map.warpOutByTeam(team, MapId.EVENT_WINNER);
} else {
map.warpOutByTeam(team, 109050001);
map.warpOutByTeam(team, MapId.EVENT_EXIT);
}
map.setSnowball(team, null);

View File

@@ -23,6 +23,7 @@
package server.expeditions;
import client.Character;
import constants.id.MapId;
import constants.id.MobId;
import net.packet.Packet;
import net.server.PlayerStorage;
@@ -256,7 +257,7 @@ public class Expedition {
player.dropMessage(6, "[Expedition] You have been banned from this expedition.");
}
if (ExpeditionType.ARIANT.equals(type) || ExpeditionType.ARIANT1.equals(type) || ExpeditionType.ARIANT2.equals(type)) {
player.changeMap(980010000);
player.changeMap(MapId.ARPQ_LOBBY);
}
}
}

View File

@@ -24,7 +24,7 @@ package server.life;
import client.Character;
import client.Disease;
import client.status.MonsterStatus;
import constants.game.GameConstants;
import constants.id.MapId;
import constants.id.MobId;
import net.server.services.task.channel.OverallService;
import net.server.services.type.ChannelServices;
@@ -244,7 +244,7 @@ public class MobSkill {
int skillLimit = this.getLimit();
MapleMap map = monster.getMap();
if (GameConstants.isDojo(map.getId())) { // spawns in dojo should be unlimited
if (MapId.isDojo(map.getId())) { // spawns in dojo should be unlimited
skillLimit = Integer.MAX_VALUE;
}
@@ -252,7 +252,7 @@ public class MobSkill {
List<Integer> summons = getSummons();
int summonLimit = monster.countAvailableMobSummons(summons.size(), skillLimit);
if (summonLimit >= 1) {
boolean bossRushMap = GameConstants.isBossRush(map.getId());
boolean bossRushMap = MapId.isBossRush(map.getId());
Collections.shuffle(summons);
for (Integer mobId : summons.subList(0, summonLimit)) {
@@ -286,14 +286,14 @@ public class MobSkill {
break;
}
switch (map.getId()) {
case 220080001: //Pap map
case MapId.ORIGIN_OF_CLOCKTOWER: //Pap map
if (xpos < -890) {
xpos = (int) (Math.ceil(Math.random() * 150) - 890);
} else if (xpos > 230) {
xpos = (int) (230 - Math.ceil(Math.random() * 150));
}
break;
case 230040420: // Pianus map
case MapId.CAVE_OF_PIANUS: // Pianus map
if (xpos < -239) {
xpos = (int) (Math.ceil(Math.random() * 150) - 239);
} else if (xpos > 371) {

View File

@@ -20,6 +20,7 @@
package server.life;
import constants.id.ItemId;
import constants.id.MapId;
import constants.id.NpcId;
import net.server.Server;
import provider.Data;
@@ -51,7 +52,7 @@ public class PlayerNPCFactory {
if (thisData != null) {
DataProvider map = DataProviderFactory.getDataProvider(WZFiles.MAP);
thisData = map.getData("Map/Map7/777777777.img");
thisData = map.getData("Map/Map7/" + MapId.DEVELOPERS_HQ + ".img");
if (thisData != null) {
DataProvider sound = DataProviderFactory.getDataProvider(WZFiles.SOUND);
@@ -112,7 +113,7 @@ public class PlayerNPCFactory {
if (thisData != null) {
byte[] encData = {0x52, 0x6F, 0x6E, 0x61, 0x6E};
String name = new String(encData);
int face = 20104, hair = 30215, gender = 0, skin = 0, dir = 0, mapid = 777777777;
int face = 20104, hair = 30215, gender = 0, skin = 0, dir = 0, mapid = MapId.DEVELOPERS_HQ;
int FH = 4, RX0 = -143, RX1 = -243, CX = -193, CY = 117, scriptId = NpcId.CUSTOM_DEV;
Map<Short, Integer> equips = new HashMap<>();

View File

@@ -21,6 +21,7 @@ package server.maps;
import client.Character;
import client.Client;
import constants.id.MapId;
import net.server.audit.locks.MonitoredLockType;
import net.server.audit.locks.MonitoredReadLock;
import net.server.audit.locks.MonitoredReentrantReadWriteLock;
@@ -128,7 +129,7 @@ public class DoorObject extends AbstractMapObject {
if (from.getId() == chr.getMapId()) {
Party party = chr.getParty();
if (party != null && (ownerId == chr.getId() || party.getMemberById(ownerId) != null)) {
client.sendPacket(PacketCreator.partyPortal(999999999, 999999999, new Point(-1, -1)));
client.sendPacket(PacketCreator.partyPortal(MapId.NONE, MapId.NONE, new Point(-1, -1)));
}
client.sendPacket(PacketCreator.removeDoor(ownerId, inTown()));
}
@@ -136,7 +137,7 @@ public class DoorObject extends AbstractMapObject {
public void sendDestroyData(Client client, boolean partyUpdate) {
if (client != null && from.getId() == client.getPlayer().getMapId()) {
client.sendPacket(PacketCreator.partyPortal(999999999, 999999999, new Point(-1, -1)));
client.sendPacket(PacketCreator.partyPortal(MapId.NONE, MapId.NONE, new Point(-1, -1)));
client.sendPacket(PacketCreator.removeDoor(ownerId, inTown()));
}
}

View File

@@ -24,6 +24,7 @@ package server.maps;
import client.Character;
import client.Client;
import constants.game.GameConstants;
import constants.id.MapId;
import net.server.audit.locks.MonitoredLockType;
import net.server.audit.locks.MonitoredReentrantLock;
import net.server.audit.locks.factory.MonitoredReentrantLockFactory;
@@ -140,7 +141,7 @@ public class GenericPortal implements Portal {
} catch (NullPointerException npe) {
npe.printStackTrace();
}
} else if (getTargetMapId() != 999999999) {
} else if (getTargetMapId() != MapId.NONE) {
Character chr = c.getPlayer();
if (!(chr.getChalkboard() != null && GameConstants.isFreeMarketRoom(getTargetMapId()))) {
MapleMap to = chr.getEventInstance() == null ? c.getChannelServer().getMapFactory().getMap(getTargetMapId()) : chr.getEventInstance().getMapInstance(getTargetMapId());

View File

@@ -21,6 +21,7 @@
*/
package server.maps;
import constants.id.MapId;
import provider.Data;
import provider.DataProvider;
import provider.DataProviderFactory;
@@ -309,7 +310,7 @@ public class MapFactory {
map.setTown(DataTool.getIntConvert("town", infoData, 0) != 0);
map.setHPDec(DataTool.getIntConvert("decHP", infoData, 0));
map.setHPDecProtect(DataTool.getIntConvert("protectItem", infoData, 0));
map.setForcedReturnMap(DataTool.getInt(infoData.getChildByPath("forcedReturn"), 999999999));
map.setForcedReturnMap(DataTool.getInt(infoData.getChildByPath("forcedReturn"), MapId.NONE));
map.setBoat(mapData.getChildByPath("shipObj") != null);
map.setTimeLimit(DataTool.getIntConvert("timeLimit", infoData, -1));
map.setFieldType(DataTool.getIntConvert("fieldType", infoData, 0));
@@ -381,15 +382,15 @@ public class MapFactory {
StringBuilder builder = new StringBuilder();
if (mapid < 100000000) {
builder.append("maple");
} else if (mapid >= 100000000 && mapid < 200000000) {
} else if (mapid >= 100000000 && mapid < MapId.ORBIS) {
builder.append("victoria");
} else if (mapid >= 200000000 && mapid < 300000000) {
} else if (mapid >= MapId.ORBIS && mapid < MapId.ELLIN_FOREST) {
builder.append("ossyria");
} else if (mapid >= 300000000 && mapid < 400000000) {
} else if (mapid >= MapId.ELLIN_FOREST && mapid < 400000000) {
builder.append("elin");
} else if (mapid >= 540000000 && mapid < 560000000) {
} else if (mapid >= MapId.SINGAPORE && mapid < 560000000) {
builder.append("singapore");
} else if (mapid >= 600000000 && mapid < 620000000) {
} else if (mapid >= MapId.NEW_LEAF_CITY && mapid < 620000000) {
builder.append("MasteriaGL");
} else if (mapid >= 677000000 && mapid < 677100000) {
builder.append("Episode1GL");
@@ -403,7 +404,7 @@ public class MapFactory {
builder.append("HalloweenGL");
} else if (mapid >= 683000000 && mapid < 684000000) {
builder.append("event");
} else if (mapid >= 800000000 && mapid < 900000000) {
} else if (mapid >= MapId.MUSHROOM_SHRINE && mapid < 900000000) {
if ((mapid >= 889100000 && mapid < 889200000)) {
builder.append("etc");
} else {

View File

@@ -33,6 +33,7 @@ import client.status.MonsterStatus;
import client.status.MonsterStatusEffect;
import config.YamlConfig;
import constants.game.GameConstants;
import constants.id.MapId;
import constants.id.MobId;
import constants.inventory.ItemConstants;
import net.packet.Packet;
@@ -120,7 +121,7 @@ public class MapleMap {
private String streetName;
private MapEffect mapEffect = null;
private boolean everlast = false;
private int forcedReturnMap = 999999999;
private int forcedReturnMap = MapId.NONE;
private int timeLimit;
private long mapTimer;
private int decHP = 0;
@@ -264,7 +265,7 @@ public class MapleMap {
}
public MapleMap getReturnMap() {
if (returnMapId == 999999999) {
if (returnMapId == MapId.NONE) {
return this;
}
return getChannelServer().getMapFactory().getMap(returnMapId);
@@ -2388,7 +2389,7 @@ public class MapleMap {
}
}
if (onUserEnter.length() != 0) {
if (onUserEnter.equals("cygnusTest") && (mapid < 913040000 || mapid > 913040006)) {
if (onUserEnter.equals("cygnusTest") && !MapId.isCygnusIntro(mapid)) {
chr.saveLocation("INTRO");
}
@@ -2399,52 +2400,52 @@ public class MapleMap {
chr.cancelBuffStats(BuffStat.MONSTER_RIDING);
}
if (mapid == 200090060) { // To Rien
if (mapid == MapId.FROM_LITH_TO_RIEN) { // To Rien
int travelTime = getWorldServer().getTransportationTime((int) MINUTES.toMillis(1));
chr.sendPacket(PacketCreator.getClock(travelTime / 1000));
TimerManager.getInstance().schedule(() -> {
if (chr.getMapId() == 200090060) {
chr.changeMap(140020300, 0);
if (chr.getMapId() == MapId.FROM_LITH_TO_RIEN) {
chr.changeMap(MapId.DANGEROUS_FOREST, 0);
}
}, travelTime);
} else if (mapid == 200090070) { // To Lith Harbor
} else if (mapid == MapId.FROM_RIEN_TO_LITH) { // To Lith Harbor
int travelTime = getWorldServer().getTransportationTime((int) MINUTES.toMillis(1));
chr.sendPacket(PacketCreator.getClock(travelTime / 1000));
TimerManager.getInstance().schedule(() -> {
if (chr.getMapId() == 200090070) {
chr.changeMap(104000000, 3);
if (chr.getMapId() == MapId.FROM_RIEN_TO_LITH) {
chr.changeMap(MapId.LITH_HARBOUR, 3);
}
}, travelTime);
} else if (mapid == 200090030) { // To Ereve (SkyFerry)
} else if (mapid == MapId.FROM_ELLINIA_TO_EREVE) { // To Ereve (SkyFerry)
int travelTime = getWorldServer().getTransportationTime((int) MINUTES.toMillis(2));
chr.sendPacket(PacketCreator.getClock(travelTime / 1000));
TimerManager.getInstance().schedule(() -> {
if (chr.getMapId() == 200090030) {
chr.changeMap(130000210, 0);
if (chr.getMapId() == MapId.FROM_ELLINIA_TO_EREVE) {
chr.changeMap(MapId.SKY_FERRY, 0);
}
}, travelTime);
} else if (mapid == 200090031) { // To Victoria Island (SkyFerry)
} else if (mapid == MapId.FROM_EREVE_TO_ELLINIA) { // To Victoria Island (SkyFerry)
int travelTime = getWorldServer().getTransportationTime((int) MINUTES.toMillis(2));
chr.sendPacket(PacketCreator.getClock(travelTime / 1000));
TimerManager.getInstance().schedule(() -> {
if (chr.getMapId() == 200090031) {
chr.changeMap(101000400, 0);
if (chr.getMapId() == MapId.FROM_EREVE_TO_ELLINIA) {
chr.changeMap(MapId.ELLINIA_SKY_FERRY, 0);
}
}, travelTime);
} else if (mapid == 200090021) { // To Orbis (SkyFerry)
} else if (mapid == MapId.FROM_EREVE_TO_ORBIS) { // To Orbis (SkyFerry)
int travelTime = getWorldServer().getTransportationTime((int) MINUTES.toMillis(8));
chr.sendPacket(PacketCreator.getClock(travelTime / 1000));
TimerManager.getInstance().schedule(() -> {
if (chr.getMapId() == 200090021) {
chr.changeMap(200000161, 0);
if (chr.getMapId() == MapId.FROM_EREVE_TO_ORBIS) {
chr.changeMap(MapId.ORBIS_STATION, 0);
}
}, travelTime);
} else if (mapid == 200090020) { // To Ereve From Orbis (SkyFerry)
} else if (mapid == MapId.FROM_ORBIS_TO_EREVE) { // To Ereve From Orbis (SkyFerry)
int travelTime = getWorldServer().getTransportationTime((int) MINUTES.toMillis(8));
chr.sendPacket(PacketCreator.getClock(travelTime / 1000));
TimerManager.getInstance().schedule(() -> {
if (chr.getMapId() == 200090020) {
chr.changeMap(130000210, 0);
if (chr.getMapId() == MapId.FROM_ORBIS_TO_EREVE) {
chr.changeMap(MapId.SKY_FERRY, 0);
}
}, travelTime);
} else if (MiniDungeonInfo.isDungeonMap(mapid)) {
@@ -2550,7 +2551,7 @@ public class MapleMap {
mapEffect.sendStartData(chr.getClient());
}
chr.sendPacket(PacketCreator.resetForcedStats());
if (mapid == 914000200 || mapid == 914000210 || mapid == 914000220) {
if (MapId.isGodlyStatMap(mapid)) {
chr.sendPacket(PacketCreator.aranGodlyStats());
}
if (chr.getEventInstance() != null && chr.getEventInstance().isTimerStarted()) {
@@ -2564,7 +2565,7 @@ public class MapleMap {
chr.sendPacket(PacketCreator.getClock((int) (chr.getOla().getTimeLeft() / 1000)));
}
if (mapid == 109060000) {
if (mapid == MapId.EVENT_SNOWBALL) {
chr.sendPacket(PacketCreator.rollSnowBall(true, 0, null, null));
}
@@ -2591,7 +2592,7 @@ public class MapleMap {
public Portal getRandomPlayerSpawnpoint() {
List<Portal> spawnPoints = new ArrayList<>();
for (Portal portal : portals.values()) {
if (portal.getType() >= 0 && portal.getType() <= 1 && portal.getTargetMapId() == 999999999) {
if (portal.getType() >= 0 && portal.getType() <= 1 && portal.getTargetMapId() == MapId.NONE) {
spawnPoints.add(portal);
}
}
@@ -2604,7 +2605,7 @@ public class MapleMap {
double shortestDistance = Double.POSITIVE_INFINITY;
for (Portal portal : portals.values()) {
double distance = portal.getPosition().distanceSq(from);
if (portal.getType() == Portal.TELEPORT_PORTAL && distance < shortestDistance && portal.getTargetMapId() != 999999999) {
if (portal.getType() == Portal.TELEPORT_PORTAL && distance < shortestDistance && portal.getTargetMapId() != MapId.NONE) {
closest = portal;
shortestDistance = distance;
}
@@ -2617,7 +2618,7 @@ public class MapleMap {
double shortestDistance = Double.POSITIVE_INFINITY;
for (Portal portal : portals.values()) {
double distance = portal.getPosition().distanceSq(from);
if (portal.getType() >= 0 && portal.getType() <= 1 && distance < shortestDistance && portal.getTargetMapId() == 999999999) {
if (portal.getType() >= 0 && portal.getType() <= 1 && distance < shortestDistance && portal.getTargetMapId() == MapId.NONE) {
closest = portal;
shortestDistance = distance;
}
@@ -3895,20 +3896,21 @@ public class MapleMap {
}
public void startEvent(final Character chr) {
if (this.mapid == 109080000 && getCoconut() == null) {
if (this.mapid == MapId.EVENT_COCONUT_HARVEST && getCoconut() == null) {
setCoconut(new Coconut(this));
coconut.startEvent();
} else if (this.mapid == 109040000) {
} else if (this.mapid == MapId.EVENT_PHYSICAL_FITNESS) {
chr.setFitness(new Fitness(chr));
chr.getFitness().startFitness();
} else if (this.mapid == 109030101 || this.mapid == 109030201 || this.mapid == 109030301 || this.mapid == 109030401) {
} else if (this.mapid == MapId.EVENT_OLA_OLA_1 || this.mapid == MapId.EVENT_OLA_OLA_2 ||
this.mapid == MapId.EVENT_OLA_OLA_3 || this.mapid == MapId.EVENT_OLA_OLA_4) {
chr.setOla(new Ola(chr));
chr.getOla().startOla();
} else if (this.mapid == 109020001 && getOx() == null) {
} else if (this.mapid == MapId.EVENT_OX_QUIZ && getOx() == null) {
setOx(new OxQuiz(this));
getOx().sendQuestion();
setOxQuiz(true);
} else if (this.mapid == 109060000 && getSnowball(chr.getTeam()) == null) {
} else if (this.mapid == MapId.EVENT_SNOWBALL && getSnowball(chr.getTeam()) == null) {
setSnowball(0, new Snowball(0, this));
setSnowball(1, new Snowball(1, this));
getSnowball(chr.getTeam()).startEvent();
@@ -3930,13 +3932,13 @@ public class MapleMap {
public String getEventNPC() {
StringBuilder sb = new StringBuilder();
sb.append("Talk to ");
if (mapid == 60000) {
if (mapid == MapId.SOUTHPERRY) {
sb.append("Paul!");
} else if (mapid == 104000000) {
} else if (mapid == MapId.LITH_HARBOUR) {
sb.append("Jean!");
} else if (mapid == 200000000) {
} else if (mapid == MapId.ORBIS) {
sb.append("Martin!");
} else if (mapid == 220000000) {
} else if (mapid == MapId.LUDIBRIUM) {
sb.append("Tony!");
} else {
return null;
@@ -3945,15 +3947,16 @@ public class MapleMap {
}
public boolean hasEventNPC() {
return this.mapid == 60000 || this.mapid == 104000000 || this.mapid == 200000000 || this.mapid == 220000000;
return this.mapid == 60000 || this.mapid == MapId.LITH_HARBOUR || this.mapid == MapId.ORBIS || this.mapid == MapId.LUDIBRIUM;
}
public boolean isStartingEventMap() {
return this.mapid == 109040000 || this.mapid == 109020001 || this.mapid == 109010000 || this.mapid == 109030001 || this.mapid == 109030101;
return this.mapid == MapId.EVENT_PHYSICAL_FITNESS || this.mapid == MapId.EVENT_OX_QUIZ ||
this.mapid == MapId.EVENT_FIND_THE_JEWEL || this.mapid == MapId.EVENT_OLA_OLA_0 || this.mapid == MapId.EVENT_OLA_OLA_1;
}
public boolean isEventMap() {
return this.mapid >= 109010000 && this.mapid < 109050000 || this.mapid > 109050001 && this.mapid <= 109090000;
return this.mapid >= MapId.EVENT_FIND_THE_JEWEL && this.mapid < MapId.EVENT_WINNER || this.mapid > MapId.EVENT_EXIT && this.mapid <= 109090000;
}
public void setTimeMob(int id, String msg) {

View File

@@ -21,6 +21,8 @@
*/
package server.maps;
import constants.id.MapId;
/**
* @author Alan (SharpAceX)
*/
@@ -29,18 +31,18 @@ public enum MiniDungeonInfo {
//http://bbb.hidden-street.net/search_finder/mini%20dungeon
CAVE_OF_MUSHROOMS(105050100, 105050101, 30),
GOLEM_CASTLE_RUINS(105040304, 105040320, 34),
HILL_OF_SANDSTORMS(260020600, 260020630, 30),
HENESYS_PIG_FARM(100020000, 100020100, 30),
DRAKES_BLUE_CAVE(105090311, 105090320, 30),
DRUMMER_BUNNYS_LAIR(221023400, 221023401, 30),
THE_ROUND_TABLE_OF_KENTARUS(240020500, 240020512, 30),
THE_RESTORING_MEMORY(240040511, 240040800, 19),
NEWT_SECURED_ZONE(240040520, 240040900, 19),
PILLAGE_OF_TREASURE_ISLAND(251010402, 251010410, 30),
CRITICAL_ERROR(261020300, 261020301, 30),
LONGEST_RIDE_ON_BYEBYE_STATION(551030000, 551030001, 19);
CAVE_OF_MUSHROOMS(MapId.ANT_TUNNEL_2, MapId.CAVE_OF_MUSHROOMS_BASE, 30), // Horny Mushroom, Zombie Mushroom
GOLEM_CASTLE_RUINS(MapId.SLEEPY_DUNGEON_4, MapId.GOLEMS_CASTLE_RUINS_BASE, 34), // Stone Golem, Mixed Golem
HILL_OF_SANDSTORMS(MapId.SAHEL_2, MapId.HILL_OF_SANDSTORMS_BASE, 30), // Sand Rat
HENESYS_PIG_FARM(MapId.RAIN_FOREST_EAST_OF_HENESYS, MapId.HENESYS_PIG_FARM_BASE, 30), // Pig, Ribbon Pig
DRAKES_BLUE_CAVE(MapId.COLD_CRADLE, MapId.DRAKES_BLUE_CAVE_BASE, 30), // Dark Drake
DRUMMER_BUNNYS_LAIR(MapId.EOS_TOWER_76TH_TO_90TH_FLOOR, MapId.DRUMMER_BUNNYS_LAIR_BASE, 30), // Drumming Bunny
THE_ROUND_TABLE_OF_KENTARUS(MapId.BATTLEFIELD_OF_FIRE_AND_WATER, MapId.ROUND_TABLE_OF_KENTAURUS_BASE, 30), // Blue/Red/Black Kentaurus
THE_RESTORING_MEMORY(MapId.DRAGON_NEST_LEFT_BEHIND, MapId.RESTORING_MEMORY_BASE, 19), // Skelegon, Skelosaurus
NEWT_SECURED_ZONE(MapId.DESTROYED_DRAGON_NEST, MapId.NEWT_SECURED_ZONE_BASE, 19), // Jr. Newtie, Transforming Jr. Newtie
PILLAGE_OF_TREASURE_ISLAND(MapId.RED_NOSE_PIRATE_DEN_2, MapId.PILLAGE_OF_TREASURE_ISLAND_BASE, 30), // Captain
CRITICAL_ERROR(MapId.LAB_AREA_C1, MapId.CRITICAL_ERROR_BASE, 30), // Roid
LONGEST_RIDE_ON_BYEBYE_STATION(MapId.FANTASY_THEME_PARK_3, MapId.LONGEST_RIDE_ON_BYEBYE_STATION, 19); // Froscola, Jester Scarlion
private final int baseId;
private final int dungeonId;

View File

@@ -22,16 +22,16 @@
package server.maps;
public class SavedLocation {
private int mapid = 102000000;
private final int mapId;
private final int portal;
public SavedLocation(int mapid, int portal) {
this.mapid = mapid;
public SavedLocation(int mapId, int portal) {
this.mapId = mapId;
this.portal = portal;
}
public int getMapId() {
return mapid;
return mapId;
}
public int getPortal() {

View File

@@ -22,6 +22,7 @@ package server.partyquest;
import client.Character;
import constants.game.GameConstants;
import constants.id.ItemId;
import constants.id.MapId;
import server.TimerManager;
import server.expeditions.Expedition;
import server.expeditions.ExpeditionType;
@@ -249,9 +250,9 @@ public class AriantColiseum {
private ExpeditionType getExpeditionType() {
ExpeditionType type;
if (map.getId() == 980010101) {
if (map.getId() == MapId.ARPQ_ARENA_1) {
type = ExpeditionType.ARIANT;
} else if (map.getId() == 980010201) {
} else if (map.getId() == MapId.ARPQ_ARENA_2) {
type = ExpeditionType.ARIANT1;
} else {
type = ExpeditionType.ARIANT2;
@@ -265,7 +266,7 @@ public class AriantColiseum {
cancelAriantSchedules();
for (Character chr : map.getAllPlayers()) {
chr.changeMap(980010010, 0);
chr.changeMap(MapId.ARPQ_KINGS_ROOM, 0);
}
}
@@ -275,7 +276,7 @@ public class AriantColiseum {
for (Character chr : exped.getActiveMembers()) {
chr.setAriantColiseum(null);
chr.changeMap(980010000, 0);
chr.changeMap(MapId.ARPQ_LOBBY, 0);
}
map.getWorldServer().registerTimedMapObject(() -> {

View File

@@ -24,6 +24,7 @@ package server.partyquest;
import client.Character;
import constants.id.ItemId;
import constants.id.MapId;
import net.server.world.Party;
import server.ItemInformationProvider;
import server.TimerManager;
@@ -85,7 +86,7 @@ public class Pyramid extends PartyQuest {
gaugeSchedule = TimerManager.getInstance().register(() -> {
gauge -= decrease;
if (gauge <= 0) {
warp(926010001);
warp(MapId.NETTS_PYRAMID);
}
}, 1000);