aboutsummaryrefslogtreecommitdiff
path: root/src/game/NPCHandler.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/game/NPCHandler.cpp')
-rw-r--r--src/game/NPCHandler.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/game/NPCHandler.cpp b/src/game/NPCHandler.cpp
index 04c31ff8f8d..6bb916d9fe0 100644
--- a/src/game/NPCHandler.cpp
+++ b/src/game/NPCHandler.cpp
@@ -174,6 +174,7 @@ void WorldSession::SendTrainerList( uint64 guid, const std::string& strTitle )
bool primary_prof_first_rank = spellmgr.IsPrimaryProfessionFirstRankSpell(tSpell->spell);
SpellChainNode const* chain_node = spellmgr.GetSpellChainNode(tSpell->spell);
+ uint32 req_spell = spellmgr.GetSpellRequired(tSpell->spell);
data << uint32(tSpell->spell);
data << uint8(_player->GetTrainerSpellState(tSpell));
@@ -184,8 +185,8 @@ void WorldSession::SendTrainerList( uint64 guid, const std::string& strTitle )
data << uint8(tSpell->reqlevel);
data << uint32(tSpell->reqskill);
data << uint32(tSpell->reqskillvalue);
- data << uint32(chain_node ? (chain_node->prev ? chain_node->prev : chain_node->req) : 0);
- data << uint32(chain_node && chain_node->prev ? chain_node->req : 0);
+ data << uint32(chain_node && chain_node->prev ? chain_node->prev : req_spell);
+ data << uint32(chain_node && chain_node->prev ? req_spell : 0);
data << uint32(0);
}