Browse Source

Arena System

lakebane2
FatBoy-DOTC 2 weeks ago
parent
commit
a13d5018b9
  1. 3
      src/engine/gameManager/ArenaManager.java
  2. 12
      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 {
lastExecution = System.currentTimeMillis(); lastExecution = System.currentTimeMillis();
} }
if(activeArenas.isEmpty() && playerQueue.isEmpty())
return;
Iterator<Arena> iterator = activeArenas.iterator(); Iterator<Arena> iterator = activeArenas.iterator();
while (iterator.hasNext()) { while (iterator.hasNext()) {

12
src/engine/gameManager/SimulationManager.java

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

8
src/engine/objects/Contract.java

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

Loading…
Cancel
Save