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

◆ ItemCheck_StartActualUse()

void Terraria.Player.ItemCheck_StartActualUse ( Item sItem)
inlineprivate

Definition at line 52518 of file Player.cs.

52519 {
52520 //IL_00b7: Unknown result type (might be due to invalid IL or missing references)
52521 bool flag = sItem.type == 4711;
52522 if (sItem.pick > 0 || sItem.axe > 0 || sItem.hammer > 0 || flag)
52523 {
52524 toolTime = 1;
52525 }
52526 if (grappling[0] > -1 || sItem.useTurnOnAnimationStart)
52527 {
52528 pulley = false;
52529 pulleyDir = 1;
52530 if (controlRight)
52531 {
52532 direction = 1;
52533 }
52534 else if (controlLeft)
52535 {
52536 direction = -1;
52537 }
52538 }
52540 attackCD = 0;
52544 if (sItem.UseSound.HasValue && !flag2)
52545 {
52546 SoundEngine.PlaySound(sItem.UseSound, base.Center);
52547 }
52548 }
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 bool[] SkipsInitialUseSound
If true for a given item type (F:Terraria.Item.type), then that item will not play F:Terraria....
Definition ItemID.cs:249
bool controlRight
Definition Player.cs:1896
void ResetMeleeHitCooldowns()
Definition Player.cs:43449
void StartChanneling()
Definition Player.cs:53529
int[] grappling
Definition Player.cs:2840
void ApplyItemAnimation(Item sItem)
Definition Player.cs:4929

References Terraria.Player.ApplyItemAnimation(), Terraria.Player.attackCD, Terraria.Player.controlLeft, Terraria.Player.controlRight, Terraria.Entity.direction, Terraria.Player.grappling, Terraria.Audio.SoundEngine.PlaySound(), Terraria.Player.pulley, Terraria.Player.pulleyDir, Terraria.Player.ResetMeleeHitCooldowns(), Terraria.ID.ItemID.Sets.SkipsInitialUseSound, Terraria.Player.StartChanneling(), and Terraria.Player.toolTime.

Referenced by Terraria.Player.ItemCheck_Inner().

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