Rename and clean up MapleExpeditionType
This commit is contained in:
@@ -45,7 +45,7 @@ import scripting.event.EventScriptManager;
|
||||
import server.TimerManager;
|
||||
import server.events.gm.Event;
|
||||
import server.expeditions.Expedition;
|
||||
import server.expeditions.MapleExpeditionType;
|
||||
import server.expeditions.ExpeditionType;
|
||||
import server.maps.*;
|
||||
import tools.PacketCreator;
|
||||
import tools.Pair;
|
||||
@@ -73,9 +73,9 @@ public final class Channel {
|
||||
private Map<Integer, MapleHiredMerchant> hiredMerchants = new HashMap<>();
|
||||
private final Map<Integer, Integer> storedVars = new HashMap<>();
|
||||
private Set<Integer> playersAway = new HashSet<>();
|
||||
private Map<MapleExpeditionType, Expedition> expeditions = new HashMap<>();
|
||||
private Map<ExpeditionType, Expedition> expeditions = new HashMap<>();
|
||||
private Map<Integer, MapleMiniDungeon> dungeons = new HashMap<>();
|
||||
private List<MapleExpeditionType> expedType = new ArrayList<>();
|
||||
private List<ExpeditionType> expedType = new ArrayList<>();
|
||||
private Set<MapleMap> ownedMaps = Collections.synchronizedSet(Collections.newSetFromMap(new WeakHashMap<>()));
|
||||
private Event event;
|
||||
private boolean finishedShutdown = false;
|
||||
@@ -119,7 +119,7 @@ public final class Channel {
|
||||
|
||||
try {
|
||||
this.channelServer = initServer(port, world, channel);
|
||||
expedType.addAll(Arrays.asList(MapleExpeditionType.values()));
|
||||
expedType.addAll(Arrays.asList(ExpeditionType.values()));
|
||||
|
||||
if (Server.getInstance().isOnline()) { // postpone event loading to improve boot time... thanks Riizade, daronhudson for noticing slow startup times
|
||||
eventSM = new EventScriptManager(this, getEvents());
|
||||
@@ -416,7 +416,7 @@ public final class Channel {
|
||||
}
|
||||
}
|
||||
|
||||
public Expedition getExpedition(MapleExpeditionType type) {
|
||||
public Expedition getExpedition(ExpeditionType type) {
|
||||
return expeditions.get(type);
|
||||
}
|
||||
|
||||
|
||||
@@ -40,7 +40,7 @@ import server.MapleItemInformationProvider;
|
||||
import server.MapleMarriage;
|
||||
import server.expeditions.Expedition;
|
||||
import server.expeditions.ExpeditionBossLog;
|
||||
import server.expeditions.MapleExpeditionType;
|
||||
import server.expeditions.ExpeditionType;
|
||||
import server.life.*;
|
||||
import server.maps.MapleMap;
|
||||
import server.maps.MapleMapObject;
|
||||
@@ -1067,11 +1067,11 @@ public class AbstractPlayerInteraction {
|
||||
return (Pyramid) getPlayer().getPartyQuest();
|
||||
}
|
||||
|
||||
public int createExpedition(MapleExpeditionType type) {
|
||||
public int createExpedition(ExpeditionType type) {
|
||||
return createExpedition(type, false, 0, 0);
|
||||
}
|
||||
|
||||
public int createExpedition(MapleExpeditionType type, boolean silent, int minPlayers, int maxPlayers) {
|
||||
public int createExpedition(ExpeditionType type, boolean silent, int minPlayers, int maxPlayers) {
|
||||
Character player = getPlayer();
|
||||
Expedition exped = new Expedition(player, type, silent, minPlayers, maxPlayers);
|
||||
|
||||
@@ -1092,11 +1092,11 @@ public class AbstractPlayerInteraction {
|
||||
exped.removeChannelExpedition(getPlayer().getClient().getChannelServer());
|
||||
}
|
||||
|
||||
public Expedition getExpedition(MapleExpeditionType type) {
|
||||
public Expedition getExpedition(ExpeditionType type) {
|
||||
return getPlayer().getClient().getChannelServer().getExpedition(type);
|
||||
}
|
||||
|
||||
public String getExpeditionMemberNames(MapleExpeditionType type) {
|
||||
public String getExpeditionMemberNames(ExpeditionType type) {
|
||||
String members = "";
|
||||
Expedition exped = getExpedition(type);
|
||||
for (String memberName : exped.getMembers().values()) {
|
||||
@@ -1105,7 +1105,7 @@ public class AbstractPlayerInteraction {
|
||||
return members;
|
||||
}
|
||||
|
||||
public boolean isLeaderExpedition(MapleExpeditionType type) {
|
||||
public boolean isLeaderExpedition(ExpeditionType type) {
|
||||
Expedition exped = getExpedition(type);
|
||||
return exped.isLeader(getPlayer());
|
||||
}
|
||||
|
||||
@@ -46,7 +46,7 @@ import server.*;
|
||||
import server.MapleSkillbookInformationProvider.SkillBookEntry;
|
||||
import server.events.gm.Event;
|
||||
import server.expeditions.Expedition;
|
||||
import server.expeditions.MapleExpeditionType;
|
||||
import server.expeditions.ExpeditionType;
|
||||
import server.gachapon.MapleGachapon;
|
||||
import server.gachapon.MapleGachapon.MapleGachaponItem;
|
||||
import server.life.MapleLifeFactory;
|
||||
@@ -1024,7 +1024,7 @@ public class NPCConversationManager extends AbstractPlayerInteraction {
|
||||
return true;
|
||||
}
|
||||
|
||||
public String startAriantBattle(MapleExpeditionType expedType, int mapid) {
|
||||
public String startAriantBattle(ExpeditionType expedType, int mapid) {
|
||||
if (!GameConstants.isAriantColiseumLobby(mapid)) {
|
||||
return "You cannot start an Ariant tournament from outside the Battle Arena Entrance.";
|
||||
}
|
||||
|
||||
@@ -81,7 +81,7 @@ public class Expedition {
|
||||
};
|
||||
|
||||
private final Character leader;
|
||||
private final MapleExpeditionType type;
|
||||
private final ExpeditionType type;
|
||||
private boolean registering;
|
||||
private final MapleMap startMap;
|
||||
private final List<String> bossLogs;
|
||||
@@ -95,7 +95,7 @@ public class Expedition {
|
||||
private final int maxSize;
|
||||
private final MonitoredReentrantLock pL = MonitoredReentrantLockFactory.createLock(MonitoredLockType.EIM_PARTY, true);
|
||||
|
||||
public Expedition(Character player, MapleExpeditionType met, boolean sil, int minPlayers, int maxPlayers) {
|
||||
public Expedition(Character player, ExpeditionType met, boolean sil, int minPlayers, int maxPlayers) {
|
||||
leader = player;
|
||||
members.put(player.getId(), player.getName());
|
||||
startMap = player.getMap();
|
||||
@@ -252,7 +252,7 @@ public class Expedition {
|
||||
if (!silent) {
|
||||
player.dropMessage(6, "[Expedition] You have been banned from this expedition.");
|
||||
}
|
||||
if (MapleExpeditionType.ARIANT.equals(type) || MapleExpeditionType.ARIANT1.equals(type) || MapleExpeditionType.ARIANT2.equals(type)) {
|
||||
if (ExpeditionType.ARIANT.equals(type) || ExpeditionType.ARIANT1.equals(type) || ExpeditionType.ARIANT2.equals(type)) {
|
||||
player.changeMap(980010000);
|
||||
}
|
||||
}
|
||||
@@ -287,7 +287,7 @@ public class Expedition {
|
||||
}
|
||||
}
|
||||
|
||||
public MapleExpeditionType getType() {
|
||||
public ExpeditionType getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
|
||||
@@ -25,12 +25,10 @@ package server.expeditions;
|
||||
import config.YamlConfig;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Alan (SharpAceX)
|
||||
*/
|
||||
|
||||
public enum MapleExpeditionType {
|
||||
* @author Alan (SharpAceX)
|
||||
*/
|
||||
|
||||
public enum ExpeditionType {
|
||||
BALROG_EASY(3, 30, 50, 255, 5),
|
||||
BALROG_NORMAL(6, 30, 50, 255, 5),
|
||||
SCARGA(6, 30, 100, 255, 5),
|
||||
@@ -44,14 +42,14 @@ public enum MapleExpeditionType {
|
||||
ARIANT2(2, 7, 20, 30, 5),
|
||||
PINKBEAN(6, 30, 120, 255, 5),
|
||||
CWKPQ(6, 30, 90, 255, 5); // CWKPQ min-level 90, found thanks to Cato
|
||||
|
||||
private int minSize;
|
||||
private int maxSize;
|
||||
private int minLevel;
|
||||
private int maxLevel;
|
||||
private int registrationTime;
|
||||
|
||||
private MapleExpeditionType(int minSize, int maxSize, int minLevel, int maxLevel, int minutes) {
|
||||
|
||||
private final int minSize;
|
||||
private final int maxSize;
|
||||
private final int minLevel;
|
||||
private final int maxLevel;
|
||||
private final int registrationTime;
|
||||
|
||||
ExpeditionType(int minSize, int maxSize, int minLevel, int maxLevel, int minutes) {
|
||||
this.minSize = minSize;
|
||||
this.maxSize = maxSize;
|
||||
this.minLevel = minLevel;
|
||||
@@ -60,22 +58,22 @@ public enum MapleExpeditionType {
|
||||
}
|
||||
|
||||
public int getMinSize() {
|
||||
return !YamlConfig.config.server.USE_ENABLE_SOLO_EXPEDITIONS ? minSize : 1;
|
||||
return !YamlConfig.config.server.USE_ENABLE_SOLO_EXPEDITIONS ? minSize : 1;
|
||||
}
|
||||
|
||||
|
||||
public int getMaxSize() {
|
||||
return maxSize;
|
||||
}
|
||||
|
||||
|
||||
public int getMinLevel() {
|
||||
return minLevel;
|
||||
return minLevel;
|
||||
}
|
||||
|
||||
|
||||
public int getMaxLevel() {
|
||||
return maxLevel;
|
||||
return maxLevel;
|
||||
}
|
||||
|
||||
public int getRegistrationTime(){
|
||||
return registrationTime;
|
||||
|
||||
public int getRegistrationTime() {
|
||||
return registrationTime;
|
||||
}
|
||||
}
|
||||
@@ -23,7 +23,7 @@ import client.Character;
|
||||
import constants.game.GameConstants;
|
||||
import server.TimerManager;
|
||||
import server.expeditions.Expedition;
|
||||
import server.expeditions.MapleExpeditionType;
|
||||
import server.expeditions.ExpeditionType;
|
||||
import server.maps.MapleMap;
|
||||
import tools.PacketCreator;
|
||||
|
||||
@@ -244,14 +244,14 @@ public class AriantColiseum {
|
||||
}
|
||||
}
|
||||
|
||||
private MapleExpeditionType getExpeditionType() {
|
||||
MapleExpeditionType type;
|
||||
private ExpeditionType getExpeditionType() {
|
||||
ExpeditionType type;
|
||||
if (map.getId() == 980010101) {
|
||||
type = MapleExpeditionType.ARIANT;
|
||||
type = ExpeditionType.ARIANT;
|
||||
} else if (map.getId() == 980010201) {
|
||||
type = MapleExpeditionType.ARIANT1;
|
||||
type = ExpeditionType.ARIANT1;
|
||||
} else {
|
||||
type = MapleExpeditionType.ARIANT2;
|
||||
type = ExpeditionType.ARIANT2;
|
||||
}
|
||||
|
||||
return type;
|
||||
|
||||
Reference in New Issue
Block a user