addEventId(ZAKEN, Quest.QuestEventType.ON_KILL);
addEventId(ZAKEN, Quest.QuestEventType.ON_ATTACK);
_Zone = GrandBossManager.getInstance().getZone(55312, 219168, -3223);
StatsSet info = GrandBossManager.getInstance().getStatsSet(ZAKEN);
Integer status = GrandBossManager.getInstance().getBossStatus(ZAKEN);
if (status == DEAD)
{
// load the unlock date and time for zaken from DB
long temp = info.getLong("respawn_time") - System.currentTimeMillis();
// if zaken is locked until a certain time, mark it so and start the unlock timer
// the unlock time has not yet expired.
if (temp > 0)
startQuestTimer("zaken_unlock", temp, null, null);
else
{
// the time has already expired while the server was offline. Immediately spawn zaken.
L2GrandBossInstance zaken = (L2GrandBossInstance) addSpawn(ZAKEN, 55312, 219168, -3223, 0, false, 0);
GrandBossManager.getInstance().setBossStatus(ZAKEN, ALIVE);
spawnBoss(zaken);
}
}
else
{
int loc_x = info.getInteger("loc_x");
int loc_y = info.getInteger("loc_y");
int loc_z = info.getInteger("loc_z");
int heading = info.getInteger("heading");
int hp = info.getInteger("currentHP");
int mp = info.getInteger("currentMP");
L2GrandBossInstance zaken = (L2GrandBossInstance) addSpawn(ZAKEN, loc_x, loc_y, loc_z, heading, false, 0);
zaken.setCurrentHpMp(hp, mp);
spawnBoss(zaken);
}
}