From bf58cf85ccc2aad87593ee9946805bae865f0e1d Mon Sep 17 00:00:00 2001 From: Aaron Kimbre Date: Fri, 7 Jun 2024 15:07:37 -0500 Subject: [PATCH] us static cast and enum --- dCommon/dEnums/eCSRCommand.h | 55 +++++++++++++++++++ .../CDDeletionRestrictionsTable.cpp | 2 +- 2 files changed, 56 insertions(+), 1 deletion(-) create mode 100644 dCommon/dEnums/eCSRCommand.h diff --git a/dCommon/dEnums/eCSRCommand.h b/dCommon/dEnums/eCSRCommand.h new file mode 100644 index 00000000..107d82bb --- /dev/null +++ b/dCommon/dEnums/eCSRCommand.h @@ -0,0 +1,55 @@ +#ifndef __ECSRCOMMAND__H__ +#define __ECSRCOMMAND__H__ + +#include + +enum class eCSRCommand : uint32_t { + QUERY_SERVER_STATUS = 0, + QUERY_CHARACTER_LOCATION, + QUERY_CHARACTER_ONLINE_STATUS, + INVENTORY_ADD_ITEM, + INVENTORY_DELETE_ITEM, + MODERATE_MUTE_ACCOUNT, + MODERATE_BAN_ACCOUNT, + MODERATE_EDUCATE_CHARACTER, + MODERATE_KICK_CHARACTER, + MODERATE_WARN_CHARACTER, + MODERATE_RENAME_CHARACTER, + MODERATE_DELETE_CHARACTER_FRIEND, + MODERATE_KILL_CHARACTER, + UPDATE_CHARACTER_HEALTH, + UPDATE_CHARACTER_ARMOR, + UPDATE_CHARACTER_IMAGINATION, + UPDATE_CHARACTER_MAX_HEALTH, + UPDATE_CHARACTER_MAX_ARMOR, + UPDATE_CHARACTER_MAX_IMAGINATION, + UPDATE_CHARACTER_CURRENCY, + UPDATE_CHARACTER_REPUTATION, + UPDATE_CHARACTER_LEGO_SCORE, + UPDATE_CHARACTER_EMOTES, + UPDATE_CHARACTER_ADD_ACHIEVEMENT, + UPDATE_CHARACTER_COMPLETE_ACHIEVEMENT, + UPDATE_CHARACTER_REMOVE_ACHIEVEMENT, + UPDATE_CHARACTER_POSITION_OFFLINE, + UPDATE_CHARACTER_INV_SLOT_AMOUNT, + UTILITY_SAVE_CHARACTER, + UTILITY_SEND_MAIL, + UTILITY_GIVE_ITEM_TO_ALL_PLAYERS_ONLINE, + METRICS_CONFIGURE, + DISABLE_ZONE, + INIT_DONATION_AMOUNT, + KILL_SERVERS_COUNTDOWN, + DISABLE_FAQ, + THROTTLEQUEUE, + GATEGM_ACCESS, + RECONNECT_CRISP, + MODERATE_KICK_ACCOUNT, + TOGGLE_CRISP_SERVER, + QUICK_DRAIN_SERVER, + QUICK_DRAIN_SERVER_RENEW, + REPLICATE_CHARACTER, + GET_SERVER_STATUS, + RELOAD_SERVER_INIS +}; + +#endif //!__ECSRCOMMAND__H__ diff --git a/dDatabase/CDClientDatabase/CDClientTables/CDDeletionRestrictionsTable.cpp b/dDatabase/CDClientDatabase/CDClientTables/CDDeletionRestrictionsTable.cpp index 77fb1a48..4cef8041 100644 --- a/dDatabase/CDClientDatabase/CDClientTables/CDDeletionRestrictionsTable.cpp +++ b/dDatabase/CDClientDatabase/CDClientTables/CDDeletionRestrictionsTable.cpp @@ -27,7 +27,7 @@ void CDDeletionRestrictionsTable::LoadValuesFromDatabase() { } } } - entry.checkType = static_cast(tableData.getIntField("checkType", 6)); // MAX + entry.checkType = static_cast(tableData.getIntField("checkType", static_cast(eDeletionRestrictionsCheckType::MAX))); entries.insert(std::make_pair(entry.id, entry)); tableData.nextRow();