mirror of
https://github.com/mangosfour/server.git
synced 2025-12-15 19:37:02 +00:00
[7283] Use map for trainer spells for fast find data by spell id.
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
This commit is contained in:
parent
02b4b2f0b1
commit
22656b33e3
5 changed files with 38 additions and 42 deletions
|
|
@ -160,9 +160,9 @@ void WorldSession::SendTrainerList( uint64 guid, const std::string& strTitle )
|
|||
float fDiscountMod = _player->GetReputationPriceDiscount(unit);
|
||||
|
||||
uint32 count = 0;
|
||||
for(TrainerSpellList::const_iterator itr = trainer_spells->spellList.begin(); itr != trainer_spells->spellList.end(); ++itr)
|
||||
for(TrainerSpellMap::const_iterator itr = trainer_spells->spellList.begin(); itr != trainer_spells->spellList.end(); ++itr)
|
||||
{
|
||||
TrainerSpell const* tSpell = *itr;
|
||||
TrainerSpell const* tSpell = &itr->second;
|
||||
|
||||
if(!_player->IsSpellFitByClassAndRace(tSpell->learnedSpell))
|
||||
continue;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue