Rename and clean up MapleExpeditionBossLog
This commit is contained in:
@@ -59,7 +59,7 @@ import server.CashShop.CashItemFactory;
|
||||
import server.MapleSkillbookInformationProvider;
|
||||
import server.ThreadManager;
|
||||
import server.TimerManager;
|
||||
import server.expeditions.MapleExpeditionBossLog;
|
||||
import server.expeditions.ExpeditionBossLog;
|
||||
import server.life.MaplePlayerNPCFactory;
|
||||
import server.quest.MapleQuest;
|
||||
import tools.DatabaseConnection;
|
||||
@@ -951,7 +951,7 @@ public class Server {
|
||||
tMan.register(new RespawnTask(), YamlConfig.config.server.RESPAWN_INTERVAL, YamlConfig.config.server.RESPAWN_INTERVAL);
|
||||
|
||||
timeLeft = getTimeLeftForNextDay();
|
||||
MapleExpeditionBossLog.resetBossLogTable();
|
||||
ExpeditionBossLog.resetBossLogTable();
|
||||
tMan.register(new BossLogTask(), 24 * 60 * 60 * 1000, timeLeft);
|
||||
}
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
*/
|
||||
package net.server.task;
|
||||
|
||||
import server.expeditions.MapleExpeditionBossLog;
|
||||
import server.expeditions.ExpeditionBossLog;
|
||||
|
||||
/**
|
||||
* @author Ronan
|
||||
@@ -28,6 +28,6 @@ public class BossLogTask implements Runnable {
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
MapleExpeditionBossLog.resetBossLogTable();
|
||||
ExpeditionBossLog.resetBossLogTable();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -39,7 +39,7 @@ import scripting.npc.NPCScriptManager;
|
||||
import server.MapleItemInformationProvider;
|
||||
import server.MapleMarriage;
|
||||
import server.expeditions.Expedition;
|
||||
import server.expeditions.MapleExpeditionBossLog;
|
||||
import server.expeditions.ExpeditionBossLog;
|
||||
import server.expeditions.MapleExpeditionType;
|
||||
import server.life.*;
|
||||
import server.maps.MapleMap;
|
||||
@@ -1076,7 +1076,7 @@ public class AbstractPlayerInteraction {
|
||||
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
|
||||
if (!ExpeditionBossLog.attemptBoss(player.getId(), channel, exped, false)) { // thanks Conrad for noticing missing expeditions entry limit
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
@@ -178,7 +178,7 @@ public class Expedition {
|
||||
}
|
||||
|
||||
int channel = this.getRecruitingMap().getChannelServer().getId();
|
||||
if (!MapleExpeditionBossLog.attemptBoss(player.getId(), channel, this, false)) { // thanks Conrad, Cato for noticing some expeditions have entry limit
|
||||
if (!ExpeditionBossLog.attemptBoss(player.getId(), channel, this, false)) { // thanks Conrad, Cato for noticing some expeditions have entry limit
|
||||
return "Sorry, you've already reached the quota of attempts for this expedition! Try again another day...";
|
||||
}
|
||||
|
||||
@@ -213,7 +213,7 @@ public class Expedition {
|
||||
int channel = this.getRecruitingMap().getChannelServer().getId();
|
||||
|
||||
for (Character chr : getActiveMembers()) {
|
||||
MapleExpeditionBossLog.attemptBoss(chr.getId(), channel, this, true);
|
||||
ExpeditionBossLog.attemptBoss(chr.getId(), channel, this, true);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -29,11 +29,10 @@ import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Conrad
|
||||
* @author Ronan
|
||||
*/
|
||||
public class MapleExpeditionBossLog {
|
||||
public class ExpeditionBossLog {
|
||||
|
||||
public enum BossLogEntry {
|
||||
ZAKUM(2, 1, false),
|
||||
@@ -42,16 +41,17 @@ public class MapleExpeditionBossLog {
|
||||
SCARGA(1, 1, false),
|
||||
PAPULATUS(2, 1, false);
|
||||
|
||||
private int entries;
|
||||
private int timeLength;
|
||||
private int minChannel, maxChannel;
|
||||
private boolean week;
|
||||
private final int entries;
|
||||
private final int timeLength;
|
||||
private final int minChannel;
|
||||
private final int maxChannel;
|
||||
private final boolean week;
|
||||
|
||||
private BossLogEntry(int entries, int timeLength, boolean week) {
|
||||
BossLogEntry(int entries, int timeLength, boolean week) {
|
||||
this(entries, 0, Integer.MAX_VALUE, timeLength, week);
|
||||
}
|
||||
|
||||
private BossLogEntry(int entries, int minChannel, int maxChannel, int timeLength, boolean week) {
|
||||
BossLogEntry(int entries, int minChannel, int maxChannel, int timeLength, boolean week) {
|
||||
this.entries = entries;
|
||||
this.minChannel = minChannel;
|
||||
this.maxChannel = maxChannel;
|
||||
@@ -106,14 +106,14 @@ public class MapleExpeditionBossLog {
|
||||
deltaTime -= halfDayLength;
|
||||
|
||||
if (deltaTime < halfDayLength) {
|
||||
MapleExpeditionBossLog.resetBossLogTable(true, thursday);
|
||||
ExpeditionBossLog.resetBossLogTable(true, thursday);
|
||||
}
|
||||
|
||||
now.set(Calendar.HOUR, 0);
|
||||
now.set(Calendar.MINUTE, 0);
|
||||
now.set(Calendar.SECOND, 0);
|
||||
|
||||
MapleExpeditionBossLog.resetBossLogTable(false, now);
|
||||
ExpeditionBossLog.resetBossLogTable(false, now);
|
||||
}
|
||||
|
||||
private static void resetBossLogTable(boolean week, Calendar c) {
|
||||
Reference in New Issue
Block a user