Better naming from raidboss status getter and setter.
This commit is contained in:
@@ -206,7 +206,7 @@ public class Antharas extends Quest
|
||||
LOGGER.warning(e.getMessage());
|
||||
}
|
||||
|
||||
Integer status = GrandBossManager.getInstance().getBossStatus(ANTHARAS_OLD);
|
||||
Integer status = GrandBossManager.getInstance().getStatus(ANTHARAS_OLD);
|
||||
if (FWA_OLDANTHARAS || (status == WAITING))
|
||||
{
|
||||
final StatSet info = GrandBossManager.getInstance().getStatSet(ANTHARAS_OLD);
|
||||
@@ -215,7 +215,7 @@ public class Antharas extends Quest
|
||||
{
|
||||
// The time has already expired while the server was offline. Immediately spawn antharas in his cave.
|
||||
// Also, the status needs to be changed to DORMANT.
|
||||
GrandBossManager.getInstance().setBossStatus(ANTHARAS_OLD, DORMANT);
|
||||
GrandBossManager.getInstance().setStatus(ANTHARAS_OLD, DORMANT);
|
||||
status = DORMANT;
|
||||
}
|
||||
else if (status == FIGHTING)
|
||||
@@ -248,9 +248,9 @@ public class Antharas extends Quest
|
||||
}
|
||||
else
|
||||
{
|
||||
final Integer statusWeak = GrandBossManager.getInstance().getBossStatus(ANTHARAS_WEAK);
|
||||
final Integer statusNormal = GrandBossManager.getInstance().getBossStatus(ANTHARAS_NORMAL);
|
||||
final Integer statusStrong = GrandBossManager.getInstance().getBossStatus(ANTHARAS_STRONG);
|
||||
final Integer statusWeak = GrandBossManager.getInstance().getStatus(ANTHARAS_WEAK);
|
||||
final Integer statusNormal = GrandBossManager.getInstance().getStatus(ANTHARAS_NORMAL);
|
||||
final Integer statusStrong = GrandBossManager.getInstance().getStatus(ANTHARAS_STRONG);
|
||||
int antharasId = 0;
|
||||
if ((statusWeak == FIGHTING) || (statusWeak == DEAD))
|
||||
{
|
||||
@@ -291,7 +291,7 @@ public class Antharas extends Quest
|
||||
{
|
||||
// The time has already expired while the server was offline. Immediately spawn antharas in his cave.
|
||||
// Also, the status needs to be changed to DORMANT.
|
||||
GrandBossManager.getInstance().setBossStatus(antharasId, DORMANT);
|
||||
GrandBossManager.getInstance().setStatus(antharasId, DORMANT);
|
||||
status = DORMANT;
|
||||
}
|
||||
else
|
||||
@@ -334,7 +334,7 @@ public class Antharas extends Quest
|
||||
{
|
||||
if (_monsterSpawnTask == null)
|
||||
{
|
||||
GrandBossManager.getInstance().setBossStatus(ANTHARAS_OLD, WAITING);
|
||||
GrandBossManager.getInstance().setStatus(ANTHARAS_OLD, WAITING);
|
||||
_monsterSpawnTask = ThreadPool.schedule(new AntharasSpawn(1), 60000 * Config.ANTHARAS_WAIT_TIME);
|
||||
}
|
||||
}
|
||||
@@ -418,8 +418,8 @@ public class Antharas extends Quest
|
||||
GrandBossManager.getInstance().addBoss(_antharas);
|
||||
_monsters.add(_antharas);
|
||||
_antharas.setImmobilized(true);
|
||||
GrandBossManager.getInstance().setBossStatus(ANTHARAS_OLD, DORMANT);
|
||||
GrandBossManager.getInstance().setBossStatus(npcId, FIGHTING);
|
||||
GrandBossManager.getInstance().setStatus(ANTHARAS_OLD, DORMANT);
|
||||
GrandBossManager.getInstance().setStatus(npcId, FIGHTING);
|
||||
_lastAction = System.currentTimeMillis();
|
||||
// Start repeating timer to check for inactivity.
|
||||
_activityCheckTask = ThreadPool.scheduleAtFixedRate(new CheckActivity(), 60000, 60000);
|
||||
@@ -710,7 +710,7 @@ public class Antharas extends Quest
|
||||
final Long temp = (System.currentTimeMillis() - _lastAction);
|
||||
if (temp > (Config.ANTHARAS_DESPAWN_TIME * 60000))
|
||||
{
|
||||
GrandBossManager.getInstance().setBossStatus(_antharas.getNpcId(), DORMANT);
|
||||
GrandBossManager.getInstance().setStatus(_antharas.getNpcId(), DORMANT);
|
||||
finishRaid();
|
||||
}
|
||||
}
|
||||
@@ -816,7 +816,7 @@ public class Antharas extends Quest
|
||||
@Override
|
||||
public void run()
|
||||
{
|
||||
GrandBossManager.getInstance().setBossStatus(_bossId, DORMANT);
|
||||
GrandBossManager.getInstance().setStatus(_bossId, DORMANT);
|
||||
if (FWA_DOSERVEREARTHQUAKE)
|
||||
{
|
||||
for (Player p : World.getInstance().getAllPlayers())
|
||||
@@ -912,7 +912,7 @@ public class Antharas extends Quest
|
||||
{
|
||||
npc.broadcastPacket(new PlaySound(1, "BS01_D", npc));
|
||||
_cubeSpawnTask = ThreadPool.schedule(new CubeSpawn(0), 10000);
|
||||
GrandBossManager.getInstance().setBossStatus(npc.getNpcId(), DEAD);
|
||||
GrandBossManager.getInstance().setStatus(npc.getNpcId(), DEAD);
|
||||
final long respawnTime = (Config.ANTHARAS_RESP_FIRST + getRandom(Config.ANTHARAS_RESP_SECOND)) * 3600000;
|
||||
ThreadPool.schedule(new UnlockAntharas(npc.getNpcId()), respawnTime);
|
||||
// Also save the respawn time so that the info is maintained past restarts.
|
||||
|
@@ -103,7 +103,7 @@ public class Baium extends Quest
|
||||
_zone = GrandBossManager.getInstance().getZone(113100, 14500, 10077);
|
||||
|
||||
final StatSet info = GrandBossManager.getInstance().getStatSet(LIVE_BAIUM);
|
||||
final Integer status = GrandBossManager.getInstance().getBossStatus(LIVE_BAIUM);
|
||||
final Integer status = GrandBossManager.getInstance().getStatus(LIVE_BAIUM);
|
||||
if (status == DEAD)
|
||||
{
|
||||
// Load the unlock date and time for baium from DB.
|
||||
@@ -118,7 +118,7 @@ public class Baium extends Quest
|
||||
{
|
||||
// The time has already expired while the server was offline. Delete the saved time and immediately spawn the stone-baium. Also the state need not be changed from ASLEEP.
|
||||
addSpawn(STONE_BAIUM, 116033, 17447, 10104, 40188, false, 0);
|
||||
GrandBossManager.getInstance().setBossStatus(LIVE_BAIUM, ASLEEP);
|
||||
GrandBossManager.getInstance().setStatus(LIVE_BAIUM, ASLEEP);
|
||||
}
|
||||
}
|
||||
else if (status == AWAKE)
|
||||
@@ -158,7 +158,7 @@ public class Baium extends Quest
|
||||
{
|
||||
if (event.equals("baium_unlock"))
|
||||
{
|
||||
GrandBossManager.getInstance().setBossStatus(LIVE_BAIUM, ASLEEP);
|
||||
GrandBossManager.getInstance().setStatus(LIVE_BAIUM, ASLEEP);
|
||||
addSpawn(STONE_BAIUM, 116033, 17447, 10104, 40188, false, 0);
|
||||
}
|
||||
else if (event.equals("skill_range") && (npc != null))
|
||||
@@ -237,7 +237,7 @@ public class Baium extends Quest
|
||||
}
|
||||
_minions.clear();
|
||||
addSpawn(STONE_BAIUM, 116033, 17447, 10104, 40188, false, 0); // Spawn stone-baium.
|
||||
GrandBossManager.getInstance().setBossStatus(LIVE_BAIUM, ASLEEP); // Mark that Baium is not awake any more.
|
||||
GrandBossManager.getInstance().setStatus(LIVE_BAIUM, ASLEEP); // Mark that Baium is not awake any more.
|
||||
_zone.oustAllPlayers();
|
||||
cancelQuestTimer("baium_despawn", npc, null);
|
||||
}
|
||||
@@ -245,7 +245,7 @@ public class Baium extends Quest
|
||||
{
|
||||
npc.setTarget(npc);
|
||||
npc.doCast(SkillTable.getInstance().getSkill(4135, 1));
|
||||
if (GrandBossManager.getInstance().getBossStatus(LIVE_BAIUM) != AWAKE)
|
||||
if (GrandBossManager.getInstance().getStatus(LIVE_BAIUM) != AWAKE)
|
||||
{
|
||||
cancelQuestTimer("baium_despawn", npc, null);
|
||||
}
|
||||
@@ -269,13 +269,13 @@ public class Baium extends Quest
|
||||
return "<html><body>Angelic Vortex:<br>You may not enter while admin disabled this zone</body></html>";
|
||||
}
|
||||
|
||||
final Integer status = GrandBossManager.getInstance().getBossStatus(LIVE_BAIUM);
|
||||
final Integer status = GrandBossManager.getInstance().getStatus(LIVE_BAIUM);
|
||||
if ((npcId == STONE_BAIUM) && (status == ASLEEP))
|
||||
{
|
||||
if (Config.ALLOW_DIRECT_TP_TO_BOSS_ROOM || _zone.isPlayerAllowed(player))
|
||||
{
|
||||
// Once Baium is awaken, no more people may enter until he dies, the server reboots, or 30 minutes pass with no attacks made against Baium.
|
||||
GrandBossManager.getInstance().setBossStatus(LIVE_BAIUM, AWAKE);
|
||||
GrandBossManager.getInstance().setStatus(LIVE_BAIUM, AWAKE);
|
||||
npc.deleteMe();
|
||||
final GrandBoss baium = (GrandBoss) addSpawn(LIVE_BAIUM, npc);
|
||||
GrandBossManager.getInstance().addBoss(baium);
|
||||
@@ -385,7 +385,7 @@ public class Baium extends Quest
|
||||
addSpawn(29055, 115203, 16620, 10078, 0, false, 900000); // Should we teleport everyone out if the cubic despawns??
|
||||
// Lock baium for 5 days and 1 to 8 hours [i.e. 432,000,000 + 1*3,600,000 + random-less-than(8*3,600,000) millisecs]
|
||||
final long respawnTime = (Config.BAIUM_RESP_FIRST + getRandom(Config.BAIUM_RESP_SECOND)) * 3600000;
|
||||
GrandBossManager.getInstance().setBossStatus(LIVE_BAIUM, DEAD);
|
||||
GrandBossManager.getInstance().setStatus(LIVE_BAIUM, DEAD);
|
||||
startQuestTimer("baium_unlock", respawnTime, null, null);
|
||||
// Also save the respawn time so that the info is maintained past reboots.
|
||||
final StatSet info = GrandBossManager.getInstance().getStatSet(LIVE_BAIUM);
|
||||
|
@@ -99,7 +99,7 @@ public class Core extends Quest
|
||||
|
||||
_firstAttacked = false;
|
||||
final StatSet info = GrandBossManager.getInstance().getStatSet(CORE);
|
||||
if (GrandBossManager.getInstance().getBossStatus(CORE) == DEAD)
|
||||
if (GrandBossManager.getInstance().getStatus(CORE) == DEAD)
|
||||
{
|
||||
// Load the unlock date and time for Core from DB.
|
||||
final long temp = info.getLong("respawn_time") - System.currentTimeMillis();
|
||||
@@ -112,7 +112,7 @@ public class Core extends Quest
|
||||
{
|
||||
// The time has already expired while the server was offline. Immediately spawn Core.
|
||||
final GrandBoss core = (GrandBoss) addSpawn(CORE, 17726, 108915, -6480, 0, false, 0);
|
||||
GrandBossManager.getInstance().setBossStatus(CORE, ALIVE);
|
||||
GrandBossManager.getInstance().setStatus(CORE, ALIVE);
|
||||
spawnBoss(core);
|
||||
}
|
||||
}
|
||||
@@ -151,11 +151,11 @@ public class Core extends Quest
|
||||
@Override
|
||||
public String onAdvEvent(String event, Npc npc, Player player)
|
||||
{
|
||||
final Integer status = GrandBossManager.getInstance().getBossStatus(CORE);
|
||||
final Integer status = GrandBossManager.getInstance().getStatus(CORE);
|
||||
if (event.equals("core_unlock"))
|
||||
{
|
||||
final GrandBoss core = (GrandBoss) addSpawn(CORE, 17726, 108915, -6480, 0, false, 0);
|
||||
GrandBossManager.getInstance().setBossStatus(CORE, ALIVE);
|
||||
GrandBossManager.getInstance().setStatus(CORE, ALIVE);
|
||||
spawnBoss(core);
|
||||
}
|
||||
else if (status == null)
|
||||
@@ -216,7 +216,7 @@ public class Core extends Quest
|
||||
_firstAttacked = false;
|
||||
addSpawn(31842, 16502, 110165, -6394, 0, false, 900000);
|
||||
addSpawn(31842, 18948, 110166, -6397, 0, false, 900000);
|
||||
GrandBossManager.getInstance().setBossStatus(CORE, DEAD);
|
||||
GrandBossManager.getInstance().setStatus(CORE, DEAD);
|
||||
// Calculate Min and Max respawn times randomly.
|
||||
final long respawnTime = (Config.CORE_RESP_FIRST + getRandom(Config.CORE_RESP_SECOND)) * 3600000;
|
||||
startQuestTimer("core_unlock", respawnTime, null, null);
|
||||
@@ -227,7 +227,7 @@ public class Core extends Quest
|
||||
startQuestTimer("despawn_minions", 20000, null, null);
|
||||
cancelQuestTimers("spawn_minion");
|
||||
}
|
||||
else if ((GrandBossManager.getInstance().getBossStatus(CORE) == ALIVE) && _minions.contains(npc))
|
||||
else if ((GrandBossManager.getInstance().getStatus(CORE) == ALIVE) && _minions.contains(npc))
|
||||
{
|
||||
_minions.remove(npc);
|
||||
startQuestTimer("spawn_minion", Config.CORE_RESP_MINION * 1000, npc, null);
|
||||
|
@@ -54,7 +54,7 @@ public class Orfen extends Quest
|
||||
super(-1, "ai/bosses");
|
||||
|
||||
final StatSet info = GrandBossManager.getInstance().getStatSet(ORFEN);
|
||||
final Integer status = GrandBossManager.getInstance().getBossStatus(ORFEN);
|
||||
final Integer status = GrandBossManager.getInstance().getStatus(ORFEN);
|
||||
|
||||
addEventId(ORFEN, EventType.ON_KILL);
|
||||
addEventId(ORFEN, EventType.ON_ATTACK);
|
||||
@@ -71,7 +71,7 @@ public class Orfen extends Quest
|
||||
else
|
||||
{
|
||||
_orfen = (GrandBoss) addSpawn(ORFEN, 55024, 17368, -5412, 0, false, 0);
|
||||
GrandBossManager.getInstance().setBossStatus(ORFEN, LIVE);
|
||||
GrandBossManager.getInstance().setStatus(ORFEN, LIVE);
|
||||
GrandBossManager.getInstance().addBoss(_orfen);
|
||||
}
|
||||
break;
|
||||
@@ -92,7 +92,7 @@ public class Orfen extends Quest
|
||||
final int loc_z = -5412;
|
||||
final int heading = 0;
|
||||
_orfen = (GrandBoss) addSpawn(ORFEN, loc_x, loc_y, loc_z, heading, false, 0);
|
||||
GrandBossManager.getInstance().setBossStatus(ORFEN, LIVE);
|
||||
GrandBossManager.getInstance().setStatus(ORFEN, LIVE);
|
||||
GrandBossManager.getInstance().addBoss(_orfen);
|
||||
break;
|
||||
}
|
||||
@@ -113,7 +113,7 @@ public class Orfen extends Quest
|
||||
final int loc_z = -5412;
|
||||
final int heading = 0;
|
||||
_orfen = (GrandBoss) addSpawn(ORFEN, loc_x, loc_y, loc_z, heading, false, 0);
|
||||
GrandBossManager.getInstance().setBossStatus(ORFEN, LIVE);
|
||||
GrandBossManager.getInstance().setStatus(ORFEN, LIVE);
|
||||
GrandBossManager.getInstance().addBoss(_orfen);
|
||||
break;
|
||||
}
|
||||
@@ -210,7 +210,7 @@ public class Orfen extends Quest
|
||||
if (npc.getNpcId() == ORFEN)
|
||||
{
|
||||
npc.broadcastPacket(new PlaySound(1, "BS02_D", npc));
|
||||
GrandBossManager.getInstance().setBossStatus(ORFEN, DEAD);
|
||||
GrandBossManager.getInstance().setStatus(ORFEN, DEAD);
|
||||
// Time is 48hour +/- 20hour.
|
||||
final long respawnTime = (Config.ORFEN_RESP_FIRST + getRandom(Config.ORFEN_RESP_SECOND)) * 3600000;
|
||||
cancelQuestTimer("ORFEN_REFRESH", npc, null);
|
||||
|
@@ -85,7 +85,7 @@ public class QueenAnt extends Quest
|
||||
}
|
||||
|
||||
final StatSet info = GrandBossManager.getInstance().getStatSet(QUEEN);
|
||||
final Integer status = GrandBossManager.getInstance().getBossStatus(QUEEN);
|
||||
final Integer status = GrandBossManager.getInstance().getStatus(QUEEN);
|
||||
|
||||
switch (status)
|
||||
{
|
||||
@@ -99,7 +99,7 @@ public class QueenAnt extends Quest
|
||||
else
|
||||
{
|
||||
final GrandBoss queen = (GrandBoss) addSpawn(QUEEN, -21610, 181594, -5734, 0, false, 0);
|
||||
GrandBossManager.getInstance().setBossStatus(QUEEN, LIVE);
|
||||
GrandBossManager.getInstance().setStatus(QUEEN, LIVE);
|
||||
GrandBossManager.getInstance().addBoss(queen);
|
||||
spawnBoss(queen);
|
||||
}
|
||||
@@ -118,7 +118,7 @@ public class QueenAnt extends Quest
|
||||
default:
|
||||
{
|
||||
final GrandBoss queen = (GrandBoss) addSpawn(QUEEN, -21610, 181594, -5734, 0, false, 0);
|
||||
GrandBossManager.getInstance().setBossStatus(QUEEN, LIVE);
|
||||
GrandBossManager.getInstance().setStatus(QUEEN, LIVE);
|
||||
GrandBossManager.getInstance().addBoss(queen);
|
||||
spawnBoss(queen);
|
||||
break;
|
||||
@@ -151,7 +151,7 @@ public class QueenAnt extends Quest
|
||||
case QUEEN_SPAWN:
|
||||
{
|
||||
final GrandBoss queen = (GrandBoss) addSpawn(QUEEN, -21610, 181594, -5734, 0, false, 0);
|
||||
GrandBossManager.getInstance().setBossStatus(QUEEN, LIVE);
|
||||
GrandBossManager.getInstance().setStatus(QUEEN, LIVE);
|
||||
GrandBossManager.getInstance().addBoss(queen);
|
||||
spawnBoss(queen);
|
||||
break;
|
||||
@@ -334,11 +334,11 @@ public class QueenAnt extends Quest
|
||||
public String onKill(Npc npc, Player killer, boolean isPet)
|
||||
{
|
||||
final int npcId = npc.getNpcId();
|
||||
final Integer status = GrandBossManager.getInstance().getBossStatus(QUEEN);
|
||||
final Integer status = GrandBossManager.getInstance().getStatus(QUEEN);
|
||||
if (npcId == QUEEN)
|
||||
{
|
||||
npc.broadcastPacket(new PlaySound(1, "BS02_D", npc));
|
||||
GrandBossManager.getInstance().setBossStatus(QUEEN, DEAD);
|
||||
GrandBossManager.getInstance().setStatus(QUEEN, DEAD);
|
||||
// Time is 36hour +/- 17hour.
|
||||
final long respawnTime = (Config.QA_RESP_FIRST + getRandom(Config.QA_RESP_SECOND)) * 3600000;
|
||||
startQuestTimer("QUEEN_SPAWN", respawnTime, null, null);
|
||||
|
@@ -87,7 +87,7 @@ public class Valakas extends Quest
|
||||
_zone = GrandBossManager.getInstance().getZone(212852, -114842, -1632);
|
||||
|
||||
final StatSet info = GrandBossManager.getInstance().getStatSet(VALAKAS);
|
||||
final Integer status = GrandBossManager.getInstance().getBossStatus(VALAKAS);
|
||||
final Integer status = GrandBossManager.getInstance().getStatus(VALAKAS);
|
||||
if (status == DEAD)
|
||||
{
|
||||
// Load the unlock date and time for valakas from DB.
|
||||
@@ -102,7 +102,7 @@ public class Valakas extends Quest
|
||||
{
|
||||
// The time has already expired while the server was offline.
|
||||
// The status needs to be changed to DORMANT.
|
||||
GrandBossManager.getInstance().setBossStatus(VALAKAS, DORMANT);
|
||||
GrandBossManager.getInstance().setStatus(VALAKAS, DORMANT);
|
||||
}
|
||||
}
|
||||
else if (status == FIGHTING)
|
||||
@@ -156,7 +156,7 @@ public class Valakas extends Quest
|
||||
break;
|
||||
}
|
||||
}
|
||||
final Integer status = GrandBossManager.getInstance().getBossStatus(VALAKAS);
|
||||
final Integer status = GrandBossManager.getInstance().getStatus(VALAKAS);
|
||||
if ((status == FIGHTING) && ((System.currentTimeMillis() - lastAttackTime) > (Config.VALAKAS_DESPAWN_TIME * 60000))) // 15 mins by default.
|
||||
{
|
||||
npc.getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE);
|
||||
@@ -164,7 +164,7 @@ public class Valakas extends Quest
|
||||
// delete the actual boss
|
||||
final GrandBoss boss = GrandBossManager.getInstance().deleteBoss(VALAKAS);
|
||||
boss.decayMe();
|
||||
GrandBossManager.getInstance().setBossStatus(VALAKAS, DORMANT);
|
||||
GrandBossManager.getInstance().setStatus(VALAKAS, DORMANT);
|
||||
// npc.setCurrentHpMp(npc.getMaxHp(), npc.getMaxMp());
|
||||
_zone.oustAllPlayers();
|
||||
cancelQuestTimer("check_activity_and_do_actions", npc, null);
|
||||
@@ -271,7 +271,7 @@ public class Valakas extends Quest
|
||||
}
|
||||
case "1110":
|
||||
{
|
||||
GrandBossManager.getInstance().setBossStatus(VALAKAS, FIGHTING);
|
||||
GrandBossManager.getInstance().setStatus(VALAKAS, FIGHTING);
|
||||
startQuestTimer("check_activity_and_do_actions", 60000, npc, null, true);
|
||||
npc.setInvul(false);
|
||||
getRandomSkill(npc);
|
||||
@@ -356,7 +356,7 @@ public class Valakas extends Quest
|
||||
{
|
||||
// GrandBoss valakas = (GrandBoss) addSpawn(VALAKAS, -105200, -253104, -15264, 32768, false, 0);
|
||||
// GrandBossManager.getInstance().addBoss(valakas);
|
||||
GrandBossManager.getInstance().setBossStatus(VALAKAS, DORMANT);
|
||||
GrandBossManager.getInstance().setStatus(VALAKAS, DORMANT);
|
||||
}
|
||||
else if (event.equals("remove_players"))
|
||||
{
|
||||
@@ -589,7 +589,7 @@ public class Valakas extends Quest
|
||||
npc.broadcastPacket(new SpecialCamera(npc.getObjectId(), 1700, 2000, 130, -1, 0));
|
||||
npc.broadcastPacket(new PlaySound(1, "B03_D", npc));
|
||||
startQuestTimer("1111", 500, npc, null);
|
||||
GrandBossManager.getInstance().setBossStatus(VALAKAS, DEAD);
|
||||
GrandBossManager.getInstance().setStatus(VALAKAS, DEAD);
|
||||
final long respawnTime = (Config.VALAKAS_RESP_FIRST + getRandom(Config.VALAKAS_RESP_SECOND)) * 3600000;
|
||||
startQuestTimer("valakas_unlock", respawnTime, null, null);
|
||||
// Also save the respawn time so that the info is maintained past restarts.
|
||||
@@ -996,7 +996,7 @@ public class Valakas extends Quest
|
||||
{
|
||||
int i1 = 0;
|
||||
|
||||
final Integer status = GrandBossManager.getInstance().getBossStatus(VALAKAS);
|
||||
final Integer status = GrandBossManager.getInstance().getStatus(VALAKAS);
|
||||
if (status == FIGHTING)
|
||||
{
|
||||
if (npc.getCurrentHp() > ((npc.getMaxHp() * 1) / 4))
|
||||
|
@@ -164,7 +164,7 @@ public class Zaken extends Quest
|
||||
_zone = GrandBossManager.getInstance().getZone(55312, 219168, -3223);
|
||||
|
||||
final StatSet info = GrandBossManager.getInstance().getStatSet(ZAKEN);
|
||||
final Integer status = GrandBossManager.getInstance().getBossStatus(ZAKEN);
|
||||
final Integer status = GrandBossManager.getInstance().getStatus(ZAKEN);
|
||||
if (status == DEAD)
|
||||
{
|
||||
// Load the unlock date and time for zaken from DB.
|
||||
@@ -179,7 +179,7 @@ public class Zaken extends Quest
|
||||
{
|
||||
// The time has already expired while the server was offline. Immediately spawn Zaken.
|
||||
final GrandBoss zaken = (GrandBoss) addSpawn(ZAKEN, 55312, 219168, -3223, 0, false, 0);
|
||||
GrandBossManager.getInstance().setBossStatus(ZAKEN, ALIVE);
|
||||
GrandBossManager.getInstance().setStatus(ZAKEN, ALIVE);
|
||||
spawnBoss(zaken);
|
||||
}
|
||||
}
|
||||
@@ -575,10 +575,10 @@ public class Zaken extends Quest
|
||||
}
|
||||
case "zaken_unlock":
|
||||
{
|
||||
if (GrandBossManager.getInstance().getBossStatus(ZAKEN) != DEAD)
|
||||
if (GrandBossManager.getInstance().getStatus(ZAKEN) != DEAD)
|
||||
{
|
||||
final GrandBoss zaken = (GrandBoss) addSpawn(ZAKEN, 55312, 219168, -3223, 0, false, 0);
|
||||
GrandBossManager.getInstance().setBossStatus(ZAKEN, ALIVE);
|
||||
GrandBossManager.getInstance().setStatus(ZAKEN, ALIVE);
|
||||
spawnBoss(zaken);
|
||||
}
|
||||
break;
|
||||
@@ -827,11 +827,11 @@ public class Zaken extends Quest
|
||||
public String onKill(Npc npc, Player killer, boolean isPet)
|
||||
{
|
||||
final int npcId = npc.getNpcId();
|
||||
final Integer status = GrandBossManager.getInstance().getBossStatus(ZAKEN);
|
||||
final Integer status = GrandBossManager.getInstance().getStatus(ZAKEN);
|
||||
if (npcId == ZAKEN)
|
||||
{
|
||||
npc.broadcastPacket(new PlaySound(1, "BS02_D", npc));
|
||||
GrandBossManager.getInstance().setBossStatus(ZAKEN, DEAD);
|
||||
GrandBossManager.getInstance().setStatus(ZAKEN, DEAD);
|
||||
// Time is 36hour +/- 17hour.
|
||||
final long respawnTime = (Config.ZAKEN_RESP_FIRST + getRandom(Config.ZAKEN_RESP_SECOND)) * 3600000;
|
||||
startQuestTimer("zaken_unlock", respawnTime, null, null);
|
||||
|
@@ -93,10 +93,10 @@ public class GrandBossTeleporters extends Quest
|
||||
{
|
||||
if (antharasAI() != null)
|
||||
{
|
||||
final int status = GrandBossManager.getInstance().getBossStatus(29019);
|
||||
final int statusW = GrandBossManager.getInstance().getBossStatus(29066);
|
||||
final int statusN = GrandBossManager.getInstance().getBossStatus(29067);
|
||||
final int statusS = GrandBossManager.getInstance().getBossStatus(29068);
|
||||
final int status = GrandBossManager.getInstance().getStatus(29019);
|
||||
final int statusW = GrandBossManager.getInstance().getStatus(29066);
|
||||
final int statusN = GrandBossManager.getInstance().getStatus(29067);
|
||||
final int statusS = GrandBossManager.getInstance().getStatus(29068);
|
||||
if ((status == 2) || (statusW == 2) || (statusN == 2) || (statusS == 2))
|
||||
{
|
||||
htmltext = "13001-02.htm";
|
||||
@@ -142,7 +142,7 @@ public class GrandBossTeleporters extends Quest
|
||||
htmltext = "31385-01.htm";
|
||||
if (valakasAI() != null)
|
||||
{
|
||||
final int status = GrandBossManager.getInstance().getBossStatus(29028);
|
||||
final int status = GrandBossManager.getInstance().getStatus(29028);
|
||||
if ((status == 0) || (status == 1)) // If entrance to see Valakas is unlocked (he is Dormant or Waiting)
|
||||
{
|
||||
final QuestState st = player.getQuestState(getName());
|
||||
@@ -166,7 +166,7 @@ public class GrandBossTeleporters extends Quest
|
||||
{
|
||||
final GrandBoss valakas = GrandBossManager.getInstance().getBoss(29028);
|
||||
valakasAI().startQuestTimer("lock_entry_and_spawn_valakas", 60000 * Config.VALAKAS_WAIT_TIME, valakas, null);
|
||||
GrandBossManager.getInstance().setBossStatus(29028, 1);
|
||||
GrandBossManager.getInstance().setStatus(29028, 1);
|
||||
}
|
||||
}
|
||||
else // player cheated, wasn't ported via npc Klein
|
||||
|
Reference in New Issue
Block a user