fix(Scripts/Spells): Improvements to Brood Power: Bronze: (#11499)

Brood Power bronze affects only one target.
Death Talon Wyrmguard gain the Brood Power aura only once per lifetime.
Fixes #11448
This commit is contained in:
UltraNix
2022-04-24 08:25:07 +02:00
committed by GitHub
parent c695d9b4bd
commit a57aecbf8c
3 changed files with 20 additions and 5 deletions

View File

@@ -0,0 +1,13 @@
INSERT INTO `version_db_world` (`sql_rev`) VALUES ('1650744666752700000');
UPDATE `spell_dbc` SET `AttributesEx3`=`AttributesEx3`|0x00100000 WHERE `id` IN (22282,22283,22285,22286,22287,22288);
UPDATE `smart_scripts` SET `event_type`=11 WHERE `entryorguid`=12460 AND `source_type`=0 AND `id`=1;
DELETE FROM `spell_custom_attr` WHERE `spell_id` IN (22282,22283,22285,22286,22287,22288);
INSERT INTO `spell_custom_attr` VALUES
(22282,0x00000800),
(22283,0x00000800),
(22285,0x00000800),
(22286,0x00000800),
(22287,0x00000800),
(22288,0x00000800);

View File

@@ -5021,7 +5021,8 @@ void Unit::RemoveEvadeAuras()
for (AuraApplicationMap::iterator iter = m_appliedAuras.begin(); iter != m_appliedAuras.end();)
{
Aura const* aura = iter->second->GetBase();
if (aura->GetSpellInfo()->HasAura(SPELL_AURA_CONTROL_VEHICLE) || aura->GetSpellInfo()->HasAura(SPELL_AURA_CLONE_CASTER) || (aura->IsPassive() && GetOwnerGUID().IsPlayer()))
SpellInfo const* spellInfo = aura->GetSpellInfo();
if (spellInfo->HasAttribute(SPELL_ATTR0_CU_IGNORE_EVADE) || spellInfo->HasAura(SPELL_AURA_CONTROL_VEHICLE) || spellInfo->HasAura(SPELL_AURA_CLONE_CASTER) || (aura->IsPassive() && GetOwnerGUID().IsPlayer()))
++iter;
else
_UnapplyAura(iter, AURA_REMOVE_BY_DEFAULT);
@@ -5030,7 +5031,8 @@ void Unit::RemoveEvadeAuras()
for (AuraMap::iterator iter = m_ownedAuras.begin(); iter != m_ownedAuras.end();)
{
Aura* aura = iter->second;
if (aura->GetSpellInfo()->HasAura(SPELL_AURA_CONTROL_VEHICLE) || aura->GetSpellInfo()->HasAura(SPELL_AURA_CLONE_CASTER) || (aura->IsPassive() && GetOwnerGUID().IsPlayer()))
SpellInfo const* spellInfo = aura->GetSpellInfo();
if (spellInfo->HasAttribute(SPELL_ATTR0_CU_IGNORE_EVADE) || spellInfo->HasAura(SPELL_AURA_CONTROL_VEHICLE) || spellInfo->HasAura(SPELL_AURA_CLONE_CASTER) || (aura->IsPassive() && GetOwnerGUID().IsPlayer()))
++iter;
else
RemoveOwnedAura(iter, AURA_REMOVE_BY_DEFAULT);

View File

@@ -4243,10 +4243,10 @@ void SpellMgr::LoadSpellInfoCorrections()
spellInfo->AttributesEx2 |= SPELL_ATTR2_IGNORE_LINE_OF_SIGHT;
});
// Brood Power Bronze
ApplySpellFix({ 22291 }, [](SpellInfo* spellInfo)
// Brood Power : Bronze
ApplySpellFix({ 22311 }, [](SpellInfo* spellInfo)
{
spellInfo->MaxAffectedTargets = 1;
spellInfo->AttributesEx3 |= SPELL_ATTR3_SUPRESS_CASTER_PROCS;
});
for (uint32 i = 0; i < GetSpellInfoStoreSize(); ++i)