Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
ItemDropResolver.cs
Go to the documentation of this file.
2
4
5public class ItemDropResolver
6{
8
13
14 public void TryDropping(DropAttemptInfo info)
15 {
17 for (int i = 0; i < rulesForNPCID.Count; i++)
18 {
19 ResolveRule(rulesForNPCID[i], info);
20 }
21 }
22
37
42
44 {
45 if (ruleChains == null)
46 {
47 return;
48 }
49 for (int i = 0; i < ruleChains.Count; i++)
50 {
52 if (itemDropRuleChainAttempt.CanChainIntoRule(parentResult))
53 {
54 ResolveRule(itemDropRuleChainAttempt.RuleToChain, info);
55 }
56 }
57 }
58}
List< IItemDropRule > GetRulesForNPCID(int npcNetId, bool includeGlobalDrops=true)
ItemDropAttemptResult ResolveRule(IItemDropRule rule, DropAttemptInfo info)
void ResolveRuleChains(IItemDropRule rule, DropAttemptInfo info, ItemDropAttemptResult parentResult)
void ResolveRuleChains(ref DropAttemptInfo info, ref ItemDropAttemptResult parentResult, List< IItemDropRuleChainAttempt > ruleChains)