fix(Core/Spells): Implemented SPELL_GROUP_SPECIAL_FLAG_SKIP_STRONGER_SAME_SPELL. (#10307)

Fixed #10263
This commit is contained in:
UltraNix
2022-01-31 01:29:22 +01:00
committed by GitHub
parent 0c09e88f64
commit 8f8fbd95ce
5 changed files with 39 additions and 19 deletions

View File

@@ -9171,7 +9171,11 @@ bool Unit::HandleProcTriggerSpell(Unit* victim, uint32 damage, AuraEffect* trigg
if (AuraEffect* aurEff = owner->GetDummyAuraEffect(SPELLFAMILY_WARLOCK, 3220, 0))
{
basepoints0 = int32((aurEff->GetAmount() * owner->SpellBaseDamageBonusDone(SpellSchoolMask(SPELL_SCHOOL_MASK_MAGIC)) + 100.0f) / 100.0f); // TODO: Is it right?
int32 spellPower = owner->SpellBaseDamageBonusDone(SpellSchoolMask(SPELL_SCHOOL_MASK_MAGIC));
if (AuraEffect const* demonicAuraEffect = GetAuraEffect(trigger_spell_id, EFFECT_0))
spellPower -= demonicAuraEffect->GetAmount();
basepoints0 = int32((aurEff->GetAmount() * spellPower + 100.0f) / 100.0f);
CastCustomSpell(this, trigger_spell_id, &basepoints0, &basepoints0, nullptr, true, castItem, triggeredByAura);
return true;
}