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

◆ IsVanitySet()

virtual string Terraria.ModLoader.GlobalItem.IsVanitySet ( int head,
int body,
int legs )
inlinevirtualinherited

Returns whether or not the head armor, body armor, and leg armor textures make up a set. This hook is used for the PreUpdateVanitySet, UpdateVanitySet, and ArmorSetShadows hooks, and will use items in the social slots if they exist. By default this will return the same value as the IsArmorSet hook, so you will not have to use this hook unless you want vanity effects to be entirely separate from armor sets.

This method is not instanced.

Definition at line 686 of file GlobalItem.cs.

687 {
688 int headItemType = 0;
689 if (head >= 0)
690 {
691 headItemType = Item.headType[head];
692 }
694 int bodyItemType = 0;
695 if (body >= 0)
696 {
697 bodyItemType = Item.bodyType[body];
698 }
700 int legsItemType = 0;
701 if (legs >= 0)
702 {
703 legsItemType = Item.legType[legs];
704 }
707 }
static Dictionary< int, Item > ItemsByType
The default T:Terraria.Item for a given item type (F:Terraria.Item.type).
This class stores instances of various content types in a number of dictionaries. These instances ser...
virtual string IsArmorSet(Item head, Item body, Item legs)
Allows you to determine whether the player is wearing an armor set, and return a name for this set....

References Terraria.Item.bodyType, Terraria.Item.headType, Terraria.ModLoader.GlobalItem.IsArmorSet(), Terraria.ID.ContentSamples.ItemsByType, and Terraria.Item.legType.

+ Here is the call graph for this function: