mirror of
https://gitlab.com/2009scape/2009scape.git
synced 2026-08-24 11:55:13 -06:00
rawtypes
This commit is contained in:
parent
fd45d82993
commit
ec41a9b564
4 changed files with 8 additions and 15 deletions
|
|
@ -56,7 +56,7 @@ public final class ChinchompaSwingHandler extends RangeSwingHandler {
|
|||
}
|
||||
|
||||
// https://oldschool.runescape.wiki/w/Chinchompa - shit source but it's better than what was here before
|
||||
@SuppressWarnings("rawtypes") List targetCandidates;
|
||||
List<? extends Entity> targetCandidates;
|
||||
if (victim instanceof Player) {
|
||||
targetCandidates = RegionManager.getSurroundingPlayers(victim, 9);
|
||||
} else {
|
||||
|
|
@ -64,8 +64,7 @@ public final class ChinchompaSwingHandler extends RangeSwingHandler {
|
|||
}
|
||||
BattleState[] targets = new BattleState[targetCandidates.size()];
|
||||
int count = 0;
|
||||
for (Object o : targetCandidates) {
|
||||
Entity e = (Entity) o;
|
||||
for (Entity e : targetCandidates) {
|
||||
if (e != entity && canSwing(entity, e) != InteractionType.NO_INTERACT && e.isAttackable(entity, CombatStyle.RANGE, false)) {
|
||||
BattleState s = targets[count++] = new BattleState(entity, e);
|
||||
s.setStyle(CombatStyle.RANGE);
|
||||
|
|
|
|||
|
|
@ -75,12 +75,10 @@ public final class PowerstabSpecialHandler extends MeleeSwingHandler implements
|
|||
if (!multi) {
|
||||
return super.swing(entity, victim, state);
|
||||
}
|
||||
@SuppressWarnings("rawtypes")
|
||||
List list = victim instanceof NPC ? RegionManager.getSurroundingNPCs(entity, 9) : RegionManager.getSurroundingPlayers(entity, 9);
|
||||
List<? extends Entity> list = victim instanceof NPC ? RegionManager.getSurroundingNPCs(entity, 9) : RegionManager.getSurroundingPlayers(entity, 9);
|
||||
BattleState[] targets = new BattleState[list.size()];
|
||||
int count = 0;
|
||||
for (Object o : list) {
|
||||
Entity e = (Entity) o;
|
||||
for (Entity e : list) {
|
||||
if (e != entity && CombatStyle.RANGE.getSwingHandler().canSwing(entity, e) != InteractionType.NO_INTERACT && e.isAttackable(entity, CombatStyle.RANGE, false)) {
|
||||
BattleState s = targets[count++] = new BattleState(entity, e);
|
||||
int hit = 0;
|
||||
|
|
|
|||
|
|
@ -76,12 +76,10 @@ public final class SpearWallSpecialHandler extends MeleeSwingHandler implements
|
|||
if (!multi) {
|
||||
return super.swing(entity, victim, state);
|
||||
}
|
||||
@SuppressWarnings("rawtypes")
|
||||
List list = victim instanceof NPC ? RegionManager.getSurroundingNPCs(entity, 9) : RegionManager.getSurroundingPlayers(entity, 9);
|
||||
List<? extends Entity> list = victim instanceof NPC ? RegionManager.getSurroundingNPCs(entity, 9) : RegionManager.getSurroundingPlayers(entity, 9);
|
||||
BattleState[] targets = new BattleState[list.size()];
|
||||
int count = 0;
|
||||
for (Object o : list) {
|
||||
Entity e = (Entity) o;
|
||||
for (Entity e : list) {
|
||||
if (e != entity && CombatStyle.RANGE.getSwingHandler().canSwing(entity, e) != InteractionType.NO_INTERACT && e.isAttackable(entity, CombatStyle.RANGE, false)) {
|
||||
BattleState s = targets[count++] = new BattleState(entity, e);
|
||||
int hit = 0;
|
||||
|
|
|
|||
|
|
@ -112,15 +112,13 @@ public final class Prayer {
|
|||
killer.getImpactHandler().manualHit(player, 1 + RandomFunction.randomize(maximum), HitsplatType.NORMAL);
|
||||
}
|
||||
if (player.getProperties().isMultiZone()) {
|
||||
@SuppressWarnings("rawtypes")
|
||||
List targets;
|
||||
List<? extends Entity> targets;
|
||||
if (killer instanceof NPC) {
|
||||
targets = RegionManager.getLocalNPCs(player.getLocation(), 1);
|
||||
} else {
|
||||
targets = RegionManager.getLocalPlayers(player.getLocation(), 1);
|
||||
}
|
||||
for (Object o : targets) {
|
||||
Entity entity = (Entity) o;
|
||||
for (Entity entity : targets) {
|
||||
if (entity == player) {
|
||||
continue;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue