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

◆ TryTeleportingCaughtMysticFrog()

bool Terraria.NPC.TryTeleportingCaughtMysticFrog ( )
inlineprivate

Definition at line 85484 of file NPC.cs.

85485 {
85486 //IL_0019: Unknown result type (might be due to invalid IL or missing references)
85487 //IL_001e: Unknown result type (might be due to invalid IL or missing references)
85488 //IL_0020: Unknown result type (might be due to invalid IL or missing references)
85489 //IL_0025: Unknown result type (might be due to invalid IL or missing references)
85490 //IL_002a: Unknown result type (might be due to invalid IL or missing references)
85491 //IL_002e: Unknown result type (might be due to invalid IL or missing references)
85492 //IL_0034: Unknown result type (might be due to invalid IL or missing references)
85493 //IL_00a7: Unknown result type (might be due to invalid IL or missing references)
85494 //IL_00b1: Unknown result type (might be due to invalid IL or missing references)
85495 //IL_00b6: Unknown result type (might be due to invalid IL or missing references)
85496 //IL_00bb: Unknown result type (might be due to invalid IL or missing references)
85497 //IL_00bc: Unknown result type (might be due to invalid IL or missing references)
85498 //IL_00f0: Unknown result type (might be due to invalid IL or missing references)
85499 //IL_00f7: Unknown result type (might be due to invalid IL or missing references)
85500 //IL_0049: Unknown result type (might be due to invalid IL or missing references)
85501 //IL_005f: Unknown result type (might be due to invalid IL or missing references)
85502 //IL_009b: Unknown result type (might be due to invalid IL or missing references)
85503 if (Main.netMode == 1)
85504 {
85505 return false;
85506 }
85507 if (type != 687)
85508 {
85509 return false;
85510 }
85511 Vector2 chosenTile = Vector2.Zero;
85512 Point point = base.Center.ToTileCoordinates();
85513 if (AI_AttemptToFindTeleportSpot(ref chosenTile, point.X, point.Y, 15, 8))
85514 {
85515 Vector2 newPos = default(Vector2);
85516 ((Vector2)(ref newPos))._002Ector(chosenTile.X * 16f - (float)(width / 2), chosenTile.Y * 16f - (float)height);
85517 NetMessage.SendData(23, -1, -1, null, whoAmI);
85518 Teleport(newPos, 13);
85519 return true;
85520 }
85521 Vector2 vector = base.Center - new Vector2(20f);
85522 Utils.PoofOfSmoke(vector);
85523 active = false;
85524 NetMessage.SendData(23, -1, -1, null, whoAmI);
85525 NetMessage.SendData(106, -1, -1, null, (int)vector.X, vector.Y);
85526 return false;
85527 }
int whoAmI
The index of this Entity within its specific array. These arrays track the entities in the world....
Definition Entity.cs:16
int width
The width of this Entity's hitbox, in pixels.
Definition Entity.cs:46
bool active
If true, the Entity actually exists within the game world. Within the specific entity array,...
Definition Entity.cs:21
int height
The height of this Entity's hitbox, in pixels.
Definition Entity.cs:51
void Teleport(Vector2 newPos, int Style=0, int extraInfo=0)
Definition NPC.cs:91555
int type
The NPC ID of this NPC. The NPC ID is a unique number assigned to each NPC loaded into the game....
Definition NPC.cs:990
bool AI_AttemptToFindTeleportSpot(ref Vector2 chosenTile, int targetTileX, int targetTileY, int rangeFromTargetTile=20, int telefragPreventionDistanceInTiles=5, int solidTileCheckFluff=1, bool solidTileCheckCentered=false, bool teleportInAir=false)
Definition NPC.cs:13811

References Terraria.Main.netMode, Terraria.Utils.PoofOfSmoke(), and Terraria.NetMessage.SendData().

+ Here is the call graph for this function: