forked from MagicBane/Server
HZ related stuff
This commit is contained in:
@@ -58,7 +58,7 @@ public class HotzoneManager {
|
|||||||
created.teleport(created.bindLoc);
|
created.teleport(created.bindLoc);
|
||||||
created.BehaviourType = Enum.MobBehaviourType.Aggro;
|
created.BehaviourType = Enum.MobBehaviourType.Aggro;
|
||||||
hotzoneMob = created;
|
hotzoneMob = created;
|
||||||
HellgateManager.SpecialLootHandler(created,true,true);
|
GenerateHotzoneEpicLoot(created);
|
||||||
|
|
||||||
for(PlayerCharacter player : SessionManager.getAllActivePlayerCharacters()) {
|
for(PlayerCharacter player : SessionManager.getAllActivePlayerCharacters()) {
|
||||||
HotzoneChangeMsg hcm = new HotzoneChangeMsg(Enum.GameObjectType.Zone.ordinal(), ZoneManager.hotZone.getObjectUUID());
|
HotzoneChangeMsg hcm = new HotzoneChangeMsg(Enum.GameObjectType.Zone.ordinal(), ZoneManager.hotZone.getObjectUUID());
|
||||||
@@ -153,4 +153,13 @@ public class HotzoneManager {
|
|||||||
mob.getCharItemManager().addItemToInventory(rune);
|
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);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -137,6 +137,13 @@ public enum SimulationManager {
|
|||||||
// Logger.error(e.getMessage());
|
// 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());
|
SimulationManager.executionTime = Duration.between(startTime, Instant.now());
|
||||||
|
|
||||||
if (executionTime.compareTo(executionMax) > 0)
|
if (executionTime.compareTo(executionMax) > 0)
|
||||||
|
|||||||
Reference in New Issue
Block a user