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

◆ MoonLeechRope()

void Terraria.Player.MoonLeechRope ( )
inline

Definition at line 20129 of file Player.cs.

20130 {
20131 //IL_009c: Unknown result type (might be due to invalid IL or missing references)
20132 //IL_00a2: Unknown result type (might be due to invalid IL or missing references)
20133 //IL_00a7: Unknown result type (might be due to invalid IL or missing references)
20134 //IL_00ac: Unknown result type (might be due to invalid IL or missing references)
20135 //IL_00ad: Unknown result type (might be due to invalid IL or missing references)
20136 //IL_00b2: Unknown result type (might be due to invalid IL or missing references)
20137 //IL_00c2: Unknown result type (might be due to invalid IL or missing references)
20138 //IL_00c4: Unknown result type (might be due to invalid IL or missing references)
20139 //IL_00c9: Unknown result type (might be due to invalid IL or missing references)
20140 //IL_00cd: Unknown result type (might be due to invalid IL or missing references)
20141 //IL_00d2: Unknown result type (might be due to invalid IL or missing references)
20142 //IL_00e1: Unknown result type (might be due to invalid IL or missing references)
20143 //IL_00e6: Unknown result type (might be due to invalid IL or missing references)
20144 //IL_00eb: Unknown result type (might be due to invalid IL or missing references)
20145 int num = -1;
20146 for (int i = 0; i < 1000; i++)
20147 {
20148 if (Main.projectile[i].active && Main.projectile[i].type == 456 && Main.projectile[i].ai[1] == (float)whoAmI)
20149 {
20150 num = i;
20151 break;
20152 }
20153 }
20154 if (num != -1 && !(Main.projectile[num].ai[0] < 0f))
20155 {
20156 Projectile projectile = Main.projectile[num];
20157 Vector2 vector = default(Vector2);
20158 ((Vector2)(ref vector))._002Ector(0f, 216f);
20159 Vector2 value = Main.npc[(int)Math.Abs(projectile.ai[0]) - 1].Center - base.Center + vector;
20160 if (((Vector2)(ref value)).Length() > 200f)
20161 {
20162 Vector2 vector2 = Vector2.Normalize(value);
20163 position += vector2 * (((Vector2)(ref value)).Length() - 200f);
20164 }
20165 }
20166 }
int whoAmI
The index of this Entity within its specific array. These arrays track the entities in the world....
Definition Entity.cs:16
Vector2 position
The position of this Entity in world coordinates.
Definition Entity.cs:28

References Terraria.Projectile.ai, Terraria.Main.npc, Terraria.Entity.position, Terraria.Main.projectile, and Terraria.Entity.whoAmI.