◆ achievement_commandscript()
achievement_commandscript::achievement_commandscript |
( |
| ) |
|
|
inline |
Definition CommandScript.h:25
◆ GetCommands()
Implements CommandScript.
30 {
32 {
35 };
37 {
38 { "achievement", achievementCommandTable }
39 };
40 return commandTable;
41 }
@ SEC_ADMINISTRATOR
Definition Common.h:60
@ SEC_GAMEMASTER
Definition Common.h:59
static bool HandleAchievementCheckAllCommand(ChatHandler *handler, Optional< PlayerIdentifier > player)
Definition cs_achievement.cpp:56
static bool HandleAchievementAddCommand(ChatHandler *handler, AchievementEntry const *achievementEntry)
Definition cs_achievement.cpp:43
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()
57 {
58 if (!player)
59 {
61 }
62
63 if (!player)
64 {
66 return false;
67 }
68
69 if (player->IsConnected())
70 {
71 if (
Player* target = player->GetConnectedPlayer())
72 target->CheckAllAchievementCriteria();
73 }
74 else
75 {
78 stmt->SetData(1, player->GetGUID().GetCounter());
80 }
81
82 return true;
83 }
@ 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:616
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: