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

◆ FishingCheck_RollEnemySpawns()

void Terraria.Projectile.FishingCheck_RollEnemySpawns ( ref FishingAttempt fisher)
inlineprivate

Definition at line 19725 of file Projectile.cs.

19726 {
19727 if (fisher.inLava || fisher.inHoney || !Main.bloodMoon || Main.dayTime)
19728 {
19729 return;
19730 }
19731 int maxValue = 6;
19732 if (fisher.playerFishingConditions.PoleItemType == 4325)
19733 {
19734 maxValue = 3;
19735 }
19736 if (Main.rand.Next(maxValue) != 0)
19737 {
19738 return;
19739 }
19740 if (!NPC.unlockedSlimeRedSpawn && Main.rand.Next(5) == 0)
19741 {
19742 fisher.rolledEnemySpawn = 682;
19743 }
19744 else if (Main.hardMode)
19745 {
19746 fisher.rolledEnemySpawn = Utils.SelectRandom(Main.rand, new short[4] { 620, 621, 586, 587 });
19747 if (Main.rand.Next(10) == 0)
19748 {
19749 fisher.rolledEnemySpawn = 618;
19750 }
19751 }
19752 else
19753 {
19754 fisher.rolledEnemySpawn = Utils.SelectRandom(Main.rand, new short[2] { 586, 587 });
19755 }
19756 }

References Terraria.Main.bloodMoon, Terraria.Main.dayTime, Terraria.Main.hardMode, Terraria.Main.rand, and Terraria.NPC.unlockedSlimeRedSpawn.

Referenced by Terraria.Projectile.FishingCheck().

+ Here is the caller graph for this function: