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 "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 "MMapFactory.h"
#include "MovementGenerator.h"
#include "ObjectAccessor.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 "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 ( )
3028{
3029 new misc_commandscript();
3030}
Definition cs_misc.cpp:87

Referenced by AddCommandsScripts().

◆ GetLocalizeCreatureName()

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

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