mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-15 01:59:09 +00:00
fix(Core/Spells): Improved Drain Soul triggering from every target … (#8144)
...that dies and not just the one affected by Drain Soul and move the Drain Soul code to spell scripts - TC Ports:d9743c984f (diff-ea612aafadff90005e88b243eb000369be9e5cb6f8dc85a008d31e42b156e0ec)and2b1b36f561 (diff-ea612aafadff90005e88b243eb000369be9e5cb6f8dc85a008d31e42b156e0ec)
This commit is contained in:
@@ -8409,28 +8409,8 @@ bool Unit::HandleProcTriggerSpell(Unit* victim, uint32 damage, AuraEffect* trigg
|
||||
break;
|
||||
case SPELLFAMILY_WARLOCK:
|
||||
{
|
||||
// Drain Soul
|
||||
if (auraSpellInfo->SpellFamilyFlags[0] & 0x4000)
|
||||
{
|
||||
// Improved Drain Soul
|
||||
Unit::AuraEffectList const& mAddFlatModifier = GetAuraEffectsByType(SPELL_AURA_DUMMY);
|
||||
for (Unit::AuraEffectList::const_iterator i = mAddFlatModifier.begin(); i != mAddFlatModifier.end(); ++i)
|
||||
{
|
||||
if ((*i)->GetMiscValue() == SPELLMOD_CHANCE_OF_SUCCESS && (*i)->GetSpellInfo()->SpellIconID == 113)
|
||||
{
|
||||
int32 value2 = CalculateSpellDamage(this, (*i)->GetSpellInfo(), 2);
|
||||
basepoints0 = int32(CalculatePct(GetMaxPower(POWER_MANA), value2));
|
||||
// Drain Soul
|
||||
CastCustomSpell(this, 18371, &basepoints0, nullptr, nullptr, true, castItem, triggeredByAura);
|
||||
break;
|
||||
}
|
||||
}
|
||||
// Not remove charge (aura removed on death in any cases)
|
||||
// Need for correct work Drain Soul SPELL_AURA_CHANNEL_DEATH_ITEM aura
|
||||
return false;
|
||||
}
|
||||
// Nether Protection
|
||||
else if (auraSpellInfo->SpellIconID == 1985)
|
||||
if (auraSpellInfo->SpellIconID == 1985)
|
||||
{
|
||||
if (!procSpell)
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user