![]() |
TrinityCore
|
Inheritance diagram for character_commandscript:Classes | |
| struct | DeletedInfo |
Public Types | |
| typedef std::list< DeletedInfo > | DeletedInfoList |
Public Member Functions | |
| character_commandscript () | |
| std::span< ChatCommandBuilder const > | GetCommands () const override |
Public Member Functions inherited from CommandScript | |
| ~CommandScript () | |
Public Member Functions inherited from ScriptObject | |
| ScriptObject (ScriptObject const &right)=delete | |
| ScriptObject (ScriptObject &&right)=delete | |
| ScriptObject & | operator= (ScriptObject const &right)=delete |
| ScriptObject & | operator= (ScriptObject &&right)=delete |
| std::string const & | GetName () const |
Additional Inherited Members | |
Protected Member Functions inherited from CommandScript | |
| CommandScript (char const *name) noexcept | |
Protected Member Functions inherited from ScriptObject | |
| ScriptObject (char const *name) noexcept | |
| virtual | ~ScriptObject () |
Definition at line 43 of file cs_character.cpp.
| typedef std::list<DeletedInfo> character_commandscript::DeletedInfoList |
Definition at line 97 of file cs_character.cpp.
|
inline |
Definition at line 46 of file cs_character.cpp.
|
inlineoverridevirtual |
Implements CommandScript.
Definition at line 48 of file cs_character.cpp.
References HandleCharacterChangeAccountCommand(), HandleCharacterChangeFactionCommand(), HandleCharacterChangeRaceCommand(), HandleCharacterCustomizeCommand(), HandleCharacterDeletedDeleteCommand(), HandleCharacterDeletedListCommand(), HandleCharacterDeletedOldCommand(), HandleCharacterDeletedRestoreCommand(), HandleCharacterEraseCommand(), HandleCharacterLevelCommand(), HandleCharacterRenameCommand(), HandleCharacterReputationCommand(), HandleCharacterTitlesCommand(), HandleLevelUpCommand(), HandlePDumpCopyCommand(), HandlePDumpLoadCommand(), HandlePDumpWriteCommand(), rbac::RBAC_PERM_COMMAND_CHARACTER_CHANGEACCOUNT, rbac::RBAC_PERM_COMMAND_CHARACTER_CHANGEFACTION, rbac::RBAC_PERM_COMMAND_CHARACTER_CHANGERACE, rbac::RBAC_PERM_COMMAND_CHARACTER_CUSTOMIZE, rbac::RBAC_PERM_COMMAND_CHARACTER_DELETED_DELETE, rbac::RBAC_PERM_COMMAND_CHARACTER_DELETED_LIST, rbac::RBAC_PERM_COMMAND_CHARACTER_DELETED_OLD, rbac::RBAC_PERM_COMMAND_CHARACTER_DELETED_RESTORE, rbac::RBAC_PERM_COMMAND_CHARACTER_ERASE, rbac::RBAC_PERM_COMMAND_CHARACTER_LEVEL, rbac::RBAC_PERM_COMMAND_CHARACTER_RENAME, rbac::RBAC_PERM_COMMAND_CHARACTER_REPUTATION, rbac::RBAC_PERM_COMMAND_CHARACTER_TITLES, rbac::RBAC_PERM_COMMAND_LEVELUP, rbac::RBAC_PERM_COMMAND_PDUMP_COPY, rbac::RBAC_PERM_COMMAND_PDUMP_LOAD, and rbac::RBAC_PERM_COMMAND_PDUMP_WRITE.
|
inlinestatic |
Collects all GUIDs (and related info) from deleted characters which are still in the database.
| foundList | a reference to an std::list which will be filled with info data |
| searchString | the search string which either contains a player GUID or a part fo the character-name |
Definition at line 106 of file cs_character.cpp.
References character_commandscript::DeletedInfo::accountId, character_commandscript::DeletedInfo::accountName, CHAR_SEL_CHAR_DEL_INFO, CHAR_SEL_CHAR_DEL_INFO_BY_GUID, CHAR_SEL_CHAR_DEL_INFO_BY_NAME, CharacterDatabase, character_commandscript::DeletedInfo::deleteDate, Field::GetInt64(), AccountMgr::GetName(), Field::GetString(), Field::GetUInt32(), character_commandscript::DeletedInfo::guid, character_commandscript::DeletedInfo::name, normalizePlayerName(), PreparedStatementBase::setString(), and PreparedStatementBase::setUInt64().
Referenced by HandleCharacterDeletedDeleteCommand(), HandleCharacterDeletedListCommand(), and HandleCharacterDeletedRestoreCommand().
|
inlinestatic |
Definition at line 483 of file cs_character.cpp.
References CharacterCacheEntry::AccountId, CHAR_UPD_ACCOUNT_BY_GUID, CharacterDatabase, CONFIG_CHARACTERS_PER_REALM, Trinity::ChatCommands::PlayerIdentifier::FromTarget(), AccountMgr::GetCharactersCount(), Trinity::ChatCommands::AccountIdentifier::GetID(), Trinity::ChatCommands::AccountIdentifier::GetName(), ChatHandler::GetSession(), ChatHandler::GetTrinityString(), LANG_ACCOUNT_CHARACTER_LIST_FULL, LANG_CHANGEACCOUNT_SUCCESS, LANG_CONSOLE, LANG_PLAYER_NOT_FOUND, ChatHandler::PSendSysMessage(), sCharacterCache, ChatHandler::SendSysMessage(), ChatHandler::SetSentErrorMessage(), PreparedStatementBase::setUInt32(), PreparedStatementBase::setUInt64(), sLog, Trinity::StringFormat(), and sWorld.
Referenced by GetCommands().
|
inlinestatic |
Definition at line 417 of file cs_character.cpp.
References AT_LOGIN_CHANGE_FACTION, CHAR_UPD_ADD_AT_LOGIN_FLAG, CharacterDatabase, CharacterCacheEntry::Class, CLASS_DEATH_KNIGHT, Trinity::ChatCommands::PlayerIdentifier::FromTarget(), ChatHandler::GetNameLink(), LANG_CHANGEFACTION_NOT_ELIGIBLE_10, LANG_CHANGEFACTION_NOT_ELIGIBLE_60, LANG_CUSTOMIZE_PLAYER, LANG_CUSTOMIZE_PLAYER_GUID, CharacterCacheEntry::Level, ChatHandler::playerLink(), ChatHandler::PSendSysMessage(), sCharacterCache, ChatHandler::SetSentErrorMessage(), PreparedStatementBase::setUInt16(), and PreparedStatementBase::setUInt64().
Referenced by GetCommands().
|
inlinestatic |
Definition at line 459 of file cs_character.cpp.
References AT_LOGIN_CHANGE_RACE, CHAR_UPD_ADD_AT_LOGIN_FLAG, CharacterDatabase, Trinity::ChatCommands::PlayerIdentifier::FromTarget(), ChatHandler::GetNameLink(), LANG_CUSTOMIZE_PLAYER, LANG_CUSTOMIZE_PLAYER_GUID, ChatHandler::playerLink(), ChatHandler::PSendSysMessage(), PreparedStatementBase::setUInt16(), and PreparedStatementBase::setUInt64().
Referenced by GetCommands().
|
inlinestatic |
Definition at line 393 of file cs_character.cpp.
References AT_LOGIN_CUSTOMIZE, CHAR_UPD_ADD_AT_LOGIN_FLAG, CharacterDatabase, Trinity::ChatCommands::PlayerIdentifier::FromTarget(), ChatHandler::GetNameLink(), LANG_CUSTOMIZE_PLAYER, LANG_CUSTOMIZE_PLAYER_GUID, ChatHandler::playerLink(), ChatHandler::PSendSysMessage(), PreparedStatementBase::setUInt16(), and PreparedStatementBase::setUInt64().
Referenced by GetCommands().
|
inlinestatic |
Handles the '.character deleted delete' command, which completely deletes all deleted characters which matches the given search string
| needle | the search string which either contains a player GUID or a part fo the character-name |
Definition at line 687 of file cs_character.cpp.
References Player::DeleteFromDB(), GetDeletedCharacterInfoList(), HandleCharacterDeletedListHelper(), LANG_CHARACTER_DELETED_DELETE, LANG_CHARACTER_DELETED_LIST_EMPTY, ChatHandler::SendSysMessage(), and ChatHandler::SetSentErrorMessage().
Referenced by GetCommands().
|
inlinestatic |
Handles the '.character deleted list' command, which shows all deleted characters which matches the given search string
| needle | the search string which either contains a player GUID or a part fo the character-name |
Definition at line 597 of file cs_character.cpp.
References GetDeletedCharacterInfoList(), HandleCharacterDeletedListHelper(), LANG_CHARACTER_DELETED_LIST_EMPTY, ChatHandler::SendSysMessage(), and ChatHandler::SetSentErrorMessage().
Referenced by GetCommands().
|
inlinestatic |
Shows all deleted characters which matches the given search string, expected non empty list
| foundList | contains a list with all found deleted characters |
Definition at line 170 of file cs_character.cpp.
References ChatHandler::GetSession(), LANG_CHARACTER_DELETED_LIST_BAR, LANG_CHARACTER_DELETED_LIST_HEADER, LANG_CHARACTER_DELETED_LIST_LINE_CHAT, LANG_CHARACTER_DELETED_LIST_LINE_CONSOLE, ChatHandler::PSendSysMessage(), ChatHandler::SendSysMessage(), TimeToTimestampStr(), and Trinity::ToString().
Referenced by HandleCharacterDeletedDeleteCommand(), HandleCharacterDeletedListCommand(), and HandleCharacterDeletedRestoreCommand().
|
inlinestatic |
Handles the '.character deleted old' command, which completely deletes all deleted characters deleted with some days ago
| days | removes characters deleted more than this many days ago |
Definition at line 721 of file cs_character.cpp.
References CONFIG_CHARDELETE_KEEP_DAYS, Player::DeleteOldCharacters(), and sWorld.
Referenced by GetCommands().
|
inlinestatic |
Handles the '.character deleted restore' command, which restores all deleted characters which matches the given search string
The command automatically calls '.character deleted list' command with the search string to show all restored characters.
| needle | the search string which either contains a player GUID or a part of the character-name |
| newCharName | new character name after restoring |
| newAccount | account to attach restored character to |
Definition at line 629 of file cs_character.cpp.
References character_commandscript::DeletedInfo::accountId, character_commandscript::DeletedInfo::accountName, GetDeletedCharacterInfoList(), HandleCharacterDeletedListHelper(), HandleCharacterDeletedRestoreHelper(), LANG_CHARACTER_DELETED_ERR_RENAME, LANG_CHARACTER_DELETED_LIST_EMPTY, LANG_CHARACTER_DELETED_RESTORE, character_commandscript::DeletedInfo::name, ChatHandler::SendSysMessage(), and ChatHandler::SetSentErrorMessage().
Referenced by GetCommands().
|
inlinestatic |
Restore a previously deleted character
| delInfo | the informations about the character which will be restored |
Definition at line 207 of file cs_character.cpp.
References character_commandscript::DeletedInfo::accountId, character_commandscript::DeletedInfo::accountName, CHAR_UPD_RESTORE_DELETE_INFO, CharacterDatabase, CONFIG_CHARACTERS_PER_REALM, AccountMgr::GetCharactersCount(), ObjectGuid::GetCounter(), character_commandscript::DeletedInfo::guid, LANG_CHARACTER_DELETED_SKIP_ACCOUNT, LANG_CHARACTER_DELETED_SKIP_FULL, LANG_CHARACTER_DELETED_SKIP_NAME, character_commandscript::DeletedInfo::name, ChatHandler::PSendSysMessage(), sCharacterCache, PreparedStatementBase::setString(), PreparedStatementBase::setUInt32(), PreparedStatementBase::setUInt64(), sWorld, and Trinity::ToString().
Referenced by HandleCharacterDeletedRestoreCommand().
|
inlinestatic |
Definition at line 735 of file cs_character.cpp.
References Player::DeleteFromDB(), Trinity::ChatCommands::PlayerIdentifier::GetConnectedPlayer(), Trinity::ChatCommands::PlayerIdentifier::GetGUID(), Trinity::ChatCommands::PlayerIdentifier::GetName(), AccountMgr::GetName(), LANG_CHARACTER_DELETED, ChatHandler::PSendSysMessage(), sCharacterCache, and ObjectGuid::ToString().
Referenced by GetCommands().
|
inlinestatic |
Definition at line 755 of file cs_character.cpp.
References CHAR_UPD_LEVEL, CharacterDatabase, Trinity::ChatCommands::PlayerIdentifier::FromTargetOrSelf(), ChatHandler::GetNameLink(), WorldSession::GetPlayer(), ChatHandler::GetSession(), LANG_YOU_CHANGE_LVL, LANG_YOURS_LEVEL_DOWN, LANG_YOURS_LEVEL_PROGRESS_RESET, LANG_YOURS_LEVEL_UP, ChatHandler::needReportToTarget(), ChatHandler::playerLink(), ChatHandler::PSendSysMessage(), sCharacterCache, PreparedStatementBase::setUInt64(), PreparedStatementBase::setUInt8(), and STRONG_MAX_LEVEL.
Referenced by GetCommands().
|
inlinestatic |
Definition at line 285 of file cs_character.cpp.
References AT_LOGIN_RENAME, CHAR_DEL_CHAR_DECLINED_NAME, CHAR_NAME_SUCCESS, CHAR_SEL_CHECK_NAME, CHAR_UPD_ADD_AT_LOGIN_FLAG, CHAR_UPD_NAME_BY_GUID, CharacterDatabase, ObjectMgr::CheckPlayerName(), Trinity::ChatCommands::PlayerIdentifier::FromTarget(), ChatHandler::GetNameLink(), ChatHandler::GetSession(), ChatHandler::HasLowerSecurity(), LANG_BAD_VALUE, LANG_RENAME_PLAYER, LANG_RENAME_PLAYER_ALREADY_EXISTS, LANG_RENAME_PLAYER_GUID, LANG_RENAME_PLAYER_WITH_NEW_NAME, LANG_RESERVED_NAME, normalizePlayerName(), ChatHandler::playerLink(), ChatHandler::PSendSysMessage(), rbac::RBAC_PERM_SKIP_CHECK_CHARACTER_CREATION_RESERVEDNAME, sCharacterCache, ChatHandler::SendSysMessage(), ChatHandler::SetSentErrorMessage(), PreparedStatementBase::setString(), PreparedStatementBase::setUInt16(), PreparedStatementBase::setUInt64(), sLog, sObjectMgr, and sWorld.
Referenced by GetCommands().
|
inlinestatic |
Definition at line 539 of file cs_character.cpp.
References AtWar, FactionState::Flags, Trinity::ChatCommands::PlayerIdentifier::FromTargetOrSelf(), ReputationMgr::GetReputation(), Player::GetReputationMgr(), ReputationMgr::GetReputationRankName(), ChatHandler::GetSession(), ChatHandler::GetSessionDbcLocale(), ReputationMgr::GetStateList(), ChatHandler::GetTrinityString(), EnumFlag< T >::HasFlag(), Header, Hidden, FactionState::ID, Inactive, LANG_FACTION_ATWAR, LANG_FACTION_HIDDEN, LANG_FACTION_INACTIVE, LANG_FACTION_INVISIBLE_FORCED, LANG_FACTION_PEACE_FORCED, LANG_FACTION_VISIBLE, LANG_PLAYER_NOT_FOUND, localeNames, FactionEntry::Name, Peaceful, ChatHandler::SendSysMessage(), ChatHandler::SetSentErrorMessage(), sFactionStore, and Visible.
Referenced by GetCommands().
|
inlinestatic |
Definition at line 238 of file cs_character.cpp.
References Trinity::ChatCommands::PlayerIdentifier::FromTargetOrSelf(), GENDER_MALE, Player::GetNativeGender(), ChatHandler::GetSession(), ChatHandler::GetSessionDbcLocale(), ChatHandler::GetTrinityString(), Player::HasTitle(), LANG_ACTIVE, LANG_KNOWN, LANG_PLAYER_NOT_FOUND, LANG_TITLE_LIST_CHAT, LANG_TITLE_LIST_CONSOLE, localeNames, Player::m_playerData, CharTitlesEntry::MaskID, CharTitlesEntry::Name, CharTitlesEntry::Name1, ChatHandler::PGetParseString(), ChatHandler::PSendSysMessage(), sCharTitlesStore, ChatHandler::SendSysMessage(), ChatHandler::SetSentErrorMessage(), and sWorld.
Referenced by GetCommands().
|
inlinestatic |
Definition at line 801 of file cs_character.cpp.
References CHAR_UPD_LEVEL, CharacterDatabase, Trinity::ChatCommands::PlayerIdentifier::FromTargetOrSelf(), ChatHandler::GetNameLink(), WorldSession::GetPlayer(), ChatHandler::GetSession(), LANG_YOU_CHANGE_LVL, LANG_YOURS_LEVEL_DOWN, LANG_YOURS_LEVEL_PROGRESS_RESET, LANG_YOURS_LEVEL_UP, ChatHandler::needReportToTarget(), ChatHandler::playerLink(), ChatHandler::PSendSysMessage(), sCharacterCache, PreparedStatementBase::setUInt64(), PreparedStatementBase::setUInt8(), and STRONG_MAX_LEVEL.
Referenced by GetCommands().
|
inlinestatic |
Definition at line 848 of file cs_character.cpp.
References DUMP_CHARACTER_DELETED, DUMP_FILE_BROKEN, DUMP_FILE_OPEN_ERROR, DUMP_SUCCESS, DUMP_TOO_MANY_CHARS, ObjectGuid::GetCounter(), Trinity::ChatCommands::PlayerIdentifier::GetGUID(), Trinity::ChatCommands::AccountIdentifier::GetID(), Trinity::ChatCommands::AccountIdentifier::GetName(), LANG_ACCOUNT_CHARACTER_LIST_FULL, LANG_COMMAND_EXPORT_DELETED_CHAR, LANG_COMMAND_EXPORT_FAILED, LANG_COMMAND_IMPORT_FAILED, LANG_COMMAND_IMPORT_SUCCESS, ChatHandler::PSendSysMessage(), ChatHandler::SetSentErrorMessage(), and ValidatePDumpTarget().
Referenced by GetCommands().
|
inlinestatic |
Definition at line 892 of file cs_character.cpp.
References DUMP_FILE_BROKEN, DUMP_FILE_OPEN_ERROR, DUMP_SUCCESS, DUMP_TOO_MANY_CHARS, Trinity::ChatCommands::AccountIdentifier::GetID(), Trinity::ChatCommands::AccountIdentifier::GetName(), LANG_ACCOUNT_CHARACTER_LIST_FULL, LANG_COMMAND_IMPORT_FAILED, LANG_COMMAND_IMPORT_SUCCESS, LANG_DUMP_BROKEN, LANG_FILE_OPEN_FAIL, ChatHandler::PSendSysMessage(), ChatHandler::SetSentErrorMessage(), and ValidatePDumpTarget().
Referenced by GetCommands().
|
inlinestatic |
Definition at line 958 of file cs_character.cpp.
References DUMP_CHARACTER_DELETED, DUMP_FILE_OPEN_ERROR, DUMP_SUCCESS, ObjectGuid::GetCounter(), Trinity::ChatCommands::PlayerIdentifier::GetGUID(), LANG_COMMAND_EXPORT_DELETED_CHAR, LANG_COMMAND_EXPORT_FAILED, LANG_COMMAND_EXPORT_SUCCESS, LANG_FILE_OPEN_FAIL, ChatHandler::PSendSysMessage(), and ChatHandler::SetSentErrorMessage().
Referenced by GetCommands().
|
inlinestatic |
Definition at line 924 of file cs_character.cpp.
References CHAR_NAME_SUCCESS, ObjectMgr::CheckPlayerName(), LANG_CHARACTER_GUID_IN_USE, LANG_INVALID_CHARACTER_NAME, normalizePlayerName(), ChatHandler::PSendSysMessage(), sCharacterCache, ChatHandler::SetSentErrorMessage(), and sWorld.
Referenced by HandlePDumpCopyCommand(), and HandlePDumpLoadCommand().