This commit is contained in:
William Burns 2015-12-09 23:53:04 +00:00
parent b8a2304edd
commit 05bd55f720

View File

@ -2,6 +2,7 @@ package nautilus.game.arcade.game.games.gladiators;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.HashMap; import java.util.HashMap;
import java.util.Iterator;
import java.util.LinkedList; import java.util.LinkedList;
import java.util.Map; import java.util.Map;
import java.util.Queue; import java.util.Queue;
@ -388,6 +389,28 @@ public class Gladiators extends SoloGame
a.closeDoor(); a.closeDoor();
} }
@EventHandler
public void arenaCheckPlayer(UpdateEvent e)
{
if (!IsLive())
return;
if (e.getType() != UpdateType.TICK)
return;
for (Arena a : _gameArenaSet)
{
Iterator<Player> pls = a.getPastPlayers().iterator();
while (pls.hasNext())
{
Player p = pls.next();
if (!GetPlayers(true).contains(p))
pls.remove();
}
}
}
@EventHandler @EventHandler
public void arenaMoveCheck(PlayerMoveEvent e) public void arenaMoveCheck(PlayerMoveEvent e)
{ {
@ -427,25 +450,6 @@ public class Gladiators extends SoloGame
} }
} }
// @EventHandler
// public void arenaCheckPlayer(UpdateEvent e)
// {
// if (!IsLive())
// return;
//
// if (e.getType() != UpdateType.TICK)
// return;
//
// for (Arena a : _gameArenaSet)
// {
// for (Player p : a.getPastPlayers())
// {
// if (!GetPlayers(true).contains(p))
// a.getPastPlayers().remove(p);
// }
// }
// }
@EventHandler @EventHandler
public void arenaChange(PlayerChangeArenaEvent e) public void arenaChange(PlayerChangeArenaEvent e)
{ {