tModLoader v2025.03
A mod to make and play Terraria mods
All Classes Namespaces Functions Variables Enumerations Enumerator Properties Events Pages
CommonDrop Class Reference

Inherits IItemDropRule.

Inherited by CommonDropNotScalingWithLuck, CommonDropWithRerolls, DropLocalPerClientAndResetsNPCMoneyTo0, DropPerPlayerOnThePlayer, and ItemDropWithConditionRule.

Public Member Functions

 CommonDrop (int itemId, int chanceDenominator, int amountDroppedMinimum=1, int amountDroppedMaximum=1, int chanceNumerator=1)
 
virtual bool CanDrop (DropAttemptInfo info)
 
virtual void ReportDroprates (List< DropRateInfo > drops, DropRateInfoChainFeed ratesInfo)
 
virtual ItemDropAttemptResult TryDroppingItem (DropAttemptInfo info)
 
bool CanDrop (DropAttemptInfo info)
 
void ReportDroprates (List< DropRateInfo > drops, DropRateInfoChainFeed ratesInfo)
 
ItemDropAttemptResult TryDroppingItem (DropAttemptInfo info)
 

Public Attributes

int amountDroppedMaximum
 
int amountDroppedMinimum
 
int chanceDenominator
 
int chanceNumerator
 
int itemId
 

Properties

List< IItemDropRuleChainAttemptChainedRules [get]
 
- Properties inherited from IItemDropRule
List< IItemDropRuleChainAttemptChainedRules [get]
 

Member Function Documentation

◆ CanDrop()

virtual bool CommonDrop.CanDrop ( DropAttemptInfo  info)
virtual

Implements IItemDropRule.

◆ ReportDroprates()

virtual void CommonDrop.ReportDroprates ( List< DropRateInfo drops,
DropRateInfoChainFeed  ratesInfo 
)
virtual

Implements IItemDropRule.

◆ TryDroppingItem()

virtual ItemDropAttemptResult CommonDrop.TryDroppingItem ( DropAttemptInfo  info)
virtual

Implements IItemDropRule.

Property Documentation

◆ ChainedRules

List<IItemDropRuleChainAttempt> CommonDrop.ChainedRules
get

Implements IItemDropRule.