Skip to content

Commit

Permalink
chore: remove non cstdint integer types
Browse files Browse the repository at this point in the history
  • Loading branch information
EmosewaMC committed Jan 9, 2024
1 parent 4a50c60 commit 8dd14cf
Show file tree
Hide file tree
Showing 64 changed files with 252 additions and 252 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

void CDActivitiesTable::LoadValuesFromDatabase() {
// First, get the size of the table
unsigned int size = 0;
uint32_t size = 0;
auto tableSize = CDClientDatabase::ExecuteQuery("SELECT COUNT(*) FROM Activities");
while (!tableSize.eof()) {
size = tableSize.getIntField(0, 0);
Expand Down
26 changes: 13 additions & 13 deletions dDatabase/CDClientDatabase/CDClientTables/CDActivitiesTable.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,22 @@
#include "CDTable.h"

struct CDActivities {
unsigned int ActivityID;
unsigned int locStatus;
unsigned int instanceMapID;
unsigned int minTeams;
unsigned int maxTeams;
unsigned int minTeamSize;
unsigned int maxTeamSize;
unsigned int waitTime;
unsigned int startDelay;
uint32_t ActivityID;
uint32_t locStatus;
uint32_t instanceMapID;
uint32_t minTeams;
uint32_t maxTeams;
uint32_t minTeamSize;
uint32_t maxTeamSize;
uint32_t waitTime;
uint32_t startDelay;
bool requiresUniqueData;
unsigned int leaderboardType;
uint32_t leaderboardType;
bool localize;
int optionalCostLOT;
int optionalCostCount;
int32_t optionalCostLOT;
int32_t optionalCostCount;
bool showUIRewards;
unsigned int CommunityActivityFlagID;
uint32_t CommunityActivityFlagID;
std::string gate_version;
bool noTeamLootOnDeath;
float optionalPercentage;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
void CDActivityRewardsTable::LoadValuesFromDatabase() {

// First, get the size of the table
unsigned int size = 0;
uint32_t size = 0;
auto tableSize = CDClientDatabase::ExecuteQuery("SELECT COUNT(*) FROM ActivityRewards");
while (!tableSize.eof()) {
size = tableSize.getIntField(0, 0);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@
#include "CDTable.h"

struct CDActivityRewards {
unsigned int objectTemplate; //!< The object template (?)
unsigned int ActivityRewardIndex; //!< The activity reward index
int activityRating; //!< The activity rating
unsigned int LootMatrixIndex; //!< The loot matrix index
unsigned int CurrencyIndex; //!< The currency index
unsigned int ChallengeRating; //!< The challenge rating
uint32_t objectTemplate; //!< The object template (?)
uint32_t ActivityRewardIndex; //!< The activity reward index
int32_t activityRating; //!< The activity rating
uint32_t LootMatrixIndex; //!< The loot matrix index
uint32_t CurrencyIndex; //!< The currency index
uint32_t ChallengeRating; //!< The challenge rating
std::string description; //!< The description
};

Expand Down
6 changes: 3 additions & 3 deletions dDatabase/CDClientDatabase/CDClientTables/CDAnimationsTable.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
#include <list>

struct CDAnimation {
// unsigned int animationGroupID;
// uint32_t animationGroupID;
// std::string animation_type;
// The above two are a pair to represent a primary key in the map.
std::string animation_name; //!< The animation name
float chance_to_play; //!< The chance to play the animation
UNUSED_COLUMN(unsigned int min_loops;) //!< The minimum number of loops
UNUSED_COLUMN(unsigned int max_loops;) //!< The maximum number of loops
UNUSED_COLUMN(uint32_t min_loops;) //!< The minimum number of loops
UNUSED_COLUMN(uint32_t max_loops;) //!< The maximum number of loops
float animation_length; //!< The animation length
UNUSED_COLUMN(bool hideEquip;) //!< Whether or not to hide the equip
UNUSED_COLUMN(bool ignoreUpperBody;) //!< Whether or not to ignore the upper body
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
void CDBehaviorTemplateTable::LoadValuesFromDatabase() {

// First, get the size of the table
unsigned int size = 0;
uint32_t size = 0;
auto tableSize = CDClientDatabase::ExecuteQuery("SELECT COUNT(*) FROM BehaviorTemplate");
while (!tableSize.eof()) {
size = tableSize.getIntField(0, 0);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
#include <unordered_set>

struct CDBehaviorTemplate {
unsigned int behaviorID; //!< The Behavior ID
unsigned int templateID; //!< The Template ID (LOT)
unsigned int effectID; //!< The Effect ID attached
uint32_t behaviorID; //!< The Behavior ID
uint32_t templateID; //!< The Template ID (LOT)
uint32_t effectID; //!< The Effect ID attached
std::unordered_set<std::string>::iterator effectHandle; //!< The effect handle
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
void CDBrickIDTableTable::LoadValuesFromDatabase() {

// First, get the size of the table
unsigned int size = 0;
uint32_t size = 0;
auto tableSize = CDClientDatabase::ExecuteQuery("SELECT COUNT(*) FROM BrickIDTable");
while (!tableSize.eof()) {
size = tableSize.getIntField(0, 0);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@

//! BrickIDTable Entry Struct
struct CDBrickIDTable {
unsigned int NDObjectID;
unsigned int LEGOBrickID;
uint32_t NDObjectID;
uint32_t LEGOBrickID;
};


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@

enum class eReplicaComponentType : uint32_t;
struct CDComponentsRegistry {
unsigned int id; //!< The LOT is used as the ID
uint32_t id; //!< The LOT is used as the ID
eReplicaComponentType component_type; //!< See ComponentTypes enum for values
unsigned int component_id; //!< The ID used within the component's table (0 may either mean it's non-networked, or that the ID is actually 0
uint32_t component_id; //!< The ID used within the component's table (0 may either mean it's non-networked, or that the ID is actually 0
};


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
void CDCurrencyTableTable::LoadValuesFromDatabase() {

// First, get the size of the table
unsigned int size = 0;
uint32_t size = 0;
auto tableSize = CDClientDatabase::ExecuteQuery("SELECT COUNT(*) FROM CurrencyTable");
while (!tableSize.eof()) {
size = tableSize.getIntField(0, 0);
Expand Down
10 changes: 5 additions & 5 deletions dDatabase/CDClientDatabase/CDClientTables/CDCurrencyTableTable.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@

//! CurrencyTable Struct
struct CDCurrencyTable {
unsigned int currencyIndex; //!< The Currency Index
unsigned int npcminlevel; //!< The minimum level of the npc
unsigned int minvalue; //!< The minimum currency
unsigned int maxvalue; //!< The maximum currency
unsigned int id; //!< The ID of the currency index
uint32_t currencyIndex; //!< The Currency Index
uint32_t npcminlevel; //!< The minimum level of the npc
uint32_t minvalue; //!< The minimum currency
uint32_t maxvalue; //!< The maximum currency
uint32_t id; //!< The ID of the currency index
};

//! CurrencyTable table
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

void CDDestructibleComponentTable::LoadValuesFromDatabase() {
// First, get the size of the table
unsigned int size = 0;
uint32_t size = 0;
auto tableSize = CDClientDatabase::ExecuteQuery("SELECT COUNT(*) FROM DestructibleComponent");
while (!tableSize.eof()) {
size = tableSize.getIntField(0, 0);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,20 @@
#include "CDTable.h"

struct CDDestructibleComponent {
unsigned int id; //!< The component ID from the ComponentsRegistry Table
int faction; //!< The Faction ID of the object
uint32_t id; //!< The component ID from the ComponentsRegistry Table
int32_t faction; //!< The Faction ID of the object
std::string factionList; //!< A list of the faction IDs
int life; //!< The amount of life of the object
unsigned int imagination; //!< The amount of imagination of the object
int LootMatrixIndex; //!< The Loot Matrix Index
int CurrencyIndex; //!< The Currency Index
unsigned int level; //!< ???
int32_t life; //!< The amount of life of the object
uint32_t imagination; //!< The amount of imagination of the object
int32_t LootMatrixIndex; //!< The Loot Matrix Index
int32_t CurrencyIndex; //!< The Currency Index
uint32_t level; //!< ???
float armor; //!< The amount of armor of the object
unsigned int death_behavior; //!< The behavior ID of the death behavior
uint32_t death_behavior; //!< The behavior ID of the death behavior
bool isnpc; //!< Whether or not the object is an NPC
unsigned int attack_priority; //!< ???
uint32_t attack_priority; //!< ???
bool isSmashable; //!< Whether or not the object is smashable
int difficultyLevel; //!< ???
int32_t difficultyLevel; //!< ???
};

class CDDestructibleComponentTable : public CDTable<CDDestructibleComponentTable> {
Expand Down
2 changes: 1 addition & 1 deletion dDatabase/CDClientDatabase/CDClientTables/CDEmoteTable.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ void CDEmoteTableTable::LoadValuesFromDatabase() {
tableData.finalize();
}

CDEmoteTable* CDEmoteTableTable::GetEmote(int id) {
CDEmoteTable* CDEmoteTableTable::GetEmote(int32_t id) {
auto itr = entries.find(id);
return itr != entries.end() ? &itr->second : nullptr;
}
8 changes: 4 additions & 4 deletions dDatabase/CDClientDatabase/CDClientTables/CDEmoteTable.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ struct CDEmoteTable {
gateVersion = "";
}

int ID;
int32_t ID;
std::string animationName;
std::string iconFilename;
int locState;
int channel;
int32_t locState;
int32_t channel;
bool locked;
bool localize;
std::string gateVersion;
Expand All @@ -33,5 +33,5 @@ class CDEmoteTableTable : public CDTable<CDEmoteTableTable> {
public:
void LoadValuesFromDatabase();
// Returns an emote by ID
CDEmoteTable* GetEmote(int id);
CDEmoteTable* GetEmote(int32_t id);
};
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
void CDFeatureGatingTable::LoadValuesFromDatabase() {

// First, get the size of the table
unsigned int size = 0;
uint32_t size = 0;
auto tableSize = CDClientDatabase::ExecuteQuery("SELECT COUNT(*) FROM FeatureGating");
while (!tableSize.eof()) {
size = tableSize.getIntField(0, 0);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
void CDInventoryComponentTable::LoadValuesFromDatabase() {

// First, get the size of the table
unsigned int size = 0;
uint32_t size = 0;
auto tableSize = CDClientDatabase::ExecuteQuery("SELECT COUNT(*) FROM InventoryComponent");
while (!tableSize.eof()) {
size = tableSize.getIntField(0, 0);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
#include "CDTable.h"

struct CDInventoryComponent {
unsigned int id; //!< The component ID for this object
unsigned int itemid; //!< The LOT of the object
unsigned int count; //!< The count of the items the object has
uint32_t id; //!< The component ID for this object
uint32_t itemid; //!< The LOT of the object
uint32_t count; //!< The count of the items the object has
bool equip; //!< Whether or not to equip the item
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ CDItemComponent CDItemComponentTable::Default = {};

void CDItemComponentTable::LoadValuesFromDatabase() {
// First, get the size of the table
unsigned int size = 0;
uint32_t size = 0;
auto tableSize = CDClientDatabase::ExecuteQuery("SELECT COUNT(*) FROM ItemComponent");
while (!tableSize.eof()) {
size = tableSize.getIntField(0, 0);
Expand Down Expand Up @@ -69,7 +69,7 @@ void CDItemComponentTable::LoadValuesFromDatabase() {
tableData.finalize();
}

const CDItemComponent& CDItemComponentTable::GetItemComponentByID(unsigned int skillID) {
const CDItemComponent& CDItemComponentTable::GetItemComponentByID(uint32_t skillID) {
const auto& it = this->entries.find(skillID);
if (it != this->entries.end()) {
return it->second;
Expand Down
52 changes: 26 additions & 26 deletions dDatabase/CDClientDatabase/CDClientTables/CDItemComponentTable.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,60 +5,60 @@
#include "dCommonVars.h"

struct CDItemComponent {
unsigned int id; //!< The Component ID
uint32_t id; //!< The Component ID
std::string equipLocation; //!< The equip location
unsigned int baseValue; //!< The monetary base value of the item
uint32_t baseValue; //!< The monetary base value of the item
bool isKitPiece; //!< Whether or not the item belongs to a kit
unsigned int rarity; //!< The rarity of the item
unsigned int itemType; //!< The item type
uint32_t rarity; //!< The rarity of the item
uint32_t itemType; //!< The item type
int64_t itemInfo; //!< The item info
bool inLootTable; //!< Whether or not the item is in a loot table
bool inVendor; //!< Whether or not the item is in a vendor inventory
bool isUnique; //!< ???
bool isBOP; //!< ???
bool isBOE; //!< ???
unsigned int reqFlagID; //!< User must have completed this flag to get the item
unsigned int reqSpecialtyID; //!< ???
unsigned int reqSpecRank; //!< ???
unsigned int reqAchievementID; //!< The required achievement must be completed
unsigned int stackSize; //!< The stack size of the item
unsigned int color1; //!< Something to do with item color...
unsigned int decal; //!< The decal of the item
unsigned int offsetGroupID; //!< Something to do with group IDs
unsigned int buildTypes; //!< Something to do with building
uint32_t reqFlagID; //!< User must have completed this flag to get the item
uint32_t reqSpecialtyID; //!< ???
uint32_t reqSpecRank; //!< ???
uint32_t reqAchievementID; //!< The required achievement must be completed
uint32_t stackSize; //!< The stack size of the item
uint32_t color1; //!< Something to do with item color...
uint32_t decal; //!< The decal of the item
uint32_t offsetGroupID; //!< Something to do with group IDs
uint32_t buildTypes; //!< Something to do with building
std::string reqPrecondition; //!< The required precondition
unsigned int animationFlag; //!< The Animation Flag
unsigned int equipEffects; //!< The effect played when the item is equipped
uint32_t animationFlag; //!< The Animation Flag
uint32_t equipEffects; //!< The effect played when the item is equipped
bool readyForQA; //!< ???
unsigned int itemRating; //!< ???
uint32_t itemRating; //!< ???
bool isTwoHanded; //!< Whether or not the item is double handed
unsigned int minNumRequired; //!< Maybe the minimum number required for a mission, or to own this object?
unsigned int delResIndex; //!< ???
unsigned int currencyLOT; //!< ???
unsigned int altCurrencyCost; //!< ???
uint32_t minNumRequired; //!< Maybe the minimum number required for a mission, or to own this object?
uint32_t delResIndex; //!< ???
uint32_t currencyLOT; //!< ???
uint32_t altCurrencyCost; //!< ???
std::string subItems; //!< A comma seperate string of sub items (maybe for multi-itemed things like faction test gear set)
UNUSED(std::string audioEventUse); //!< ???
bool noEquipAnimation; //!< Whether or not there is an equip animation
unsigned int commendationLOT; //!< The commendation LOT
unsigned int commendationCost; //!< The commendation cost
uint32_t commendationLOT; //!< The commendation LOT
uint32_t commendationCost; //!< The commendation cost
UNUSED(std::string audioEquipMetaEventSet); //!< ???
std::string currencyCosts; //!< Used for crafting
UNUSED(std::string ingredientInfo); //!< Unused
unsigned int locStatus; //!< ???
unsigned int forgeType; //!< Forge Type
uint32_t locStatus; //!< ???
uint32_t forgeType; //!< Forge Type
float SellMultiplier; //!< Something to do with early vendors perhaps (but replaced)
};

class CDItemComponentTable : public CDTable<CDItemComponentTable> {
private:
std::map<unsigned int, CDItemComponent> entries;
std::map<uint32_t, CDItemComponent> entries;

public:
void LoadValuesFromDatabase();
static std::map<LOT, uint32_t> ParseCraftingCurrencies(const CDItemComponent& itemComponent);

// Gets an entry by ID
const CDItemComponent& GetItemComponentByID(unsigned int skillID);
const CDItemComponent& GetItemComponentByID(uint32_t skillID);

static CDItemComponent Default;
};
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
void CDItemSetSkillsTable::LoadValuesFromDatabase() {

// First, get the size of the table
unsigned int size = 0;
uint32_t size = 0;
auto tableSize = CDClientDatabase::ExecuteQuery("SELECT COUNT(*) FROM ItemSetSkills");
while (!tableSize.eof()) {
size = tableSize.getIntField(0, 0);
Expand Down Expand Up @@ -44,7 +44,7 @@ const std::vector<CDItemSetSkills>& CDItemSetSkillsTable::GetEntries() const {
return this->entries;
}

std::vector<CDItemSetSkills> CDItemSetSkillsTable::GetBySkillID(unsigned int SkillSetID) {
std::vector<CDItemSetSkills> CDItemSetSkillsTable::GetBySkillID(uint32_t SkillSetID) {
std::vector<CDItemSetSkills> toReturn;

for (CDItemSetSkills entry : this->entries) {
Expand Down
Loading

0 comments on commit 8dd14cf

Please sign in to comment.