AzerothCore 3.3.5a
OpenSource WoW Emulator
Loading...
Searching...
No Matches
SpellInfoCorrections.cpp File Reference
#include "DBCStores.h"
#include "DBCStructure.h"
#include "GameGraveyard.h"
#include "SpellInfo.h"
#include "SpellMgr.h"

Go to the source code of this file.

Functions

void ApplySpellFix (std::initializer_list< uint32 > spellIds, void(*fix)(SpellInfo *))
 

Function Documentation

◆ ApplySpellFix()

void ApplySpellFix ( std::initializer_list< uint32 spellIds,
void(*)(SpellInfo *)  fix 
)
inline
25{
26 for (uint32 spellId : spellIds)
27 {
28 SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(spellId);
29 if (!spellInfo)
30 {
31 LOG_ERROR("sql.sql", "Spell info correction specified for non-existing spell {}", spellId);
32 continue;
33 }
34
35 fix(const_cast<SpellInfo*>(spellInfo));
36 }
37}
std::uint32_t uint32
Definition: Define.h:108
#define LOG_ERROR(filterType__,...)
Definition: Log.h:157
#define sSpellMgr
Definition: SpellMgr.h:825
Definition: SpellInfo.h:314

References LOG_ERROR, and sSpellMgr.

Referenced by SpellMgr::LoadSpellInfoCorrections().