Fix displaying the right ranks of spells in spellbook
- Fixes displaying the Seal of Righteousness (SoR) ranks - Fixes the "double spell listing" of non-stackable spells after the learning, both in chat and in spellbook (applies to all classes) - This fix is paired with 2 database updates, one for world and one for characters - After applying the fixes, all paladin characters must visit their trainer to relearn the "Judgement" spell
This commit is contained in:
parent
f70bb75ba0
commit
e16313c5b2
@ -2983,8 +2983,10 @@ bool Player::addSpell(uint32 spell_id, bool active, bool learning, bool dependen
|
||||
|
||||
m_spells[spell_id] = newspell;
|
||||
|
||||
// return false if spell disabled
|
||||
if (newspell.disabled)
|
||||
// return false if spell disabled or spell is non-stackable with lower-ranks
|
||||
if (newspell.disabled ||
|
||||
(sSpellMgr.IsRankedSpellNonStackableInSpellBook(spellInfo) &&
|
||||
(sSpellMgr.GetFirstSpellInChain(spell_id) != spell_id)))
|
||||
{ return false; }
|
||||
}
|
||||
|
||||
|
@ -1964,6 +1964,9 @@ bool SpellMgr::canStackSpellRanksInSpellBook(SpellEntry const* spellInfo) const
|
||||
switch (spellInfo->SpellFamilyName)
|
||||
{
|
||||
case SPELLFAMILY_PALADIN:
|
||||
// Paladin SoR spell, Judgement version
|
||||
if (spellInfo->Id == 21084 || spellInfo->Id == 20154)
|
||||
{ return false; }
|
||||
// Paladin aura Spell
|
||||
if (spellInfo->Effect[i] == SPELL_EFFECT_APPLY_AREA_AURA_PARTY)
|
||||
{ return false; }
|
||||
|
@ -2276,6 +2276,11 @@ void Spell::EffectLearnSpell(SpellEffectIndex eff_idx)
|
||||
Player* player = (Player*)unitTarget;
|
||||
|
||||
uint32 spellToLearn = m_spellInfo->EffectTriggerSpell[eff_idx];
|
||||
|
||||
// special case for paladin SoR 20154 (non-judgement version)
|
||||
if (m_spellInfo->Id == 10321)
|
||||
{ player->removeSpell(20154, true, false); }
|
||||
|
||||
player->learnSpell(spellToLearn, false);
|
||||
|
||||
if (WorldObject const* caster = GetCastingObject())
|
||||
|
@ -706,6 +706,7 @@ SpellAuraProcResult Unit::HandleDummyAuraProc(Unit* pVictim, uint32 damage, Aura
|
||||
uint32 spellId;
|
||||
switch (triggeredByAura->GetId())
|
||||
{
|
||||
case 20154:
|
||||
case 21084: spellId = 25742; break; // Rank 1
|
||||
case 20287: spellId = 25740; break; // Rank 2
|
||||
case 20288: spellId = 25739; break; // Rank 3
|
||||
|
Loading…
x
Reference in New Issue
Block a user