Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
DropRateInfo.cs
Go to the documentation of this file.
2
4
5public struct DropRateInfo
6{
7 public int itemId;
8
9 public int stackMin;
10
11 public int stackMax;
12
13 public float dropRate;
14
16
18 {
19 this.itemId = itemId;
20 this.stackMin = stackMin;
21 this.stackMax = stackMax;
22 this.dropRate = dropRate;
23 this.conditions = null;
24 if (conditions != null && conditions.Count > 0)
25 {
26 this.conditions = new List<IItemDropRuleCondition>(conditions);
27 }
28 }
29
30 public void AddCondition(IItemDropRuleCondition condition)
31 {
32 if (conditions == null)
33 {
35 }
36 conditions.Add(condition);
37 }
38}
void Add(TKey key, TValue value)
DropRateInfo(int itemId, int stackMin, int stackMax, float dropRate, List< IItemDropRuleCondition > conditions=null)
void AddCondition(IItemDropRuleCondition condition)
List< IItemDropRuleCondition > conditions