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

◆ BloodButcherer_TryButchering()

void Terraria.Player.BloodButcherer_TryButchering ( NPC npc,
Item sItem,
float damage,
float knockBack )
inlineprivate

Definition at line 43391 of file Player.cs.

43392 {
43393 //IL_002c: Unknown result type (might be due to invalid IL or missing references)
43394 //IL_0032: Unknown result type (might be due to invalid IL or missing references)
43395 //IL_0037: Unknown result type (might be due to invalid IL or missing references)
43396 //IL_003c: Unknown result type (might be due to invalid IL or missing references)
43397 //IL_003d: Unknown result type (might be due to invalid IL or missing references)
43398 //IL_003e: Unknown result type (might be due to invalid IL or missing references)
43399 //IL_0043: Unknown result type (might be due to invalid IL or missing references)
43400 //IL_0048: Unknown result type (might be due to invalid IL or missing references)
43401 //IL_004a: Unknown result type (might be due to invalid IL or missing references)
43402 //IL_0050: Unknown result type (might be due to invalid IL or missing references)
43403 //IL_0055: Unknown result type (might be due to invalid IL or missing references)
43404 //IL_005a: Unknown result type (might be due to invalid IL or missing references)
43405 //IL_005b: Unknown result type (might be due to invalid IL or missing references)
43406 //IL_0060: Unknown result type (might be due to invalid IL or missing references)
43407 //IL_0062: Unknown result type (might be due to invalid IL or missing references)
43408 //IL_0067: Unknown result type (might be due to invalid IL or missing references)
43409 //IL_0068: Unknown result type (might be due to invalid IL or missing references)
43410 //IL_0072: Unknown result type (might be due to invalid IL or missing references)
43411 //IL_0077: Unknown result type (might be due to invalid IL or missing references)
43412 //IL_0078: Unknown result type (might be due to invalid IL or missing references)
43413 //IL_0092: Unknown result type (might be due to invalid IL or missing references)
43414 //IL_0098: Unknown result type (might be due to invalid IL or missing references)
43415 //IL_009a: Unknown result type (might be due to invalid IL or missing references)
43416 //IL_009f: Unknown result type (might be due to invalid IL or missing references)
43417 //IL_00a7: Unknown result type (might be due to invalid IL or missing references)
43418 //IL_00ad: Unknown result type (might be due to invalid IL or missing references)
43419 //IL_00b3: Unknown result type (might be due to invalid IL or missing references)
43420 //IL_00b9: Unknown result type (might be due to invalid IL or missing references)
43421 if (_spawnBloodButcherer && Main.myPlayer == whoAmI && (npc == null || npc.CanBeChasedBy(this)))
43422 {
43423 Vector2 v = npc.Center - MountedCenter;
43424 v = v.SafeNormalize(Vector2.Zero);
43425 Vector2 vector = npc.Hitbox.ClosestPointInRect(MountedCenter) + v;
43426 Vector2 spinningpoint = (npc.Center - vector) * 0.8f;
43427 spinningpoint = spinningpoint.RotatedBy(Main.rand.NextFloatDirection() * (float)Math.PI * 0.25f);
43428 int num = Projectile.NewProjectile(GetProjectileSource_Item(sItem), vector.X, vector.Y, spinningpoint.X, spinningpoint.Y, 975, (int)damage, knockBack, whoAmI, 1f, npc.whoAmI);
43429 Main.projectile[num].StatusNPC(npc.whoAmI);
43430 Projectile.KillOldestJavelin(num, 975, npc.whoAmI, _bloodButchererMax5);
43431 _spawnBloodButcherer = false;
43432 }
43433 }
int whoAmI
The index of this Entity within its specific array. These arrays track the entities in the world....
Definition Entity.cs:16
Vector2 MountedCenter
Returns the player's center adjusted for mount and step stool usage. Typically used in conjunction wi...
Definition Player.cs:3692
static Point[] _bloodButchererMax5
Definition Player.cs:3271
bool _spawnBloodButcherer
Definition Player.cs:2999
IEntitySource GetProjectileSource_Item(Item item)
Definition Player.cs:7831

References Terraria.Player._bloodButchererMax5, Terraria.Player._spawnBloodButcherer, Terraria.NPC.CanBeChasedBy(), Terraria.Player.GetProjectileSource_Item(), Terraria.Entity.Hitbox, Terraria.Projectile.KillOldestJavelin(), Terraria.Player.MountedCenter, Terraria.Main.myPlayer, Terraria.Projectile.NewProjectile(), Terraria.Main.projectile, Terraria.Main.rand, and Terraria.Entity.whoAmI.

Referenced by Terraria.Player.ApplyNPCOnHitEffects().

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