us static cast and enum

This commit is contained in:
Aaron Kimbre 2024-06-07 15:07:37 -05:00
parent f6f3cdc3c0
commit bf58cf85cc
2 changed files with 56 additions and 1 deletions

View File

@ -0,0 +1,55 @@
#ifndef __ECSRCOMMAND__H__
#define __ECSRCOMMAND__H__
#include <cstdint>
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__

View File

@ -27,7 +27,7 @@ void CDDeletionRestrictionsTable::LoadValuesFromDatabase() {
} }
} }
} }
entry.checkType = static_cast<eDeletionRestrictionsCheckType>(tableData.getIntField("checkType", 6)); // MAX entry.checkType = static_cast<eDeletionRestrictionsCheckType>(tableData.getIntField("checkType", static_cast<int>(eDeletionRestrictionsCheckType::MAX)));
entries.insert(std::make_pair(entry.id, entry)); entries.insert(std::make_pair(entry.id, entry));
tableData.nextRow(); tableData.nextRow();