You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
55 lines
1.8 KiB
55 lines
1.8 KiB
package engine.objects; |
|
|
|
import engine.gameManager.HellgateManager; |
|
import engine.gameManager.LootManager; |
|
import engine.gameManager.ZoneManager; |
|
import engine.math.Vector3fImmutable; |
|
import org.pmw.tinylog.Logger; |
|
|
|
import java.util.ArrayList; |
|
|
|
public class Hellgate { |
|
public Zone parent; |
|
public ArrayList<Vector3fImmutable> entrances; |
|
public ArrayList<Mob> mobs; |
|
public ArrayList<Mob> mini_bosses; |
|
public Mob boss; |
|
|
|
public Long completionTime; |
|
|
|
public Hellgate(Integer zoneID){ |
|
Zone parentZone = ZoneManager.getZoneByUUID(zoneID); |
|
if(parentZone == null){ |
|
Logger.error("Failed To Spawn Hellgate"); |
|
return; |
|
} |
|
this.parent = parentZone; |
|
this.entrances = new ArrayList<>(); |
|
Zone entrance1 = ZoneManager.getZoneByUUID(994); |
|
Zone entrance2 = ZoneManager.getZoneByUUID(996); |
|
Zone entrance3 = ZoneManager.getZoneByUUID(997); |
|
Zone entrance4 = ZoneManager.getZoneByUUID(998); |
|
//entrances.add(ZoneManager.getZoneByUUID(994).getLoc()); |
|
//entrances.add(ZoneManager.getZoneByUUID(996).getLoc()); |
|
//entrances.add(ZoneManager.getZoneByUUID(997).getLoc()); |
|
//entrances.add(ZoneManager.getZoneByUUID(998).getLoc()); |
|
this.mobs = new ArrayList<>(); |
|
this.mini_bosses = new ArrayList<>(); |
|
this.completionTime = 0L; |
|
this.init(); |
|
} |
|
|
|
public void init(){ |
|
HellgateManager.Spawn(this); |
|
for(Mob mob : this.mobs){ |
|
mob.respawn(); |
|
LootManager.GenerateStrongholdLoot(mob,false,false); |
|
} |
|
for(Mob mob : this.mini_bosses){ |
|
mob.respawn(); |
|
LootManager.GenerateStrongholdLoot(mob,true,false); |
|
} |
|
LootManager.GenerateStrongholdLoot(this.boss,false,true); |
|
} |
|
|
|
}
|
|
|