Beispiel #1
0
        public void ReportDroprates(List <DropRateInfo> drops, DropRateInfoChainFeed ratesInfo)
        {
            float personalDropRate = 1f;
            float dropRate         = 1f / dropIds.Length * (personalDropRate * ratesInfo.parentDroprateChance);

            for (int index = 0; index < dropIds.Length; ++index)
            {
                drops.Add(new DropRateInfo(dropIds[index], 1, 1, dropRate, ratesInfo.conditions));
            }
            Chains.ReportDroprates(ChainedRules, personalDropRate, drops, ratesInfo);
        }
Beispiel #2
0
        public void ReportDroprates(List <DropRateInfo> drops, DropRateInfoChainFeed ratesInfo)
        {
            DropRateInfoChainFeed ratesInfo1 = ratesInfo.With(1f);

            ratesInfo1.AddCondition(new EModeDropCondition());
            ruleForEMode.ReportDroprates(drops, ratesInfo1);
            DropRateInfoChainFeed ratesInfo2 = ratesInfo.With(1f);

            ratesInfo2.AddCondition(new NotEModeDropCondition());
            ruleForDefault.ReportDroprates(drops, ratesInfo2);
            Chains.ReportDroprates(ChainedRules, 1f, drops, ratesInfo);
        }
        public override void ReportDroprates(List <DropRateInfo> drops, DropRateInfoChainFeed ratesInfo)
        {
            float chance        = chanceNumerator / (float)chanceDenominator;
            float inverseChance = 1f - chance;

            float finalChance = chance;                           //First roll could be a success

            finalChance += inverseChance * rerollChance * chance; //Other success is when first roll fails, reroll happens, and it rolls a success

            float dropRate = finalChance * ratesInfo.parentDroprateChance;

            drops.Add(new DropRateInfo(itemId, amountDroppedMinimum, amountDroppedMaximum, dropRate, ratesInfo.conditions));
            Chains.ReportDroprates(base.ChainedRules, finalChance, drops, ratesInfo);
        }
 public void ReportDroprates(List <DropRateInfo> drops, DropRateInfoChainFeed ratesInfo)
 {
     Chains.ReportDroprates(ChainedRules, 1f, drops, ratesInfo);
 }