Go to the source code of this file.
◆ CALL_ENABLED_BOOLEAN_HOOKS
#define CALL_ENABLED_BOOLEAN_HOOKS |
( |
|
scriptType, |
|
|
|
hookType, |
|
|
|
action |
|
) |
| |
Value:
return true; \
return true;
Definition: ScriptMgr.h:710
◆ CALL_ENABLED_BOOLEAN_HOOKS_WITH_DEFAULT_FALSE
#define CALL_ENABLED_BOOLEAN_HOOKS_WITH_DEFAULT_FALSE |
( |
|
scriptType, |
|
|
|
hookType, |
|
|
|
action |
|
) |
| |
Value:
return false; \
return false;
◆ CALL_ENABLED_HOOKS
#define CALL_ENABLED_HOOKS |
( |
|
scriptType, |
|
|
|
hookType, |
|
|
|
action |
|
) |
| |
◆ ExecuteScript()
template<typename ScriptName >
void ExecuteScript |
( |
std::function< void(ScriptName *)> |
executeHook | ) |
|
|
inline |
57{
59 return;
60
62 {
63 executeHook(script);
64 }
65}
◆ GetReturnAIScript()
template<typename ScriptName , class T >
T * GetReturnAIScript |
( |
std::function< T *(ScriptName *)> |
executeHook | ) |
|
|
inline |
40{
42 return nullptr;
43
45 {
46 if (T* scriptAI = executeHook(script))
47 {
48 return scriptAI;
49 }
50 }
51
52 return nullptr;
53}
◆ IsValidBoolScript()
template<typename ScriptName >
Optional< bool > IsValidBoolScript |
( |
std::function< bool(ScriptName *)> |
executeHook | ) |
|
|
inline |
25{
27 return {};
28
30 {
31 if (executeHook(script))
32 return true;
33 }
34
35 return false;
36}
◆ ReturnValidBool()
bool ReturnValidBool |
( |
Optional< bool > |
ret, |
|
|
bool |
need = false |
|
) |
| |
|
inline |
68{
69 return ret && *ret ? need : !need;
70}