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

◆ UpdateVisibleAccessories() [2/2]

void Terraria.Player.UpdateVisibleAccessories ( Item item,
bool invisible,
int slot = -1,
bool modded = false )
inline

Invoked in UpdateVisibleAccessories. Runs common code for both modded slots and vanilla slots based on provided Items.

Definition at line 58528 of file Player.cs.

58529 {
58530 if (eocDash > 0 && shield == -1 && item.shieldSlot != -1)
58531 {
58532 shield = item.shieldSlot;
58533 if (cShieldFallback != -1)
58534 {
58536 }
58537 }
58538 if (shieldRaised && shield == -1 && item.shieldSlot != -1)
58539 {
58540 shield = item.shieldSlot;
58541 if (cShieldFallback != -1)
58542 {
58544 }
58545 }
58547 {
58548 return;
58549 }
58550 if (item.wingSlot > 0)
58551 {
58552 if (invisible && (velocity.Y == 0f || mount.Active))
58553 {
58554 return;
58555 }
58556 wings = item.wingSlot;
58557 }
58558 if (!invisible)
58559 {
58561 }
58562 }
Vector2 velocity
The velocity of this Entity in world coordinates per tick.
Definition Entity.cs:33
bool Active
Definition Mount.cs:348
void UpdateVisibleAccessory(int itemSlot, Item item, bool modded=false)
Definition Player.cs:35805
bool ItemIsVisuallyIncompatible(Item item)
Definition Player.cs:35771
Mount mount
This player's T:Terraria.Mount. Do not overwrite this value. Instead, call M:Terraria....
Definition Player.cs:2323
int cShieldFallback
Definition Player.cs:3066
bool shieldRaised
Definition Player.cs:3233

References Terraria.Mount.Active, Terraria.Player.cShield, Terraria.Player.cShieldFallback, Terraria.Player.eocDash, Terraria.Player.ItemIsVisuallyIncompatible(), Terraria.Player.mount, Terraria.Player.shield, Terraria.Player.shieldRaised, Terraria.Item.shieldSlot, Terraria.Player.UpdateVisibleAccessory(), Terraria.Entity.velocity, Terraria.Player.wings, and Terraria.Item.wingSlot.

+ Here is the call graph for this function: