From df8f6133b3e7fa97f491fd7b0d034d36983d5e8d Mon Sep 17 00:00:00 2001 From: hondacrx Date: Sun, 13 Aug 2017 11:14:15 -0400 Subject: [PATCH] Renamed ModShieldBlockvalue -> AllowTalentSwapping --- Framework/Constants/Spells/SpellAuraConst.cs | 2 +- Game/Spells/Auras/AuraEffect.cs | 13 ++++--------- 2 files changed, 5 insertions(+), 10 deletions(-) diff --git a/Framework/Constants/Spells/SpellAuraConst.cs b/Framework/Constants/Spells/SpellAuraConst.cs index 9c7d18a63..35a0e2133 100644 --- a/Framework/Constants/Spells/SpellAuraConst.cs +++ b/Framework/Constants/Spells/SpellAuraConst.cs @@ -179,7 +179,7 @@ namespace Framework.Constants ModWaterBreathing = 155, // Mod Water Breathing ModReputationGain = 156, // Mod Reputation Gain PetDamageMulti = 157, // Mod Pet Damage - ModShieldBlockvalue = 158, + AllowTalentSwapping = 158, NoPvpCredit = 159, Unk160 = 160, // Old ModAoeAvoidance. Unused 4.3.4 ModHealthRegenInCombat = 161, diff --git a/Game/Spells/Auras/AuraEffect.cs b/Game/Spells/Auras/AuraEffect.cs index 643c4dcaf..cc583dcf1 100644 --- a/Game/Spells/Auras/AuraEffect.cs +++ b/Game/Spells/Auras/AuraEffect.cs @@ -4165,20 +4165,15 @@ namespace Game.Spells target.HandleStatModifier(UnitMods.DamageOffHand, UnitModifierType.TotalPCT, GetAmount(), apply); } - [AuraEffectHandler(AuraType.ModShieldBlockvalue)] + [AuraEffectHandler(AuraType.ModShieldBlockvaluePct)] void HandleShieldBlockValue(AuraApplication aurApp, AuraEffectHandleModes mode, bool apply) { if (!mode.HasAnyFlag((AuraEffectHandleModes.ChangeAmountMask | AuraEffectHandleModes.Stat))) return; - Unit target = aurApp.GetTarget(); - - BaseModType modType = BaseModType.FlatMod; - if (GetAuraType() == AuraType.ModShieldBlockvaluePct) - modType = BaseModType.PCTmod; - - if (target.IsTypeId(TypeId.Player)) - target.ToPlayer().HandleBaseModValue(BaseModGroup.ShieldBlockValue, modType, GetAmount(), apply); + Player player = aurApp.GetTarget().ToPlayer(); + if (player) + player.HandleBaseModValue(BaseModGroup.ShieldBlockValue, BaseModType.PCTmod, GetAmount(), apply); } /********************************/