tModLoader v2024.09
A mod to make and play Terraria mods
|
A drop rule that doesn't drop any items by itself, rather it contains just a IItemDropRuleCondition. Use Chains.OnSuccess(IItemDropRule, IItemDropRule, bool), OnFailedConditions, or OnFailedRoll to attach other item drop rules to this rule. This can be useful for avoiding code repetition while writing logical item drop code. See the Chaining Rules section of the Basic NPC Drops and Loot Guidefor more information and examples. More...
Inherits IItemDropRule.
Public Member Functions | |
LeadingConditionRule (IItemDropRuleCondition condition) | |
bool | CanDrop (DropAttemptInfo info) |
void | ReportDroprates (List< DropRateInfo > drops, DropRateInfoChainFeed ratesInfo) |
ItemDropAttemptResult | TryDroppingItem (DropAttemptInfo info) |
bool | CanDrop (DropAttemptInfo info) |
void | ReportDroprates (List< DropRateInfo > drops, DropRateInfoChainFeed ratesInfo) |
ItemDropAttemptResult | TryDroppingItem (DropAttemptInfo info) |
Public Attributes | |
IItemDropRuleCondition | condition |
Properties | |
List< IItemDropRuleChainAttempt > | ChainedRules [get] |
Properties inherited from IItemDropRule | |
List< IItemDropRuleChainAttempt > | ChainedRules [get] |
A drop rule that doesn't drop any items by itself, rather it contains just a IItemDropRuleCondition. Use Chains.OnSuccess(IItemDropRule, IItemDropRule, bool), OnFailedConditions, or OnFailedRoll to attach other item drop rules to this rule. This can be useful for avoiding code repetition while writing logical item drop code.
See the Chaining Rules section of the Basic NPC Drops and Loot Guide
for more information and examples.
bool LeadingConditionRule.CanDrop | ( | DropAttemptInfo | info | ) |
Implements IItemDropRule.
void LeadingConditionRule.ReportDroprates | ( | List< DropRateInfo > | drops, |
DropRateInfoChainFeed | ratesInfo | ||
) |
Implements IItemDropRule.
ItemDropAttemptResult LeadingConditionRule.TryDroppingItem | ( | DropAttemptInfo | info | ) |
Implements IItemDropRule.
|
get |
Implements IItemDropRule.