Rename and clean up MapleExpedition
This commit is contained in:
@@ -38,7 +38,7 @@ import scripting.event.EventManager;
|
||||
import scripting.npc.NPCScriptManager;
|
||||
import server.MapleItemInformationProvider;
|
||||
import server.MapleMarriage;
|
||||
import server.expeditions.MapleExpedition;
|
||||
import server.expeditions.Expedition;
|
||||
import server.expeditions.MapleExpeditionBossLog;
|
||||
import server.expeditions.MapleExpeditionType;
|
||||
import server.life.*;
|
||||
@@ -1073,7 +1073,7 @@ public class AbstractPlayerInteraction {
|
||||
|
||||
public int createExpedition(MapleExpeditionType type, boolean silent, int minPlayers, int maxPlayers) {
|
||||
Character player = getPlayer();
|
||||
MapleExpedition exped = new MapleExpedition(player, type, silent, minPlayers, maxPlayers);
|
||||
Expedition exped = new Expedition(player, type, silent, minPlayers, maxPlayers);
|
||||
|
||||
int channel = player.getMap().getChannelServer().getId();
|
||||
if (!MapleExpeditionBossLog.attemptBoss(player.getId(), channel, exped, false)) { // thanks Conrad for noticing missing expeditions entry limit
|
||||
@@ -1087,18 +1087,18 @@ public class AbstractPlayerInteraction {
|
||||
}
|
||||
}
|
||||
|
||||
public void endExpedition(MapleExpedition exped) {
|
||||
public void endExpedition(Expedition exped) {
|
||||
exped.dispose(true);
|
||||
exped.removeChannelExpedition(getPlayer().getClient().getChannelServer());
|
||||
}
|
||||
|
||||
public MapleExpedition getExpedition(MapleExpeditionType type) {
|
||||
public Expedition getExpedition(MapleExpeditionType type) {
|
||||
return getPlayer().getClient().getChannelServer().getExpedition(type);
|
||||
}
|
||||
|
||||
public String getExpeditionMemberNames(MapleExpeditionType type) {
|
||||
String members = "";
|
||||
MapleExpedition exped = getExpedition(type);
|
||||
Expedition exped = getExpedition(type);
|
||||
for (String memberName : exped.getMembers().values()) {
|
||||
members += "" + memberName + ", ";
|
||||
}
|
||||
@@ -1106,7 +1106,7 @@ public class AbstractPlayerInteraction {
|
||||
}
|
||||
|
||||
public boolean isLeaderExpedition(MapleExpeditionType type) {
|
||||
MapleExpedition exped = getExpedition(type);
|
||||
Expedition exped = getExpedition(type);
|
||||
return exped.isLeader(getPlayer());
|
||||
}
|
||||
|
||||
|
||||
@@ -40,7 +40,7 @@ import server.MapleItemInformationProvider;
|
||||
import server.MapleStatEffect;
|
||||
import server.ThreadManager;
|
||||
import server.TimerManager;
|
||||
import server.expeditions.MapleExpedition;
|
||||
import server.expeditions.Expedition;
|
||||
import server.life.MapleLifeFactory;
|
||||
import server.life.MapleMonster;
|
||||
import server.life.MapleNPC;
|
||||
@@ -77,7 +77,7 @@ public class EventInstanceManager {
|
||||
private Map<String, Object> objectProps = new HashMap<>();
|
||||
private long timeStarted = 0;
|
||||
private long eventTime = 0;
|
||||
private MapleExpedition expedition = null;
|
||||
private Expedition expedition = null;
|
||||
private List<Integer> mapIds = new LinkedList<>();
|
||||
|
||||
private final MonitoredReentrantReadWriteLock lock = new MonitoredReentrantReadWriteLock(MonitoredLockType.EIM, true);
|
||||
@@ -361,12 +361,12 @@ public class EventInstanceManager {
|
||||
}
|
||||
}
|
||||
|
||||
public void registerExpedition(MapleExpedition exped) {
|
||||
public void registerExpedition(Expedition exped) {
|
||||
expedition = exped;
|
||||
registerExpeditionTeam(exped, exped.getRecruitingMap().getId());
|
||||
}
|
||||
|
||||
private void registerExpeditionTeam(MapleExpedition exped, int recruitMap) {
|
||||
private void registerExpeditionTeam(Expedition exped, int recruitMap) {
|
||||
expedition = exped;
|
||||
|
||||
for (Character chr: exped.getActiveMembers()) {
|
||||
|
||||
@@ -37,7 +37,7 @@ import net.server.world.World;
|
||||
import scripting.event.scheduler.EventScriptScheduler;
|
||||
import server.MapleMarriage;
|
||||
import server.ThreadManager;
|
||||
import server.expeditions.MapleExpedition;
|
||||
import server.expeditions.Expedition;
|
||||
import server.life.MapleLifeFactory;
|
||||
import server.life.MapleMonster;
|
||||
import server.maps.MapleMap;
|
||||
@@ -370,16 +370,16 @@ public class EventManager {
|
||||
instanceLocks.put(eventName, lobbyId);
|
||||
}
|
||||
|
||||
public boolean startInstance(MapleExpedition exped) {
|
||||
public boolean startInstance(Expedition exped) {
|
||||
return startInstance(-1, exped);
|
||||
}
|
||||
|
||||
public boolean startInstance(int lobbyId, MapleExpedition exped) {
|
||||
public boolean startInstance(int lobbyId, Expedition exped) {
|
||||
return startInstance(lobbyId, exped, exped.getLeader());
|
||||
}
|
||||
|
||||
//Expedition method: starts an expedition
|
||||
public boolean startInstance(int lobbyId, MapleExpedition exped, Character leader) {
|
||||
public boolean startInstance(int lobbyId, Expedition exped, Character leader) {
|
||||
if (this.isDisposed()) return false;
|
||||
|
||||
try {
|
||||
|
||||
@@ -45,7 +45,7 @@ import scripting.AbstractPlayerInteraction;
|
||||
import server.*;
|
||||
import server.MapleSkillbookInformationProvider.SkillBookEntry;
|
||||
import server.events.gm.Event;
|
||||
import server.expeditions.MapleExpedition;
|
||||
import server.expeditions.Expedition;
|
||||
import server.expeditions.MapleExpeditionType;
|
||||
import server.gachapon.MapleGachapon;
|
||||
import server.gachapon.MapleGachapon.MapleGachaponItem;
|
||||
@@ -1014,7 +1014,7 @@ public class NPCConversationManager extends AbstractPlayerInteraction {
|
||||
}
|
||||
}
|
||||
|
||||
private synchronized boolean setupAriantBattle(MapleExpedition exped, int mapid) {
|
||||
private synchronized boolean setupAriantBattle(Expedition exped, int mapid) {
|
||||
MapleMap arenaMap = this.getMap().getChannelServer().getMapFactory().getMap(mapid + 1);
|
||||
if (!arenaMap.getAllPlayers().isEmpty()) {
|
||||
return false;
|
||||
@@ -1029,7 +1029,7 @@ public class NPCConversationManager extends AbstractPlayerInteraction {
|
||||
return "You cannot start an Ariant tournament from outside the Battle Arena Entrance.";
|
||||
}
|
||||
|
||||
MapleExpedition exped = this.getMap().getChannelServer().getExpedition(expedType);
|
||||
Expedition exped = this.getMap().getChannelServer().getExpedition(expedType);
|
||||
if (exped == null) {
|
||||
return "Please register on an expedition before attempting to start an Ariant tournament.";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user