disc dropper time delay
This commit is contained in:
@@ -456,7 +456,7 @@ public enum LootManager {
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
if((bse.itemBase == 3040 || bse.itemBase == 3021) && mob.level < 80){
|
if((bse.itemBase == 3040 || bse.itemBase == 3021) && mob.level < 80){
|
||||||
mob.setSpawnTime(3600);
|
mob.discDelay = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(mob.parentZone.getSafeZone() == 1) {
|
if(mob.parentZone.getSafeZone() == 1) {
|
||||||
|
|||||||
@@ -80,6 +80,7 @@ public class Mob extends AbstractIntelligenceAgent {
|
|||||||
private DeferredPowerJob weaponPower;
|
private DeferredPowerJob weaponPower;
|
||||||
private DateTime upgradeDateTime = null;
|
private DateTime upgradeDateTime = null;
|
||||||
private boolean lootSync = false;
|
private boolean lootSync = false;
|
||||||
|
public int discDelay = 6;
|
||||||
|
|
||||||
// New Mobile constructor. Fill in the blanks and then call
|
// New Mobile constructor. Fill in the blanks and then call
|
||||||
// PERSIST.
|
// PERSIST.
|
||||||
|
|||||||
@@ -256,12 +256,16 @@ public class WorldServer {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (LocalDateTime.now().isAfter(nextDiscSpawn)) {
|
if (LocalDateTime.now().isAfter(nextDiscSpawn)) {
|
||||||
for(Mob dropper : Mob.disciplineDroppers){
|
for(Mob dropper : Mob.disciplineDroppers) {
|
||||||
if(dropper.isAlive() == false){
|
if (dropper.discDelay == 6 && (LocalDateTime.now().getHour() == 6 || LocalDateTime.now().getHour() == 12 || LocalDateTime.now().getHour() == 18 || LocalDateTime.now().getHour() == 0)) {
|
||||||
|
if (!dropper.isAlive()) {
|
||||||
|
dropper.respawn();
|
||||||
|
}
|
||||||
|
} else if (!dropper.isAlive()) {
|
||||||
dropper.respawn();
|
dropper.respawn();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
nextDiscSpawn = LocalDateTime.now().plusHours(6).withMinute(0).withSecond(0);
|
nextDiscSpawn = LocalDateTime.now().plusHours(1).withMinute(0).withSecond(0);
|
||||||
}
|
}
|
||||||
ThreadUtils.sleep(50);
|
ThreadUtils.sleep(50);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user