aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Spells/SpellInfo.cpp
diff options
context:
space:
mode:
authorShauren <shauren.trinity@gmail.com>2016-06-15 16:20:43 +0200
committerShauren <shauren.trinity@gmail.com>2016-06-15 16:20:43 +0200
commit5da217877be7f22db3bfc8ee06ca1ffad172d281 (patch)
treefc6b5a98a6b1d76bd1e061afec0fabc007922b0c /src/server/game/Spells/SpellInfo.cpp
parent8839369fc534d46816efd22ef0db3f8b9e5c8d44 (diff)
Core/Spells: Automatically generate spell rank info from SkillLineAbility
* This fixes weird spellbook/talent/glyph/profession ui behavior when knowing multiple spells to remove talent or glyph, or multiple spells to open profession ui
Diffstat (limited to 'src/server/game/Spells/SpellInfo.cpp')
-rw-r--r--src/server/game/Spells/SpellInfo.cpp39
1 files changed, 0 insertions, 39 deletions
diff --git a/src/server/game/Spells/SpellInfo.cpp b/src/server/game/Spells/SpellInfo.cpp
index e7ac181e69f..25a5c874a58 100644
--- a/src/server/game/Spells/SpellInfo.cpp
+++ b/src/server/game/Spells/SpellInfo.cpp
@@ -1257,22 +1257,6 @@ bool SpellInfo::IsQuestTame() const
return effect0 && effect1 && effect0->Effect == SPELL_EFFECT_THREAT && effect1->Effect == SPELL_EFFECT_APPLY_AURA && effect1->ApplyAuraName == SPELL_AURA_DUMMY;
}
-bool SpellInfo::IsProfessionOrRiding(uint32 difficulty) const
-{
- SpellEffectInfoVector effects = GetEffectsForDifficulty(difficulty);
- for (SpellEffectInfo const* effect : effects)
- {
- if ((effect && effect->Effect == SPELL_EFFECT_SKILL))
- {
- uint32 skill = effect->MiscValue;
-
- if (IsProfessionOrRidingSkill(skill))
- return true;
- }
- }
- return false;
-}
-
bool SpellInfo::IsProfession(uint32 difficulty) const
{
SpellEffectInfoVector effects = GetEffectsForDifficulty(difficulty);
@@ -1310,23 +1294,6 @@ bool SpellInfo::IsPrimaryProfessionFirstRank(uint32 difficulty) const
return IsPrimaryProfession(difficulty) && GetRank() == 1;
}
-bool SpellInfo::IsAbilityLearnedWithProfession() const
-{
- SkillLineAbilityMapBounds bounds = sSpellMgr->GetSkillLineAbilityMapBounds(Id);
-
- for (SkillLineAbilityMap::const_iterator _spell_idx = bounds.first; _spell_idx != bounds.second; ++_spell_idx)
- {
- SkillLineAbilityEntry const* pAbility = _spell_idx->second;
- if (!pAbility || pAbility->AquireMethod != SKILL_LINE_ABILITY_LEARNED_ON_SKILL_VALUE)
- continue;
-
- if (pAbility->MinSkillLineRank > 0)
- return true;
- }
-
- return false;
-}
-
bool SpellInfo::IsAbilityOfSkillType(uint32 skillType) const
{
SkillLineAbilityMapBounds bounds = sSpellMgr->GetSkillLineAbilityMapBounds(Id);
@@ -1425,12 +1392,6 @@ bool SpellInfo::IsStackableWithRanks() const
if (IsPassive())
return false;
- if (IsProfessionOrRiding())
- return false;
-
- if (IsAbilityLearnedWithProfession())
- return false;
-
// All stance spells. if any better way, change it.
SpellEffectInfoVector effects = GetEffectsForDifficulty(DIFFICULTY_NONE);
for (SpellEffectInfo const* effect : effects)