public static float getDoNotReplenishGarrisonCorrectionMult(
            MobileParty mobileParty,
            Settlement settlement)
        {
            if (settlement.IsVillage || settlement.OwnerClan.Kingdom != mobileParty.LeaderHero.Clan.Kingdom)
            {
                return(1f);
            }
            float strengthPerWalledCenter = FactionHelper.FindIdealGarrisonStrengthPerWalledCenter(mobileParty.MapFaction as Kingdom);

            if (mobileParty.Army != null)
            {
                strengthPerWalledCenter *= 0.75f;
            }
            if (settlement.IsFortification && settlement.OwnerClan != Clan.PlayerClan)
            {
                float num1 = settlement.Town.GarrisonParty != null ? settlement.Town.GarrisonParty.Party.TotalStrength : 0.0f;
                float num2 = FactionHelper.OwnerClanEconomyEffectOnGarrisonSizeConstant(settlement.OwnerClan);
                float num3 = FactionHelper.SettlementProsperityEffectOnGarrisonSizeConstant(settlement);
                float num4 = FactionHelper.SettlementFoodPotentialEffectOnGarrisonSizeConstant(settlement);
                float num5 = strengthPerWalledCenter * num2 * num3 * num4;
                if ((double)num1 < (double)num5)
                {
                    return((float)(1.0 / (1.0 + Math.Pow(1.0 - (double)num1 / (double)num5, 3.0) * 99.0)));
                }
            }
            return(1f);
        }