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

◆ ReflectProjectile()

void Terraria.NPC.ReflectProjectile ( Projectile proj)
inline

Definition at line 71865 of file NPC.cs.

71866 {
71867 //IL_0006: Unknown result type (might be due to invalid IL or missing references)
71868 //IL_001c: Unknown result type (might be due to invalid IL or missing references)
71869 //IL_003c: Unknown result type (might be due to invalid IL or missing references)
71870 //IL_0042: Unknown result type (might be due to invalid IL or missing references)
71871 //IL_0056: Unknown result type (might be due to invalid IL or missing references)
71872 //IL_0060: Unknown result type (might be due to invalid IL or missing references)
71873 //IL_0065: Unknown result type (might be due to invalid IL or missing references)
71874 //IL_0093: Unknown result type (might be due to invalid IL or missing references)
71875 //IL_0099: Unknown result type (might be due to invalid IL or missing references)
71876 //IL_009e: Unknown result type (might be due to invalid IL or missing references)
71877 //IL_00a3: Unknown result type (might be due to invalid IL or missing references)
71878 //IL_00ab: Unknown result type (might be due to invalid IL or missing references)
71879 //IL_00b7: Unknown result type (might be due to invalid IL or missing references)
71880 //IL_00bc: Unknown result type (might be due to invalid IL or missing references)
71881 //IL_00dc: Unknown result type (might be due to invalid IL or missing references)
71882 //IL_00e1: Unknown result type (might be due to invalid IL or missing references)
71883 //IL_00f3: Unknown result type (might be due to invalid IL or missing references)
71884 //IL_00ff: Unknown result type (might be due to invalid IL or missing references)
71885 //IL_0104: Unknown result type (might be due to invalid IL or missing references)
71886 //IL_010b: Unknown result type (might be due to invalid IL or missing references)
71887 //IL_0110: Unknown result type (might be due to invalid IL or missing references)
71888 //IL_0116: Unknown result type (might be due to invalid IL or missing references)
71889 //IL_011b: Unknown result type (might be due to invalid IL or missing references)
71890 //IL_0120: Unknown result type (might be due to invalid IL or missing references)
71891 //IL_0132: Unknown result type (might be due to invalid IL or missing references)
71892 //IL_013e: Unknown result type (might be due to invalid IL or missing references)
71893 //IL_0143: Unknown result type (might be due to invalid IL or missing references)
71895 for (int i = 0; i < 3; i++)
71896 {
71897 int num = Dust.NewDust(proj.position, proj.width, proj.height, 31);
71898 Dust obj = Main.dust[num];
71899 obj.velocity *= 0.3f;
71900 }
71901 proj.reflected = true;
71902 proj.hostile = true;
71903 proj.friendly = false;
71904 Vector2 vector = Main.player[proj.owner].Center - proj.Center;
71905 ((Vector2)(ref vector)).Normalize();
71906 vector *= ((Vector2)(ref proj.oldVelocity)).Length();
71907 proj.velocity = new Vector2((float)Main.rand.Next(-100, 101), (float)Main.rand.Next(-100, 101));
71908 ((Vector2)(ref proj.velocity)).Normalize();
71909 proj.velocity *= ((Vector2)(ref vector)).Length();
71910 proj.velocity += vector * 20f;
71911 ((Vector2)(ref proj.velocity)).Normalize();
71912 proj.velocity *= ((Vector2)(ref vector)).Length();
71913 proj.damage /= 2;
71914 proj.damage /= 2;
71915 proj.penetrate = 1;
71916 }
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 ...
static readonly SoundStyle Item150
Definition SoundID.cs:977

References Terraria.Main.dust, Terraria.ID.SoundID.Item150, Terraria.Dust.NewDust(), Terraria.Main.player, Terraria.Audio.SoundEngine.PlaySound(), and Terraria.Main.rand.

Referenced by Terraria.NPC.ReflectProjectiles().

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