load imagination costs for pet abilities from CDClient

This commit is contained in:
jadebenn
2024-04-18 23:31:27 -05:00
parent 0b4d7b6d92
commit 36e0dbdb5e
8 changed files with 102 additions and 22 deletions

View File

@@ -0,0 +1,34 @@
#pragma once
#include "CDTable.h"
#include <cstdint>
#include <string>
// Forward declarations
enum class ePetAbilityType : uint32_t;
struct CDPetAbilities {
ePetAbilityType id;
UNUSED_COLUMN(std::string abilityName;)
int32_t imaginationCost;
UNUSED_COLUMN(uint32_t locStatus;)
};
class CDPetAbilitiesTable : public CDTable<CDPetAbilitiesTable, std::map<ePetAbilityType, CDPetAbilities>> {
public:
/**
* Load values from the CD client database
*/
void LoadValuesFromDatabase();
/**
* Load the default values into memory instead of attempting to connect to the CD client database
*/
void LoadValuesFromDefaults();
/**
* Gets the pet ability table corresponding to the pet ability ID
* @returns A pointer to the corresponding table, or nullptr if one could not be found
*/
const CDPetAbilities& GetByID(const ePetAbilityType id);
};