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
520{ spellList.clear(); }
TrainerSpellMap spellList
Definition: CreatureData.h:522

References spellList.

Member Function Documentation

◆ Find()

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

References spellList.

Referenced by WorldSession::HandleTrainerBuySpellOpcode().

Member Data Documentation

◆ spellList

◆ trainerType

uint32 TrainerSpellData::trainerType {0}