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

◆ ItemCheck_CheckFishingBobber_PullBobber()

void Terraria.Player.ItemCheck_CheckFishingBobber_PullBobber ( Projectile bobber,
int baitTypeUsed )
inlineprivate

Definition at line 53114 of file Player.cs.

53115 {
53116 //IL_00bc: Unknown result type (might be due to invalid IL or missing references)
53117 //IL_00c5: Unknown result type (might be due to invalid IL or missing references)
53118 //IL_00f8: Unknown result type (might be due to invalid IL or missing references)
53119 //IL_00fe: Unknown result type (might be due to invalid IL or missing references)
53120 if (baitTypeUsed == 2673)
53121 {
53122 if (Main.netMode != 1)
53123 {
53124 NPC.SpawnOnPlayer(whoAmI, 370);
53125 }
53126 else
53127 {
53128 NetMessage.SendData(61, -1, -1, null, whoAmI, 370f);
53129 }
53130 bobber.ai[0] = 2f;
53131 }
53132 else if (bobber.localAI[1] < 0f)
53133 {
53134 Point point = default(Point);
53135 ((Point)(ref point))._002Ector((int)bobber.position.X, (int)bobber.position.Y);
53136 int num = (int)(0f - bobber.localAI[1]);
53137 if (num == 618)
53138 {
53139 point.Y += 64;
53140 }
53141 if (Main.netMode == 1)
53142 {
53143 NetMessage.SendData(130, -1, -1, null, point.X / 16, point.Y / 16, num);
53144 }
53145 else
53146 {
53147 if (num == 682)
53148 {
53149 NPC.unlockedSlimeRedSpawn = true;
53150 }
53151 NPC.NewNPC(new EntitySource_FishedOut(this), point.X, point.Y, num);
53152 bobber.ai[0] = 2f;
53153 WorldGen.CheckAchievement_RealEstateAndTownSlimes();
53154 }
53155 }
53156 else if (Main.rand.Next(7) == 0 && !accFishingLine)
53157 {
53158 bobber.ai[0] = 2f;
53159 }
53160 else
53161 {
53162 bobber.ai[1] = bobber.localAI[1];
53163 }
53164 bobber.netUpdate = true;
53165 }
Used when an NPC spawns as a result of fishing.
int whoAmI
The index of this Entity within its specific array. These arrays track the entities in the world....
Definition Entity.cs:16
bool accFishingLine
If true, this player's fishing line will never break.
Definition Player.cs:1421

References Terraria.Player.accFishingLine, Terraria.Projectile.ai, Terraria.WorldGen.CheckAchievement_RealEstateAndTownSlimes(), Terraria.Projectile.localAI, Terraria.Main.netMode, Terraria.NPC.NewNPC(), Terraria.Entity.position, Terraria.Main.rand, Terraria.NetMessage.SendData(), Terraria.NPC.SpawnOnPlayer(), and Terraria.Entity.whoAmI.

Referenced by Terraria.Player.ItemCheck_CheckFishingBobbers().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: