determining weight
master
Lan 5 years ago
parent 43df999b02
commit 7adcb813c4
  1. 16
      Kehyeedra3/Commands/Economy.cs

@ -235,7 +235,7 @@ namespace Kehyeedra3.Commands
if (lastfish < time)
{
int rari = (SRandom.Next(0, 2001));
int weight = SRandom.Next(10 + Convert.ToInt32(level * 5), 1501);
int weight = SRandom.Next(Convert.ToInt32(level * 5), 1501);
ulong rarity;
if (level < 100)
@ -375,22 +375,23 @@ namespace Kehyeedra3.Commands
weight = 1000;
}
if (weight >= 1000)
{
size = FishSize.Medium;
if (weight >= (1000 - Convert.ToInt32(level * 2)))
{
weight = SRandom.Next(10, 2001) + Convert.ToInt32(level * 5);
weight = SRandom.Next(100, 2001) + Convert.ToInt32(level * 5);
}
if (weight >= 1000)
{
size = FishSize.Medium;
if (fish.Rarity == FishRarity.Legendary || fish.Rarity == FishRarity.T2Legendary || fish.Rarity == FishRarity.T3Legendary || fish.Rarity == FishRarity.T4Legendary)
{
weight = SRandom.Next(2000 + Convert.ToInt32(level * 20), 40001);
}
double w = Convert.ToDouble(weight);
if (weight >= 1000)
{
xp = Convert.ToUInt64(Math.Round((xp * w / 1000), 0, MidpointRounding.ToEven));
if (fish.Rarity == FishRarity.Legendary || fish.Rarity == FishRarity.T2Legendary || fish.Rarity == FishRarity.T3Legendary || fish.Rarity == FishRarity.T4Legendary)
{
if (xp < 100)
@ -399,7 +400,6 @@ namespace Kehyeedra3.Commands
}
}
}
}
else
{
size = FishSize.Small;

Loading…
Cancel
Save