TModLoader v1.4.4.9
TModLoader source code documentation
Loading...
Searching...
No Matches

◆ FishingCheck_RollDropLevels()

void Terraria.Projectile.FishingCheck_RollDropLevels ( int fishingLevel,
out bool common,
out bool uncommon,
out bool rare,
out bool veryrare,
out bool legendary,
out bool crate )
inlineprivate

Definition at line 20348 of file Projectile.cs.

20349 {
20350 int num = 150 / fishingLevel;
20351 int num2 = 300 / fishingLevel;
20352 int num3 = 1050 / fishingLevel;
20353 int num4 = 2250 / fishingLevel;
20354 int num5 = 4500 / fishingLevel;
20355 int num6 = 10;
20356 if (Main.player[owner].cratePotion)
20357 {
20358 num6 += 15;
20359 }
20360 if (num < 2)
20361 {
20362 num = 2;
20363 }
20364 if (num2 < 3)
20365 {
20366 num2 = 3;
20367 }
20368 if (num3 < 4)
20369 {
20370 num3 = 4;
20371 }
20372 if (num4 < 5)
20373 {
20374 num4 = 5;
20375 }
20376 if (num5 < 6)
20377 {
20378 num5 = 6;
20379 }
20380 common = false;
20381 uncommon = false;
20382 rare = false;
20383 veryrare = false;
20384 legendary = false;
20385 crate = false;
20386 if (Main.rand.Next(num) == 0)
20387 {
20388 common = true;
20389 }
20390 if (Main.rand.Next(num2) == 0)
20391 {
20392 uncommon = true;
20393 }
20394 if (Main.rand.Next(num3) == 0)
20395 {
20396 rare = true;
20397 }
20398 if (Main.rand.Next(num4) == 0)
20399 {
20400 veryrare = true;
20401 }
20402 if (Main.rand.Next(num5) == 0)
20403 {
20404 legendary = true;
20405 }
20406 if (Main.rand.Next(100) < num6)
20407 {
20408 crate = true;
20409 }
20410 }
int owner
The index of the player who owns this projectile. In Multiplayer, Clients "own" projectiles that they...

References Terraria.Projectile.owner, Terraria.Main.player, and Terraria.Main.rand.

Referenced by Terraria.Projectile.FishingCheck().

+ Here is the caller graph for this function: