57006 {
57007
57008
57009
57010
57011
57012
57013
57014
57015
57016
57017
57018
57019
57020
57021
57022
57026 bool flag2 =
false;
57027 if (player.inventory[player.selectedItem].fishingPole == 0 || player.CCed || player.noItems)
57028 {
57030 }
57031 else if (player.inventory[player.selectedItem].shoot !=
type && !
flag)
57032 {
57034 }
57035 else if (player.pulley)
57036 {
57038 }
57039 else if (player.dead)
57040 {
57042 }
57044 {
57046 return;
57047 }
57049 {
57052 {
57054 }
57055 }
57057 {
57059 {
57063 {
57065 }
57066 }
57068 {
57070 }
57072 {
57075 }
57078 Vector2
vector =
default(Vector2);
57080 float num3 = player.position.X + (float)(player.width / 2) -
vector.X;
57081 float num4 = player.position.Y + (float)(player.height / 2) -
vector.Y;
57084 {
57086 }
57090 velocity.X = (velocity.X * (float)(
num - 1) +
num3) / (
float)
num;
57091 velocity.Y = (velocity.Y * (float)(
num - 1) +
num4) / (
float)
num;
57093 if (Main.myPlayer ==
owner)
57094 {
57096 if (((Rectangle)(
ref hitbox)).Intersects(player.Hitbox))
57097 {
57099 }
57100 }
57101 return;
57102 }
57103 bool flag3 =
false;
57104 Vector2
vector2 =
default(Vector2);
57106 float num6 = player.position.X + (float)(player.width / 2) -
vector2.X;
57107 float num7 = player.position.Y + (float)(player.height / 2) -
vector2.Y;
57110 {
57112 }
57114 {
57116 {
57117 if (Main.myPlayer ==
owner)
57118 {
57119 Main.player[
owner].AddBuff(353, 60);
57120 }
57122 {
57125 }
57126 }
57128 velocity.X *= 0.9f;
57131 _ = position.Y / 16
f;
57133 if (Main.tile[
num8,
num9] ==
null)
57134 {
57136 }
57138 {
57140 }
57142 {
57143 velocity.Y *= 0.5f;
57144 }
57149 {
57150 velocity.Y -= 0.1f;
57152 {
57154 }
57156 {
57157 velocity.Y =
num2 -
base.Center.Y;
57158 }
57159 }
57160 else
57161 {
57162 velocity.Y =
num2 -
base.Center.Y;
57163 }
57165 {
57167 }
57168 }
57169 else
57170 {
57172 {
57173 velocity.X *= 0.95f;
57174 }
57175 velocity.X *= 0.98f;
57176 velocity.Y += 0.2f;
57178 {
57179 velocity.Y = 15.9f;
57180 }
57181 }
57182 if (Main.myPlayer ==
owner && player.GetFishingConditions().BaitItemType == 2673)
57183 {
57185 }
57187 {
57189 }
57191 {
57192 return;
57193 }
57194 if (
ai[1] == 0
f && Main.myPlayer ==
owner)
57195 {
57198 {
57199 localAI[1] += Main.rand.Next(1, 3);
57200 }
57202 localAI[1] += Main.rand.Next(1, 3);
57203 if (Main.rand.Next(60) == 0)
57204 {
57206 }
57208 {
57211 }
57212 }
57213 else if (
ai[1] < 0
f)
57214 {
57216 {
57217 velocity.Y = (float)Main.rand.Next(100, 500) * 0.015f;
57218 velocity.X = (float)Main.rand.Next(-100, 101) * 0.015f;
57222 }
57223 ai[1] += Main.rand.Next(1, 5);
57225 {
57229 }
57230 }
57231 }
static SlotId PlaySound(in SoundStyle? style, Vector2? position=null, SoundUpdateCallback? updateCallback=null)
Attempts to play a sound style with the provided sound style (if it's not null), and returns a valid ...
bool wet
The Entity is currently in water. Projectile: Affects movement speed and some projectiles die when ...
Vector2 velocity
The velocity of this Entity in world coordinates per tick.
Vector2 position
The position of this Entity in world coordinates.
int width
The width of this Entity's hitbox, in pixels.
int height
The height of this Entity's hitbox, in pixels.
static readonly SoundStyle Item17
static string GetTextValue(string key)
Retrieves the text value for a specified localization key. The text returned will be for the currentl...
Contains methods to access or retrieve localization values. The Localization Guideteaches more about ...
float AI_061_FishingBobber_GetWaterLine(int X, int Y)
void AI_061_FishingBobber_DoASplash()
int owner
The index of the player who owns this projectile. In Multiplayer, Clients "own" projectiles that they...
float[] ai
An array with 3 slots used for any sort of data storage, which is occasionally synced to the server....
bool netUpdate
Set manually to true in M:Terraria.ModLoader.ModProjectile.AI once to make it sync its current F:Terr...
float[] localAI
Acts like F:Terraria.Projectile.ai, but does not sync to the server. Many vanilla T:Terraria....
void ReduceRemainingChumsInPool()
int type
The Projectile ID of this projectile. The Projectile ID is a unique number assigned to each Projectil...
bool tileCollide
If true, the projectile will collide with tiles, usually bouncing or killing the tile depending on M:...
int timeLeft
Time in ticks before this projectile will naturally despawn. Each update timeLeft is decreased by 1...
float rotation
Rotation of the projectile. Radians not Degrees. Use T:Microsoft.Xna.Framework.MathHelper if you want...
int frameCounter
Used as a timer to decide when to change F:Terraria.Projectile.frame. Defaults to 0.