Terraria.ModLoader.ModPrefix

Methods

GetPrefix(System.Byte)()
Returns the ModPrefix associated with specified type If not a ModPrefix, returns null.
GetPrefixesInCategory(Terraria.ModLoader.PrefixCategory)()
Returns a list of all modded prefixes of a certain category.
Roll(Terraria.Item,System.Int32@,System.Int32,Terraria.ModLoader.PrefixCategory[])()
Performs a mod prefix roll. If the vanillaWeight wins the roll, then prefix is unchanged.
RollChance(Terraria.Item)()
The roll chance of your prefix relative to a vanilla prefix, 1f by default.
CanRoll(Terraria.Item)()
Returns if your ModPrefix can roll on the given item By default returns RollChance(item) > 0
SetDefaults()
Allows you to set the prefix's name/translations and to set its category.
SetStats(System.Single@,System.Single@,System.Single@,System.Single@,System.Single@,System.Single@,System.Int32@)()
Sets the stat changes for this prefix. If data is not already pre-stored, it is best to store custom data changes to some static variables.
ValidateItem(Terraria.Item,System.Boolean@)()
Validates whether this prefix with the custom data stats set from SetStats is allowed on the given item. It is not allowed if one of the stat changes do not cause any change (eg. percentage being too small to make a difference).
Apply(Terraria.Item)()
Applies the custom data stats set in SetStats to the given item.
ModifyValue(System.Single@)()
Allows you to modify the sell price of the item based on the prefix or changes in custom data stats. This also influences the item's rarity.