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

◆ FishTransformationDuringRain()

void Terraria.NPC.FishTransformationDuringRain ( )
inlineprivate

Definition at line 89593 of file NPC.cs.

89594 {
89595 if (Main.netMode == 1)
89596 {
89597 return;
89598 }
89599 if (type == 230 && wet)
89600 {
89601 int num = direction;
89603 Transform(55);
89604 direction = num;
89605 velocity = vector;
89606 wet = true;
89607 if (velocity.Y < 0f)
89608 {
89609 velocity.Y = 0f;
89610 }
89611 }
89612 else if (type == 55 && !wet && Main.raining)
89613 {
89614 int num2 = direction;
89616 Transform(230);
89617 direction = num2;
89618 velocity = vector2;
89620 }
89621 else if (type == 593 && wet)
89622 {
89623 int num3 = direction;
89625 Transform(592);
89626 direction = num3;
89627 velocity = vector3;
89628 wet = true;
89629 if (velocity.Y < 0f)
89630 {
89631 velocity.Y = 0f;
89632 }
89633 }
89634 else if (type == 592 && !wet && Main.raining)
89635 {
89636 int num4 = direction;
89638 Transform(593);
89639 direction = num4;
89640 velocity = vector4;
89642 }
89643 }
Vector2 velocity
Definition Entity.cs:16
Vector2 position
Definition Entity.cs:14
void UpdateHomeTileState(bool homeless, int x, int y)
Definition NPC.cs:46195
int type
Definition NPC.cs:445
bool homeless
Definition NPC.cs:541
void Transform(int newType)
Definition NPC.cs:77913
int homeTileY
Definition NPC.cs:545

References Terraria.Main.netMode, Terraria.Main.raining, and System.type.