|
Project SkyFire Core
SkyFire 5.4.8 server core API documentation
|
Classes | |
| struct | DeletedInfo |
Public Types | |
| typedef std::list< DeletedInfo > | DeletedInfoList |
Public Member Functions | |
| character_commandscript () | |
| std::vector< ChatCommand > | GetCommands () const OVERRIDE |
| Public Member Functions inherited from ScriptObject | |
| const std::string & | GetName () const |
| virtual bool | IsDatabaseBound () const |
Static Public Member Functions | |
| static bool | GetDeletedCharacterInfoList (DeletedInfoList &foundList, std::string searchString) |
| static bool | HandleCharacterChangeFactionCommand (ChatHandler *handler, char const *args) |
| static bool | HandleCharacterChangeRaceCommand (ChatHandler *handler, char const *args) |
| static bool | HandleCharacterCustomizeCommand (ChatHandler *handler, char const *args) |
| static bool | HandleCharacterDeletedDeleteCommand (ChatHandler *handler, char const *args) |
| static bool | HandleCharacterDeletedListCommand (ChatHandler *handler, char const *args) |
| static void | HandleCharacterDeletedListHelper (DeletedInfoList const &foundList, ChatHandler *handler) |
| static bool | HandleCharacterDeletedOldCommand (ChatHandler *, char const *args) |
| static bool | HandleCharacterDeletedRestoreCommand (ChatHandler *handler, char const *args) |
| static void | HandleCharacterDeletedRestoreHelper (DeletedInfo const &delInfo, ChatHandler *handler) |
| static bool | HandleCharacterEraseCommand (ChatHandler *handler, char const *args) |
| static void | HandleCharacterLevel (Player *player, uint64 playerGuid, uint32 oldLevel, uint32 newLevel, ChatHandler *handler) |
| static bool | HandleCharacterLevelCommand (ChatHandler *handler, char const *args) |
| static bool | HandleCharacterRenameCommand (ChatHandler *handler, char const *args) |
| static bool | HandleCharacterReputationCommand (ChatHandler *handler, char const *args) |
| static bool | HandleCharacterTitlesCommand (ChatHandler *handler, char const *args) |
| static bool | HandleLevelUpCommand (ChatHandler *handler, char const *args) |
| static bool | HandlePDumpLoadCommand (ChatHandler *handler, char const *args) |
| static bool | HandlePDumpWriteCommand (ChatHandler *handler, char const *args) |
Additional Inherited Members | |
| Protected Member Functions inherited from CommandScript | |
| CommandScript (const char *name) | |
| Protected Member Functions inherited from ScriptObject | |
| ScriptObject (const char *name) | |
| virtual | ~ScriptObject () |
Definition at line 23 of file cs_character.cpp.
| typedef std::list<DeletedInfo> character_commandscript::DeletedInfoList |
Definition at line 75 of file cs_character.cpp.
|
inline |
Definition at line 26 of file cs_character.cpp.
References CommandScript::CommandScript().
|
inlinevirtual |
Implements CommandScript.
Definition at line 28 of file cs_character.cpp.
References HandleCharacterChangeFactionCommand(), HandleCharacterChangeRaceCommand(), HandleCharacterCustomizeCommand(), HandleCharacterDeletedDeleteCommand(), HandleCharacterDeletedListCommand(), HandleCharacterDeletedOldCommand(), HandleCharacterDeletedRestoreCommand(), HandleCharacterEraseCommand(), HandleCharacterLevelCommand(), HandleCharacterRenameCommand(), HandleCharacterReputationCommand(), HandleCharacterTitlesCommand(), HandleLevelUpCommand(), HandlePDumpLoadCommand(), HandlePDumpWriteCommand(), OVERRIDE, rbac::RBAC_PERM_COMMAND_CHARACTER, rbac::RBAC_PERM_COMMAND_CHARACTER_CHANGEFACTION, rbac::RBAC_PERM_COMMAND_CHARACTER_CHANGERACE, rbac::RBAC_PERM_COMMAND_CHARACTER_CUSTOMIZE, rbac::RBAC_PERM_COMMAND_CHARACTER_DELETED, 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, 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 84 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, AccountMgr::GetName(), Field::GetString(), Field::GetUInt32(), isNumeric(), character_commandscript::DeletedInfo::lowGuid, character_commandscript::DeletedInfo::name, normalizePlayerName(), PreparedStatement::setString(), and PreparedStatement::setUInt32().
Referenced by HandleCharacterDeletedDeleteCommand(), HandleCharacterDeletedListCommand(), and HandleCharacterDeletedRestoreCommand().
|
inlinestatic |
Definition at line 484 of file cs_character.cpp.
References AT_LOGIN_CHANGE_FACTION, CHAR_UPD_ADD_AT_LOGIN_FLAG, CharacterDatabase, ChatHandler::extractPlayerTarget(), Object::GetGUIDLow(), ChatHandler::GetNameLink(), GUID_LOPART(), LANG_CUSTOMIZE_PLAYER, LANG_CUSTOMIZE_PLAYER_GUID, ChatHandler::playerLink(), ChatHandler::PSendSysMessage(), Player::SetAtLoginFlag(), PreparedStatement::setUInt16(), and PreparedStatement::setUInt32().
Referenced by GetCommands().
|
inlinestatic |
Definition at line 512 of file cs_character.cpp.
References AT_LOGIN_CHANGE_RACE, CHAR_UPD_ADD_AT_LOGIN_FLAG, CharacterDatabase, ChatHandler::extractPlayerTarget(), Object::GetGUIDLow(), ChatHandler::GetNameLink(), GUID_LOPART(), LANG_CUSTOMIZE_PLAYER, LANG_CUSTOMIZE_PLAYER_GUID, ChatHandler::playerLink(), ChatHandler::PSendSysMessage(), Player::SetAtLoginFlag(), PreparedStatement::setUInt16(), and PreparedStatement::setUInt32().
Referenced by GetCommands().
|
inlinestatic |
Definition at line 457 of file cs_character.cpp.
References AT_LOGIN_CUSTOMIZE, CHAR_UPD_ADD_AT_LOGIN_FLAG, CharacterDatabase, ChatHandler::extractPlayerTarget(), Object::GetGUIDLow(), ChatHandler::GetNameLink(), GUID_LOPART(), LANG_CUSTOMIZE_PLAYER, LANG_CUSTOMIZE_PLAYER_GUID, ChatHandler::playerLink(), ChatHandler::PSendSysMessage(), Player::SetAtLoginFlag(), PreparedStatement::setUInt16(), and PreparedStatement::setUInt32().
Referenced by GetCommands().
|
inlinestatic |
Handles the '.character deleted delete' command, which completely deletes all deleted characters which matches the given search string
| args | the search string which either contains a player GUID or a part fo the character-name |
Definition at line 688 of file cs_character.cpp.
References Player::DeleteFromDB(), GetDeletedCharacterInfoList(), HandleCharacterDeletedListHelper(), LANG_CHARACTER_DELETED_DELETE, LANG_CHARACTER_DELETED_LIST_EMPTY, and ChatHandler::SendSysMessage().
Referenced by GetCommands().
|
inlinestatic |
Handles the '.character deleted list' command, which shows all deleted characters which matches the given search string
| args | the search string which either contains a player GUID or a part fo the character-name |
Definition at line 594 of file cs_character.cpp.
References GetDeletedCharacterInfoList(), HandleCharacterDeletedListHelper(), LANG_CHARACTER_DELETED_LIST_EMPTY, and ChatHandler::SendSysMessage().
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 146 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(), and TimeToTimestampStr().
Referenced by HandleCharacterDeletedDeleteCommand(), HandleCharacterDeletedListCommand(), and HandleCharacterDeletedRestoreCommand().
|
inlinestatic |
Handles the '.character deleted old' command, which completely deletes all deleted characters deleted with some days ago
| args | the search string which either contains a player GUID or a part fo the character-name |
Definition at line 725 of file cs_character.cpp.
References CONFIG_CHARDELETE_KEEP_DAYS, Player::DeleteOldCharacters(), isNumeric(), 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.
| args | the search string which either contains a player GUID or a part of the character-name |
Definition at line 623 of file cs_character.cpp.
References character_commandscript::DeletedInfo::accountId, character_commandscript::DeletedInfo::accountName, GetDeletedCharacterInfoList(), AccountMgr::GetName(), HandleCharacterDeletedListHelper(), HandleCharacterDeletedRestoreHelper(), LANG_CHARACTER_DELETED_ERR_RENAME, LANG_CHARACTER_DELETED_LIST_EMPTY, LANG_CHARACTER_DELETED_RESTORE, character_commandscript::DeletedInfo::name, normalizePlayerName(), and ChatHandler::SendSysMessage().
Referenced by GetCommands().
|
inlinestatic |
Restore a previously deleted character
| delInfo | the informations about the character which will be restored |
Definition at line 183 of file cs_character.cpp.
References character_commandscript::DeletedInfo::accountId, character_commandscript::DeletedInfo::accountName, CHAR_SEL_CHARACTER_NAME_DATA, CHAR_UDP_RESTORE_DELETE_INFO, CharacterDatabase, AccountMgr::GetCharactersCount(), LANG_CHARACTER_DELETED_SKIP_ACCOUNT, LANG_CHARACTER_DELETED_SKIP_FULL, LANG_CHARACTER_DELETED_SKIP_NAME, character_commandscript::DeletedInfo::lowGuid, character_commandscript::DeletedInfo::name, ChatHandler::PSendSysMessage(), PreparedStatement::setString(), PreparedStatement::setUInt32(), sObjectMgr, and sWorld.
Referenced by HandleCharacterDeletedRestoreCommand().
|
inlinestatic |
Definition at line 748 of file cs_character.cpp.
References Player::DeleteFromDB(), WorldSession::GetAccountId(), Object::GetGUID(), AccountMgr::GetName(), Player::GetSession(), GUID_LOPART(), WorldSession::KickPlayer(), LANG_CHARACTER_DELETED, LANG_NO_PLAYER, normalizePlayerName(), ChatHandler::PSendSysMessage(), ChatHandler::SetSentErrorMessage(), sObjectAccessor, and sObjectMgr.
Referenced by GetCommands().
|
inlinestatic |
Definition at line 217 of file cs_character.cpp.
References CHAR_UPD_LEVEL, CharacterDatabase, ChatHandler::GetNameLink(), Player::GetSession(), Player::GiveLevel(), GUID_LOPART(), Player::InitTalentForLevel(), LANG_YOURS_LEVEL_DOWN, LANG_YOURS_LEVEL_PROGRESS_RESET, LANG_YOURS_LEVEL_UP, ChatHandler::needReportToTarget(), PLAYER_FIELD_XP, ChatHandler::PSendSysMessage(), PreparedStatement::setUInt32(), Object::SetUInt32Value(), and PreparedStatement::setUInt8().
Referenced by HandleCharacterLevelCommand(), and HandleLevelUpCommand().
|
inlinestatic |
Definition at line 416 of file cs_character.cpp.
References ChatHandler::extractOptFirstArg(), ChatHandler::extractPlayerTarget(), Unit::getLevel(), Player::GetLevelFromDB(), WorldSession::GetPlayer(), ChatHandler::GetSession(), HandleCharacterLevel(), LANG_YOU_CHANGE_LVL, ChatHandler::playerLink(), ChatHandler::PSendSysMessage(), and STRONG_MAX_LEVEL.
Referenced by GetCommands().
|
inlinestatic |
Definition at line 288 of file cs_character.cpp.
References AT_LOGIN_RENAME, CHAR_DEL_DECLINED_NAME, CHAR_NAME_SUCCESS, CHAR_SEL_CHECK_NAME, CHAR_UPD_ADD_AT_LOGIN_FLAG, CHAR_UPD_NAME_BY_GUID, CharacterDatabase, ObjectMgr::CheckPlayerName(), ChatHandler::extractPlayerTarget(), WorldObject::GetName(), ChatHandler::GetNameLink(), Unit::GetPlayer(), ChatHandler::GetSession(), Player::GetSession(), GUID_LOPART(), 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, ChatHandler::SendSysMessage(), Player::SetAtLoginFlag(), WorldObject::SetName(), ChatHandler::SetSentErrorMessage(), PreparedStatement::setString(), PreparedStatement::setUInt16(), PreparedStatement::setUInt32(), sLog, sObjectMgr, and sWorld.
Referenced by GetCommands().
|
inlinestatic |
Definition at line 541 of file cs_character.cpp.
References ChatHandler::extractPlayerTarget(), FACTION_FLAG_AT_WAR, FACTION_FLAG_HIDDEN, FACTION_FLAG_INACTIVE, FACTION_FLAG_INVISIBLE_FORCED, FACTION_FLAG_PEACE_FORCED, FACTION_FLAG_VISIBLE, FactionState::Flags, ReputationMgr::GetRank(), ReputationMgr::GetReputation(), Player::GetReputationMgr(), ChatHandler::GetSession(), ChatHandler::GetSessionDbcLocale(), ChatHandler::GetSkyFireString(), ReputationMgr::GetStateList(), FactionState::ID, LANG_FACTION_ATWAR, LANG_FACTION_HIDDEN, LANG_FACTION_INACTIVE, LANG_FACTION_INVISIBLE_FORCED, LANG_FACTION_PEACE_FORCED, LANG_FACTION_VISIBLE, localeNames, FactionEntry::name, ReputationRankStrIndex, ChatHandler::SendSysMessage(), and sFactionStore.
Referenced by GetCommands().
|
inlinestatic |
Definition at line 245 of file cs_character.cpp.
References CharTitlesEntry::bit_index, ChatHandler::extractPlayerTarget(), WorldObject::GetName(), ChatHandler::GetSession(), ChatHandler::GetSessionDbcLocale(), ChatHandler::GetSkyFireString(), Object::GetUInt32Value(), Player::HasTitle(), LANG_ACTIVE, LANG_KNOWN, LANG_TITLE_LIST_CHAT, LANG_TITLE_LIST_CONSOLE, localeNames, CharTitlesEntry::name, PLAYER_FIELD_PLAYER_TITLE, ChatHandler::PSendSysMessage(), and sCharTitlesStore.
Referenced by GetCommands().
|
inlinestatic |
Definition at line 792 of file cs_character.cpp.
References ChatHandler::extractOptFirstArg(), ChatHandler::extractPlayerTarget(), Unit::getLevel(), Player::GetLevelFromDB(), WorldSession::GetPlayer(), ChatHandler::GetSession(), HandleCharacterLevel(), LANG_YOU_CHANGE_LVL, ChatHandler::playerLink(), ChatHandler::PSendSysMessage(), and STRONG_MAX_LEVEL.
Referenced by GetCommands().
|
inlinestatic |
Definition at line 832 of file cs_character.cpp.
References CHAR_NAME_SUCCESS, ObjectMgr::CheckPlayerName(), DUMP_FILE_BROKEN, DUMP_FILE_OPEN_ERROR, DUMP_SUCCESS, DUMP_TOO_MANY_CHARS, AccountMgr::GetId(), AccountMgr::GetName(), LANG_ACCOUNT_CHARACTER_LIST_FULL, LANG_ACCOUNT_NOT_EXIST, LANG_CHARACTER_GUID_IN_USE, LANG_COMMAND_IMPORT_FAILED, LANG_COMMAND_IMPORT_SUCCESS, LANG_DUMP_BROKEN, LANG_FILE_OPEN_FAIL, LANG_INVALID_CHARACTER_GUID, LANG_INVALID_CHARACTER_NAME, normalizePlayerName(), AccountMgr::normalizeString(), ChatHandler::PSendSysMessage(), ChatHandler::SetSentErrorMessage(), and sObjectMgr.
Referenced by GetCommands().
|
inlinestatic |
Definition at line 943 of file cs_character.cpp.
References CharacterDatabase, DUMP_CHARACTER_DELETED, DUMP_FILE_OPEN_ERROR, DUMP_SUCCESS, ChatHandler::extractPlayerNameFromLink(), HIGHGUID_PLAYER, isNumeric(), LANG_COMMAND_EXPORT_DELETED_CHAR, LANG_COMMAND_EXPORT_FAILED, LANG_COMMAND_EXPORT_SUCCESS, LANG_FILE_OPEN_FAIL, LANG_PLAYER_NOT_FOUND, MAKE_NEW_GUID(), ChatHandler::PSendSysMessage(), ChatHandler::SendSysMessage(), ChatHandler::SetSentErrorMessage(), sObjectAccessor, and sObjectMgr.
Referenced by GetCommands().