AzerothCore 3.3.5a
OpenSource WoW Emulator
Loading...
Searching...
No Matches
TrainerSpellData Struct Reference

#include "CreatureData.h"

Public Member Functions

 TrainerSpellData ()=default
 
 ~TrainerSpellData ()
 
TrainerSpell const * Find (uint32 spell_id) const
 

Public Attributes

TrainerSpellMap spellList
 
uint32 trainerType {0}
 

Detailed Description

Constructor & Destructor Documentation

◆ TrainerSpellData()

TrainerSpellData::TrainerSpellData ( )
default

◆ ~TrainerSpellData()

TrainerSpellData::~TrainerSpellData ( )
inline
534{ spellList.clear(); }
TrainerSpellMap spellList
Definition: CreatureData.h:536

References spellList.

Member Function Documentation

◆ Find()

TrainerSpell const * TrainerSpellData::Find ( uint32  spell_id) const
84{
85 TrainerSpellMap::const_iterator itr = spellList.find(spell_id);
86 if (itr != spellList.end())
87 return &itr->second;
88
89 return nullptr;
90}

References spellList.

Referenced by WorldSession::HandleTrainerBuySpellOpcode().

Member Data Documentation

◆ spellList

◆ trainerType

uint32 TrainerSpellData::trainerType {0}