mirror of
https://gitlab.com/2009scape/2009scape.git
synced 2026-08-23 11:25:11 -06:00
make kq not enumerate local players twice
This commit is contained in:
parent
9c42c7e4c9
commit
2297aa6b32
1 changed files with 3 additions and 5 deletions
|
|
@ -315,12 +315,10 @@ public final class KalphiteQueenNPC extends AbstractNPC {
|
|||
return;
|
||||
}
|
||||
if (style == CombatStyle.MAGIC) {
|
||||
BattleState[] states = new BattleState[RegionManager.getLocalPlayers(entity.getLocation()).size() + 1];
|
||||
List<Player> localPlayers = RegionManager.getLocalPlayers(entity.getLocation());
|
||||
BattleState[] states = new BattleState[localPlayers.size() + 1];
|
||||
int index = 1;
|
||||
if (states.length == 0) {
|
||||
return;
|
||||
}
|
||||
for (Player p : RegionManager.getLocalPlayers(entity.getLocation())) {
|
||||
for (Player p : localPlayers) {
|
||||
if (p != victim) {
|
||||
states[index++] = new BattleState(entity, p);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue