Browse Source

Arena System

lakebane2
FatBoy-DOTC 2 weeks ago
parent
commit
a13d5018b9
  1. 3
      src/engine/gameManager/ArenaManager.java
  2. 8
      src/engine/gameManager/SimulationManager.java
  3. 8
      src/engine/objects/Contract.java

3
src/engine/gameManager/ArenaManager.java

@ -20,6 +20,9 @@ public class ArenaManager { @@ -20,6 +20,9 @@ public class ArenaManager {
lastExecution = System.currentTimeMillis();
}
if(activeArenas.isEmpty() && playerQueue.isEmpty())
return;
Iterator<Arena> iterator = activeArenas.iterator();
while (iterator.hasNext()) {

8
src/engine/gameManager/SimulationManager.java

@ -114,8 +114,16 @@ public enum SimulationManager { @@ -114,8 +114,16 @@ public enum SimulationManager {
try {
if ((_cityPulseTime != 0) && (System.currentTimeMillis() > _cityPulseTime)) {
try {
pulseCities();
}catch(Exception e){
}
try {
ArenaManager.pulseArenas();
}catch(Exception e){
}
}
} catch (Exception e) {
Logger.error(

8
src/engine/objects/Contract.java

@ -203,16 +203,16 @@ public class Contract extends AbstractGameObject { @@ -203,16 +203,16 @@ public class Contract extends AbstractGameObject {
switch(optionId){
case 15020431:
if(pc.isBoxed){
ChatManager.chatSystemInfo(pc, "You Cannot Join The Que, You Are Boxed");
}else {
//if(pc.isBoxed){
// ChatManager.chatSystemInfo(pc, "You Cannot Join The Que, You Are Boxed");
//}else {
if (ArenaManager.playerQueue.contains(pc)) {
ChatManager.chatSystemInfo(pc, "You Are Already In The Arena Que");
} else {
ArenaManager.joinQueue(pc);
ChatManager.chatSystemInfo(pc, "You Have Joined The Arena Que");
}
}
//}
break;
case 15020432:
if(ArenaManager.playerQueue.contains(pc)) {

Loading…
Cancel
Save