aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/server/game/Entities/Creature/Trainer.cpp17
1 files changed, 1 insertions, 16 deletions
diff --git a/src/server/game/Entities/Creature/Trainer.cpp b/src/server/game/Entities/Creature/Trainer.cpp
index bfdf21a06bd..ed2d2a9cf3e 100644
--- a/src/server/game/Entities/Creature/Trainer.cpp
+++ b/src/server/game/Entities/Creature/Trainer.cpp
@@ -150,26 +150,11 @@ namespace Trainer
hasLearnSpellEffect = true;
if (!player->HasSpell(spellEffect->TriggerSpell))
knowsAllLearnedSpells = false;
-
- if (uint32 previousRankSpellId = sSpellMgr->GetPrevSpellInChain(spellEffect->TriggerSpell))
- if (!player->HasSpell(previousRankSpellId))
- return SpellState::Unavailable;
}
- if (!hasLearnSpellEffect)
- {
- if (uint32 previousRankSpellId = sSpellMgr->GetPrevSpellInChain(trainerSpell->SpellId))
- if (!player->HasSpell(previousRankSpellId))
- return SpellState::Unavailable;
- }
- else if (knowsAllLearnedSpells)
+ if (hasLearnSpellEffect && knowsAllLearnedSpells)
return SpellState::Known;
- // check additional spell requirement
- for (auto const& requirePair : sSpellMgr->GetSpellsRequiredForSpellBounds(trainerSpell->SpellId))
- if (!player->HasSpell(requirePair.second))
- return SpellState::Unavailable;
-
return SpellState::Available;
}