AzerothCore 3.3.5a
OpenSource WoW Emulator
Loading...
Searching...
No Matches
cs_misc.cpp File Reference
#include "AccountMgr.h"
#include "ArenaTeamMgr.h"
#include "BattlegroundMgr.h"
#include "CellImpl.h"
#include "CharacterCache.h"
#include "Chat.h"
#include "CommandScript.h"
#include "GameGraveyard.h"
#include "GameTime.h"
#include "GridNotifiers.h"
#include "Group.h"
#include "GuildMgr.h"
#include "IPLocation.h"
#include "InstanceSaveMgr.h"
#include "LFG.h"
#include "LFGMgr.h"
#include "Language.h"
#include "MapMgr.h"
#include "MiscPackets.h"
#include "MovementGenerator.h"
#include "ObjectAccessor.h"
#include "Opcodes.h"
#include "Pet.h"
#include "Player.h"
#include "Realm.h"
#include "ScriptMgr.h"
#include "SpellAuras.h"
#include "TargetedMovementGenerator.h"
#include "Tokenize.h"
#include "WeatherMgr.h"
#include "GridNotifiersImpl.h"

Go to the source code of this file.

Classes

class  misc_commandscript
 

Functions

std::string const GetLocalizeCreatureName (Creature *creature, LocaleConstant locale)
 
void AddSC_misc_commandscript ()
 

Variables

constexpr auto SPELL_STUCK = 7355
 
constexpr auto SPELL_FREEZE = 9454
 

Function Documentation

◆ AddSC_misc_commandscript()

void AddSC_misc_commandscript ( )
2987{
2988 new misc_commandscript();
2989}
Definition: cs_misc.cpp:85

Referenced by AddCommandsScripts().

◆ GetLocalizeCreatureName()

std::string const GetLocalizeCreatureName ( Creature creature,
LocaleConstant  locale 
)
59{
60 auto creatureTemplate = sObjectMgr->GetCreatureTemplate(creature->GetEntry());
61 auto cretureLocale = sObjectMgr->GetCreatureLocale(creature->GetEntry());
62 std::string name;
63
64 if (cretureLocale)
65 {
66 name = cretureLocale->Name[locale];
67 }
68
69 if (name.empty() && creatureTemplate)
70 {
71 name = creatureTemplate->Name;
72 }
73
74 if (name.empty())
75 {
76 name = "Unknown creature";
77 }
78
79 return name;
80}
#define sObjectMgr
Definition: ObjectMgr.h:1640
uint32 GetEntry() const
Definition: Object.h:109

References Object::GetEntry(), and sObjectMgr.

Referenced by misc_commandscript::HandleFreezeCommand(), and misc_commandscript::HandleUnFreezeCommand().

Variable Documentation

◆ SPELL_FREEZE

constexpr auto SPELL_FREEZE = 9454
constexpr

◆ SPELL_STUCK

constexpr auto SPELL_STUCK = 7355
constexpr
Todo:
: this import is not necessary for compilation and marked as unused by the IDE

Referenced by misc_commandscript::HandleUnstuckCommand().