AzerothCore 3.3.5a
OpenSource WoW Emulator
Loading...
Searching...
No Matches
worldstate_commandscript Class Reference
Inheritance diagram for worldstate_commandscript:
CommandScript ScriptObject

Public Member Functions

 worldstate_commandscript ()
 
ChatCommandTable GetCommands () const override
 
- Public Member Functions inherited from ScriptObject
virtual bool IsDatabaseBound () const
 
virtual bool isAfterLoadScript () const
 
virtual void checkValidity ()
 
const std::string & GetName () const
 
uint16 GetTotalAvailableHooks ()
 

Static Public Member Functions

static bool HandleSunsReachReclamationStatusCommand (ChatHandler *handler)
 
static bool HandleSunsReachReclamationPhaseCommand (ChatHandler *handler, uint32 phase)
 
static bool HandleSunsReachReclamationSubPhaseCommand (ChatHandler *handler, uint32 subphase)
 
static bool HandleSunsReachReclamationCounterCommand (ChatHandler *handler, Optional< uint32 > index, Optional< uint32 > value)
 
static bool HandleSunwellGateCommand (ChatHandler *handler, uint32 newGate)
 
static bool HandleSunwellGateCounterCommand (ChatHandler *handler, Optional< uint32 > index, Optional< uint32 > value)
 

Additional Inherited Members

- Protected Member Functions inherited from CommandScript
 CommandScript (const char *name)
 
- Protected Member Functions inherited from ScriptObject
 ScriptObject (const char *name, uint16 totalAvailableHooks=0)
 
virtual ~ScriptObject ()=default
 

Detailed Description

Constructor & Destructor Documentation

◆ worldstate_commandscript()

worldstate_commandscript::worldstate_commandscript ( )
inline
35: CommandScript("worldstate_commandscript") { }
Definition CommandScript.h:25

Member Function Documentation

◆ GetCommands()

ChatCommandTable worldstate_commandscript::GetCommands ( ) const
inlineoverridevirtual

Implements CommandScript.

38 {
39 static ChatCommandTable sunsreachCommandTable =
40 {
45 { "gate", HandleSunwellGateCommand, SEC_ADMINISTRATOR, Console::Yes },
46 { "gatecounter", HandleSunwellGateCounterCommand, SEC_ADMINISTRATOR, Console::Yes },
47 };
48
49 static ChatCommandTable worldStateCommandTable =
50 {
51 { "sunsreach", sunsreachCommandTable }
52 };
53
54 static ChatCommandTable commandTable =
55 {
56 { "worldstate", worldStateCommandTable }
57 };
58 return commandTable;
59 }
@ SEC_ADMINISTRATOR
Definition Common.h:60
static bool HandleSunsReachReclamationStatusCommand(ChatHandler *handler)
Definition cs_worldstate.cpp:61
static bool HandleSunsReachReclamationSubPhaseCommand(ChatHandler *handler, uint32 subphase)
Definition cs_worldstate.cpp:79
static bool HandleSunwellGateCommand(ChatHandler *handler, uint32 newGate)
Definition cs_worldstate.cpp:104
static bool HandleSunsReachReclamationPhaseCommand(ChatHandler *handler, uint32 phase)
Definition cs_worldstate.cpp:67
static bool HandleSunsReachReclamationCounterCommand(ChatHandler *handler, Optional< uint32 > index, Optional< uint32 > value)
Definition cs_worldstate.cpp:91
static bool HandleSunwellGateCounterCommand(ChatHandler *handler, Optional< uint32 > index, Optional< uint32 > value)
Definition cs_worldstate.cpp:116
std::vector< ChatCommandBuilder > ChatCommandTable
Definition ChatCommand.h:46

References HandleSunsReachReclamationCounterCommand(), HandleSunsReachReclamationPhaseCommand(), HandleSunsReachReclamationStatusCommand(), HandleSunsReachReclamationSubPhaseCommand(), HandleSunwellGateCommand(), HandleSunwellGateCounterCommand(), and SEC_ADMINISTRATOR.

◆ HandleSunsReachReclamationCounterCommand()

static bool worldstate_commandscript::HandleSunsReachReclamationCounterCommand ( ChatHandler handler,
Optional< uint32 index,
Optional< uint32 value 
)
inlinestatic
92 {
93 if (!index || !value || index.value() >= COUNTERS_MAX)
94 {
95 handler->PSendSysMessage("Syntax: .worldstate sunsreach counter <index> <value>.");
96 handler->PSendSysMessage(sWorldState->GetSunsReachPrintout());
97 return true;
98 }
99 sWorldState->SetSunsReachCounter(SunsReachCounters(index.value()), value.value());
100 handler->PSendSysMessage(sWorldState->GetSunsReachPrintout());
101 return true;
102 }
#define sWorldState
Definition WorldState.h:215
SunsReachCounters
Definition WorldState.h:123
@ COUNTERS_MAX
Definition WorldState.h:134
void PSendSysMessage(std::string_view str, bool escapeCharacters=false)
Definition Chat.cpp:211

References COUNTERS_MAX, ChatHandler::PSendSysMessage(), and sWorldState.

Referenced by GetCommands().

◆ HandleSunsReachReclamationPhaseCommand()

static bool worldstate_commandscript::HandleSunsReachReclamationPhaseCommand ( ChatHandler handler,
uint32  phase 
)
inlinestatic
68 {
70 {
71 handler->PSendSysMessage("Invalid phase, see \".worldstate sunsreach phase\" for usage");
72 return false;
73 }
74 sWorldState->HandleSunsReachPhaseTransition(phase);
75 handler->PSendSysMessage(sWorldState->GetSunsReachPrintout());
76 return true;
77 }
@ SUNS_REACH_PHASE_4_HARBOR
Definition WorldState.h:110
phase
Definition boss_skadi.cpp:103

References ChatHandler::PSendSysMessage(), SUNS_REACH_PHASE_4_HARBOR, and sWorldState.

Referenced by GetCommands().

◆ HandleSunsReachReclamationStatusCommand()

static bool worldstate_commandscript::HandleSunsReachReclamationStatusCommand ( ChatHandler handler)
inlinestatic
62 {
63 handler->PSendSysMessage(sWorldState->GetSunsReachPrintout());
64 return true;
65 }

References ChatHandler::PSendSysMessage(), and sWorldState.

Referenced by GetCommands().

◆ HandleSunsReachReclamationSubPhaseCommand()

static bool worldstate_commandscript::HandleSunsReachReclamationSubPhaseCommand ( ChatHandler handler,
uint32  subphase 
)
inlinestatic
80 {
81 if (subphase > SUBPHASE_ALL)
82 {
83 handler->PSendSysMessage("Invalid subphase, see \".worldstate sunsreach subphase\" for usage");
84 return false;
85 }
86 sWorldState->HandleSunsReachSubPhaseTransition(subphase);
87 handler->PSendSysMessage(sWorldState->GetSunsReachPrintout());
88 return true;
89 }
@ SUBPHASE_ALL
Definition WorldState.h:119

References ChatHandler::PSendSysMessage(), SUBPHASE_ALL, and sWorldState.

Referenced by GetCommands().

◆ HandleSunwellGateCommand()

static bool worldstate_commandscript::HandleSunwellGateCommand ( ChatHandler handler,
uint32  newGate 
)
inlinestatic
105 {
106 if (newGate > SUNWELL_ARCHONISUS_GATE3_OPEN)
107 {
108 handler->PSendSysMessage("Invalid phase, see \".worldstate sunsreach gate\" for usage");
109 return false;
110 }
111 sWorldState->HandleSunwellGateTransition(newGate);
112 handler->PSendSysMessage(sWorldState->GetSunsReachPrintout());
113 return true;
114 }
@ SUNWELL_ARCHONISUS_GATE3_OPEN
Definition WorldState.h:142

References ChatHandler::PSendSysMessage(), SUNWELL_ARCHONISUS_GATE3_OPEN, and sWorldState.

Referenced by GetCommands().

◆ HandleSunwellGateCounterCommand()

static bool worldstate_commandscript::HandleSunwellGateCounterCommand ( ChatHandler handler,
Optional< uint32 index,
Optional< uint32 value 
)
inlinestatic
117 {
118 if (!index || !value || index.value() >= COUNTERS_MAX_GATES)
119 {
120 handler->PSendSysMessage("Syntax: .worldstate sunsreach gatecounter <index> <value>.");
121 handler->PSendSysMessage(sWorldState->GetSunsReachPrintout());
122 return true;
123 }
124 sWorldState->SetSunwellGateCounter(SunwellGateCounters(index.value()), value.value());
125 handler->PSendSysMessage(sWorldState->GetSunsReachPrintout());
126 return true;
127 }
SunwellGateCounters
Definition WorldState.h:145
@ COUNTERS_MAX_GATES
Definition WorldState.h:149

References COUNTERS_MAX_GATES, ChatHandler::PSendSysMessage(), and sWorldState.

Referenced by GetCommands().


The documentation for this class was generated from the following file: