Browse Source

HZ related stuff

lakebane
FatBoy-DOTC 2 weeks ago
parent
commit
a7b9fec032
  1. 11
      src/engine/gameManager/HotzoneManager.java
  2. 7
      src/engine/gameManager/SimulationManager.java

11
src/engine/gameManager/HotzoneManager.java

@ -58,7 +58,7 @@ public class HotzoneManager { @@ -58,7 +58,7 @@ public class HotzoneManager {
created.teleport(created.bindLoc);
created.BehaviourType = Enum.MobBehaviourType.Aggro;
hotzoneMob = created;
HellgateManager.SpecialLootHandler(created,true,true);
GenerateHotzoneEpicLoot(created);
for(PlayerCharacter player : SessionManager.getAllActivePlayerCharacters()) {
HotzoneChangeMsg hcm = new HotzoneChangeMsg(Enum.GameObjectType.Zone.ordinal(), ZoneManager.hotZone.getObjectUUID());
@ -153,4 +153,13 @@ public class HotzoneManager { @@ -153,4 +153,13 @@ public class HotzoneManager {
mob.getCharItemManager().addItemToInventory(rune);
}
}
public static void ClearHotzone(){
ZoneManager.hotZone = null;
for(PlayerCharacter player : SessionManager.getAllActivePlayerCharacters()) {
HotzoneChangeMsg hcm = new HotzoneChangeMsg(Enum.GameObjectType.Zone.ordinal(), 0);
Dispatch dispatch = Dispatch.borrow(player, hcm);
DispatchMessage.dispatchMsgDispatch(dispatch, Enum.DispatchChannel.SECONDARY);
}
}
}

7
src/engine/gameManager/SimulationManager.java

@ -137,6 +137,13 @@ public enum SimulationManager { @@ -137,6 +137,13 @@ public enum SimulationManager {
// Logger.error(e.getMessage());
//}
try{
if(ZoneManager.hotZone != null && HotzoneManager.hotzoneMob != null && !HotzoneManager.hotzoneMob.isAlive()){
HotzoneManager.ClearHotzone();
}
}catch(Exception e){
}
SimulationManager.executionTime = Duration.between(startTime, Instant.now());
if (executionTime.compareTo(executionMax) > 0)

Loading…
Cancel
Save