Exemplo n.º 1
0
        static void CalculateLearningLimitPostfix(ref ExplainedNumber __result)
        {
            float newLearningLimit = __result.ResultNumber * LEARNING_RATE_LIMIT_MULTIPLIER - __result.ResultNumber;

            __result.AddFactor(newLearningLimit);
            __result.LimitMax(500);
        }
        static void Postfix(MobileParty mobileParty, ref ExplainedNumber __result)
        {
            if (!Main.PartySpeedContext.IsPartySpeedBonusAllowedByUser())
            {
                return;
            }

            string partyId = CampaignUtils.IsolateMobilePartyStringID(mobileParty); //TODO if this is non-trivial make it more efficient

            if (Main.PartySpeedContext.IsPartyMinimumSpeedOverriden(partyId))       //minimum adjustment
            {
                __result.LimitMin(Main.PartySpeedContext.GetMinimumSpeed(partyId));
            }

            if (Main.PartySpeedContext.IsPartyMaximumSpeedOverriden(partyId))//maximum adjustment
            {
                __result.LimitMax(Main.PartySpeedContext.GetMaximumSpeed(partyId));
            }
        }