aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/server/game/Entities/Player/Player.cpp27
-rw-r--r--src/server/game/Spells/SpellInfo.cpp30
-rw-r--r--src/server/game/Spells/SpellMgr.cpp4
3 files changed, 22 insertions, 39 deletions
diff --git a/src/server/game/Entities/Player/Player.cpp b/src/server/game/Entities/Player/Player.cpp
index 9c928b5fb73..13c52109fcd 100644
--- a/src/server/game/Entities/Player/Player.cpp
+++ b/src/server/game/Entities/Player/Player.cpp
@@ -23072,31 +23072,10 @@ void Player::LearnSkillRewardedSpells(uint32 skillId, uint32 skillValue)
if (skillValue < ability->MinSkillLineRank && ability->AcquireMethod == SKILL_LINE_ABILITY_LEARNED_ON_SKILL_VALUE)
RemoveSpell(ability->Spell);
// need learn
+ else if (!IsInWorld())
+ AddSpell(ability->Spell, true, true, true, false, false, ability->SkillLine);
else
- {
- // used to avoid double Seal of Righteousness on paladins, it's the only player spell which has both spell and forward spell in auto learn
- if (ability->AcquireMethod == SKILL_LINE_ABILITY_LEARNED_ON_SKILL_LEARN && ability->SupercededBySpell)
- {
- bool skipCurrent = false;
- auto bounds = sSpellMgr->GetSkillLineAbilityMapBounds(ability->SupercededBySpell);
- for (auto itr = bounds.first; itr != bounds.second; ++itr)
- {
- if (itr->second->AcquireMethod == SKILL_LINE_ABILITY_LEARNED_ON_SKILL_LEARN && skillValue >= itr->second->MinSkillLineRank)
- {
- skipCurrent = true;
- break;
- }
- }
-
- if (skipCurrent)
- continue;
- }
-
- if (!IsInWorld())
- AddSpell(ability->Spell, true, true, true, false, false, ability->SkillLine);
- else
- LearnSpell(ability->Spell, true, ability->SkillLine);
- }
+ LearnSpell(ability->Spell, true, ability->SkillLine);
}
}
diff --git a/src/server/game/Spells/SpellInfo.cpp b/src/server/game/Spells/SpellInfo.cpp
index 48ae954b080..80f7aa8e87a 100644
--- a/src/server/game/Spells/SpellInfo.cpp
+++ b/src/server/game/Spells/SpellInfo.cpp
@@ -1136,23 +1136,23 @@ bool SpellInfo::IsStackableWithRanks() const
return false;
// All stance spells. if any better way, change it.
- for (SpellEffectInfo const& effect : GetEffects())
+ switch (SpellFamilyName)
{
- switch (SpellFamilyName)
- {
- case SPELLFAMILY_PALADIN:
- // Paladin aura Spell
- if (effect.Effect == SPELL_EFFECT_APPLY_AREA_AURA_RAID)
- return false;
- break;
- case SPELLFAMILY_DRUID:
- // Druid form Spell
- if (effect.Effect == SPELL_EFFECT_APPLY_AURA &&
- effect.ApplyAuraName == SPELL_AURA_MOD_SHAPESHIFT)
- return false;
- break;
- }
+ case SPELLFAMILY_PALADIN:
+ // Paladin aura Spell
+ if (HasEffect(SPELL_EFFECT_APPLY_AREA_AURA_RAID))
+ return false;
+ // Seal of Righteousness
+ if (SpellFamilyFlags[1] & 0x20000000)
+ return false;
+ break;
+ case SPELLFAMILY_DRUID:
+ // Druid form Spell
+ if (HasAura(SPELL_AURA_MOD_SHAPESHIFT))
+ return false;
+ break;
}
+
return true;
}
diff --git a/src/server/game/Spells/SpellMgr.cpp b/src/server/game/Spells/SpellMgr.cpp
index 3dfd8dc16e4..a31d6fcbaab 100644
--- a/src/server/game/Spells/SpellMgr.cpp
+++ b/src/server/game/Spells/SpellMgr.cpp
@@ -1973,6 +1973,10 @@ void SpellMgr::LoadSkillLineAbilityMap()
++count;
}
+ // Don't autolearn secondary variant of Seal of Righteousness - it is learned together with Judgement of Light
+ if (SkillLineAbilityEntry* sealOfRighteousnessR2 = const_cast<SkillLineAbilityEntry*>(sSkillLineAbilityStore.LookupEntry(11957)))
+ sealOfRighteousnessR2->AcquireMethod = 0;
+
TC_LOG_INFO("server.loading", ">> Loaded {} SkillLineAbility MultiMap Data in {} ms", count, GetMSTimeDiffToNow(oldMSTime));
}