From a57aecbf8c47cb674d03091d08eff133341b54f2 Mon Sep 17 00:00:00 2001 From: UltraNix <80540499+UltraNix@users.noreply.github.com> Date: Sun, 24 Apr 2022 08:25:07 +0200 Subject: [PATCH] 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 --- .../pending_db_world/rev_1650744666752700000.sql | 13 +++++++++++++ src/server/game/Entities/Unit/Unit.cpp | 6 ++++-- src/server/game/Spells/SpellInfoCorrections.cpp | 6 +++--- 3 files changed, 20 insertions(+), 5 deletions(-) create mode 100644 data/sql/updates/pending_db_world/rev_1650744666752700000.sql diff --git a/data/sql/updates/pending_db_world/rev_1650744666752700000.sql b/data/sql/updates/pending_db_world/rev_1650744666752700000.sql new file mode 100644 index 000000000..0657e5a0e --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1650744666752700000.sql @@ -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); diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp index 72a60b800..86ae9e131 100644 --- a/src/server/game/Entities/Unit/Unit.cpp +++ b/src/server/game/Entities/Unit/Unit.cpp @@ -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); diff --git a/src/server/game/Spells/SpellInfoCorrections.cpp b/src/server/game/Spells/SpellInfoCorrections.cpp index 3b9f21cde..dd18b7b91 100644 --- a/src/server/game/Spells/SpellInfoCorrections.cpp +++ b/src/server/game/Spells/SpellInfoCorrections.cpp @@ -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)