Browse Source

Arena System

lakebane2
FatBoy-DOTC 2 weeks ago
parent
commit
f9b7c8b851
  1. 6
      src/engine/gameManager/ArenaManager.java
  2. 2
      src/engine/objects/PlayerCharacter.java

6
src/engine/gameManager/ArenaManager.java

@ -78,7 +78,7 @@ public class ArenaManager { @@ -78,7 +78,7 @@ public class ArenaManager {
}
}
public static void endArena(Arena arena, PlayerCharacter winner, PlayerCharacter loser, String condition) throws MsgSendException {
public static void endArena(Arena arena, PlayerCharacter winner, PlayerCharacter loser, String condition){
if (winner != null && loser != null) {
Logger.info("[ARENA] The fight between {} and {} is concluded. Victor: {}",
arena.player1.getName(), arena.player2.getName(), winner.getName());
@ -86,10 +86,6 @@ public class ArenaManager { @@ -86,10 +86,6 @@ public class ArenaManager {
Logger.info("[ARENA] The fight between {} and {} is concluded. No Winner Declared.",
arena.player1.getName(), arena.player2.getName());
}
if(loser != null) {
PlayerCharacter.forceRespawn(loser);
loser.removeEffectBySource(Enum.EffectSourceType.DeathShroud,41,false);
}
// Teleport players to the arena location
Zone sdr = ZoneManager.getZoneByUUID(656);
MovementManager.translocate(arena.player1, Vector3fImmutable.getRandomPointOnCircle(sdr.getLoc(),50f), null);

2
src/engine/objects/PlayerCharacter.java

@ -4825,7 +4825,7 @@ public class PlayerCharacter extends AbstractCharacter { @@ -4825,7 +4825,7 @@ public class PlayerCharacter extends AbstractCharacter {
return false;
}
public static void forceRespawn(PlayerCharacter sourcePlayer) throws MsgSendException {
private static void forceRespawn(PlayerCharacter sourcePlayer) throws MsgSendException {
if (sourcePlayer == null)
return;

Loading…
Cancel
Save