|
|
|
@ -20,13 +20,17 @@ public class HellgateManager {
@@ -20,13 +20,17 @@ public class HellgateManager {
|
|
|
|
|
public static void Reset(Hellgate hellgate){ |
|
|
|
|
for(Mob mob : hellgate.mobs){ |
|
|
|
|
mob.respawn(); |
|
|
|
|
mob.destination = mob.bindLoc; |
|
|
|
|
mob.setLoc(mob.bindLoc); |
|
|
|
|
LootManager.GenerateStrongholdLoot(mob,false,false); |
|
|
|
|
} |
|
|
|
|
for(Mob mob : hellgate.mini_bosses){ |
|
|
|
|
mob.respawn(); |
|
|
|
|
mob.setLoc(mob.bindLoc); |
|
|
|
|
LootManager.GenerateStrongholdLoot(mob,true,false); |
|
|
|
|
} |
|
|
|
|
hellgate.boss.respawn(); |
|
|
|
|
hellgate.boss.setLoc(hellgate.boss.bindLoc); |
|
|
|
|
LootManager.GenerateStrongholdLoot(hellgate.boss,false,true); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -158,13 +162,13 @@ public class HellgateManager {
@@ -158,13 +162,13 @@ public class HellgateManager {
|
|
|
|
|
|
|
|
|
|
//handle MobAI controller
|
|
|
|
|
for(Hellgate hellgate : HellgateManager.hellgates){ |
|
|
|
|
for(Mob mob : hellgate.mobs){ |
|
|
|
|
MobAI.DetermineAction(mob); |
|
|
|
|
} |
|
|
|
|
for(Mob mob : hellgate.mini_bosses){ |
|
|
|
|
MobAI.DetermineAction(mob); |
|
|
|
|
} |
|
|
|
|
MobAI.DetermineAction(hellgate.boss); |
|
|
|
|
//for(Mob mob : hellgate.mobs){
|
|
|
|
|
// MobAI.DetermineAction(mob);
|
|
|
|
|
//}
|
|
|
|
|
//for(Mob mob : hellgate.mini_bosses){
|
|
|
|
|
// MobAI.DetermineAction(mob);
|
|
|
|
|
//}
|
|
|
|
|
//MobAI.DetermineAction(hellgate.boss);
|
|
|
|
|
|
|
|
|
|
//check if boss has been defeated
|
|
|
|
|
if(!hellgate.boss.isAlive() && hellgate.completionTime == 0L){ |
|
|
|
@ -181,7 +185,8 @@ public class HellgateManager {
@@ -181,7 +185,8 @@ public class HellgateManager {
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
//reset hellgate on 15 minute intervals
|
|
|
|
|
if(!hellgate.boss.isAlive() && hellgate.completionTime != 0L && hellgate.completionTime + MBServerStatics.FIFTEEN_MINUTES < System.currentTimeMillis()){ |
|
|
|
|
//if(!hellgate.boss.isAlive() && hellgate.completionTime != 0L && hellgate.completionTime + MBServerStatics.FIFTEEN_MINUTES < System.currentTimeMillis()){
|
|
|
|
|
if(!hellgate.boss.isAlive() && hellgate.completionTime != 0L && hellgate.completionTime + 5000 < System.currentTimeMillis()){ |
|
|
|
|
Reset(hellgate); |
|
|
|
|
ChatSystemMsg chatMsg = new ChatSystemMsg(null, "Citadel Ruins Hellgate Has Begun!"); |
|
|
|
|
chatMsg.setMessageType(10); |
|
|
|
|