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:
hondacrx
2021-02-09 13:31:59 -05:00
parent 926035b704
commit c4f0ad6012
5 changed files with 15 additions and 7 deletions
@@ -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,
+6 -3
View File
@@ -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
+6 -3
View File
@@ -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());
+1
View File
@@ -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())
+1
View File
@@ -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: