Exemplo n.º 1
0
        private static void ApplyPerkBonusToRaidHit(MapEvent __instance, float hitDamage)
        {
            var perk = ActivePatch._perk;
            var partyMemberHitDamage = new ExplainedNumber(hitDamage);

            foreach (var party in __instance.AttackerSide.Parties.Where(x => x.MobileParty != null))
            {
                PerkHelper.AddPerkBonusForParty(perk, party.MobileParty, ref partyMemberHitDamage);
            }

            RaidingHelper.SetHitDamage(__instance, partyMemberHitDamage.ResultNumber);
        }
        private static void ApplyPerkExtraRewardBonusToRaidHit(MapEvent __instance, float hitDamage)
        {
            var perk = ActivePatch._perk;
            var partyMemberHitDamage = new ExplainedNumber(hitDamage);

            foreach (var party in __instance.AttackerSide.Parties.Where(x => x.MobileParty != null))
            {
                PerkHelper.AddPerkBonusForParty(perk, party.MobileParty, ref partyMemberHitDamage);
            }

            var damageBonus = partyMemberHitDamage.ResultNumber - partyMemberHitDamage.BaseNumber;

            RaidingHelper.SetHitDamage(__instance, partyMemberHitDamage.ResultNumber);
            RaidingHelper.IncreaseSettlementHitPoints(__instance, damageBonus);
        }