mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2024-11-22 21:47:24 +00:00
df83f0d847
* feat: reward codes this is for giving rewards across characters as the did in live. Tested that the default config works Tested that all claim codes work Tested that saving and loading claim codes work Tested that mail sends correctly * newlines * include array * delete cascade * newline * address feedback
26 lines
503 B
C++
26 lines
503 B
C++
#pragma once
|
|
|
|
// Custom Classes
|
|
#include "CDTable.h"
|
|
|
|
|
|
struct CDRewardCode {
|
|
uint32_t id;
|
|
std::string code;
|
|
LOT attachmentLOT;
|
|
UNUSED(uint32_t locStatus);
|
|
UNUSED(std::string gate_version);
|
|
};
|
|
|
|
|
|
class CDRewardCodesTable : public CDTable<CDRewardCodesTable> {
|
|
private:
|
|
std::vector<CDRewardCode> entries;
|
|
|
|
public:
|
|
void LoadValuesFromDatabase();
|
|
const std::vector<CDRewardCode>& GetEntries() const;
|
|
LOT GetAttachmentLOT(uint32_t rewardCodeId) const;
|
|
uint32_t GetCodeID(std::string code) const;
|
|
};
|