Prohibit the use of duplicate Rnd methods.
This commit is contained in:
@@ -76,7 +76,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
|
||||
effected.setTarget(target);
|
||||
effected.getAI().setIntention(CtrlIntention.AI_INTENTION_ATTACK, target);
|
||||
|
@@ -140,6 +140,6 @@ public final class Harvesting extends AbstractEffect
|
||||
{
|
||||
basicSuccess = 1;
|
||||
}
|
||||
return Rnd.nextInt(99) < basicSuccess;
|
||||
return Rnd.get(99) < basicSuccess;
|
||||
}
|
||||
}
|
||||
|
@@ -129,6 +129,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