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

◆ MagicConch()

void Terraria.Player.MagicConch ( )
inline

Definition at line 56812 of file Player.cs.

56813 {
56814 //IL_008c: Unknown result type (might be due to invalid IL or missing references)
56815 //IL_0091: Unknown result type (might be due to invalid IL or missing references)
56816 //IL_00e3: Unknown result type (might be due to invalid IL or missing references)
56817 //IL_00ef: Unknown result type (might be due to invalid IL or missing references)
56818 //IL_0104: Unknown result type (might be due to invalid IL or missing references)
56819 //IL_0109: Unknown result type (might be due to invalid IL or missing references)
56820 //IL_010e: Unknown result type (might be due to invalid IL or missing references)
56821 //IL_016e: Unknown result type (might be due to invalid IL or missing references)
56822 //IL_0173: Unknown result type (might be due to invalid IL or missing references)
56823 //IL_0176: Unknown result type (might be due to invalid IL or missing references)
56824 //IL_0180: Unknown result type (might be due to invalid IL or missing references)
56825 //IL_0185: Unknown result type (might be due to invalid IL or missing references)
56826 //IL_0113: Unknown result type (might be due to invalid IL or missing references)
56827 //IL_0115: Unknown result type (might be due to invalid IL or missing references)
56828 //IL_0118: Unknown result type (might be due to invalid IL or missing references)
56829 //IL_0122: Unknown result type (might be due to invalid IL or missing references)
56830 //IL_0127: Unknown result type (might be due to invalid IL or missing references)
56831 //IL_0199: Unknown result type (might be due to invalid IL or missing references)
56832 //IL_01b1: Unknown result type (might be due to invalid IL or missing references)
56833 //IL_01b8: Unknown result type (might be due to invalid IL or missing references)
56834 //IL_013e: Unknown result type (might be due to invalid IL or missing references)
56835 //IL_0156: Unknown result type (might be due to invalid IL or missing references)
56836 //IL_015d: Unknown result type (might be due to invalid IL or missing references)
56837 bool flag = position.X / 16f < (float)(Main.maxTilesX / 2);
56838 bool flag2 = false;
56839 int num = 50;
56840 int num2 = 50;
56841 int num3 = WorldGen.beachDistance - num - num2;
56842 if (flag)
56843 {
56844 num3 = Main.maxTilesX - num3 - 1 - num2;
56845 }
56846 else
56847 {
56848 num3 -= num2 / 2;
56849 }
56850 _ = (float)Main.maxTilesY / 1200f;
56851 _ = (float)Main.maxTilesY / 1200f;
56852 new RandomTeleportationAttemptSettings
56853 {
56854 avoidAnyLiquid = true,
56855 avoidHurtTiles = true,
56856 attemptsBeforeGivingUp = 1000,
56857 maximumFallDistanceFromOrignalPoint = 300
56858 };
56859 Vector2 vector = Vector2.Zero;
56860 int num4 = flag.ToDirectionInt();
56861 int startX = (flag ? (Main.maxTilesX - 50) : 50);
56862 flag2 = true;
56864 {
56865 flag2 = false;
56866 startX = ((!flag) ? (Main.maxTilesX - 50) : 50);
56868 {
56869 flag2 = true;
56870 }
56871 }
56872 if (flag2)
56873 {
56874 vector = landingPoint.ToWorldCoordinates(8f, 16f) - new Vector2((float)(width / 2), (float)height);
56875 }
56876 if (flag2)
56877 {
56878 Vector2 newPos = vector;
56879 Teleport(newPos, 5);
56880 velocity = Vector2.Zero;
56881 if (Main.netMode == 2)
56882 {
56883 RemoteClient.CheckSection(whoAmI, position);
56884 NetMessage.SendData(65, -1, -1, null, 0, whoAmI, newPos.X, newPos.Y, 5);
56885 }
56886 }
56887 else
56888 {
56889 Vector2 newPos2 = position;
56890 Teleport(newPos2, 5);
56891 velocity = Vector2.Zero;
56892 if (Main.netMode == 2)
56893 {
56894 RemoteClient.CheckSection(whoAmI, position);
56895 NetMessage.SendData(65, -1, -1, null, 0, whoAmI, newPos2.X, newPos2.Y, 5, 1);
56896 }
56897 }
56898 }
int whoAmI
The index of this Entity within its specific array. These arrays track the entities in the world....
Definition Entity.cs:16
Vector2 velocity
The velocity of this Entity in world coordinates per tick.
Definition Entity.cs:33
Vector2 position
The position of this Entity in world coordinates.
Definition Entity.cs:28
int width
The width of this Entity's hitbox, in pixels.
Definition Entity.cs:46
int height
The height of this Entity's hitbox, in pixels.
Definition Entity.cs:51
static bool RequestMagicConchTeleportPosition(Player player, int crawlOffsetX, int startX, out Point landingPoint)
void Teleport(Vector2 newPos, int Style=0, int extraInfo=0)
Definition Player.cs:36320

References Terraria.RemoteClient.CheckSection(), Terraria.Entity.height, Terraria.Main.maxTilesX, Terraria.Main.maxTilesY, Terraria.Main.netMode, Terraria.Entity.position, Terraria.GameContent.TeleportHelpers.RequestMagicConchTeleportPosition(), Terraria.NetMessage.SendData(), Terraria.Player.Teleport(), Terraria.Entity.velocity, Terraria.Entity.whoAmI, and Terraria.Entity.width.

Referenced by Terraria.Player.ItemCheck_Inner().

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