PDA

Просмотр полной версии : [patch] Repentance vs Righteous Vengeance


Insider42
28.05.2010, 16:59
Суть проблемы:
Покаяние (Repentance) не заменяет эффекта Праведной мести (Righteous Vengeance) как должно быть с одного из последних патчей.

Автор: MrLama
diff --git a/src/game/SpellMgr.cpp b/src/game/SpellMgr.cpp
index 77b2db3..e43cb22 100644
--- a/src/game/SpellMgr.cpp
+++ b/src/game/SpellMgr.cpp
@@ -1742,6 +1742,10 @@ bool SpellMgr::IsNoStackSpellDueToSpell(uint32 spellId_1, uint32 spellId_2) cons
if (IsSealSpell(spellInfo_1) && IsSealSpell(spellInfo_2))
return true;

+ // Repentance removes Righteous Vengeance
+ if (spellInfo_1->Id == 20066 && spellInfo_2->Id == 61840)
+ return true;
+
// Swift Retribution / Improved Devotion Aura (talents) and Paladin Auras
if ((spellInfo_1->SpellFamilyFlags2 & 0x00000020) && (spellInfo_2->SpellIconID == 291 || spellInfo_2->SpellIconID == 3028) ||
(spellInfo_2->SpellFamilyFlags2 & 0x00000020) && (spellInfo_1->SpellIconID == 291 || spellInfo_1->SpellIconID == 3028))

Den
26.08.2011, 19:56
Скорее лучше это сделать в Cast(...) или HandleSpellSpecificBoosts(...)

Я сделал через Cast(...) , если что подправим.

diff --git a/src/game/Spell.cpp b/src/game/Spell.cpp
index 722e112..364ea75 100644
--- a/src/game/Spell.cpp
+++ b/src/game/Spell.cpp
@@ -3153,6 +3153,14 @@ void Spell::cast(bool skipCheck)
// Avenging Wrath
else if (m_spellInfo->SpellFamilyFlags & UI64LIT(0x0000200000000000))
AddPrecastSpell(61987); // Avenging Wrath Marker
+ // Repentance
+ else if (m_spellInfo->IsFitToFamilyMask(UI64LIT(0x0000000000000004)))
+ {
+ // remove Righteous Vengeance after apply Repentance
+ if (Unit* target = m_targets.getUnitTarget())
+ if (target->GetAura(SPELL_AURA_PERIODIC_DAMAGE, SPELLFAMILY_PALADIN, UI64LIT(0x0000000020000000), 0))
+ target->RemoveAurasDueToSpell(61840);
+ }
break;
}
case SPELLFAMILY_SHAMAN: