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 "Common.h"
#include "GameGraveyard.h"
#include "GameObject.h"
#include "GameTime.h"
#include "GridNotifiers.h"
#include "GridTerrainLoader.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 "Pet.h"
#include "Player.h"
#include "PoolMgr.h"
#include "RBAC.h"
#include "Realm.h"
#include "ScriptMgr.h"
#include "SpellAuras.h"
#include "TargetedMovementGenerator.h"
#include "Tokenize.h"
#include "Transport.h"
#include "WeatherMgr.h"
#include "WorldSessionMgr.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 ( )
3552{
3553 new misc_commandscript();
3554}
Definition cs_misc.cpp:91

Referenced by AddCommandsScripts().

◆ GetLocalizeCreatureName()

std::string const GetLocalizeCreatureName ( Creature creature,
LocaleConstant  locale 
)
65{
66 auto creatureTemplate = sObjectMgr->GetCreatureTemplate(creature->GetEntry());
67 auto cretureLocale = sObjectMgr->GetCreatureLocale(creature->GetEntry());
68 std::string name;
69
70 if (cretureLocale)
71 {
72 name = cretureLocale->Name[locale];
73 }
74
75 if (name.empty() && creatureTemplate)
76 {
77 name = creatureTemplate->Name;
78 }
79
80 if (name.empty())
81 {
82 name = "Unknown creature";
83 }
84
85 return name;
86}
#define sObjectMgr
Definition ObjectMgr.h:1730
uint32 GetEntry() const
Definition Object.h:117

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().