◆ achievement_commandscript()
achievement_commandscript::achievement_commandscript |
( |
| ) |
|
|
inline |
Definition CommandScript.h:25
◆ GetCommands()
Implements CommandScript.
37 {
39 {
42 };
44 {
45 { "achievement", achievementCommandTable }
46 };
47 return commandTable;
48 }
@ SEC_ADMINISTRATOR
Definition Common.h:60
@ SEC_GAMEMASTER
Definition Common.h:59
static bool HandleAchievementCheckAllCommand(ChatHandler *handler, Optional< PlayerIdentifier > player)
Definition cs_achievement.cpp:63
static bool HandleAchievementAddCommand(ChatHandler *handler, AchievementEntry const *achievementEntry)
Definition cs_achievement.cpp:50
std::vector< ChatCommandBuilder > ChatCommandTable
Definition ChatCommand.h:46
References HandleAchievementAddCommand(), HandleAchievementCheckAllCommand(), SEC_ADMINISTRATOR, and SEC_GAMEMASTER.
◆ HandleAchievementAddCommand()
static bool achievement_commandscript::HandleAchievementAddCommand |
( |
ChatHandler * |
handler, |
|
|
AchievementEntry const * |
achievementEntry |
|
) |
| |
|
inlinestatic |
◆ HandleAchievementCheckAllCommand()
64 {
65 if (!player)
66 {
68 }
69
70 if (!player)
71 {
73 return false;
74 }
75
76 if (player->IsConnected())
77 {
78 if (
Player* target = player->GetConnectedPlayer())
79 target->CheckAllAchievementCriteria();
80 }
81 else
82 {
85 stmt->SetData(1, player->GetGUID().GetCounter());
87 }
88
89 return true;
90 }
@ CHAR_UPD_ADD_AT_LOGIN_FLAG
Definition CharacterDatabase.h:276
DatabaseWorkerPool< CharacterDatabaseConnection > CharacterDatabase
Accessor to the character database.
Definition DatabaseEnv.cpp:21
std::uint16_t uint16
Definition Define.h:108
@ LANG_PLAYER_NOT_FOUND
Definition Language.h:540
@ AT_LOGIN_CHECK_ACHIEVS
Definition Player.h:615
static Optional< PlayerIdentifier > FromTarget(ChatHandler *handler)
Definition ChatCommandTags.cpp:138
References AT_LOGIN_CHECK_ACHIEVS, CHAR_UPD_ADD_AT_LOGIN_FLAG, CharacterDatabase, Acore::ChatCommands::PlayerIdentifier::FromTarget(), LANG_PLAYER_NOT_FOUND, and ChatHandler::SendErrorMessage().
Referenced by GetCommands().
The documentation for this class was generated from the following file: