|
|
|
@ -68,6 +68,8 @@ public class HotzoneManager {
@@ -68,6 +68,8 @@ public class HotzoneManager {
|
|
|
|
|
created.teleport(created.bindLoc); |
|
|
|
|
created.BehaviourType = Enum.MobBehaviourType.Aggro; |
|
|
|
|
hotzoneMob = created; |
|
|
|
|
created.setHealth(100000); |
|
|
|
|
created.setResists(new Resists("Dropper")); |
|
|
|
|
GenerateHotzoneEpicLoot(created); |
|
|
|
|
ZoneManager.hotZone = newHotzone; |
|
|
|
|
|
|
|
|
@ -181,6 +183,14 @@ public class HotzoneManager {
@@ -181,6 +183,14 @@ public class HotzoneManager {
|
|
|
|
|
|
|
|
|
|
public static void ClearHotzone(){ |
|
|
|
|
ZoneManager.hotZone = null; |
|
|
|
|
HotzoneManager.playersPresent.clear(); |
|
|
|
|
if(hotzoneMob != null){ |
|
|
|
|
hotzoneMob.killCharacter("Hotzone Over"); |
|
|
|
|
hotzoneMob.despawn(); |
|
|
|
|
hotzoneMob.spawnTime = 1000000000; |
|
|
|
|
DbManager.MobQueries.DELETE_MOB( hotzoneMob); |
|
|
|
|
hotzoneMob = null; |
|
|
|
|
} |
|
|
|
|
for(PlayerCharacter player : SessionManager.getAllActivePlayerCharacters()) { |
|
|
|
|
HotzoneChangeMsg hcm = new HotzoneChangeMsg(Enum.GameObjectType.Zone.ordinal(), 0); |
|
|
|
|
Dispatch dispatch = Dispatch.borrow(player, hcm); |
|
|
|
@ -201,6 +211,20 @@ public class HotzoneManager {
@@ -201,6 +211,20 @@ public class HotzoneManager {
|
|
|
|
|
lastPulseTime = System.currentTimeMillis(); |
|
|
|
|
|
|
|
|
|
HashSet<AbstractWorldObject> inRange = WorldGrid.getObjectsInRangePartial(ZoneManager.hotZone.getLoc(),ZoneManager.hotZone.getBounds().getHalfExtents().x * 2, MBServerStatics.MASK_PLAYER); |
|
|
|
|
|
|
|
|
|
//clear out old players who aren't here anymore
|
|
|
|
|
for(Guild nation : HotzoneManager.playersPresent.keySet()){ |
|
|
|
|
for(PlayerCharacter pc : HotzoneManager.playersPresent.get(nation)){ |
|
|
|
|
if (!inRange.contains(pc)) { |
|
|
|
|
HotzoneManager.playersPresent.get(nation).remove(pc); |
|
|
|
|
if(HotzoneManager.playersPresent.get(nation).size() < 1){ |
|
|
|
|
HotzoneManager.playersPresent.remove(nation); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
//check status of current players/nation in vicinity
|
|
|
|
|
for(AbstractWorldObject awo : inRange){ |
|
|
|
|
PlayerCharacter pc = (PlayerCharacter)awo; |
|
|
|
|
Guild nation = pc.guild.getNation(); |
|
|
|
|