Browse Source

hellgates maybe? round 7

lakebane
FatBoy-DOTC 3 weeks ago
parent
commit
e3ec9ac56f
  1. 21
      src/engine/gameManager/HellgateManager.java
  2. 1
      src/engine/objects/Mob.java

21
src/engine/gameManager/HellgateManager.java

@ -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);

1
src/engine/objects/Mob.java

@ -129,6 +129,7 @@ public class Mob extends AbstractIntelligenceAgent { @@ -129,6 +129,7 @@ public class Mob extends AbstractIntelligenceAgent {
this.parentZone = parent;
this.parentZoneID = (parent != null) ? parent.getObjectUUID() : 0;
this.building = building;
this.bonuses = new PlayerBonuses(this);
if (building != null)
this.buildingID = building.getObjectUUID();

Loading…
Cancel
Save