Prohibit the use of duplicate Rnd methods.

This commit is contained in:
MobiusDev
2018-09-14 01:17:54 +00:00
parent 16ad1d2b48
commit b4e8040541
233 changed files with 596 additions and 594 deletions

View File

@@ -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);

View File

@@ -140,6 +140,6 @@ public final class Harvesting extends AbstractEffect
{
basicSuccess = 1;
}
return Rnd.nextInt(99) < basicSuccess;
return Rnd.get(99) < basicSuccess;
}
}

View File

@@ -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;
}
}