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

◆ IsVanitySet()

virtual bool Terraria.ModLoader.ModItem.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. By default, this will return the same value as the IsArmorSet hook (passing the equipment textures' associated items as parameters), so you will not have to use this hook unless you want vanity effects to be entirely separate from armor sets. Note that this hook is only ever called through this item's associated equipment texture.

Parameters
headThe head.
bodyThe body.
legsThe legs.

Reimplemented in Terraria.ModLoader.Default.Developer.Jofairden.Jofairden_Head, Terraria.ModLoader.Default.Patreon.Guildpack_Head, Terraria.ModLoader.Default.Patreon.HER0zero_Body, Terraria.ModLoader.Default.Patreon.Orian_Head, and Terraria.ModLoader.Default.Patreon.Saethar_Head.

Definition at line 845 of file ModItem.cs.

846 {
847 int headItemType = 0;
848 if (head >= 0)
849 {
850 headItemType = Item.headType[head];
851 }
853 int bodyItemType = 0;
854 if (body >= 0)
855 {
856 bodyItemType = Item.bodyType[body];
857 }
859 int legsItemType = 0;
860 if (legs >= 0)
861 {
862 legsItemType = Item.legType[legs];
863 }
866 }
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...
static int[] legType
An array for converting an F:Terraria.Item.legSlot value into a F:Terraria.Item.type value....
Definition Item.cs:147
static int[] headType
An array for converting an F:Terraria.Item.headSlot value into a F:Terraria.Item.type value....
Definition Item.cs:135
static int[] bodyType
An array for converting an F:Terraria.Item.bodySlot value into a F:Terraria.Item.type value....
Definition Item.cs:141
virtual bool IsArmorSet(Item head, Item body, Item legs)
Returns whether or not the head armor, body armor, and leg armor make up a set. If this returns true,...
Definition ModItem.cs:826
Item Item
The item object that this ModItem controls.
Definition ModItem.cs:28

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

+ Here is the call graph for this function: