public float getCharacterTypeDamageModifier(GameLogic.CharacterType characterType) { float num = 0f; for (int i = 0; i < this.Perks.PerkInstances.Count; i++) { PerkInstance instance = this.Perks.PerkInstances[i]; float num3 = instance.getCharacterTypeDamageModifier(characterType); num += num3; if (num3 != 0f) { num += this.getEvolveBonusForPerk(instance.Type); } } for (int j = 0; j < this.Item.FixedPerks.PerkInstances.Count; j++) { PerkInstance instance2 = this.Item.FixedPerks.PerkInstances[j]; float num5 = instance2.getCharacterTypeDamageModifier(characterType); num += num5; if (num5 != 0f) { num += this.getEvolveBonusForPerk(instance2.Type); } } return(num); }
public float getCharacterTypeDamageModifier(GameLogic.CharacterType characterType) { float num = 0f; for (int i = 0; i < this.SelectedRunestones.Count; i++) { if (this.SelectedRunestones[i].Source == RunestoneSelectionSource.Player) { string id = this.SelectedRunestones[i].Id; SkillType skillTypeForRunestone = ConfigRunestones.GetSkillTypeForRunestone(id); if ((skillTypeForRunestone != SkillType.NONE) && this.Player.ActiveCharacter.isSkillActive(skillTypeForRunestone)) { ConfigRunestones.SharedData runestoneData = ConfigRunestones.GetRunestoneData(id); if (runestoneData.PerkInstance != null) { PerkInstance perkInstance = runestoneData.PerkInstance; num += perkInstance.getCharacterTypeDamageModifier(characterType); } } } } return(num); }