Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ ReportDroprates()

void Terraria.GameContent.ItemDropRules.FromOptionsWithoutRepeatsDropRule.ReportDroprates ( List< DropRateInfo > drops,
DropRateInfoChainFeed ratesInfo )
inline

Implements Terraria.GameContent.ItemDropRules.IItemDropRule.

Definition at line 46 of file FromOptionsWithoutRepeatsDropRule.cs.

47 {
48 float parentDroprateChance = ratesInfo.parentDroprateChance;
49 int num = dropIds.Length;
50 float num2 = 1f;
51 int num3 = 0;
53 {
54 num2 *= (float)(num - 1) / (float)num;
55 num3++;
56 num--;
57 }
58 float dropRate = (1f - num2) * parentDroprateChance;
59 for (int i = 0; i < dropIds.Length; i++)
60 {
61 drops.Add(new DropRateInfo(dropIds[i], 1, 1, dropRate, ratesInfo.conditions));
62 }
63 Chains.ReportDroprates(ChainedRules, 1f, drops, ratesInfo);
64 }
void Add(TKey key, TValue value)

References System.Collections.Generic.Dictionary< TKey, TValue >.Add(), Terraria.GameContent.ItemDropRules.FromOptionsWithoutRepeatsDropRule.ChainedRules, Terraria.GameContent.ItemDropRules.FromOptionsWithoutRepeatsDropRule.dropIds, and Terraria.GameContent.ItemDropRules.Chains.ReportDroprates().