public void updateStatus(L2RaidBossInstance boss, boolean isBossDead)
{
if (!_storedInfo.containsKey(boss.getNpcId()))
return;
StatsSet info = _storedInfo.get(boss.getNpcId());
if (isBossDead)
{
boss.setRaidStatus(StatusEnum.DEAD);
long respawnTime;
int RespawnMinDelay = boss.getSpawn().getRespawnMinDelay();
int RespawnMaxDelay = boss.getSpawn().getRespawnMaxDelay();
long respawn_delay = Rnd.get((int)(RespawnMinDelay*1000*Config.RAID_MIN_RESPAWN_MULTIPLIER),(int)(RespawnMaxDelay*1000*Config.RAID_MAX_RESPAWN_MULTIPLIER));
respawnTime = Calendar.getInstance().getTimeInMillis() + respawn_delay;
info.set("currentHP", boss.getMaxHp());
info.set("currentMP", boss.getMaxMp());
info.set("respawnTime", respawnTime);
_log.info("RaidBossSpawnManager: Updated " + boss.getName() + " respawn time to " + respawnTime);
ScheduledFuture<?> futureSpawn;
futureSpawn = ThreadPoolManager.getInstance().scheduleGeneral(new spawnSchedule(boss.getNpcId()), respawn_delay);
_schedules.put(boss.getNpcId(), futureSpawn);
//To update immediately Database uncomment on the following line, to post the hour of respawn raid boss on your site for example or to envisage a crash landing of the waiter.
//updateDb();
}
else
{
boss.setRaidStatus(StatusEnum.ALIVE);
info.set("currentHP", boss.getCurrentHp());
info.set("currentMP", boss.getCurrentMp());
info.set("respawnTime", 0L);
}
_storedInfo.remove(boss.getNpcId());
_storedInfo.put(boss.getNpcId(), info);
}