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

◆ UpdateItemDye()

void Terraria.Player.UpdateItemDye ( bool isNotInVanitySlot,
bool isSetToHidden,
Item armorItem,
Item dyeItem )
inlinepackage

Definition at line 7679 of file Player.cs.

7680 {
7681 if (armorItem.IsAir)
7682 {
7683 return;
7684 }
7685 bool num = armorItem.wingSlot > 0 || armorItem.type == 934 || armorItem.type == 4341 || armorItem.type == 5126 || armorItem.type == 4563 || armorItem.type == 1987;
7687 if (armorItem.shieldSlot > 0 && armorItem.shieldSlot < ArmorIDs.Shield.Count && (cShieldFallback == -1 || !flag))
7688 {
7690 }
7691 if (!num && flag)
7692 {
7693 return;
7694 }
7695 if (armorItem.handOnSlot > 0)
7696 {
7697 cHandOn = dyeItem.dye;
7698 }
7699 if (armorItem.handOffSlot > 0)
7700 {
7701 cHandOff = dyeItem.dye;
7702 }
7703 if (armorItem.backSlot > 0)
7704 {
7706 {
7707 cBackpack = dyeItem.dye;
7708 }
7709 else if (ArmorIDs.Back.Sets.DrawInTailLayer[armorItem.backSlot])
7710 {
7711 cTail = dyeItem.dye;
7712 }
7713 else
7714 {
7715 cBack = dyeItem.dye;
7716 }
7717 }
7718 if (armorItem.frontSlot > 0)
7719 {
7720 cFront = dyeItem.dye;
7721 }
7722 if (armorItem.shoeSlot > 0)
7723 {
7724 if (armorItem.type == 4822 || armorItem.type == 4874)
7725 {
7726 cFlameWaker = dyeItem.dye;
7727 }
7728 else
7729 {
7730 cShoe = dyeItem.dye;
7731 }
7732 }
7733 if (armorItem.waistSlot > 0)
7734 {
7735 cWaist = dyeItem.dye;
7736 }
7737 if (armorItem.shieldSlot > 0)
7738 {
7739 cShield = dyeItem.dye;
7740 }
7741 if (armorItem.neckSlot > 0)
7742 {
7743 cNeck = dyeItem.dye;
7744 }
7745 if (armorItem.faceSlot > 0)
7746 {
7748 {
7749 cFaceHead = dyeItem.dye;
7750 }
7752 {
7753 cFaceFlower = dyeItem.dye;
7754 }
7755 else
7756 {
7757 cFace = dyeItem.dye;
7758 }
7759 }
7760 if (armorItem.beardSlot > 0)
7761 {
7762 cBeard = dyeItem.dye;
7763 }
7764 if (armorItem.balloonSlot > 0)
7765 {
7767 {
7768 cBalloonFront = dyeItem.dye;
7769 }
7770 else
7771 {
7772 cBalloon = dyeItem.dye;
7773 }
7774 }
7775 if (armorItem.wingSlot > 0)
7776 {
7777 cWings = dyeItem.dye;
7778 }
7779 if (armorItem.type == 934)
7780 {
7781 cCarpet = dyeItem.dye;
7782 }
7783 if (armorItem.type == 4404)
7784 {
7785 cFloatingTube = dyeItem.dye;
7786 }
7787 if (armorItem.type == 4341 || armorItem.type == 5126)
7788 {
7789 cPortableStool = dyeItem.dye;
7790 }
7791 if (armorItem.type == 4563)
7792 {
7793 cUnicornHorn = dyeItem.dye;
7794 }
7795 if (armorItem.type == 1987)
7796 {
7797 cAngelHalo = dyeItem.dye;
7798 }
7799 if (armorItem.type == 4762)
7800 {
7801 cMinion = dyeItem.dye;
7802 }
7803 if (armorItem.type == 3929)
7804 {
7805 cLeinShampoo = dyeItem.dye;
7806 }
7807 }
static bool[] DrawInTailLayer
If true for a given T:Terraria.ID.ArmorIDs.Back, then that equip will draw in the player's tail layer...
Definition ArmorIDs.cs:1790
static bool[] DrawInBackpackLayer
If true for a given T:Terraria.ID.ArmorIDs.Back, then that equip will draw in the player's backpack l...
Definition ArmorIDs.cs:1784
static bool[] DrawInFrontOfBackArmLayer
If true for a given T:Terraria.ID.ArmorIDs.Balloon, then that equip will draw in the player's front b...
Definition ArmorIDs.cs:2301
static bool[] DrawInFaceFlowerLayer
If true for a given T:Terraria.ID.ArmorIDs.Face, then that equip will draw in the face flower layer (...
Definition ArmorIDs.cs:2229
static bool[] DrawInFaceHeadLayer
If true for a given T:Terraria.ID.ArmorIDs.Face, then that equip will draw in the face head layer (F:...
Definition ArmorIDs.cs:2236
static readonly int Count
Definition ArmorIDs.cs:2169
int cShieldFallback
Definition Player.cs:3066

References Terraria.Player.cAngelHalo, Terraria.Player.cBack, Terraria.Player.cBackpack, Terraria.Player.cBalloon, Terraria.Player.cBalloonFront, Terraria.Player.cBeard, Terraria.Player.cCarpet, Terraria.Player.cFace, Terraria.Player.cFaceFlower, Terraria.Player.cFaceHead, Terraria.Player.cFlameWaker, Terraria.Player.cFloatingTube, Terraria.Player.cFront, Terraria.Player.cHandOff, Terraria.Player.cHandOn, Terraria.Player.cLeinShampoo, Terraria.Player.cMinion, Terraria.Player.cNeck, Terraria.ID.ArmorIDs.Shield.Count, Terraria.Player.cPortableStool, Terraria.Player.cShield, Terraria.Player.cShieldFallback, Terraria.Player.cShoe, Terraria.Player.cTail, Terraria.Player.cUnicornHorn, Terraria.Player.cWaist, Terraria.Player.cWings, Terraria.ID.ArmorIDs.Back.Sets.DrawInBackpackLayer, Terraria.ID.ArmorIDs.Face.Sets.DrawInFaceFlowerLayer, Terraria.ID.ArmorIDs.Face.Sets.DrawInFaceHeadLayer, Terraria.ID.ArmorIDs.Balloon.Sets.DrawInFrontOfBackArmLayer, and Terraria.ID.ArmorIDs.Back.Sets.DrawInTailLayer.

Referenced by Terraria.Player.UpdateDyes().

+ Here is the caller graph for this function: