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

◆ ItemCheck_EmitHammushProjectiles()

void Terraria.Player.ItemCheck_EmitHammushProjectiles ( int i,
Item sItem,
Rectangle itemRectangle,
int damage )
inlineprivate

Definition at line 43885 of file Player.cs.

43886 {
43887 //IL_0204: Unknown result type (might be due to invalid IL or missing references)
43888 //IL_020a: Unknown result type (might be due to invalid IL or missing references)
43889 //IL_0217: Unknown result type (might be due to invalid IL or missing references)
43890 //IL_021d: Unknown result type (might be due to invalid IL or missing references)
43891 if (sItem.type != 787)
43892 {
43893 return;
43894 }
43895 int num = itemAnimationMax;
43896 if (itemAnimation != (int)((double)num * 0.1) && itemAnimation != (int)((double)num * 0.3) && itemAnimation != (int)((double)num * 0.5) && itemAnimation != (int)((double)num * 0.7) && itemAnimation != (int)((double)num * 0.9))
43897 {
43898 return;
43899 }
43900 float num2 = 0f;
43901 float num3 = 0f;
43902 float num4 = 0f;
43903 float num5 = 0f;
43904 if (itemAnimation == (int)((double)num * 0.9))
43905 {
43906 num2 = -7f;
43907 }
43908 if (itemAnimation == (int)((double)num * 0.7))
43909 {
43910 num2 = -6f;
43911 num3 = 2f;
43912 }
43913 if (itemAnimation == (int)((double)num * 0.5))
43914 {
43915 num2 = -4f;
43916 num3 = 4f;
43917 }
43918 if (itemAnimation == (int)((double)num * 0.3))
43919 {
43920 num2 = -2f;
43921 num3 = 6f;
43922 }
43923 if (itemAnimation == (int)((double)num * 0.1))
43924 {
43925 num3 = 7f;
43926 }
43927 if (itemAnimation == (int)((double)num * 0.7))
43928 {
43929 num5 = 26f;
43930 }
43931 if (itemAnimation == (int)((double)num * 0.3))
43932 {
43933 num5 -= 4f;
43934 num4 -= 20f;
43935 }
43936 if (itemAnimation == (int)((double)num * 0.1))
43937 {
43938 num4 += 6f;
43939 }
43940 if (direction == -1)
43941 {
43942 if (itemAnimation == (int)((double)num * 0.9))
43943 {
43944 num5 -= 8f;
43945 }
43946 if (itemAnimation == (int)((double)num * 0.7))
43947 {
43948 num5 -= 6f;
43949 }
43950 }
43951 num2 *= 1.5f;
43952 num3 *= 1.5f;
43953 num5 *= (float)direction;
43954 num4 *= gravDir;
43955 Projectile.NewProjectile(GetProjectileSource_Item(sItem), (float)(itemRectangle.X + itemRectangle.Width / 2) + num5, (float)(itemRectangle.Y + itemRectangle.Height / 2) + num4, (float)direction * num3, num2 * gravDir, 131, damage / 2, 0f, i);
43956 }
int itemAnimationMax
Definition Player.cs:3127
IEntitySource GetProjectileSource_Item(Item item)
Definition Player.cs:7831

References Terraria.Entity.direction, Terraria.Player.GetProjectileSource_Item(), Terraria.Player.gravDir, Terraria.Player.itemAnimation, Terraria.Player.itemAnimationMax, and Terraria.Projectile.NewProjectile().

Referenced by Terraria.Player.ItemCheck_OwnerOnlyCode().

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