Core/Auras: Handle SPELL_AURA_MOD_SCHOOL_MASK_DAMAGE_FROM_CASTER
Port From (https://github.com/TrinityCore/TrinityCore/commit/e11067a39861214bde940bdc0e5b11daf7c326a0)
This commit is contained in:
@@ -291,7 +291,7 @@ namespace Framework.Constants
|
||||
ModImmuneAuraApplySchool = 267,
|
||||
Unk268 = 268, // Old ModAttackPowerOfStatPercent. Unused 4.3.4
|
||||
ModIgnoreTargetResist = 269,
|
||||
ModSchoolMaskDamageFromCaster = 270, // NYI
|
||||
ModSchoolMaskDamageFromCaster = 270,
|
||||
ModSpellDamageFromCaster = 271,
|
||||
IgnoreMeleeReset = 272,
|
||||
XRay = 273,
|
||||
|
||||
@@ -2910,11 +2910,14 @@ namespace Game.Entities
|
||||
if (spellProto != null)
|
||||
{
|
||||
// From caster spells
|
||||
TakenTotalMod *= GetTotalAuraMultiplier(AuraType.ModSchoolMaskDamageFromCaster, aurEff =>
|
||||
{
|
||||
return aurEff.GetCasterGUID() == attacker.GetGUID() && (aurEff.GetMiscValue() & (int)spellProto.GetSchoolMask()) != 0;
|
||||
});
|
||||
|
||||
TakenTotalMod *= GetTotalAuraMultiplier(AuraType.ModSpellDamageFromCaster, aurEff =>
|
||||
{
|
||||
if (aurEff.GetCasterGUID() == attacker.GetGUID() && aurEff.IsAffectingSpell(spellProto))
|
||||
return true;
|
||||
return false;
|
||||
return aurEff.GetCasterGUID() == attacker.GetGUID() && aurEff.IsAffectingSpell(spellProto);
|
||||
});
|
||||
|
||||
// Mod damage from spell mechanic
|
||||
|
||||
@@ -299,11 +299,14 @@ namespace Game.Entities
|
||||
TakenTotalMod *= GetTotalAuraMultiplierByMiscMask(AuraType.ModDamagePercentTaken, (uint)spellProto.GetSchoolMask());
|
||||
|
||||
// From caster spells
|
||||
TakenTotalMod *= GetTotalAuraMultiplier(AuraType.ModSchoolMaskDamageFromCaster, aurEff =>
|
||||
{
|
||||
return aurEff.GetCasterGUID() == caster.GetGUID() && (aurEff.GetMiscValue() & (int)spellProto.GetSchoolMask()) != 0;
|
||||
});
|
||||
|
||||
TakenTotalMod *= GetTotalAuraMultiplier(AuraType.ModSpellDamageFromCaster, aurEff =>
|
||||
{
|
||||
if (aurEff.GetCasterGUID() == caster.GetGUID() && aurEff.IsAffectingSpell(spellProto))
|
||||
return true;
|
||||
return false;
|
||||
return aurEff.GetCasterGUID() == caster.GetGUID() && aurEff.IsAffectingSpell(spellProto);
|
||||
});
|
||||
|
||||
int TakenAdvertisedBenefit = SpellBaseDamageBonusTaken(spellProto.GetSchoolMask());
|
||||
|
||||
@@ -649,6 +649,7 @@ namespace Game.Spells
|
||||
if (!eventInfo.GetProcSpell() || eventInfo.GetProcSpell().GetCastTime() == 0)
|
||||
return false;
|
||||
break;
|
||||
case AuraType.ModSchoolMaskDamageFromCaster:
|
||||
case AuraType.ModSpellDamageFromCaster:
|
||||
// Compare casters
|
||||
if (GetCasterGUID() != eventInfo.GetActor().GetGUID())
|
||||
|
||||
@@ -3480,6 +3480,7 @@ namespace Game.Entities
|
||||
case AuraType.ModMeleeHaste3:
|
||||
case AuraType.ModAttackerMeleeHitChance:
|
||||
case AuraType.ProcTriggerSpellWithValue:
|
||||
case AuraType.ModSchoolMaskDamageFromCaster:
|
||||
case AuraType.ModSpellDamageFromCaster:
|
||||
case AuraType.AbilityIgnoreAurastate:
|
||||
case AuraType.ModInvisibility:
|
||||
|
||||
Reference in New Issue
Block a user