Fixed RandomCraftData getNewReward IOOBE.

This commit is contained in:
MobiusDevelopment 2022-04-21 21:25:48 +00:00
parent 90c72c5fb7
commit 7a268f0ff1
4 changed files with 4 additions and 4 deletions

View File

@ -122,7 +122,7 @@ public class RandomCraftData implements IXmlReader
final double random = Rnd.get(100d);
while (!REWARD_DATA.isEmpty())
{
if (REWARD_DATA.size() == _randomRewardIndex)
if (_randomRewardIndex == (REWARD_DATA.size() - 1))
{
randomizeRewards();
}

View File

@ -122,7 +122,7 @@ public class RandomCraftData implements IXmlReader
final double random = Rnd.get(100d);
while (!REWARD_DATA.isEmpty())
{
if (REWARD_DATA.size() == _randomRewardIndex)
if (_randomRewardIndex == (REWARD_DATA.size() - 1))
{
randomizeRewards();
}

View File

@ -122,7 +122,7 @@ public class RandomCraftData implements IXmlReader
final double random = Rnd.get(100d);
while (!REWARD_DATA.isEmpty())
{
if (REWARD_DATA.size() == _randomRewardIndex)
if (_randomRewardIndex == (REWARD_DATA.size() - 1))
{
randomizeRewards();
}

View File

@ -122,7 +122,7 @@ public class RandomCraftData implements IXmlReader
final double random = Rnd.get(100d);
while (!REWARD_DATA.isEmpty())
{
if (REWARD_DATA.size() == _randomRewardIndex)
if (_randomRewardIndex == (REWARD_DATA.size() - 1))
{
randomizeRewards();
}