Prohibit the use of duplicate Rnd methods.
This commit is contained in:
@@ -58,7 +58,7 @@ public final class AltarsOfSacrifice extends AbstractNpcAI
|
||||
spawn.setHeading(Rnd.get(65536));
|
||||
|
||||
final int radius = Rnd.get(BOSS_MIN_SPAWN_RADIUS, BOSS_MAX_SPAWN_RADIUS);
|
||||
final double angleRadians = Rnd.get() * 2 * Math.PI;
|
||||
final double angleRadians = Rnd.nextDouble() * 2 * Math.PI;
|
||||
final int spawnX = (int) (radius * Math.cos(angleRadians)) + _middlePoint.getX();
|
||||
final int spawnY = (int) (radius * Math.sin(angleRadians)) + _middlePoint.getY();
|
||||
|
||||
|
||||
@@ -87,7 +87,7 @@ public final class Confuse extends AbstractEffect
|
||||
if (!targetList.isEmpty())
|
||||
{
|
||||
// Choosing randomly a new target
|
||||
final L2Character target = targetList.get(Rnd.nextInt(targetList.size()));
|
||||
final L2Character target = targetList.get(Rnd.get(targetList.size()));
|
||||
// Attacking the target
|
||||
info.getEffected().setTarget(target);
|
||||
info.getEffected().getAI().setIntention(CtrlIntention.AI_INTENTION_ATTACK, target);
|
||||
|
||||
@@ -138,6 +138,6 @@ public final class Harvesting extends AbstractEffect
|
||||
{
|
||||
basicSuccess = 1;
|
||||
}
|
||||
return Rnd.nextInt(99) < basicSuccess;
|
||||
return Rnd.get(99) < basicSuccess;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -128,6 +128,6 @@ public final class Sow extends AbstractEffect
|
||||
|
||||
// chance can't be less than 1%
|
||||
Math.max(basicSuccess, 1);
|
||||
return Rnd.nextInt(99) < basicSuccess;
|
||||
return Rnd.get(99) < basicSuccess;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user