Minor Rnd method usage corrections.

This commit is contained in:
MobiusDev
2018-09-14 01:42:50 +00:00
parent b4e8040541
commit a2604e2048
55 changed files with 114 additions and 130 deletions

View File

@@ -653,7 +653,7 @@ public class Anakim extends AbstractNpcAI
@Override
public String onSkillSee(L2Npc npc, L2PcInstance caster, Skill skill, L2Object[] targets, boolean isPet)
{
if (CommonUtil.contains(ANAKIM_MINIONS, npc.getId()) && (Rnd.get(2) == 1))
if (CommonUtil.contains(ANAKIM_MINIONS, npc.getId()) && Rnd.nextBoolean())
{
if (skill.getAbnormalType() == AbnormalType.HP_RECOVER)
{

View File

@@ -669,7 +669,7 @@ public class Lilith extends AbstractNpcAI
@Override
public String onSkillSee(L2Npc npc, L2PcInstance caster, Skill skill, L2Object[] targets, boolean isPet)
{
if (CommonUtil.contains(LILITH_MINIONS, npc.getId()) && (Rnd.get(2) == 1))
if (CommonUtil.contains(LILITH_MINIONS, npc.getId()) && Rnd.nextBoolean())
{
if (skill.getAbnormalType() == AbnormalType.HP_RECOVER)
{

View File

@@ -76,7 +76,7 @@ public class Q00181_DevilsStrikeBackAdventOfBalok extends Quest
giveAdena(player, 37128000, true);
playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET);
qs.exitQuest(QuestType.ONE_TIME, true);
switch (Rnd.get(2))
switch (Rnd.get(3))
{
case 0:
{

View File

@@ -469,7 +469,7 @@ public class Q00620_FourGoblets extends Quest
}
else if (reward == 0)
{
if (Rnd.get(2) == 0)
if (Rnd.nextBoolean())
{
htmltext = "31454-14.htm";
}
@@ -918,7 +918,7 @@ public class Q00620_FourGoblets extends Quest
}
if (reward == 0)
{
if (Rnd.get(2) == 0)
if (Rnd.nextBoolean())
{
htmltext = "31919-4.htm";
}