mirror of
https://github.com/DarwinAnim8or/DarkflameServerNostalgiaMax.git
synced 2025-12-21 05:19:36 -06:00
Autogen'd new CD Table bindings for alpha
This commit is contained in:
@@ -12,15 +12,15 @@ void CDClientManager::Initialize(void) {
|
||||
tables.insert(std::make_pair("ComponentsRegistry", new CDComponentsRegistryTable()));
|
||||
tables.insert(std::make_pair("CurrencyTable", new CDCurrencyTableTable()));
|
||||
tables.insert(std::make_pair("DestructibleComponent", new CDDestructibleComponentTable()));
|
||||
tables.insert(std::make_pair("EmoteTable", new CDEmoteTableTable()));
|
||||
tables.insert(std::make_pair("EmotesTable", new CDEmotesTable()));
|
||||
tables.insert(std::make_pair("InventoryComponent", new CDInventoryComponentTable()));
|
||||
tables.insert(std::make_pair("ItemComponent", new CDItemComponentTable()));
|
||||
tables.insert(std::make_pair("ItemSets", new CDItemSetsTable()));
|
||||
tables.insert(std::make_pair("ItemSetSkills", new CDItemSetSkillsTable()));
|
||||
tables.insert(std::make_pair("LevelProgressionLookup", new CDLevelProgressionLookupTable()));
|
||||
/*tables.insert(std::make_pair("LevelProgressionLookup", new CDLevelProgressionLookupTable()));*/
|
||||
tables.insert(std::make_pair("LootMatrix", new CDLootMatrixTable()));
|
||||
tables.insert(std::make_pair("LootTable", new CDLootTableTable()));
|
||||
tables.insert(std::make_pair("MissionNPCComponent", new CDMissionNPCComponentTable()));
|
||||
/*tables.insert(std::make_pair("MissionNPCComponent", new CDMissionNPCComponentTable()));*/
|
||||
tables.insert(std::make_pair("MissionTasks", new CDMissionTasksTable()));
|
||||
tables.insert(std::make_pair("Missions", new CDMissionsTable()));
|
||||
tables.insert(std::make_pair("ObjectSkills", new CDObjectSkillsTable()));
|
||||
@@ -33,14 +33,12 @@ void CDClientManager::Initialize(void) {
|
||||
tables.insert(std::make_pair("VendorComponent", new CDVendorComponentTable()));
|
||||
tables.insert(std::make_pair("Activities", new CDActivitiesTable()));
|
||||
tables.insert(std::make_pair("PackageComponent", new CDPackageComponentTable()));
|
||||
tables.insert(std::make_pair("ProximityMonitorComponent", new CDProximityMonitorComponentTable()));
|
||||
tables.insert(std::make_pair("MovementAIComponent", new CDMovementAIComponentTable()));
|
||||
//tables.insert(std::make_pair("ProximityMonitorComponent", new CDProximityMonitorComponentTable()));
|
||||
//tables.insert(std::make_pair("MovementAIComponent", new CDMovementAIComponentTable()));
|
||||
tables.insert(std::make_pair("BrickIDTable", new CDBrickIDTableTable()));
|
||||
tables.insert(std::make_pair("RarityTable", new CDRarityTableTable()));
|
||||
tables.insert(std::make_pair("MissionEmail", new CDMissionEmailTable()));
|
||||
tables.insert(std::make_pair("Rewards", new CDRewardsTable()));
|
||||
tables.insert(std::make_pair("PropertyEntranceComponent", new CDPropertyEntranceComponentTable()));
|
||||
//tables.insert(std::make_pair("MissionEmail", new CDMissionEmailTable()));
|
||||
//tables.insert(std::make_pair("Rewards", new CDRewardsTable()));
|
||||
//tables.insert(std::make_pair("PropertyEntranceComponent", new CDPropertyEntranceComponentTable()));
|
||||
tables.insert(std::make_pair("PropertyTemplate", new CDPropertyTemplateTable()));
|
||||
tables.insert(std::make_pair("FeatureGating", new CDFeatureGatingTable()));
|
||||
tables.insert(std::make_pair("RailActivatorComponent", new CDRailActivatorComponentTable()));
|
||||
}
|
||||
|
||||
@@ -11,15 +11,14 @@
|
||||
#include "CDComponentsRegistryTable.h"
|
||||
#include "CDCurrencyTableTable.h"
|
||||
#include "CDDestructibleComponentTable.h"
|
||||
#include "CDEmoteTable.h"
|
||||
#include "CDEmotesTable.h"
|
||||
#include "CDInventoryComponentTable.h"
|
||||
#include "CDItemComponentTable.h"
|
||||
#include "CDItemSetsTable.h"
|
||||
#include "CDItemSetSkillsTable.h"
|
||||
#include "CDLevelProgressionLookupTable.h"
|
||||
#include "CDLootMatrixTable.h"
|
||||
#include "CDLootTableTable.h"
|
||||
#include "CDMissionNPCComponentTable.h"
|
||||
//#include "CDMissionNPCComponentTable.h"
|
||||
#include "CDMissionTasksTable.h"
|
||||
#include "CDMissionsTable.h"
|
||||
#include "CDObjectSkillsTable.h"
|
||||
@@ -32,16 +31,16 @@
|
||||
#include "CDVendorComponentTable.h"
|
||||
#include "CDActivitiesTable.h"
|
||||
#include "CDPackageComponentTable.h"
|
||||
#include "CDProximityMonitorComponentTable.h"
|
||||
#include "CDMovementAIComponentTable.h"
|
||||
//#include "CDProximityMonitorComponentTable.h"
|
||||
//#include "CDMovementAIComponentTable.h"
|
||||
#include "CDBrickIDTableTable.h"
|
||||
#include "CDRarityTableTable.h"
|
||||
#include "CDMissionEmailTable.h"
|
||||
#include "CDRewardsTable.h"
|
||||
#include "CDPropertyEntranceComponentTable.h"
|
||||
//#include "CDMissionEmailTable.h"
|
||||
//#include "CDRewardsTable.h"
|
||||
//#include "CDPropertyEntranceComponentTable.h"
|
||||
#include "CDPropertyTemplateTable.h"
|
||||
#include "CDFeatureGatingTable.h"
|
||||
#include "CDRailActivatorComponent.h"
|
||||
//#include "CDFeatureGatingTable.h"
|
||||
//#include "CDRailActivatorComponent.h"
|
||||
|
||||
// C++
|
||||
#include <type_traits>
|
||||
|
||||
45
dDatabase/Tables/CDAICombatBehaviorTypesTable.cpp
Normal file
45
dDatabase/Tables/CDAICombatBehaviorTypesTable.cpp
Normal file
@@ -0,0 +1,45 @@
|
||||
#include "CDAICombatBehaviorTypesTable.h"
|
||||
//Generated by xmlDb2dDatabaseGenerator on 2022-03-04 00:23:32.856100
|
||||
//DO NOT EDIT THIS FILE MANUALLY!
|
||||
|
||||
CDAICombatBehaviorTypesTable::CDAICombatBehaviorTypesTable() {
|
||||
unsigned int size = 0;
|
||||
auto tableSize = CDClientDatabase::ExecuteQuery("SELECT COUNT(*) FROM AICombatBehaviorTypes");
|
||||
while (!tableSize.eof()) {
|
||||
size = tableSize.getIntField(0, 0);
|
||||
tableSize.nextRow();
|
||||
}
|
||||
|
||||
tableSize.finalize();
|
||||
this->m_entries.reserve(size);
|
||||
|
||||
auto tableData = CDClientDatabase::ExecuteQuery("SELECT * FROM AICombatBehaviorTypes");
|
||||
while (!tableData.eof()) {
|
||||
CDAICombatBehaviorTypes entry;
|
||||
entry.id = tableData.getIntField(0, int{});
|
||||
entry.name = tableData.getStringField(1, std::string{}.c_str());
|
||||
this->m_entries.push_back(entry);
|
||||
tableData.nextRow();
|
||||
}
|
||||
|
||||
tableData.finalize();
|
||||
}
|
||||
|
||||
CDAICombatBehaviorTypesTable::~CDAICombatBehaviorTypesTable() {
|
||||
}
|
||||
|
||||
std::string CDAICombatBehaviorTypesTable::GetName(void) const {
|
||||
return "AICombatBehaviorTypes";
|
||||
}
|
||||
|
||||
std::vector<CDAICombatBehaviorTypes> CDAICombatBehaviorTypesTable::Query(std::function<bool(CDAICombatBehaviorTypes)> predicate) {
|
||||
std::vector<CDAICombatBehaviorTypes> data = cpplinq::from(this->m_entries)
|
||||
>> cpplinq::where(predicate)
|
||||
>> cpplinq::to_vector();
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
std::vector<CDAICombatBehaviorTypes> CDAICombatBehaviorTypesTable::GetEntries(void) const {
|
||||
return this->m_entries;
|
||||
}
|
||||
22
dDatabase/Tables/CDAICombatBehaviorTypesTable.h
Normal file
22
dDatabase/Tables/CDAICombatBehaviorTypesTable.h
Normal file
@@ -0,0 +1,22 @@
|
||||
#pragma once
|
||||
#include "CDTable.h"
|
||||
|
||||
//Generated by xmlDb2dDatabaseGenerator on 2022-03-04 00:23:32.855105
|
||||
//DO NOT EDIT THIS FILE MANUALLY!
|
||||
|
||||
struct CDAICombatBehaviorTypes {
|
||||
int id;
|
||||
std::string name;
|
||||
};
|
||||
|
||||
class CDAICombatBehaviorTypesTable : public CDTable {
|
||||
private:
|
||||
std::vector<CDAICombatBehaviorTypes> m_entries;
|
||||
public:
|
||||
CDAICombatBehaviorTypesTable();
|
||||
~CDAICombatBehaviorTypesTable();
|
||||
std::string GetName(void) const override;
|
||||
|
||||
std::vector<CDAICombatBehaviorTypes> Query(std::function<bool(CDAICombatBehaviorTypes)> predicate);
|
||||
std::vector<CDAICombatBehaviorTypes> GetEntries(void) const;
|
||||
};
|
||||
45
dDatabase/Tables/CDAICombatRoleTypesTable.cpp
Normal file
45
dDatabase/Tables/CDAICombatRoleTypesTable.cpp
Normal file
@@ -0,0 +1,45 @@
|
||||
#include "CDAICombatRoleTypesTable.h"
|
||||
//Generated by xmlDb2dDatabaseGenerator on 2022-03-04 00:23:32.862694
|
||||
//DO NOT EDIT THIS FILE MANUALLY!
|
||||
|
||||
CDAICombatRoleTypesTable::CDAICombatRoleTypesTable() {
|
||||
unsigned int size = 0;
|
||||
auto tableSize = CDClientDatabase::ExecuteQuery("SELECT COUNT(*) FROM AICombatRoleTypes");
|
||||
while (!tableSize.eof()) {
|
||||
size = tableSize.getIntField(0, 0);
|
||||
tableSize.nextRow();
|
||||
}
|
||||
|
||||
tableSize.finalize();
|
||||
this->m_entries.reserve(size);
|
||||
|
||||
auto tableData = CDClientDatabase::ExecuteQuery("SELECT * FROM AICombatRoleTypes");
|
||||
while (!tableData.eof()) {
|
||||
CDAICombatRoleTypes entry;
|
||||
entry.id = tableData.getIntField(0, int{});
|
||||
entry.name = tableData.getStringField(1, std::string{}.c_str());
|
||||
this->m_entries.push_back(entry);
|
||||
tableData.nextRow();
|
||||
}
|
||||
|
||||
tableData.finalize();
|
||||
}
|
||||
|
||||
CDAICombatRoleTypesTable::~CDAICombatRoleTypesTable() {
|
||||
}
|
||||
|
||||
std::string CDAICombatRoleTypesTable::GetName(void) const {
|
||||
return "AICombatRoleTypes";
|
||||
}
|
||||
|
||||
std::vector<CDAICombatRoleTypes> CDAICombatRoleTypesTable::Query(std::function<bool(CDAICombatRoleTypes)> predicate) {
|
||||
std::vector<CDAICombatRoleTypes> data = cpplinq::from(this->m_entries)
|
||||
>> cpplinq::where(predicate)
|
||||
>> cpplinq::to_vector();
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
std::vector<CDAICombatRoleTypes> CDAICombatRoleTypesTable::GetEntries(void) const {
|
||||
return this->m_entries;
|
||||
}
|
||||
22
dDatabase/Tables/CDAICombatRoleTypesTable.h
Normal file
22
dDatabase/Tables/CDAICombatRoleTypesTable.h
Normal file
@@ -0,0 +1,22 @@
|
||||
#pragma once
|
||||
#include "CDTable.h"
|
||||
|
||||
//Generated by xmlDb2dDatabaseGenerator on 2022-03-04 00:23:32.862458
|
||||
//DO NOT EDIT THIS FILE MANUALLY!
|
||||
|
||||
struct CDAICombatRoleTypes {
|
||||
int id;
|
||||
std::string name;
|
||||
};
|
||||
|
||||
class CDAICombatRoleTypesTable : public CDTable {
|
||||
private:
|
||||
std::vector<CDAICombatRoleTypes> m_entries;
|
||||
public:
|
||||
CDAICombatRoleTypesTable();
|
||||
~CDAICombatRoleTypesTable();
|
||||
std::string GetName(void) const override;
|
||||
|
||||
std::vector<CDAICombatRoleTypes> Query(std::function<bool(CDAICombatRoleTypes)> predicate);
|
||||
std::vector<CDAICombatRoleTypes> GetEntries(void) const;
|
||||
};
|
||||
50
dDatabase/Tables/CDAICombatRolesTable.cpp
Normal file
50
dDatabase/Tables/CDAICombatRolesTable.cpp
Normal file
@@ -0,0 +1,50 @@
|
||||
#include "CDAICombatRolesTable.h"
|
||||
//Generated by xmlDb2dDatabaseGenerator on 2022-03-04 00:23:32.859415
|
||||
//DO NOT EDIT THIS FILE MANUALLY!
|
||||
|
||||
CDAICombatRolesTable::CDAICombatRolesTable() {
|
||||
unsigned int size = 0;
|
||||
auto tableSize = CDClientDatabase::ExecuteQuery("SELECT COUNT(*) FROM AICombatRoles");
|
||||
while (!tableSize.eof()) {
|
||||
size = tableSize.getIntField(0, 0);
|
||||
tableSize.nextRow();
|
||||
}
|
||||
|
||||
tableSize.finalize();
|
||||
this->m_entries.reserve(size);
|
||||
|
||||
auto tableData = CDClientDatabase::ExecuteQuery("SELECT * FROM AICombatRoles");
|
||||
while (!tableData.eof()) {
|
||||
CDAICombatRoles entry;
|
||||
entry.id = tableData.getIntField(0, int{});
|
||||
entry.preferredRole = tableData.getIntField(1, int{});
|
||||
entry.description = tableData.getStringField(2, std::string{}.c_str());
|
||||
entry.specifiedMinRangeNOUSE = tableData.getFloatField(3, float{});
|
||||
entry.specifiedMaxRangeNOUSE = tableData.getFloatField(4, float{});
|
||||
entry.specificMinRange = tableData.getFloatField(5, float{});
|
||||
entry.specificMaxRange = tableData.getFloatField(6, float{});
|
||||
this->m_entries.push_back(entry);
|
||||
tableData.nextRow();
|
||||
}
|
||||
|
||||
tableData.finalize();
|
||||
}
|
||||
|
||||
CDAICombatRolesTable::~CDAICombatRolesTable() {
|
||||
}
|
||||
|
||||
std::string CDAICombatRolesTable::GetName(void) const {
|
||||
return "AICombatRoles";
|
||||
}
|
||||
|
||||
std::vector<CDAICombatRoles> CDAICombatRolesTable::Query(std::function<bool(CDAICombatRoles)> predicate) {
|
||||
std::vector<CDAICombatRoles> data = cpplinq::from(this->m_entries)
|
||||
>> cpplinq::where(predicate)
|
||||
>> cpplinq::to_vector();
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
std::vector<CDAICombatRoles> CDAICombatRolesTable::GetEntries(void) const {
|
||||
return this->m_entries;
|
||||
}
|
||||
27
dDatabase/Tables/CDAICombatRolesTable.h
Normal file
27
dDatabase/Tables/CDAICombatRolesTable.h
Normal file
@@ -0,0 +1,27 @@
|
||||
#pragma once
|
||||
#include "CDTable.h"
|
||||
|
||||
//Generated by xmlDb2dDatabaseGenerator on 2022-03-04 00:23:32.858188
|
||||
//DO NOT EDIT THIS FILE MANUALLY!
|
||||
|
||||
struct CDAICombatRoles {
|
||||
int id;
|
||||
int preferredRole;
|
||||
std::string description;
|
||||
float specifiedMinRangeNOUSE;
|
||||
float specifiedMaxRangeNOUSE;
|
||||
float specificMinRange;
|
||||
float specificMaxRange;
|
||||
};
|
||||
|
||||
class CDAICombatRolesTable : public CDTable {
|
||||
private:
|
||||
std::vector<CDAICombatRoles> m_entries;
|
||||
public:
|
||||
CDAICombatRolesTable();
|
||||
~CDAICombatRolesTable();
|
||||
std::string GetName(void) const override;
|
||||
|
||||
std::vector<CDAICombatRoles> Query(std::function<bool(CDAICombatRoles)> predicate);
|
||||
std::vector<CDAICombatRoles> GetEntries(void) const;
|
||||
};
|
||||
51
dDatabase/Tables/CDAccessoryDefaultLocTable.cpp
Normal file
51
dDatabase/Tables/CDAccessoryDefaultLocTable.cpp
Normal file
@@ -0,0 +1,51 @@
|
||||
#include "CDAccessoryDefaultLocTable.h"
|
||||
//Generated by xmlDb2dDatabaseGenerator on 2022-03-04 00:23:32.841621
|
||||
//DO NOT EDIT THIS FILE MANUALLY!
|
||||
|
||||
CDAccessoryDefaultLocTable::CDAccessoryDefaultLocTable() {
|
||||
unsigned int size = 0;
|
||||
auto tableSize = CDClientDatabase::ExecuteQuery("SELECT COUNT(*) FROM AccessoryDefaultLoc");
|
||||
while (!tableSize.eof()) {
|
||||
size = tableSize.getIntField(0, 0);
|
||||
tableSize.nextRow();
|
||||
}
|
||||
|
||||
tableSize.finalize();
|
||||
this->m_entries.reserve(size);
|
||||
|
||||
auto tableData = CDClientDatabase::ExecuteQuery("SELECT * FROM AccessoryDefaultLoc");
|
||||
while (!tableData.eof()) {
|
||||
CDAccessoryDefaultLoc entry;
|
||||
entry.GroupID = tableData.getIntField(0, int{});
|
||||
entry.Description = tableData.getStringField(1, std::string{}.c_str());
|
||||
entry.Pos_X = tableData.getFloatField(2, float{});
|
||||
entry.Pos_Y = tableData.getFloatField(3, float{});
|
||||
entry.Pos_Z = tableData.getFloatField(4, float{});
|
||||
entry.Rot_X = tableData.getFloatField(5, float{});
|
||||
entry.Rot_Y = tableData.getFloatField(6, float{});
|
||||
entry.Rot_Z = tableData.getFloatField(7, float{});
|
||||
this->m_entries.push_back(entry);
|
||||
tableData.nextRow();
|
||||
}
|
||||
|
||||
tableData.finalize();
|
||||
}
|
||||
|
||||
CDAccessoryDefaultLocTable::~CDAccessoryDefaultLocTable() {
|
||||
}
|
||||
|
||||
std::string CDAccessoryDefaultLocTable::GetName(void) const {
|
||||
return "AccessoryDefaultLoc";
|
||||
}
|
||||
|
||||
std::vector<CDAccessoryDefaultLoc> CDAccessoryDefaultLocTable::Query(std::function<bool(CDAccessoryDefaultLoc)> predicate) {
|
||||
std::vector<CDAccessoryDefaultLoc> data = cpplinq::from(this->m_entries)
|
||||
>> cpplinq::where(predicate)
|
||||
>> cpplinq::to_vector();
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
std::vector<CDAccessoryDefaultLoc> CDAccessoryDefaultLocTable::GetEntries(void) const {
|
||||
return this->m_entries;
|
||||
}
|
||||
28
dDatabase/Tables/CDAccessoryDefaultLocTable.h
Normal file
28
dDatabase/Tables/CDAccessoryDefaultLocTable.h
Normal file
@@ -0,0 +1,28 @@
|
||||
#pragma once
|
||||
#include "CDTable.h"
|
||||
|
||||
//Generated by xmlDb2dDatabaseGenerator on 2022-03-04 00:23:32.840625
|
||||
//DO NOT EDIT THIS FILE MANUALLY!
|
||||
|
||||
struct CDAccessoryDefaultLoc {
|
||||
int GroupID;
|
||||
std::string Description;
|
||||
float Pos_X;
|
||||
float Pos_Y;
|
||||
float Pos_Z;
|
||||
float Rot_X;
|
||||
float Rot_Y;
|
||||
float Rot_Z;
|
||||
};
|
||||
|
||||
class CDAccessoryDefaultLocTable : public CDTable {
|
||||
private:
|
||||
std::vector<CDAccessoryDefaultLoc> m_entries;
|
||||
public:
|
||||
CDAccessoryDefaultLocTable();
|
||||
~CDAccessoryDefaultLocTable();
|
||||
std::string GetName(void) const override;
|
||||
|
||||
std::vector<CDAccessoryDefaultLoc> Query(std::function<bool(CDAccessoryDefaultLoc)> predicate);
|
||||
std::vector<CDAccessoryDefaultLoc> GetEntries(void) const;
|
||||
};
|
||||
@@ -1,72 +1,59 @@
|
||||
#include "CDActivitiesTable.h"
|
||||
//Generated by xmlDb2dDatabaseGenerator on 2022-03-04 00:23:32.846608
|
||||
//DO NOT EDIT THIS FILE MANUALLY!
|
||||
|
||||
//! Constructor
|
||||
CDActivitiesTable::CDActivitiesTable(void) {
|
||||
|
||||
// First, get the size of the table
|
||||
CDActivitiesTable::CDActivitiesTable() {
|
||||
unsigned int size = 0;
|
||||
auto tableSize = CDClientDatabase::ExecuteQuery("SELECT COUNT(*) FROM Activities");
|
||||
while (!tableSize.eof()) {
|
||||
while (!tableSize.eof()) {
|
||||
size = tableSize.getIntField(0, 0);
|
||||
|
||||
tableSize.nextRow();
|
||||
}
|
||||
|
||||
tableSize.finalize();
|
||||
this->m_entries.reserve(size);
|
||||
|
||||
// Reserve the size
|
||||
this->entries.reserve(size);
|
||||
|
||||
// Now get the data
|
||||
auto tableData = CDClientDatabase::ExecuteQuery("SELECT * FROM Activities");
|
||||
while (!tableData.eof()) {
|
||||
CDActivities entry;
|
||||
entry.ActivityID = tableData.getIntField(0, -1);
|
||||
entry.locStatus = tableData.getIntField(1, -1);
|
||||
entry.instanceMapID = tableData.getIntField(2, -1);
|
||||
entry.minTeams = tableData.getIntField(3, -1);
|
||||
entry.maxTeams = tableData.getIntField(4, -1);
|
||||
entry.minTeamSize = tableData.getIntField(5, -1);
|
||||
entry.maxTeamSize = tableData.getIntField(6, -1);
|
||||
entry.waitTime = tableData.getIntField(7, -1);
|
||||
entry.startDelay = tableData.getIntField(8, -1);
|
||||
entry.requiresUniqueData = tableData.getIntField(9, -1);
|
||||
entry.leaderboardType = tableData.getIntField(10, -1);
|
||||
entry.localize = tableData.getIntField(11, -1);
|
||||
entry.optionalCostLOT = tableData.getIntField(12, -1);
|
||||
entry.optionalCostCount = tableData.getIntField(13, -1);
|
||||
entry.showUIRewards = tableData.getIntField(14, -1);
|
||||
entry.CommunityActivityFlagID = tableData.getIntField(15, -1);
|
||||
entry.gate_version = tableData.getStringField(16, "");
|
||||
entry.noTeamLootOnDeath = tableData.getIntField(17, -1);
|
||||
entry.optionalPercentage = tableData.getFloatField(18, -1.0f);
|
||||
|
||||
this->entries.push_back(entry);
|
||||
entry.ActivityID = tableData.getIntField(0, int{});
|
||||
entry.Description = tableData.getStringField(1, std::string{}.c_str());
|
||||
entry.ActivityName = tableData.getStringField(2, std::string{}.c_str());
|
||||
entry.scoreName = tableData.getStringField(3, std::string{}.c_str());
|
||||
entry.value1Name = tableData.getStringField(4, std::string{}.c_str());
|
||||
entry.value2Name = tableData.getStringField(5, std::string{}.c_str());
|
||||
entry.scoreSort = tableData.getIntField(6, bool{});
|
||||
entry.value1Sort = tableData.getIntField(7, bool{});
|
||||
entry.value2Sort = tableData.getIntField(8, bool{});
|
||||
entry.instanceMapID = tableData.getIntField(9, int{});
|
||||
entry.minTeams = tableData.getIntField(10, int{});
|
||||
entry.maxTeams = tableData.getIntField(11, int{});
|
||||
entry.minTeamSize = tableData.getIntField(12, int{});
|
||||
entry.maxTeamSize = tableData.getIntField(13, int{});
|
||||
entry.waitTime = tableData.getIntField(14, int{});
|
||||
entry.startDelay = tableData.getIntField(15, int{});
|
||||
this->m_entries.push_back(entry);
|
||||
tableData.nextRow();
|
||||
}
|
||||
|
||||
tableData.finalize();
|
||||
}
|
||||
|
||||
//! Destructor
|
||||
CDActivitiesTable::~CDActivitiesTable(void) { }
|
||||
CDActivitiesTable::~CDActivitiesTable() {
|
||||
}
|
||||
|
||||
//! Returns the table's name
|
||||
std::string CDActivitiesTable::GetName(void) const {
|
||||
return "Activities";
|
||||
}
|
||||
|
||||
//! Queries the table with a custom "where" clause
|
||||
std::vector<CDActivities> CDActivitiesTable::Query(std::function<bool(CDActivities)> predicate) {
|
||||
|
||||
std::vector<CDActivities> data = cpplinq::from(this->entries)
|
||||
std::vector<CDActivities> data = cpplinq::from(this->m_entries)
|
||||
>> cpplinq::where(predicate)
|
||||
>> cpplinq::to_vector();
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
//! Gets all the entries in the table
|
||||
std::vector<CDActivities> CDActivitiesTable::GetEntries(void) const {
|
||||
return this->entries;
|
||||
return this->m_entries;
|
||||
}
|
||||
|
||||
@@ -1,66 +1,36 @@
|
||||
#pragma once
|
||||
|
||||
// Custom Classes
|
||||
#include "CDTable.h"
|
||||
|
||||
/*!
|
||||
\file CDActivitiesTable.hpp
|
||||
\brief Contains data for the Activities table
|
||||
*/
|
||||
//Generated by xmlDb2dDatabaseGenerator on 2022-03-04 00:23:32.845612
|
||||
//DO NOT EDIT THIS FILE MANUALLY!
|
||||
|
||||
//! Activities Entry Struct
|
||||
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;
|
||||
bool requiresUniqueData;
|
||||
unsigned int leaderboardType;
|
||||
bool localize;
|
||||
int optionalCostLOT;
|
||||
int optionalCostCount;
|
||||
bool showUIRewards;
|
||||
unsigned int CommunityActivityFlagID;
|
||||
std::string gate_version;
|
||||
bool noTeamLootOnDeath;
|
||||
float optionalPercentage;
|
||||
int ActivityID;
|
||||
std::string Description;
|
||||
std::string ActivityName;
|
||||
std::string scoreName;
|
||||
std::string value1Name;
|
||||
std::string value2Name;
|
||||
bool scoreSort;
|
||||
bool value1Sort;
|
||||
bool value2Sort;
|
||||
int instanceMapID;
|
||||
int minTeams;
|
||||
int maxTeams;
|
||||
int minTeamSize;
|
||||
int maxTeamSize;
|
||||
int waitTime;
|
||||
int startDelay;
|
||||
};
|
||||
|
||||
|
||||
//! Activities table
|
||||
class CDActivitiesTable : public CDTable {
|
||||
private:
|
||||
std::vector<CDActivities> entries;
|
||||
|
||||
std::vector<CDActivities> m_entries;
|
||||
public:
|
||||
|
||||
//! Constructor
|
||||
CDActivitiesTable(void);
|
||||
|
||||
//! Destructor
|
||||
~CDActivitiesTable(void);
|
||||
|
||||
//! Returns the table's name
|
||||
/*!
|
||||
\return The table name
|
||||
*/
|
||||
CDActivitiesTable();
|
||||
~CDActivitiesTable();
|
||||
std::string GetName(void) const override;
|
||||
|
||||
//! Queries the table with a custom "where" clause
|
||||
/*!
|
||||
\param predicate The predicate
|
||||
*/
|
||||
std::vector<CDActivities> Query(std::function<bool(CDActivities)> predicate);
|
||||
|
||||
//! Gets all the entries in the table
|
||||
/*!
|
||||
\return The entries
|
||||
*/
|
||||
std::vector<CDActivities> Query(std::function<bool(CDActivities)> predicate);
|
||||
std::vector<CDActivities> GetEntries(void) const;
|
||||
|
||||
};
|
||||
|
||||
@@ -1,60 +1,50 @@
|
||||
#include "CDActivityRewardsTable.h"
|
||||
//Generated by xmlDb2dDatabaseGenerator on 2022-03-04 00:23:32.848603
|
||||
//DO NOT EDIT THIS FILE MANUALLY!
|
||||
|
||||
//! Constructor
|
||||
CDActivityRewardsTable::CDActivityRewardsTable(void) {
|
||||
|
||||
// First, get the size of the table
|
||||
unsigned int size = 0;
|
||||
auto tableSize = CDClientDatabase::ExecuteQuery("SELECT COUNT(*) FROM ActivityRewards");
|
||||
while (!tableSize.eof()) {
|
||||
size = tableSize.getIntField(0, 0);
|
||||
|
||||
tableSize.nextRow();
|
||||
}
|
||||
CDActivityRewardsTable::CDActivityRewardsTable() {
|
||||
unsigned int size = 0;
|
||||
auto tableSize = CDClientDatabase::ExecuteQuery("SELECT COUNT(*) FROM ActivityRewards");
|
||||
while (!tableSize.eof()) {
|
||||
size = tableSize.getIntField(0, 0);
|
||||
tableSize.nextRow();
|
||||
}
|
||||
|
||||
tableSize.finalize();
|
||||
|
||||
// Reserve the size
|
||||
this->entries.reserve(size);
|
||||
|
||||
// Now get the data
|
||||
auto tableData = CDClientDatabase::ExecuteQuery("SELECT * FROM ActivityRewards");
|
||||
while (!tableData.eof()) {
|
||||
CDActivityRewards entry;
|
||||
entry.objectTemplate = tableData.getIntField(0, -1);
|
||||
entry.ActivityRewardIndex = tableData.getIntField(1, -1);
|
||||
entry.activityRating = tableData.getIntField(2, -1);
|
||||
entry.LootMatrixIndex = tableData.getIntField(3, -1);
|
||||
entry.CurrencyIndex = tableData.getIntField(4, -1);
|
||||
entry.ChallengeRating = tableData.getIntField(5, -1);
|
||||
entry.description = tableData.getStringField(6, "");
|
||||
|
||||
this->entries.push_back(entry);
|
||||
tableData.nextRow();
|
||||
}
|
||||
this->m_entries.reserve(size);
|
||||
|
||||
auto tableData = CDClientDatabase::ExecuteQuery("SELECT * FROM ActivityRewards");
|
||||
while (!tableData.eof()) {
|
||||
CDActivityRewards entry;
|
||||
entry.objectTemplate = tableData.getIntField(0, int{});
|
||||
entry.ActivityRewardIndex = tableData.getIntField(1, int{});
|
||||
entry.activityRating = tableData.getIntField(2, int{});
|
||||
entry.LootMatrixIndex = tableData.getIntField(3, int{});
|
||||
entry.CurrencyIndex = tableData.getIntField(4, int{});
|
||||
entry.ChallengeRating = tableData.getIntField(5, int{});
|
||||
entry.description = tableData.getStringField(6, std::string{}.c_str());
|
||||
this->m_entries.push_back(entry);
|
||||
tableData.nextRow();
|
||||
}
|
||||
|
||||
tableData.finalize();
|
||||
}
|
||||
|
||||
//! Destructor
|
||||
CDActivityRewardsTable::~CDActivityRewardsTable(void) { }
|
||||
CDActivityRewardsTable::~CDActivityRewardsTable() {
|
||||
}
|
||||
|
||||
//! Returns the table's name
|
||||
std::string CDActivityRewardsTable::GetName(void) const {
|
||||
return "ActivityRewards";
|
||||
return "ActivityRewards";
|
||||
}
|
||||
|
||||
//! Queries the table with a custom "where" clause
|
||||
std::vector<CDActivityRewards> CDActivityRewardsTable::Query(std::function<bool(CDActivityRewards)> predicate) {
|
||||
|
||||
std::vector<CDActivityRewards> data = cpplinq::from(this->entries)
|
||||
>> cpplinq::where(predicate)
|
||||
>> cpplinq::to_vector();
|
||||
|
||||
return data;
|
||||
std::vector<CDActivityRewards> data = cpplinq::from(this->m_entries)
|
||||
>> cpplinq::where(predicate)
|
||||
>> cpplinq::to_vector();
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
//! Gets all the entries in the table
|
||||
std::vector<CDActivityRewards> CDActivityRewardsTable::GetEntries(void) const {
|
||||
return this->entries;
|
||||
return this->m_entries;
|
||||
}
|
||||
|
||||
@@ -1,54 +1,27 @@
|
||||
#pragma once
|
||||
|
||||
// Custom Classes
|
||||
#include "CDTable.h"
|
||||
|
||||
/*!
|
||||
\file CDActivityRewardsTable.hpp
|
||||
\brief Contains data for the ActivityRewards table
|
||||
*/
|
||||
//Generated by xmlDb2dDatabaseGenerator on 2022-03-04 00:23:32.847606
|
||||
//DO NOT EDIT THIS FILE MANUALLY!
|
||||
|
||||
//! ActivityRewards Entry Struct
|
||||
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
|
||||
std::string description; //!< The description
|
||||
int objectTemplate;
|
||||
int ActivityRewardIndex;
|
||||
int activityRating;
|
||||
int LootMatrixIndex;
|
||||
int CurrencyIndex;
|
||||
int ChallengeRating;
|
||||
std::string description;
|
||||
};
|
||||
|
||||
|
||||
//! ActivityRewards table
|
||||
class CDActivityRewardsTable : public CDTable {
|
||||
private:
|
||||
std::vector<CDActivityRewards> entries;
|
||||
|
||||
std::vector<CDActivityRewards> m_entries;
|
||||
public:
|
||||
|
||||
//! Constructor
|
||||
CDActivityRewardsTable(void);
|
||||
|
||||
//! Destructor
|
||||
~CDActivityRewardsTable(void);
|
||||
|
||||
//! Returns the table's name
|
||||
/*!
|
||||
\return The table name
|
||||
*/
|
||||
std::string GetName(void) const override;
|
||||
|
||||
//! Queries the table with a custom "where" clause
|
||||
/*!
|
||||
\param predicate The predicate
|
||||
*/
|
||||
std::vector<CDActivityRewards> Query(std::function<bool(CDActivityRewards)> predicate);
|
||||
|
||||
//! Gets all the entries in the table
|
||||
/*!
|
||||
\return The entries
|
||||
*/
|
||||
std::vector<CDActivityRewards> GetEntries(void) const;
|
||||
|
||||
CDActivityRewardsTable();
|
||||
~CDActivityRewardsTable();
|
||||
std::string GetName(void) const override;
|
||||
|
||||
std::vector<CDActivityRewards> Query(std::function<bool(CDActivityRewards)> predicate);
|
||||
std::vector<CDActivityRewards> GetEntries(void) const;
|
||||
};
|
||||
|
||||
46
dDatabase/Tables/CDActivityTextTable.cpp
Normal file
46
dDatabase/Tables/CDActivityTextTable.cpp
Normal file
@@ -0,0 +1,46 @@
|
||||
#include "CDActivityTextTable.h"
|
||||
//Generated by xmlDb2dDatabaseGenerator on 2022-03-04 00:23:32.853590
|
||||
//DO NOT EDIT THIS FILE MANUALLY!
|
||||
|
||||
CDActivityTextTable::CDActivityTextTable() {
|
||||
unsigned int size = 0;
|
||||
auto tableSize = CDClientDatabase::ExecuteQuery("SELECT COUNT(*) FROM ActivityText");
|
||||
while (!tableSize.eof()) {
|
||||
size = tableSize.getIntField(0, 0);
|
||||
tableSize.nextRow();
|
||||
}
|
||||
|
||||
tableSize.finalize();
|
||||
this->m_entries.reserve(size);
|
||||
|
||||
auto tableData = CDClientDatabase::ExecuteQuery("SELECT * FROM ActivityText");
|
||||
while (!tableData.eof()) {
|
||||
CDActivityText entry;
|
||||
entry.activityID = tableData.getIntField(0, int{});
|
||||
entry.type = tableData.getStringField(1, std::string{}.c_str());
|
||||
entry.text = tableData.getStringField(2, std::string{}.c_str());
|
||||
this->m_entries.push_back(entry);
|
||||
tableData.nextRow();
|
||||
}
|
||||
|
||||
tableData.finalize();
|
||||
}
|
||||
|
||||
CDActivityTextTable::~CDActivityTextTable() {
|
||||
}
|
||||
|
||||
std::string CDActivityTextTable::GetName(void) const {
|
||||
return "ActivityText";
|
||||
}
|
||||
|
||||
std::vector<CDActivityText> CDActivityTextTable::Query(std::function<bool(CDActivityText)> predicate) {
|
||||
std::vector<CDActivityText> data = cpplinq::from(this->m_entries)
|
||||
>> cpplinq::where(predicate)
|
||||
>> cpplinq::to_vector();
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
std::vector<CDActivityText> CDActivityTextTable::GetEntries(void) const {
|
||||
return this->m_entries;
|
||||
}
|
||||
23
dDatabase/Tables/CDActivityTextTable.h
Normal file
23
dDatabase/Tables/CDActivityTextTable.h
Normal file
@@ -0,0 +1,23 @@
|
||||
#pragma once
|
||||
#include "CDTable.h"
|
||||
|
||||
//Generated by xmlDb2dDatabaseGenerator on 2022-03-04 00:23:32.851597
|
||||
//DO NOT EDIT THIS FILE MANUALLY!
|
||||
|
||||
struct CDActivityText {
|
||||
int activityID;
|
||||
std::string type;
|
||||
std::string text;
|
||||
};
|
||||
|
||||
class CDActivityTextTable : public CDTable {
|
||||
private:
|
||||
std::vector<CDActivityText> m_entries;
|
||||
public:
|
||||
CDActivityTextTable();
|
||||
~CDActivityTextTable();
|
||||
std::string GetName(void) const override;
|
||||
|
||||
std::vector<CDActivityText> Query(std::function<bool(CDActivityText)> predicate);
|
||||
std::vector<CDActivityText> GetEntries(void) const;
|
||||
};
|
||||
46
dDatabase/Tables/CDAnimationIndexTable.cpp
Normal file
46
dDatabase/Tables/CDAnimationIndexTable.cpp
Normal file
@@ -0,0 +1,46 @@
|
||||
#include "CDAnimationIndexTable.h"
|
||||
//Generated by xmlDb2dDatabaseGenerator on 2022-03-04 00:23:32.866645
|
||||
//DO NOT EDIT THIS FILE MANUALLY!
|
||||
|
||||
CDAnimationIndexTable::CDAnimationIndexTable() {
|
||||
unsigned int size = 0;
|
||||
auto tableSize = CDClientDatabase::ExecuteQuery("SELECT COUNT(*) FROM AnimationIndex");
|
||||
while (!tableSize.eof()) {
|
||||
size = tableSize.getIntField(0, 0);
|
||||
tableSize.nextRow();
|
||||
}
|
||||
|
||||
tableSize.finalize();
|
||||
this->m_entries.reserve(size);
|
||||
|
||||
auto tableData = CDClientDatabase::ExecuteQuery("SELECT * FROM AnimationIndex");
|
||||
while (!tableData.eof()) {
|
||||
CDAnimationIndex entry;
|
||||
entry.animationGroupID = tableData.getIntField(0, int{});
|
||||
entry.description = tableData.getStringField(1, std::string{}.c_str());
|
||||
entry.groupType = tableData.getStringField(2, std::string{}.c_str());
|
||||
this->m_entries.push_back(entry);
|
||||
tableData.nextRow();
|
||||
}
|
||||
|
||||
tableData.finalize();
|
||||
}
|
||||
|
||||
CDAnimationIndexTable::~CDAnimationIndexTable() {
|
||||
}
|
||||
|
||||
std::string CDAnimationIndexTable::GetName(void) const {
|
||||
return "AnimationIndex";
|
||||
}
|
||||
|
||||
std::vector<CDAnimationIndex> CDAnimationIndexTable::Query(std::function<bool(CDAnimationIndex)> predicate) {
|
||||
std::vector<CDAnimationIndex> data = cpplinq::from(this->m_entries)
|
||||
>> cpplinq::where(predicate)
|
||||
>> cpplinq::to_vector();
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
std::vector<CDAnimationIndex> CDAnimationIndexTable::GetEntries(void) const {
|
||||
return this->m_entries;
|
||||
}
|
||||
23
dDatabase/Tables/CDAnimationIndexTable.h
Normal file
23
dDatabase/Tables/CDAnimationIndexTable.h
Normal file
@@ -0,0 +1,23 @@
|
||||
#pragma once
|
||||
#include "CDTable.h"
|
||||
|
||||
//Generated by xmlDb2dDatabaseGenerator on 2022-03-04 00:23:32.864733
|
||||
//DO NOT EDIT THIS FILE MANUALLY!
|
||||
|
||||
struct CDAnimationIndex {
|
||||
int animationGroupID;
|
||||
std::string description;
|
||||
std::string groupType;
|
||||
};
|
||||
|
||||
class CDAnimationIndexTable : public CDTable {
|
||||
private:
|
||||
std::vector<CDAnimationIndex> m_entries;
|
||||
public:
|
||||
CDAnimationIndexTable();
|
||||
~CDAnimationIndexTable();
|
||||
std::string GetName(void) const override;
|
||||
|
||||
std::vector<CDAnimationIndex> Query(std::function<bool(CDAnimationIndex)> predicate);
|
||||
std::vector<CDAnimationIndex> GetEntries(void) const;
|
||||
};
|
||||
@@ -1,66 +1,61 @@
|
||||
#include "CDAnimationsTable.h"
|
||||
//Generated by xmlDb2dDatabaseGenerator on 2022-03-04 00:23:32.869897
|
||||
//DO NOT EDIT THIS FILE MANUALLY!
|
||||
|
||||
//! Constructor
|
||||
CDAnimationsTable::CDAnimationsTable(void) {
|
||||
|
||||
// First, get the size of the table
|
||||
unsigned int size = 0;
|
||||
auto tableSize = CDClientDatabase::ExecuteQuery("SELECT COUNT(*) FROM Animations");
|
||||
while (!tableSize.eof()) {
|
||||
size = tableSize.getIntField(0, 0);
|
||||
|
||||
tableSize.nextRow();
|
||||
}
|
||||
CDAnimationsTable::CDAnimationsTable() {
|
||||
unsigned int size = 0;
|
||||
auto tableSize = CDClientDatabase::ExecuteQuery("SELECT COUNT(*) FROM Animations");
|
||||
while (!tableSize.eof()) {
|
||||
size = tableSize.getIntField(0, 0);
|
||||
tableSize.nextRow();
|
||||
}
|
||||
|
||||
tableSize.finalize();
|
||||
|
||||
// Reserve the size
|
||||
this->entries.reserve(size);
|
||||
|
||||
// Now get the data
|
||||
auto tableData = CDClientDatabase::ExecuteQuery("SELECT * FROM Animations");
|
||||
while (!tableData.eof()) {
|
||||
CDAnimations entry;
|
||||
entry.animationGroupID = tableData.getIntField(0, -1);
|
||||
entry.animation_type = tableData.getStringField(1, "");
|
||||
entry.animation_name = tableData.getStringField(2, "");
|
||||
entry.chance_to_play = tableData.getFloatField(3, -1.0f);
|
||||
entry.min_loops = tableData.getIntField(4, -1);
|
||||
entry.max_loops = tableData.getIntField(5, -1);
|
||||
entry.animation_length = tableData.getFloatField(6, -1.0f);
|
||||
entry.hideEquip = tableData.getIntField(7, -1) == 1 ? true : false;
|
||||
entry.ignoreUpperBody = tableData.getIntField(8, -1) == 1 ? true : false;
|
||||
entry.restartable = tableData.getIntField(9, -1) == 1 ? true : false;
|
||||
entry.face_animation_name = tableData.getStringField(10, "");
|
||||
entry.priority = tableData.getFloatField(11, -1.0f);
|
||||
entry.blendTime = tableData.getFloatField(12, -1.0f);
|
||||
|
||||
this->entries.push_back(entry);
|
||||
tableData.nextRow();
|
||||
}
|
||||
this->m_entries.reserve(size);
|
||||
|
||||
auto tableData = CDClientDatabase::ExecuteQuery("SELECT * FROM Animations");
|
||||
while (!tableData.eof()) {
|
||||
CDAnimations entry;
|
||||
entry.animationGroupID = tableData.getIntField(0, int{});
|
||||
entry.animation_type = tableData.getStringField(1, std::string{}.c_str());
|
||||
entry.animation_name = tableData.getStringField(2, std::string{}.c_str());
|
||||
entry.chance_to_play = tableData.getFloatField(3, float{});
|
||||
entry.min_loops = tableData.getIntField(4, int{});
|
||||
entry.max_loops = tableData.getIntField(5, int{});
|
||||
entry.animation_length = tableData.getFloatField(6, float{});
|
||||
entry.sound1 = tableData.getStringField(7, std::string{}.c_str());
|
||||
entry.sound2 = tableData.getStringField(8, std::string{}.c_str());
|
||||
entry.sound3 = tableData.getStringField(9, std::string{}.c_str());
|
||||
entry.sound4 = tableData.getStringField(10, std::string{}.c_str());
|
||||
entry.sound5 = tableData.getStringField(11, std::string{}.c_str());
|
||||
entry.leftSound = tableData.getStringField(12, std::string{}.c_str());
|
||||
entry.rightSound = tableData.getStringField(13, std::string{}.c_str());
|
||||
entry.hideEquip = tableData.getIntField(14, bool{});
|
||||
entry.ignoreUpperBody = tableData.getIntField(15, bool{});
|
||||
entry.restartable = tableData.getIntField(16, bool{});
|
||||
entry.face_animation_name = tableData.getStringField(17, std::string{}.c_str());
|
||||
this->m_entries.push_back(entry);
|
||||
tableData.nextRow();
|
||||
}
|
||||
|
||||
tableData.finalize();
|
||||
}
|
||||
|
||||
//! Destructor
|
||||
CDAnimationsTable::~CDAnimationsTable(void) { }
|
||||
CDAnimationsTable::~CDAnimationsTable() {
|
||||
}
|
||||
|
||||
//! Returns the table's name
|
||||
std::string CDAnimationsTable::GetName(void) const {
|
||||
return "Animations";
|
||||
return "Animations";
|
||||
}
|
||||
|
||||
//! Queries the table with a custom "where" clause
|
||||
std::vector<CDAnimations> CDAnimationsTable::Query(std::function<bool(CDAnimations)> predicate) {
|
||||
|
||||
std::vector<CDAnimations> data = cpplinq::from(this->entries)
|
||||
>> cpplinq::where(predicate)
|
||||
>> cpplinq::to_vector();
|
||||
|
||||
return data;
|
||||
std::vector<CDAnimations> data = cpplinq::from(this->m_entries)
|
||||
>> cpplinq::where(predicate)
|
||||
>> cpplinq::to_vector();
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
//! Gets all the entries in the table
|
||||
std::vector<CDAnimations> CDAnimationsTable::GetEntries(void) const {
|
||||
return this->entries;
|
||||
return this->m_entries;
|
||||
}
|
||||
|
||||
@@ -1,60 +1,38 @@
|
||||
#pragma once
|
||||
|
||||
// Custom Classes
|
||||
#include "CDTable.h"
|
||||
|
||||
/*!
|
||||
\file CDAnimationsTable.hpp
|
||||
\brief Contains data for the Animations table
|
||||
*/
|
||||
//Generated by xmlDb2dDatabaseGenerator on 2022-03-04 00:23:32.868915
|
||||
//DO NOT EDIT THIS FILE MANUALLY!
|
||||
|
||||
//! Animations Entry Struct
|
||||
struct CDAnimations {
|
||||
unsigned int animationGroupID; //!< The animation group ID
|
||||
std::string animation_type; //!< The animation type
|
||||
std::string animation_name; //!< The animation name
|
||||
float chance_to_play; //!< The chance to play the animation
|
||||
unsigned int min_loops; //!< The minimum number of loops
|
||||
unsigned int max_loops; //!< The maximum number of loops
|
||||
float animation_length; //!< The animation length
|
||||
bool hideEquip; //!< Whether or not to hide the equip
|
||||
bool ignoreUpperBody; //!< Whether or not to ignore the upper body
|
||||
bool restartable; //!< Whether or not the animation is restartable
|
||||
std::string face_animation_name; //!< The face animation name
|
||||
float priority; //!< The priority
|
||||
float blendTime; //!< The blend time
|
||||
int animationGroupID;
|
||||
std::string animation_type;
|
||||
std::string animation_name;
|
||||
float chance_to_play;
|
||||
int min_loops;
|
||||
int max_loops;
|
||||
float animation_length;
|
||||
std::string sound1;
|
||||
std::string sound2;
|
||||
std::string sound3;
|
||||
std::string sound4;
|
||||
std::string sound5;
|
||||
std::string leftSound;
|
||||
std::string rightSound;
|
||||
bool hideEquip;
|
||||
bool ignoreUpperBody;
|
||||
bool restartable;
|
||||
std::string face_animation_name;
|
||||
};
|
||||
|
||||
|
||||
//! Animations table
|
||||
class CDAnimationsTable : public CDTable {
|
||||
private:
|
||||
std::vector<CDAnimations> entries;
|
||||
|
||||
std::vector<CDAnimations> m_entries;
|
||||
public:
|
||||
|
||||
//! Constructor
|
||||
CDAnimationsTable(void);
|
||||
|
||||
//! Destructor
|
||||
~CDAnimationsTable(void);
|
||||
|
||||
//! Returns the table's name
|
||||
/*!
|
||||
\return The table name
|
||||
*/
|
||||
std::string GetName(void) const override;
|
||||
|
||||
//! Queries the table with a custom "where" clause
|
||||
/*!
|
||||
\param predicate The predicate
|
||||
*/
|
||||
std::vector<CDAnimations> Query(std::function<bool(CDAnimations)> predicate);
|
||||
|
||||
//! Gets all the entries in the table
|
||||
/*!
|
||||
\return The entries
|
||||
*/
|
||||
std::vector<CDAnimations> GetEntries(void) const;
|
||||
|
||||
CDAnimationsTable();
|
||||
~CDAnimationsTable();
|
||||
std::string GetName(void) const override;
|
||||
|
||||
std::vector<CDAnimations> Query(std::function<bool(CDAnimations)> predicate);
|
||||
std::vector<CDAnimations> GetEntries(void) const;
|
||||
};
|
||||
|
||||
52
dDatabase/Tables/CDBaseCombatAIComponentTable.cpp
Normal file
52
dDatabase/Tables/CDBaseCombatAIComponentTable.cpp
Normal file
@@ -0,0 +1,52 @@
|
||||
#include "CDBaseCombatAIComponentTable.h"
|
||||
//Generated by xmlDb2dDatabaseGenerator on 2022-03-04 00:23:32.872243
|
||||
//DO NOT EDIT THIS FILE MANUALLY!
|
||||
|
||||
CDBaseCombatAIComponentTable::CDBaseCombatAIComponentTable() {
|
||||
unsigned int size = 0;
|
||||
auto tableSize = CDClientDatabase::ExecuteQuery("SELECT COUNT(*) FROM BaseCombatAIComponent");
|
||||
while (!tableSize.eof()) {
|
||||
size = tableSize.getIntField(0, 0);
|
||||
tableSize.nextRow();
|
||||
}
|
||||
|
||||
tableSize.finalize();
|
||||
this->m_entries.reserve(size);
|
||||
|
||||
auto tableData = CDClientDatabase::ExecuteQuery("SELECT * FROM BaseCombatAIComponent");
|
||||
while (!tableData.eof()) {
|
||||
CDBaseCombatAIComponent entry;
|
||||
entry.id = tableData.getIntField(0, int{});
|
||||
entry.behaviorType = tableData.getIntField(1, int{});
|
||||
entry.combatRoundLength = tableData.getFloatField(2, float{});
|
||||
entry.combatRole = tableData.getIntField(3, int{});
|
||||
entry.minRoundLength = tableData.getFloatField(4, float{});
|
||||
entry.maxRoundLength = tableData.getFloatField(5, float{});
|
||||
entry.tetherSpeed = tableData.getFloatField(6, float{});
|
||||
entry.pursuitSpeed = tableData.getFloatField(7, float{});
|
||||
entry.combatStartDelay = tableData.getFloatField(8, float{});
|
||||
this->m_entries.push_back(entry);
|
||||
tableData.nextRow();
|
||||
}
|
||||
|
||||
tableData.finalize();
|
||||
}
|
||||
|
||||
CDBaseCombatAIComponentTable::~CDBaseCombatAIComponentTable() {
|
||||
}
|
||||
|
||||
std::string CDBaseCombatAIComponentTable::GetName(void) const {
|
||||
return "BaseCombatAIComponent";
|
||||
}
|
||||
|
||||
std::vector<CDBaseCombatAIComponent> CDBaseCombatAIComponentTable::Query(std::function<bool(CDBaseCombatAIComponent)> predicate) {
|
||||
std::vector<CDBaseCombatAIComponent> data = cpplinq::from(this->m_entries)
|
||||
>> cpplinq::where(predicate)
|
||||
>> cpplinq::to_vector();
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
std::vector<CDBaseCombatAIComponent> CDBaseCombatAIComponentTable::GetEntries(void) const {
|
||||
return this->m_entries;
|
||||
}
|
||||
29
dDatabase/Tables/CDBaseCombatAIComponentTable.h
Normal file
29
dDatabase/Tables/CDBaseCombatAIComponentTable.h
Normal file
@@ -0,0 +1,29 @@
|
||||
#pragma once
|
||||
#include "CDTable.h"
|
||||
|
||||
//Generated by xmlDb2dDatabaseGenerator on 2022-03-04 00:23:32.870909
|
||||
//DO NOT EDIT THIS FILE MANUALLY!
|
||||
|
||||
struct CDBaseCombatAIComponent {
|
||||
int id;
|
||||
int behaviorType;
|
||||
float combatRoundLength;
|
||||
int combatRole;
|
||||
float minRoundLength;
|
||||
float maxRoundLength;
|
||||
float tetherSpeed;
|
||||
float pursuitSpeed;
|
||||
float combatStartDelay;
|
||||
};
|
||||
|
||||
class CDBaseCombatAIComponentTable : public CDTable {
|
||||
private:
|
||||
std::vector<CDBaseCombatAIComponent> m_entries;
|
||||
public:
|
||||
CDBaseCombatAIComponentTable();
|
||||
~CDBaseCombatAIComponentTable();
|
||||
std::string GetName(void) const override;
|
||||
|
||||
std::vector<CDBaseCombatAIComponent> Query(std::function<bool(CDBaseCombatAIComponent)> predicate);
|
||||
std::vector<CDBaseCombatAIComponent> GetEntries(void) const;
|
||||
};
|
||||
78
dDatabase/Tables/CDBehaviorEffectTable.cpp
Normal file
78
dDatabase/Tables/CDBehaviorEffectTable.cpp
Normal file
@@ -0,0 +1,78 @@
|
||||
#include "CDBehaviorEffectTable.h"
|
||||
//Generated by xmlDb2dDatabaseGenerator on 2022-03-04 00:23:32.876159
|
||||
//DO NOT EDIT THIS FILE MANUALLY!
|
||||
|
||||
CDBehaviorEffectTable::CDBehaviorEffectTable() {
|
||||
unsigned int size = 0;
|
||||
auto tableSize = CDClientDatabase::ExecuteQuery("SELECT COUNT(*) FROM BehaviorEffect");
|
||||
while (!tableSize.eof()) {
|
||||
size = tableSize.getIntField(0, 0);
|
||||
tableSize.nextRow();
|
||||
}
|
||||
|
||||
tableSize.finalize();
|
||||
this->m_entries.reserve(size);
|
||||
|
||||
auto tableData = CDClientDatabase::ExecuteQuery("SELECT * FROM BehaviorEffect");
|
||||
while (!tableData.eof()) {
|
||||
CDBehaviorEffect entry;
|
||||
entry.effectID = tableData.getIntField(0, int{});
|
||||
entry.effectType = tableData.getStringField(1, std::string{}.c_str());
|
||||
entry.effectName = tableData.getStringField(2, std::string{}.c_str());
|
||||
entry.trailID = tableData.getIntField(3, int{});
|
||||
entry.pcreateDuration = tableData.getFloatField(4, float{});
|
||||
entry.soundName = tableData.getStringField(5, std::string{}.c_str());
|
||||
entry.animationName = tableData.getStringField(6, std::string{}.c_str());
|
||||
entry.attachToObject = tableData.getIntField(7, bool{});
|
||||
entry.boneName = tableData.getStringField(8, std::string{}.c_str());
|
||||
entry.useSecondary = tableData.getIntField(9, bool{});
|
||||
entry.soundIs3D = tableData.getIntField(10, bool{});
|
||||
entry.cameraEffectType = tableData.getIntField(11, int{});
|
||||
entry.cameraDuration = tableData.getFloatField(12, float{});
|
||||
entry.cameraFrequency = tableData.getFloatField(13, float{});
|
||||
entry.cameraXAmp = tableData.getFloatField(14, float{});
|
||||
entry.cameraYAmp = tableData.getFloatField(15, float{});
|
||||
entry.cameraZAmp = tableData.getFloatField(16, float{});
|
||||
entry.cameraRotFrequency = tableData.getFloatField(17, float{});
|
||||
entry.cameraRoll = tableData.getFloatField(18, float{});
|
||||
entry.cameraPitch = tableData.getFloatField(19, float{});
|
||||
entry.cameraYaw = tableData.getFloatField(20, float{});
|
||||
entry.AudioEventGUID = tableData.getStringField(21, std::string{}.c_str());
|
||||
entry.renderEffectType = tableData.getIntField(22, int{});
|
||||
entry.renderEffectTime = tableData.getFloatField(23, float{});
|
||||
entry.renderStartVal = tableData.getFloatField(24, float{});
|
||||
entry.renderEndVal = tableData.getFloatField(25, float{});
|
||||
entry.renderDelayVal = tableData.getFloatField(26, float{});
|
||||
entry.renderValue1 = tableData.getFloatField(27, float{});
|
||||
entry.renderValue2 = tableData.getFloatField(28, float{});
|
||||
entry.renderValue3 = tableData.getFloatField(29, float{});
|
||||
entry.renderRGBA = tableData.getStringField(30, std::string{}.c_str());
|
||||
entry.renderShaderVal = tableData.getIntField(31, int{});
|
||||
entry.motionID = tableData.getIntField(32, int{});
|
||||
entry.meshID = tableData.getIntField(33, int{});
|
||||
entry.meshDuration = tableData.getFloatField(34, float{});
|
||||
this->m_entries.push_back(entry);
|
||||
tableData.nextRow();
|
||||
}
|
||||
|
||||
tableData.finalize();
|
||||
}
|
||||
|
||||
CDBehaviorEffectTable::~CDBehaviorEffectTable() {
|
||||
}
|
||||
|
||||
std::string CDBehaviorEffectTable::GetName(void) const {
|
||||
return "BehaviorEffect";
|
||||
}
|
||||
|
||||
std::vector<CDBehaviorEffect> CDBehaviorEffectTable::Query(std::function<bool(CDBehaviorEffect)> predicate) {
|
||||
std::vector<CDBehaviorEffect> data = cpplinq::from(this->m_entries)
|
||||
>> cpplinq::where(predicate)
|
||||
>> cpplinq::to_vector();
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
std::vector<CDBehaviorEffect> CDBehaviorEffectTable::GetEntries(void) const {
|
||||
return this->m_entries;
|
||||
}
|
||||
55
dDatabase/Tables/CDBehaviorEffectTable.h
Normal file
55
dDatabase/Tables/CDBehaviorEffectTable.h
Normal file
@@ -0,0 +1,55 @@
|
||||
#pragma once
|
||||
#include "CDTable.h"
|
||||
|
||||
//Generated by xmlDb2dDatabaseGenerator on 2022-03-04 00:23:32.874163
|
||||
//DO NOT EDIT THIS FILE MANUALLY!
|
||||
|
||||
struct CDBehaviorEffect {
|
||||
int effectID;
|
||||
std::string effectType;
|
||||
std::string effectName;
|
||||
int trailID;
|
||||
float pcreateDuration;
|
||||
std::string soundName;
|
||||
std::string animationName;
|
||||
bool attachToObject;
|
||||
std::string boneName;
|
||||
bool useSecondary;
|
||||
bool soundIs3D;
|
||||
int cameraEffectType;
|
||||
float cameraDuration;
|
||||
float cameraFrequency;
|
||||
float cameraXAmp;
|
||||
float cameraYAmp;
|
||||
float cameraZAmp;
|
||||
float cameraRotFrequency;
|
||||
float cameraRoll;
|
||||
float cameraPitch;
|
||||
float cameraYaw;
|
||||
std::string AudioEventGUID;
|
||||
int renderEffectType;
|
||||
float renderEffectTime;
|
||||
float renderStartVal;
|
||||
float renderEndVal;
|
||||
float renderDelayVal;
|
||||
float renderValue1;
|
||||
float renderValue2;
|
||||
float renderValue3;
|
||||
std::string renderRGBA;
|
||||
int renderShaderVal;
|
||||
int motionID;
|
||||
int meshID;
|
||||
float meshDuration;
|
||||
};
|
||||
|
||||
class CDBehaviorEffectTable : public CDTable {
|
||||
private:
|
||||
std::vector<CDBehaviorEffect> m_entries;
|
||||
public:
|
||||
CDBehaviorEffectTable();
|
||||
~CDBehaviorEffectTable();
|
||||
std::string GetName(void) const override;
|
||||
|
||||
std::vector<CDBehaviorEffect> Query(std::function<bool(CDBehaviorEffect)> predicate);
|
||||
std::vector<CDBehaviorEffect> GetEntries(void) const;
|
||||
};
|
||||
@@ -1,90 +1,47 @@
|
||||
#include "CDBehaviorParameterTable.h"
|
||||
#include "GeneralUtils.h"
|
||||
//Generated by xmlDb2dDatabaseGenerator on 2022-03-04 00:23:32.881145
|
||||
//DO NOT EDIT THIS FILE MANUALLY!
|
||||
|
||||
//! Constructor
|
||||
CDBehaviorParameterTable::CDBehaviorParameterTable(void) {
|
||||
#ifdef CDCLIENT_CACHE_ALL
|
||||
auto tableData = CDClientDatabase::ExecuteQuery("SELECT * FROM BehaviorParameter");
|
||||
while (!tableData.eof()) {
|
||||
CDBehaviorParameter entry;
|
||||
entry.behaviorID = tableData.getIntField(0, -1);
|
||||
entry.parameterID = tableData.getStringField(1, "");
|
||||
entry.value = tableData.getFloatField(2, -1.0f);
|
||||
CDBehaviorParameterTable::CDBehaviorParameterTable() {
|
||||
unsigned int size = 0;
|
||||
auto tableSize = CDClientDatabase::ExecuteQuery("SELECT COUNT(*) FROM BehaviorParameter");
|
||||
while (!tableSize.eof()) {
|
||||
size = tableSize.getIntField(0, 0);
|
||||
tableSize.nextRow();
|
||||
}
|
||||
|
||||
//Check if we have an entry with this ID:
|
||||
auto it = m_entries.find(entry.behaviorID);
|
||||
if (it != m_entries.end()) {
|
||||
it->second.insert(std::make_pair(entry.parameterID, entry.value));
|
||||
}
|
||||
else {
|
||||
//Otherwise, insert it:
|
||||
m_entries.insert(std::make_pair(entry.behaviorID, std::map<std::string, float>()));
|
||||
auto jit = m_entries.find(entry.behaviorID);
|
||||
tableSize.finalize();
|
||||
this->m_entries.reserve(size);
|
||||
|
||||
//Add our value as well:
|
||||
jit->second.insert(std::make_pair(entry.parameterID, entry.value));
|
||||
}
|
||||
|
||||
tableData.nextRow();
|
||||
}
|
||||
auto tableData = CDClientDatabase::ExecuteQuery("SELECT * FROM BehaviorParameter");
|
||||
while (!tableData.eof()) {
|
||||
CDBehaviorParameter entry;
|
||||
entry.behaviorID = tableData.getIntField(0, int{});
|
||||
entry.parameterID = tableData.getStringField(1, std::string{}.c_str());
|
||||
entry.value = tableData.getFloatField(2, float{});
|
||||
entry._internalSkillID = tableData.getIntField(3, int{});
|
||||
this->m_entries.push_back(entry);
|
||||
tableData.nextRow();
|
||||
}
|
||||
|
||||
tableData.finalize();
|
||||
#endif
|
||||
}
|
||||
|
||||
//! Destructor
|
||||
CDBehaviorParameterTable::~CDBehaviorParameterTable(void) { }
|
||||
CDBehaviorParameterTable::~CDBehaviorParameterTable() {
|
||||
}
|
||||
|
||||
//! Returns the table's name
|
||||
std::string CDBehaviorParameterTable::GetName(void) const {
|
||||
return "BehaviorParameter";
|
||||
return "BehaviorParameter";
|
||||
}
|
||||
|
||||
float CDBehaviorParameterTable::GetEntry(const uint32_t behaviorID, const std::string& name, const float defaultValue)
|
||||
{
|
||||
size_t hash = 0;
|
||||
GeneralUtils::hash_combine(hash, behaviorID);
|
||||
GeneralUtils::hash_combine(hash, name);
|
||||
std::vector<CDBehaviorParameter> CDBehaviorParameterTable::Query(std::function<bool(CDBehaviorParameter)> predicate) {
|
||||
std::vector<CDBehaviorParameter> data = cpplinq::from(this->m_entries)
|
||||
>> cpplinq::where(predicate)
|
||||
>> cpplinq::to_vector();
|
||||
|
||||
// Search for specific parameter
|
||||
const auto& it = m_Entries.find(hash);
|
||||
if (it != m_Entries.end()) {
|
||||
return it->second;
|
||||
}
|
||||
|
||||
// Check if this behavior has already been checked
|
||||
const auto& itChecked = m_Entries.find(behaviorID);
|
||||
if (itChecked != m_Entries.end()) {
|
||||
return defaultValue;
|
||||
}
|
||||
|
||||
#ifndef CDCLIENT_CACHE_ALL
|
||||
std::stringstream query;
|
||||
|
||||
query << "SELECT parameterID, value FROM BehaviorParameter WHERE behaviorID = " << std::to_string(behaviorID);
|
||||
|
||||
auto tableData = CDClientDatabase::ExecuteQuery(query.str());
|
||||
|
||||
m_Entries.insert_or_assign(behaviorID, 0);
|
||||
|
||||
while (!tableData.eof()) {
|
||||
const std::string parameterID = tableData.getStringField(0, "");
|
||||
const float value = tableData.getFloatField(1, 0);
|
||||
|
||||
size_t parameterHash = 0;
|
||||
GeneralUtils::hash_combine(parameterHash, behaviorID);
|
||||
GeneralUtils::hash_combine(parameterHash, parameterID);
|
||||
|
||||
m_Entries.insert_or_assign(parameterHash, value);
|
||||
|
||||
tableData.nextRow();
|
||||
}
|
||||
|
||||
const auto& it2 = m_Entries.find(hash);
|
||||
if (it2 != m_Entries.end()) {
|
||||
return it2->second;
|
||||
}
|
||||
#endif
|
||||
|
||||
return defaultValue;
|
||||
return data;
|
||||
}
|
||||
|
||||
std::vector<CDBehaviorParameter> CDBehaviorParameterTable::GetEntries(void) const {
|
||||
return this->m_entries;
|
||||
}
|
||||
|
||||
@@ -1,39 +1,24 @@
|
||||
#pragma once
|
||||
|
||||
// Custom Classes
|
||||
#include "CDTable.h"
|
||||
#include <map>
|
||||
|
||||
/*!
|
||||
\file CDBehaviorParameterTable.hpp
|
||||
\brief Contains data for the BehaviorParameter table
|
||||
*/
|
||||
//Generated by xmlDb2dDatabaseGenerator on 2022-03-04 00:23:32.879169
|
||||
//DO NOT EDIT THIS FILE MANUALLY!
|
||||
|
||||
//! BehaviorParameter Entry Struct
|
||||
struct CDBehaviorParameter {
|
||||
unsigned int behaviorID; //!< The Behavior ID
|
||||
std::string parameterID; //!< The Parameter ID
|
||||
float value; //!< The value of the behavior template
|
||||
int behaviorID;
|
||||
std::string parameterID;
|
||||
float value;
|
||||
int _internalSkillID;
|
||||
};
|
||||
|
||||
//! BehaviorParameter table
|
||||
class CDBehaviorParameterTable : public CDTable {
|
||||
private:
|
||||
std::map<size_t, float> m_Entries;
|
||||
|
||||
std::vector<CDBehaviorParameter> m_entries;
|
||||
public:
|
||||
|
||||
//! Constructor
|
||||
CDBehaviorParameterTable(void);
|
||||
|
||||
//! Destructor
|
||||
~CDBehaviorParameterTable(void);
|
||||
|
||||
//! Returns the table's name
|
||||
/*!
|
||||
\return The table name
|
||||
*/
|
||||
std::string GetName(void) const override;
|
||||
|
||||
float GetEntry(const uint32_t behaviorID, const std::string& name, const float defaultValue = 0);
|
||||
CDBehaviorParameterTable();
|
||||
~CDBehaviorParameterTable();
|
||||
std::string GetName(void) const override;
|
||||
|
||||
std::vector<CDBehaviorParameter> Query(std::function<bool(CDBehaviorParameter)> predicate);
|
||||
std::vector<CDBehaviorParameter> GetEntries(void) const;
|
||||
};
|
||||
|
||||
45
dDatabase/Tables/CDBehaviorTemplateNameTable.cpp
Normal file
45
dDatabase/Tables/CDBehaviorTemplateNameTable.cpp
Normal file
@@ -0,0 +1,45 @@
|
||||
#include "CDBehaviorTemplateNameTable.h"
|
||||
//Generated by xmlDb2dDatabaseGenerator on 2022-03-04 00:23:32.888126
|
||||
//DO NOT EDIT THIS FILE MANUALLY!
|
||||
|
||||
CDBehaviorTemplateNameTable::CDBehaviorTemplateNameTable() {
|
||||
unsigned int size = 0;
|
||||
auto tableSize = CDClientDatabase::ExecuteQuery("SELECT COUNT(*) FROM BehaviorTemplateName");
|
||||
while (!tableSize.eof()) {
|
||||
size = tableSize.getIntField(0, 0);
|
||||
tableSize.nextRow();
|
||||
}
|
||||
|
||||
tableSize.finalize();
|
||||
this->m_entries.reserve(size);
|
||||
|
||||
auto tableData = CDClientDatabase::ExecuteQuery("SELECT * FROM BehaviorTemplateName");
|
||||
while (!tableData.eof()) {
|
||||
CDBehaviorTemplateName entry;
|
||||
entry.templateID = tableData.getIntField(0, int{});
|
||||
entry.name = tableData.getStringField(1, std::string{}.c_str());
|
||||
this->m_entries.push_back(entry);
|
||||
tableData.nextRow();
|
||||
}
|
||||
|
||||
tableData.finalize();
|
||||
}
|
||||
|
||||
CDBehaviorTemplateNameTable::~CDBehaviorTemplateNameTable() {
|
||||
}
|
||||
|
||||
std::string CDBehaviorTemplateNameTable::GetName(void) const {
|
||||
return "BehaviorTemplateName";
|
||||
}
|
||||
|
||||
std::vector<CDBehaviorTemplateName> CDBehaviorTemplateNameTable::Query(std::function<bool(CDBehaviorTemplateName)> predicate) {
|
||||
std::vector<CDBehaviorTemplateName> data = cpplinq::from(this->m_entries)
|
||||
>> cpplinq::where(predicate)
|
||||
>> cpplinq::to_vector();
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
std::vector<CDBehaviorTemplateName> CDBehaviorTemplateNameTable::GetEntries(void) const {
|
||||
return this->m_entries;
|
||||
}
|
||||
22
dDatabase/Tables/CDBehaviorTemplateNameTable.h
Normal file
22
dDatabase/Tables/CDBehaviorTemplateNameTable.h
Normal file
@@ -0,0 +1,22 @@
|
||||
#pragma once
|
||||
#include "CDTable.h"
|
||||
|
||||
//Generated by xmlDb2dDatabaseGenerator on 2022-03-04 00:23:32.887128
|
||||
//DO NOT EDIT THIS FILE MANUALLY!
|
||||
|
||||
struct CDBehaviorTemplateName {
|
||||
int templateID;
|
||||
std::string name;
|
||||
};
|
||||
|
||||
class CDBehaviorTemplateNameTable : public CDTable {
|
||||
private:
|
||||
std::vector<CDBehaviorTemplateName> m_entries;
|
||||
public:
|
||||
CDBehaviorTemplateNameTable();
|
||||
~CDBehaviorTemplateNameTable();
|
||||
std::string GetName(void) const override;
|
||||
|
||||
std::vector<CDBehaviorTemplateName> Query(std::function<bool(CDBehaviorTemplateName)> predicate);
|
||||
std::vector<CDBehaviorTemplateName> GetEntries(void) const;
|
||||
};
|
||||
@@ -1,57 +1,47 @@
|
||||
#include "CDBehaviorTemplateTable.h"
|
||||
//Generated by xmlDb2dDatabaseGenerator on 2022-03-04 00:23:32.885134
|
||||
//DO NOT EDIT THIS FILE MANUALLY!
|
||||
|
||||
CDBehaviorTemplateTable::CDBehaviorTemplateTable() {
|
||||
unsigned int size = 0;
|
||||
auto tableSize = CDClientDatabase::ExecuteQuery("SELECT COUNT(*) FROM BehaviorTemplate");
|
||||
while (!tableSize.eof()) {
|
||||
size = tableSize.getIntField(0, 0);
|
||||
tableSize.nextRow();
|
||||
}
|
||||
|
||||
//! Constructor
|
||||
CDBehaviorTemplateTable::CDBehaviorTemplateTable(void) {
|
||||
|
||||
// First, get the size of the table
|
||||
unsigned int size = 0;
|
||||
auto tableSize = CDClientDatabase::ExecuteQuery("SELECT COUNT(*) FROM BehaviorTemplate");
|
||||
while (!tableSize.eof()) {
|
||||
size = tableSize.getIntField(0, 0);
|
||||
|
||||
tableSize.nextRow();
|
||||
}
|
||||
|
||||
tableSize.finalize();
|
||||
|
||||
// Reserve the size
|
||||
this->entries.reserve(size);
|
||||
|
||||
// Now get the data
|
||||
auto tableData = CDClientDatabase::ExecuteQuery("SELECT * FROM BehaviorTemplate");
|
||||
while (!tableData.eof()) {
|
||||
CDBehaviorTemplate entry;
|
||||
entry.behaviorID = tableData.getIntField(0, -1);
|
||||
entry.templateID = tableData.getIntField(1, -1);
|
||||
entry.effectID = tableData.getIntField(2, -1);
|
||||
entry.effectHandle = tableData.getStringField(3, "");
|
||||
|
||||
this->entries.push_back(entry);
|
||||
tableData.nextRow();
|
||||
}
|
||||
this->m_entries.reserve(size);
|
||||
|
||||
auto tableData = CDClientDatabase::ExecuteQuery("SELECT * FROM BehaviorTemplate");
|
||||
while (!tableData.eof()) {
|
||||
CDBehaviorTemplate entry;
|
||||
entry.behaviorID = tableData.getIntField(0, int{});
|
||||
entry.templateID = tableData.getIntField(1, int{});
|
||||
entry.effectID = tableData.getIntField(2, int{});
|
||||
entry.effectHandle = tableData.getStringField(3, std::string{}.c_str());
|
||||
this->m_entries.push_back(entry);
|
||||
tableData.nextRow();
|
||||
}
|
||||
|
||||
tableData.finalize();
|
||||
}
|
||||
|
||||
//! Destructor
|
||||
CDBehaviorTemplateTable::~CDBehaviorTemplateTable(void) { }
|
||||
CDBehaviorTemplateTable::~CDBehaviorTemplateTable() {
|
||||
}
|
||||
|
||||
//! Returns the table's name
|
||||
std::string CDBehaviorTemplateTable::GetName(void) const {
|
||||
return "BehaviorTemplate";
|
||||
return "BehaviorTemplate";
|
||||
}
|
||||
|
||||
//! Queries the table with a custom "where" clause
|
||||
std::vector<CDBehaviorTemplate> CDBehaviorTemplateTable::Query(std::function<bool(CDBehaviorTemplate)> predicate) {
|
||||
|
||||
std::vector<CDBehaviorTemplate> data = cpplinq::from(this->entries)
|
||||
>> cpplinq::where(predicate)
|
||||
>> cpplinq::to_vector();
|
||||
|
||||
return data;
|
||||
std::vector<CDBehaviorTemplate> data = cpplinq::from(this->m_entries)
|
||||
>> cpplinq::where(predicate)
|
||||
>> cpplinq::to_vector();
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
//! Gets all the entries in the table
|
||||
std::vector<CDBehaviorTemplate> CDBehaviorTemplateTable::GetEntries(void) const {
|
||||
return this->entries;
|
||||
return this->m_entries;
|
||||
}
|
||||
|
||||
@@ -1,51 +1,24 @@
|
||||
#pragma once
|
||||
|
||||
// Custom Classes
|
||||
#include "CDTable.h"
|
||||
|
||||
/*!
|
||||
\file CDBehaviorTemplateTable.hpp
|
||||
\brief Contains data for the BehaviorTemplate table
|
||||
*/
|
||||
//Generated by xmlDb2dDatabaseGenerator on 2022-03-04 00:23:32.884137
|
||||
//DO NOT EDIT THIS FILE MANUALLY!
|
||||
|
||||
//! BehaviorTemplate Entry Struct
|
||||
struct CDBehaviorTemplate {
|
||||
unsigned int behaviorID; //!< The Behavior ID
|
||||
unsigned int templateID; //!< The Template ID (LOT)
|
||||
unsigned int effectID; //!< The Effect ID attached
|
||||
std::string effectHandle; //!< The effect handle
|
||||
int behaviorID;
|
||||
int templateID;
|
||||
int effectID;
|
||||
std::string effectHandle;
|
||||
};
|
||||
|
||||
|
||||
//! BehaviorTemplate table
|
||||
class CDBehaviorTemplateTable : public CDTable {
|
||||
private:
|
||||
std::vector<CDBehaviorTemplate> entries;
|
||||
|
||||
std::vector<CDBehaviorTemplate> m_entries;
|
||||
public:
|
||||
|
||||
//! Constructor
|
||||
CDBehaviorTemplateTable(void);
|
||||
|
||||
//! Destructor
|
||||
~CDBehaviorTemplateTable(void);
|
||||
|
||||
//! Returns the table's name
|
||||
/*!
|
||||
\return The table name
|
||||
*/
|
||||
std::string GetName(void) const override;
|
||||
|
||||
//! Queries the table with a custom "where" clause
|
||||
/*!
|
||||
\param predicate The predicate
|
||||
*/
|
||||
std::vector<CDBehaviorTemplate> Query(std::function<bool(CDBehaviorTemplate)> predicate);
|
||||
|
||||
//! Gets all the entries in the table
|
||||
/*!
|
||||
\return The entries
|
||||
*/
|
||||
std::vector<CDBehaviorTemplate> GetEntries(void) const;
|
||||
|
||||
CDBehaviorTemplateTable();
|
||||
~CDBehaviorTemplateTable();
|
||||
std::string GetName(void) const override;
|
||||
|
||||
std::vector<CDBehaviorTemplate> Query(std::function<bool(CDBehaviorTemplate)> predicate);
|
||||
std::vector<CDBehaviorTemplate> GetEntries(void) const;
|
||||
};
|
||||
|
||||
55
dDatabase/Tables/CDBlueprintsTable.cpp
Normal file
55
dDatabase/Tables/CDBlueprintsTable.cpp
Normal file
@@ -0,0 +1,55 @@
|
||||
#include "CDBlueprintsTable.h"
|
||||
//Generated by xmlDb2dDatabaseGenerator on 2022-03-04 00:23:32.893113
|
||||
//DO NOT EDIT THIS FILE MANUALLY!
|
||||
|
||||
CDBlueprintsTable::CDBlueprintsTable() {
|
||||
unsigned int size = 0;
|
||||
auto tableSize = CDClientDatabase::ExecuteQuery("SELECT COUNT(*) FROM Blueprints");
|
||||
while (!tableSize.eof()) {
|
||||
size = tableSize.getIntField(0, 0);
|
||||
tableSize.nextRow();
|
||||
}
|
||||
|
||||
tableSize.finalize();
|
||||
this->m_entries.reserve(size);
|
||||
|
||||
auto tableData = CDClientDatabase::ExecuteQuery("SELECT * FROM Blueprints");
|
||||
while (!tableData.eof()) {
|
||||
CDBlueprints entry;
|
||||
entry.id = tableData.getInt64Field(0, uint64_t{});
|
||||
entry.name = tableData.getStringField(1, std::string{}.c_str());
|
||||
entry.description = tableData.getStringField(2, std::string{}.c_str());
|
||||
entry.accountid = tableData.getInt64Field(3, uint64_t{});
|
||||
entry.characterid = tableData.getInt64Field(4, uint64_t{});
|
||||
entry.price = tableData.getIntField(5, int{});
|
||||
entry.rating = tableData.getIntField(6, int{});
|
||||
entry.categoryid = tableData.getIntField(7, int{});
|
||||
entry.lxfpath = tableData.getStringField(8, std::string{}.c_str());
|
||||
entry.deleted = tableData.getIntField(9, bool{});
|
||||
entry.created = tableData.getStringField(10, std::string{}.c_str());
|
||||
entry.modified = tableData.getStringField(11, std::string{}.c_str());
|
||||
this->m_entries.push_back(entry);
|
||||
tableData.nextRow();
|
||||
}
|
||||
|
||||
tableData.finalize();
|
||||
}
|
||||
|
||||
CDBlueprintsTable::~CDBlueprintsTable() {
|
||||
}
|
||||
|
||||
std::string CDBlueprintsTable::GetName(void) const {
|
||||
return "Blueprints";
|
||||
}
|
||||
|
||||
std::vector<CDBlueprints> CDBlueprintsTable::Query(std::function<bool(CDBlueprints)> predicate) {
|
||||
std::vector<CDBlueprints> data = cpplinq::from(this->m_entries)
|
||||
>> cpplinq::where(predicate)
|
||||
>> cpplinq::to_vector();
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
std::vector<CDBlueprints> CDBlueprintsTable::GetEntries(void) const {
|
||||
return this->m_entries;
|
||||
}
|
||||
32
dDatabase/Tables/CDBlueprintsTable.h
Normal file
32
dDatabase/Tables/CDBlueprintsTable.h
Normal file
@@ -0,0 +1,32 @@
|
||||
#pragma once
|
||||
#include "CDTable.h"
|
||||
|
||||
//Generated by xmlDb2dDatabaseGenerator on 2022-03-04 00:23:32.892149
|
||||
//DO NOT EDIT THIS FILE MANUALLY!
|
||||
|
||||
struct CDBlueprints {
|
||||
uint64_t id;
|
||||
std::string name;
|
||||
std::string description;
|
||||
uint64_t accountid;
|
||||
uint64_t characterid;
|
||||
int price;
|
||||
int rating;
|
||||
int categoryid;
|
||||
std::string lxfpath;
|
||||
bool deleted;
|
||||
std::string created;
|
||||
std::string modified;
|
||||
};
|
||||
|
||||
class CDBlueprintsTable : public CDTable {
|
||||
private:
|
||||
std::vector<CDBlueprints> m_entries;
|
||||
public:
|
||||
CDBlueprintsTable();
|
||||
~CDBlueprintsTable();
|
||||
std::string GetName(void) const override;
|
||||
|
||||
std::vector<CDBlueprints> Query(std::function<bool(CDBlueprints)> predicate);
|
||||
std::vector<CDBlueprints> GetEntries(void) const;
|
||||
};
|
||||
53
dDatabase/Tables/CDBrickColorsTable.cpp
Normal file
53
dDatabase/Tables/CDBrickColorsTable.cpp
Normal file
@@ -0,0 +1,53 @@
|
||||
#include "CDBrickColorsTable.h"
|
||||
//Generated by xmlDb2dDatabaseGenerator on 2022-03-04 00:23:32.901091
|
||||
//DO NOT EDIT THIS FILE MANUALLY!
|
||||
|
||||
CDBrickColorsTable::CDBrickColorsTable() {
|
||||
unsigned int size = 0;
|
||||
auto tableSize = CDClientDatabase::ExecuteQuery("SELECT COUNT(*) FROM BrickColors");
|
||||
while (!tableSize.eof()) {
|
||||
size = tableSize.getIntField(0, 0);
|
||||
tableSize.nextRow();
|
||||
}
|
||||
|
||||
tableSize.finalize();
|
||||
this->m_entries.reserve(size);
|
||||
|
||||
auto tableData = CDClientDatabase::ExecuteQuery("SELECT * FROM BrickColors");
|
||||
while (!tableData.eof()) {
|
||||
CDBrickColors entry;
|
||||
entry.id = tableData.getIntField(0, int{});
|
||||
entry.red = tableData.getFloatField(1, float{});
|
||||
entry.green = tableData.getFloatField(2, float{});
|
||||
entry.blue = tableData.getFloatField(3, float{});
|
||||
entry.alpha = tableData.getFloatField(4, float{});
|
||||
entry.legopaletteid = tableData.getIntField(5, int{});
|
||||
entry.description = tableData.getStringField(6, std::string{}.c_str());
|
||||
entry.validTypes = tableData.getIntField(7, int{});
|
||||
entry.validCharacters = tableData.getIntField(8, int{});
|
||||
entry.factoryValid = tableData.getIntField(9, bool{});
|
||||
this->m_entries.push_back(entry);
|
||||
tableData.nextRow();
|
||||
}
|
||||
|
||||
tableData.finalize();
|
||||
}
|
||||
|
||||
CDBrickColorsTable::~CDBrickColorsTable() {
|
||||
}
|
||||
|
||||
std::string CDBrickColorsTable::GetName(void) const {
|
||||
return "BrickColors";
|
||||
}
|
||||
|
||||
std::vector<CDBrickColors> CDBrickColorsTable::Query(std::function<bool(CDBrickColors)> predicate) {
|
||||
std::vector<CDBrickColors> data = cpplinq::from(this->m_entries)
|
||||
>> cpplinq::where(predicate)
|
||||
>> cpplinq::to_vector();
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
std::vector<CDBrickColors> CDBrickColorsTable::GetEntries(void) const {
|
||||
return this->m_entries;
|
||||
}
|
||||
30
dDatabase/Tables/CDBrickColorsTable.h
Normal file
30
dDatabase/Tables/CDBrickColorsTable.h
Normal file
@@ -0,0 +1,30 @@
|
||||
#pragma once
|
||||
#include "CDTable.h"
|
||||
|
||||
//Generated by xmlDb2dDatabaseGenerator on 2022-03-04 00:23:32.900094
|
||||
//DO NOT EDIT THIS FILE MANUALLY!
|
||||
|
||||
struct CDBrickColors {
|
||||
int id;
|
||||
float red;
|
||||
float green;
|
||||
float blue;
|
||||
float alpha;
|
||||
int legopaletteid;
|
||||
std::string description;
|
||||
int validTypes;
|
||||
int validCharacters;
|
||||
bool factoryValid;
|
||||
};
|
||||
|
||||
class CDBrickColorsTable : public CDTable {
|
||||
private:
|
||||
std::vector<CDBrickColors> m_entries;
|
||||
public:
|
||||
CDBrickColorsTable();
|
||||
~CDBrickColorsTable();
|
||||
std::string GetName(void) const override;
|
||||
|
||||
std::vector<CDBrickColors> Query(std::function<bool(CDBrickColors)> predicate);
|
||||
std::vector<CDBrickColors> GetEntries(void) const;
|
||||
};
|
||||
@@ -1,55 +1,45 @@
|
||||
#include "CDBrickIDTableTable.h"
|
||||
//Generated by xmlDb2dDatabaseGenerator on 2022-03-04 00:23:32.904085
|
||||
//DO NOT EDIT THIS FILE MANUALLY!
|
||||
|
||||
//! Constructor
|
||||
CDBrickIDTableTable::CDBrickIDTableTable(void) {
|
||||
|
||||
// First, get the size of the table
|
||||
CDBrickIDTableTable::CDBrickIDTableTable() {
|
||||
unsigned int size = 0;
|
||||
auto tableSize = CDClientDatabase::ExecuteQuery("SELECT COUNT(*) FROM BrickIDTable");
|
||||
while (!tableSize.eof()) {
|
||||
while (!tableSize.eof()) {
|
||||
size = tableSize.getIntField(0, 0);
|
||||
|
||||
tableSize.nextRow();
|
||||
}
|
||||
|
||||
tableSize.finalize();
|
||||
|
||||
// Reserve the size
|
||||
this->entries.reserve(size);
|
||||
|
||||
// Now get the data
|
||||
tableSize.finalize();
|
||||
this->m_entries.reserve(size);
|
||||
|
||||
auto tableData = CDClientDatabase::ExecuteQuery("SELECT * FROM BrickIDTable");
|
||||
while (!tableData.eof()) {
|
||||
CDBrickIDTable entry;
|
||||
entry.NDObjectID = tableData.getIntField(0, -1);
|
||||
entry.LEGOBrickID = tableData.getIntField(1, -1);
|
||||
|
||||
this->entries.push_back(entry);
|
||||
entry.NDObjectID = tableData.getIntField(0, int{});
|
||||
entry.LEGOBrickID = tableData.getIntField(1, int{});
|
||||
this->m_entries.push_back(entry);
|
||||
tableData.nextRow();
|
||||
}
|
||||
|
||||
tableData.finalize();
|
||||
}
|
||||
|
||||
//! Destructor
|
||||
CDBrickIDTableTable::~CDBrickIDTableTable(void) { }
|
||||
CDBrickIDTableTable::~CDBrickIDTableTable() {
|
||||
}
|
||||
|
||||
//! Returns the table's name
|
||||
std::string CDBrickIDTableTable::GetName(void) const {
|
||||
return "BrickIDTable";
|
||||
}
|
||||
|
||||
//! Queries the table with a custom "where" clause
|
||||
std::vector<CDBrickIDTable> CDBrickIDTableTable::Query(std::function<bool(CDBrickIDTable)> predicate) {
|
||||
|
||||
std::vector<CDBrickIDTable> data = cpplinq::from(this->entries)
|
||||
std::vector<CDBrickIDTable> data = cpplinq::from(this->m_entries)
|
||||
>> cpplinq::where(predicate)
|
||||
>> cpplinq::to_vector();
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
//! Gets all the entries in the table
|
||||
std::vector<CDBrickIDTable> CDBrickIDTableTable::GetEntries(void) const {
|
||||
return this->entries;
|
||||
return this->m_entries;
|
||||
}
|
||||
|
||||
@@ -1,49 +1,22 @@
|
||||
#pragma once
|
||||
|
||||
// Custom Classes
|
||||
#include "CDTable.h"
|
||||
|
||||
/*!
|
||||
\file CDBrickIDTableTable.hpp
|
||||
\brief Contains data for the BrickIDTable table
|
||||
*/
|
||||
//Generated by xmlDb2dDatabaseGenerator on 2022-03-04 00:23:32.903102
|
||||
//DO NOT EDIT THIS FILE MANUALLY!
|
||||
|
||||
//! BrickIDTable Entry Struct
|
||||
struct CDBrickIDTable {
|
||||
unsigned int NDObjectID;
|
||||
unsigned int LEGOBrickID;
|
||||
int NDObjectID;
|
||||
int LEGOBrickID;
|
||||
};
|
||||
|
||||
|
||||
//! BrickIDTable table
|
||||
class CDBrickIDTableTable : public CDTable {
|
||||
private:
|
||||
std::vector<CDBrickIDTable> entries;
|
||||
|
||||
std::vector<CDBrickIDTable> m_entries;
|
||||
public:
|
||||
|
||||
//! Constructor
|
||||
CDBrickIDTableTable(void);
|
||||
|
||||
//! Destructor
|
||||
~CDBrickIDTableTable(void);
|
||||
|
||||
//! Returns the table's name
|
||||
/*!
|
||||
\return The table name
|
||||
*/
|
||||
CDBrickIDTableTable();
|
||||
~CDBrickIDTableTable();
|
||||
std::string GetName(void) const override;
|
||||
|
||||
//! Queries the table with a custom "where" clause
|
||||
/*!
|
||||
\param predicate The predicate
|
||||
*/
|
||||
std::vector<CDBrickIDTable> Query(std::function<bool(CDBrickIDTable)> predicate);
|
||||
|
||||
//! Gets all the entries in the table
|
||||
/*!
|
||||
\return The entries
|
||||
*/
|
||||
std::vector<CDBrickIDTable> Query(std::function<bool(CDBrickIDTable)> predicate);
|
||||
std::vector<CDBrickIDTable> GetEntries(void) const;
|
||||
|
||||
};
|
||||
|
||||
103
dDatabase/Tables/CDCameraTable.cpp
Normal file
103
dDatabase/Tables/CDCameraTable.cpp
Normal file
@@ -0,0 +1,103 @@
|
||||
#include "CDCameraTable.h"
|
||||
//Generated by xmlDb2dDatabaseGenerator on 2022-03-04 00:23:32.908279
|
||||
//DO NOT EDIT THIS FILE MANUALLY!
|
||||
|
||||
CDCameraTable::CDCameraTable() {
|
||||
unsigned int size = 0;
|
||||
auto tableSize = CDClientDatabase::ExecuteQuery("SELECT COUNT(*) FROM Camera");
|
||||
while (!tableSize.eof()) {
|
||||
size = tableSize.getIntField(0, 0);
|
||||
tableSize.nextRow();
|
||||
}
|
||||
|
||||
tableSize.finalize();
|
||||
this->m_entries.reserve(size);
|
||||
|
||||
auto tableData = CDClientDatabase::ExecuteQuery("SELECT * FROM Camera");
|
||||
while (!tableData.eof()) {
|
||||
CDCamera entry;
|
||||
entry.camera_name = tableData.getStringField(0, std::string{}.c_str());
|
||||
entry.pitch_angle_tolerance = tableData.getFloatField(1, float{});
|
||||
entry.starting_zoom = tableData.getFloatField(2, float{});
|
||||
entry.zoom_return_modifier = tableData.getFloatField(3, float{});
|
||||
entry.pitch_return_modifier = tableData.getFloatField(4, float{});
|
||||
entry.tether_out_return_modifier = tableData.getFloatField(5, float{});
|
||||
entry.tether_in_return_multiplier = tableData.getFloatField(6, float{});
|
||||
entry.verticle_movement_dampening_modifier = tableData.getFloatField(7, float{});
|
||||
entry.return_from_incline_modifier = tableData.getFloatField(8, float{});
|
||||
entry.horizontal_return_modifier = tableData.getFloatField(9, float{});
|
||||
entry.yaw_behavior_speed_multiplier = tableData.getFloatField(10, float{});
|
||||
entry.camera_collision_padding = tableData.getFloatField(11, float{});
|
||||
entry.glide_speed = tableData.getFloatField(12, float{});
|
||||
entry.fade_player_min_range = tableData.getFloatField(13, float{});
|
||||
entry.min_movement_delta_tolerance = tableData.getFloatField(14, float{});
|
||||
entry.min_glide_distance_tolerance = tableData.getFloatField(15, float{});
|
||||
entry.look_forward_offset = tableData.getFloatField(16, float{});
|
||||
entry.look_up_offset = tableData.getFloatField(17, float{});
|
||||
entry.minimum_vertical_dampening_distance = tableData.getFloatField(18, float{});
|
||||
entry.maximum_vertical_dampening_distance = tableData.getFloatField(19, float{});
|
||||
entry.minimum_ignore_jump_distance = tableData.getFloatField(20, float{});
|
||||
entry.maximum_ignore_jump_distance = tableData.getFloatField(21, float{});
|
||||
entry.maximum_auto_glide_angle = tableData.getFloatField(22, float{});
|
||||
entry.minimum_tether_glide_distance = tableData.getFloatField(23, float{});
|
||||
entry.yaw_sign_correction = tableData.getFloatField(24, float{});
|
||||
entry.set_1_look_forward_offset = tableData.getFloatField(25, float{});
|
||||
entry.set_1_look_up_offset = tableData.getFloatField(26, float{});
|
||||
entry.set_2_look_forward_offset = tableData.getFloatField(27, float{});
|
||||
entry.set_2_look_up_offset = tableData.getFloatField(28, float{});
|
||||
entry.set_0_speed_influence_on_dir = tableData.getFloatField(29, float{});
|
||||
entry.set_1_speed_influence_on_dir = tableData.getFloatField(30, float{});
|
||||
entry.set_2_speed_influence_on_dir = tableData.getFloatField(31, float{});
|
||||
entry.set_0_angular_relaxation = tableData.getFloatField(32, float{});
|
||||
entry.set_1_angular_relaxation = tableData.getFloatField(33, float{});
|
||||
entry.set_2_angular_relaxation = tableData.getFloatField(34, float{});
|
||||
entry.set_0_position_up_offset = tableData.getFloatField(35, float{});
|
||||
entry.set_1_position_up_offset = tableData.getFloatField(36, float{});
|
||||
entry.set_2_position_up_offset = tableData.getFloatField(37, float{});
|
||||
entry.set_0_position_forward_offset = tableData.getFloatField(38, float{});
|
||||
entry.set_1_position_forward_offset = tableData.getFloatField(39, float{});
|
||||
entry.set_2_position_forward_offset = tableData.getFloatField(40, float{});
|
||||
entry.set_0_FOV = tableData.getFloatField(41, float{});
|
||||
entry.set_1_FOV = tableData.getFloatField(42, float{});
|
||||
entry.set_2_FOV = tableData.getFloatField(43, float{});
|
||||
entry.set_0_max_yaw_angle = tableData.getFloatField(44, float{});
|
||||
entry.set_1_max_yaw_angle = tableData.getFloatField(45, float{});
|
||||
entry.set_2_max_yaw_angle = tableData.getFloatField(46, float{});
|
||||
entry.set_1_fade_in_camera_set_change = tableData.getIntField(47, int{});
|
||||
entry.set_1_fade_out_camera_set_change = tableData.getIntField(48, int{});
|
||||
entry.set_2_fade_in_camera_set_change = tableData.getIntField(49, int{});
|
||||
entry.set_2_fade_out_camera_set_change = tableData.getIntField(50, int{});
|
||||
entry.input_movement_scalar = tableData.getFloatField(51, float{});
|
||||
entry.input_rotation_scalar = tableData.getFloatField(52, float{});
|
||||
entry.input_zoom_scalar = tableData.getFloatField(53, float{});
|
||||
entry.minimum_pitch_desired = tableData.getFloatField(54, float{});
|
||||
entry.maximum_pitch_desired = tableData.getFloatField(55, float{});
|
||||
entry.minimum_zoom = tableData.getFloatField(56, float{});
|
||||
entry.maximum_zoom = tableData.getFloatField(57, float{});
|
||||
entry.horizontal_rotate_tolerance = tableData.getFloatField(58, float{});
|
||||
entry.horizontal_rotate_modifier = tableData.getFloatField(59, float{});
|
||||
this->m_entries.push_back(entry);
|
||||
tableData.nextRow();
|
||||
}
|
||||
|
||||
tableData.finalize();
|
||||
}
|
||||
|
||||
CDCameraTable::~CDCameraTable() {
|
||||
}
|
||||
|
||||
std::string CDCameraTable::GetName(void) const {
|
||||
return "Camera";
|
||||
}
|
||||
|
||||
std::vector<CDCamera> CDCameraTable::Query(std::function<bool(CDCamera)> predicate) {
|
||||
std::vector<CDCamera> data = cpplinq::from(this->m_entries)
|
||||
>> cpplinq::where(predicate)
|
||||
>> cpplinq::to_vector();
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
std::vector<CDCamera> CDCameraTable::GetEntries(void) const {
|
||||
return this->m_entries;
|
||||
}
|
||||
80
dDatabase/Tables/CDCameraTable.h
Normal file
80
dDatabase/Tables/CDCameraTable.h
Normal file
@@ -0,0 +1,80 @@
|
||||
#pragma once
|
||||
#include "CDTable.h"
|
||||
|
||||
//Generated by xmlDb2dDatabaseGenerator on 2022-03-04 00:23:32.907075
|
||||
//DO NOT EDIT THIS FILE MANUALLY!
|
||||
|
||||
struct CDCamera {
|
||||
std::string camera_name;
|
||||
float pitch_angle_tolerance;
|
||||
float starting_zoom;
|
||||
float zoom_return_modifier;
|
||||
float pitch_return_modifier;
|
||||
float tether_out_return_modifier;
|
||||
float tether_in_return_multiplier;
|
||||
float verticle_movement_dampening_modifier;
|
||||
float return_from_incline_modifier;
|
||||
float horizontal_return_modifier;
|
||||
float yaw_behavior_speed_multiplier;
|
||||
float camera_collision_padding;
|
||||
float glide_speed;
|
||||
float fade_player_min_range;
|
||||
float min_movement_delta_tolerance;
|
||||
float min_glide_distance_tolerance;
|
||||
float look_forward_offset;
|
||||
float look_up_offset;
|
||||
float minimum_vertical_dampening_distance;
|
||||
float maximum_vertical_dampening_distance;
|
||||
float minimum_ignore_jump_distance;
|
||||
float maximum_ignore_jump_distance;
|
||||
float maximum_auto_glide_angle;
|
||||
float minimum_tether_glide_distance;
|
||||
float yaw_sign_correction;
|
||||
float set_1_look_forward_offset;
|
||||
float set_1_look_up_offset;
|
||||
float set_2_look_forward_offset;
|
||||
float set_2_look_up_offset;
|
||||
float set_0_speed_influence_on_dir;
|
||||
float set_1_speed_influence_on_dir;
|
||||
float set_2_speed_influence_on_dir;
|
||||
float set_0_angular_relaxation;
|
||||
float set_1_angular_relaxation;
|
||||
float set_2_angular_relaxation;
|
||||
float set_0_position_up_offset;
|
||||
float set_1_position_up_offset;
|
||||
float set_2_position_up_offset;
|
||||
float set_0_position_forward_offset;
|
||||
float set_1_position_forward_offset;
|
||||
float set_2_position_forward_offset;
|
||||
float set_0_FOV;
|
||||
float set_1_FOV;
|
||||
float set_2_FOV;
|
||||
float set_0_max_yaw_angle;
|
||||
float set_1_max_yaw_angle;
|
||||
float set_2_max_yaw_angle;
|
||||
int set_1_fade_in_camera_set_change;
|
||||
int set_1_fade_out_camera_set_change;
|
||||
int set_2_fade_in_camera_set_change;
|
||||
int set_2_fade_out_camera_set_change;
|
||||
float input_movement_scalar;
|
||||
float input_rotation_scalar;
|
||||
float input_zoom_scalar;
|
||||
float minimum_pitch_desired;
|
||||
float maximum_pitch_desired;
|
||||
float minimum_zoom;
|
||||
float maximum_zoom;
|
||||
float horizontal_rotate_tolerance;
|
||||
float horizontal_rotate_modifier;
|
||||
};
|
||||
|
||||
class CDCameraTable : public CDTable {
|
||||
private:
|
||||
std::vector<CDCamera> m_entries;
|
||||
public:
|
||||
CDCameraTable();
|
||||
~CDCameraTable();
|
||||
std::string GetName(void) const override;
|
||||
|
||||
std::vector<CDCamera> Query(std::function<bool(CDCamera)> predicate);
|
||||
std::vector<CDCamera> GetEntries(void) const;
|
||||
};
|
||||
46
dDatabase/Tables/CDChoiceBuildComponentTable.cpp
Normal file
46
dDatabase/Tables/CDChoiceBuildComponentTable.cpp
Normal file
@@ -0,0 +1,46 @@
|
||||
#include "CDChoiceBuildComponentTable.h"
|
||||
//Generated by xmlDb2dDatabaseGenerator on 2022-03-04 00:23:32.913060
|
||||
//DO NOT EDIT THIS FILE MANUALLY!
|
||||
|
||||
CDChoiceBuildComponentTable::CDChoiceBuildComponentTable() {
|
||||
unsigned int size = 0;
|
||||
auto tableSize = CDClientDatabase::ExecuteQuery("SELECT COUNT(*) FROM ChoiceBuildComponent");
|
||||
while (!tableSize.eof()) {
|
||||
size = tableSize.getIntField(0, 0);
|
||||
tableSize.nextRow();
|
||||
}
|
||||
|
||||
tableSize.finalize();
|
||||
this->m_entries.reserve(size);
|
||||
|
||||
auto tableData = CDClientDatabase::ExecuteQuery("SELECT * FROM ChoiceBuildComponent");
|
||||
while (!tableData.eof()) {
|
||||
CDChoiceBuildComponent entry;
|
||||
entry.id = tableData.getIntField(0, int{});
|
||||
entry.selections = tableData.getStringField(1, std::string{}.c_str());
|
||||
entry.imaginationOverride = tableData.getIntField(2, int{});
|
||||
this->m_entries.push_back(entry);
|
||||
tableData.nextRow();
|
||||
}
|
||||
|
||||
tableData.finalize();
|
||||
}
|
||||
|
||||
CDChoiceBuildComponentTable::~CDChoiceBuildComponentTable() {
|
||||
}
|
||||
|
||||
std::string CDChoiceBuildComponentTable::GetName(void) const {
|
||||
return "ChoiceBuildComponent";
|
||||
}
|
||||
|
||||
std::vector<CDChoiceBuildComponent> CDChoiceBuildComponentTable::Query(std::function<bool(CDChoiceBuildComponent)> predicate) {
|
||||
std::vector<CDChoiceBuildComponent> data = cpplinq::from(this->m_entries)
|
||||
>> cpplinq::where(predicate)
|
||||
>> cpplinq::to_vector();
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
std::vector<CDChoiceBuildComponent> CDChoiceBuildComponentTable::GetEntries(void) const {
|
||||
return this->m_entries;
|
||||
}
|
||||
23
dDatabase/Tables/CDChoiceBuildComponentTable.h
Normal file
23
dDatabase/Tables/CDChoiceBuildComponentTable.h
Normal file
@@ -0,0 +1,23 @@
|
||||
#pragma once
|
||||
#include "CDTable.h"
|
||||
|
||||
//Generated by xmlDb2dDatabaseGenerator on 2022-03-04 00:23:32.912062
|
||||
//DO NOT EDIT THIS FILE MANUALLY!
|
||||
|
||||
struct CDChoiceBuildComponent {
|
||||
int id;
|
||||
std::string selections;
|
||||
int imaginationOverride;
|
||||
};
|
||||
|
||||
class CDChoiceBuildComponentTable : public CDTable {
|
||||
private:
|
||||
std::vector<CDChoiceBuildComponent> m_entries;
|
||||
public:
|
||||
CDChoiceBuildComponentTable();
|
||||
~CDChoiceBuildComponentTable();
|
||||
std::string GetName(void) const override;
|
||||
|
||||
std::vector<CDChoiceBuildComponent> Query(std::function<bool(CDChoiceBuildComponent)> predicate);
|
||||
std::vector<CDChoiceBuildComponent> GetEntries(void) const;
|
||||
};
|
||||
45
dDatabase/Tables/CDCollectibleComponentTable.cpp
Normal file
45
dDatabase/Tables/CDCollectibleComponentTable.cpp
Normal file
@@ -0,0 +1,45 @@
|
||||
#include "CDCollectibleComponentTable.h"
|
||||
//Generated by xmlDb2dDatabaseGenerator on 2022-03-04 00:23:32.920051
|
||||
//DO NOT EDIT THIS FILE MANUALLY!
|
||||
|
||||
CDCollectibleComponentTable::CDCollectibleComponentTable() {
|
||||
unsigned int size = 0;
|
||||
auto tableSize = CDClientDatabase::ExecuteQuery("SELECT COUNT(*) FROM CollectibleComponent");
|
||||
while (!tableSize.eof()) {
|
||||
size = tableSize.getIntField(0, 0);
|
||||
tableSize.nextRow();
|
||||
}
|
||||
|
||||
tableSize.finalize();
|
||||
this->m_entries.reserve(size);
|
||||
|
||||
auto tableData = CDClientDatabase::ExecuteQuery("SELECT * FROM CollectibleComponent");
|
||||
while (!tableData.eof()) {
|
||||
CDCollectibleComponent entry;
|
||||
entry.id = tableData.getIntField(0, int{});
|
||||
entry.requirement_mission = tableData.getIntField(1, int{});
|
||||
this->m_entries.push_back(entry);
|
||||
tableData.nextRow();
|
||||
}
|
||||
|
||||
tableData.finalize();
|
||||
}
|
||||
|
||||
CDCollectibleComponentTable::~CDCollectibleComponentTable() {
|
||||
}
|
||||
|
||||
std::string CDCollectibleComponentTable::GetName(void) const {
|
||||
return "CollectibleComponent";
|
||||
}
|
||||
|
||||
std::vector<CDCollectibleComponent> CDCollectibleComponentTable::Query(std::function<bool(CDCollectibleComponent)> predicate) {
|
||||
std::vector<CDCollectibleComponent> data = cpplinq::from(this->m_entries)
|
||||
>> cpplinq::where(predicate)
|
||||
>> cpplinq::to_vector();
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
std::vector<CDCollectibleComponent> CDCollectibleComponentTable::GetEntries(void) const {
|
||||
return this->m_entries;
|
||||
}
|
||||
22
dDatabase/Tables/CDCollectibleComponentTable.h
Normal file
22
dDatabase/Tables/CDCollectibleComponentTable.h
Normal file
@@ -0,0 +1,22 @@
|
||||
#pragma once
|
||||
#include "CDTable.h"
|
||||
|
||||
//Generated by xmlDb2dDatabaseGenerator on 2022-03-04 00:23:32.917049
|
||||
//DO NOT EDIT THIS FILE MANUALLY!
|
||||
|
||||
struct CDCollectibleComponent {
|
||||
int id;
|
||||
int requirement_mission;
|
||||
};
|
||||
|
||||
class CDCollectibleComponentTable : public CDTable {
|
||||
private:
|
||||
std::vector<CDCollectibleComponent> m_entries;
|
||||
public:
|
||||
CDCollectibleComponentTable();
|
||||
~CDCollectibleComponentTable();
|
||||
std::string GetName(void) const override;
|
||||
|
||||
std::vector<CDCollectibleComponent> Query(std::function<bool(CDCollectibleComponent)> predicate);
|
||||
std::vector<CDCollectibleComponent> GetEntries(void) const;
|
||||
};
|
||||
@@ -1,131 +1,46 @@
|
||||
#include "CDComponentsRegistryTable.h"
|
||||
//Generated by xmlDb2dDatabaseGenerator on 2022-03-04 00:23:32.923033
|
||||
//DO NOT EDIT THIS FILE MANUALLY!
|
||||
|
||||
#define CDCLIENT_CACHE_ALL
|
||||
CDComponentsRegistryTable::CDComponentsRegistryTable() {
|
||||
unsigned int size = 0;
|
||||
auto tableSize = CDClientDatabase::ExecuteQuery("SELECT COUNT(*) FROM ComponentsRegistry");
|
||||
while (!tableSize.eof()) {
|
||||
size = tableSize.getIntField(0, 0);
|
||||
tableSize.nextRow();
|
||||
}
|
||||
|
||||
//! Constructor
|
||||
CDComponentsRegistryTable::CDComponentsRegistryTable(void) {
|
||||
|
||||
#ifdef CDCLIENT_CACHE_ALL
|
||||
// First, get the size of the table
|
||||
unsigned int size = 0;
|
||||
auto tableSize = CDClientDatabase::ExecuteQuery("SELECT COUNT(*) FROM ComponentsRegistry");
|
||||
while (!tableSize.eof()) {
|
||||
size = tableSize.getIntField(0, 0);
|
||||
|
||||
tableSize.nextRow();
|
||||
}
|
||||
|
||||
tableSize.finalize();
|
||||
|
||||
// Reserve the size
|
||||
//this->entries.reserve(size);
|
||||
|
||||
// Now get the data
|
||||
auto tableData = CDClientDatabase::ExecuteQuery("SELECT * FROM ComponentsRegistry");
|
||||
while (!tableData.eof()) {
|
||||
CDComponentsRegistry entry;
|
||||
entry.id = tableData.getIntField(0, -1);
|
||||
entry.component_type = tableData.getIntField(1, -1);
|
||||
entry.component_id = tableData.getIntField(2, -1);
|
||||
this->m_entries.reserve(size);
|
||||
|
||||
this->mappedEntries.insert_or_assign(((uint64_t) entry.component_type) << 32 | ((uint64_t) entry.id), entry.component_id);
|
||||
|
||||
//this->entries.push_back(entry);
|
||||
|
||||
/*
|
||||
//Darwin's stuff:
|
||||
const auto& it = this->mappedEntries.find(entry.id);
|
||||
if (it != mappedEntries.end()) {
|
||||
const auto& iter = it->second.find(entry.component_type);
|
||||
if (iter == it->second.end()) {
|
||||
it->second.insert(std::make_pair(entry.component_type, entry.component_id));
|
||||
}
|
||||
}
|
||||
else {
|
||||
std::map<unsigned int, unsigned int> map;
|
||||
map.insert(std::make_pair(entry.component_type, entry.component_id));
|
||||
this->mappedEntries.insert(std::make_pair(entry.id, map));
|
||||
}
|
||||
*/
|
||||
|
||||
tableData.nextRow();
|
||||
}
|
||||
auto tableData = CDClientDatabase::ExecuteQuery("SELECT * FROM ComponentsRegistry");
|
||||
while (!tableData.eof()) {
|
||||
CDComponentsRegistry entry;
|
||||
entry.id = tableData.getIntField(0, int{});
|
||||
entry.component_type = tableData.getIntField(1, int{});
|
||||
entry.component_id = tableData.getIntField(2, int{});
|
||||
this->m_entries.push_back(entry);
|
||||
tableData.nextRow();
|
||||
}
|
||||
|
||||
tableData.finalize();
|
||||
#endif
|
||||
}
|
||||
|
||||
//! Destructor
|
||||
CDComponentsRegistryTable::~CDComponentsRegistryTable(void) { }
|
||||
CDComponentsRegistryTable::~CDComponentsRegistryTable() {
|
||||
}
|
||||
|
||||
//! Returns the table's name
|
||||
std::string CDComponentsRegistryTable::GetName(void) const {
|
||||
return "ComponentsRegistry";
|
||||
return "ComponentsRegistry";
|
||||
}
|
||||
|
||||
int32_t CDComponentsRegistryTable::GetByIDAndType(uint32_t id, uint32_t componentType, int32_t defaultValue)
|
||||
{
|
||||
const auto& iter = this->mappedEntries.find(((uint64_t) componentType) << 32 | ((uint64_t) id));
|
||||
std::vector<CDComponentsRegistry> CDComponentsRegistryTable::Query(std::function<bool(CDComponentsRegistry)> predicate) {
|
||||
std::vector<CDComponentsRegistry> data = cpplinq::from(this->m_entries)
|
||||
>> cpplinq::where(predicate)
|
||||
>> cpplinq::to_vector();
|
||||
|
||||
if (iter == this->mappedEntries.end())
|
||||
{
|
||||
return defaultValue;
|
||||
}
|
||||
|
||||
return iter->second;
|
||||
|
||||
/*
|
||||
const auto& it = this->mappedEntries.find(id);
|
||||
if (it != mappedEntries.end()) {
|
||||
const auto& iter = it->second.find(componentType);
|
||||
if (iter != it->second.end()) {
|
||||
return iter->second;
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
#ifndef CDCLIENT_CACHE_ALL
|
||||
// Now get the data
|
||||
std::stringstream query;
|
||||
|
||||
query << "SELECT * FROM ComponentsRegistry WHERE id = " << std::to_string(id);
|
||||
|
||||
auto tableData = CDClientDatabase::ExecuteQuery(query.str());
|
||||
while (!tableData.eof()) {
|
||||
CDComponentsRegistry entry;
|
||||
entry.id = tableData.getIntField(0, -1);
|
||||
entry.component_type = tableData.getIntField(1, -1);
|
||||
entry.component_id = tableData.getIntField(2, -1);
|
||||
|
||||
//this->entries.push_back(entry);
|
||||
|
||||
//Darwin's stuff:
|
||||
const auto& it = this->mappedEntries.find(entry.id);
|
||||
if (it != mappedEntries.end()) {
|
||||
const auto& iter = it->second.find(entry.component_type);
|
||||
if (iter == it->second.end()) {
|
||||
it->second.insert(std::make_pair(entry.component_type, entry.component_id));
|
||||
}
|
||||
}
|
||||
else {
|
||||
std::map<unsigned int, unsigned int> map;
|
||||
map.insert(std::make_pair(entry.component_type, entry.component_id));
|
||||
this->mappedEntries.insert(std::make_pair(entry.id, map));
|
||||
}
|
||||
|
||||
tableData.nextRow();
|
||||
}
|
||||
|
||||
tableData.finalize();
|
||||
|
||||
const auto& it2 = this->mappedEntries.find(id);
|
||||
if (it2 != mappedEntries.end()) {
|
||||
const auto& iter = it2->second.find(componentType);
|
||||
if (iter != it2->second.end()) {
|
||||
return iter->second;
|
||||
}
|
||||
}
|
||||
|
||||
return defaultValue;
|
||||
#endif
|
||||
return data;
|
||||
}
|
||||
|
||||
std::vector<CDComponentsRegistry> CDComponentsRegistryTable::GetEntries(void) const {
|
||||
return this->m_entries;
|
||||
}
|
||||
|
||||
@@ -1,40 +1,23 @@
|
||||
#pragma once
|
||||
|
||||
// Custom Classes
|
||||
#include "CDTable.h"
|
||||
|
||||
/*!
|
||||
\file CDComponentsRegistryTable.hpp
|
||||
\brief Contains data for the ComponentsRegistry table
|
||||
*/
|
||||
//Generated by xmlDb2dDatabaseGenerator on 2022-03-04 00:23:32.922038
|
||||
//DO NOT EDIT THIS FILE MANUALLY!
|
||||
|
||||
//! ComponentsRegistry Entry Struct
|
||||
struct CDComponentsRegistry {
|
||||
unsigned int id; //!< The LOT is used as the ID
|
||||
unsigned int 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
|
||||
int id;
|
||||
int component_type;
|
||||
int component_id;
|
||||
};
|
||||
|
||||
|
||||
//! ComponentsRegistry table
|
||||
class CDComponentsRegistryTable : public CDTable {
|
||||
private:
|
||||
//std::vector<CDComponentsRegistry> entries;
|
||||
std::map<uint64_t, uint32_t> mappedEntries; //id, component_type, component_id
|
||||
|
||||
std::vector<CDComponentsRegistry> m_entries;
|
||||
public:
|
||||
|
||||
//! Constructor
|
||||
CDComponentsRegistryTable(void);
|
||||
|
||||
//! Destructor
|
||||
~CDComponentsRegistryTable(void);
|
||||
|
||||
//! Returns the table's name
|
||||
/*!
|
||||
\return The table name
|
||||
*/
|
||||
std::string GetName(void) const override;
|
||||
CDComponentsRegistryTable();
|
||||
~CDComponentsRegistryTable();
|
||||
std::string GetName(void) const override;
|
||||
|
||||
int32_t GetByIDAndType(uint32_t id, uint32_t componentType, int32_t defaultValue = 0);
|
||||
std::vector<CDComponentsRegistry> Query(std::function<bool(CDComponentsRegistry)> predicate);
|
||||
std::vector<CDComponentsRegistry> GetEntries(void) const;
|
||||
};
|
||||
|
||||
68
dDatabase/Tables/CDControlSchemesTable.cpp
Normal file
68
dDatabase/Tables/CDControlSchemesTable.cpp
Normal file
@@ -0,0 +1,68 @@
|
||||
#include "CDControlSchemesTable.h"
|
||||
//Generated by xmlDb2dDatabaseGenerator on 2022-03-04 00:23:32.927075
|
||||
//DO NOT EDIT THIS FILE MANUALLY!
|
||||
|
||||
CDControlSchemesTable::CDControlSchemesTable() {
|
||||
unsigned int size = 0;
|
||||
auto tableSize = CDClientDatabase::ExecuteQuery("SELECT COUNT(*) FROM ControlSchemes");
|
||||
while (!tableSize.eof()) {
|
||||
size = tableSize.getIntField(0, 0);
|
||||
tableSize.nextRow();
|
||||
}
|
||||
|
||||
tableSize.finalize();
|
||||
this->m_entries.reserve(size);
|
||||
|
||||
auto tableData = CDClientDatabase::ExecuteQuery("SELECT * FROM ControlSchemes");
|
||||
while (!tableData.eof()) {
|
||||
CDControlSchemes entry;
|
||||
entry.control_scheme = tableData.getIntField(0, int{});
|
||||
entry.scheme_name = tableData.getStringField(1, std::string{}.c_str());
|
||||
entry.rotation_speed = tableData.getFloatField(2, float{});
|
||||
entry.walk_forward_speed = tableData.getFloatField(3, float{});
|
||||
entry.walk_backward_speed = tableData.getFloatField(4, float{});
|
||||
entry.walk_strafe_speed = tableData.getFloatField(5, float{});
|
||||
entry.walk_strafe_forward_speed = tableData.getFloatField(6, float{});
|
||||
entry.walk_strafe_backward_speed = tableData.getFloatField(7, float{});
|
||||
entry.run_backward_speed = tableData.getFloatField(8, float{});
|
||||
entry.run_strafe_speed = tableData.getFloatField(9, float{});
|
||||
entry.run_strafe_forward_speed = tableData.getFloatField(10, float{});
|
||||
entry.run_strafe_backward_speed = tableData.getFloatField(11, float{});
|
||||
entry.keyboard_zoom_sensitivity = tableData.getFloatField(12, float{});
|
||||
entry.keyboard_pitch_sensitivity = tableData.getFloatField(13, float{});
|
||||
entry.keyboard_yaw_sensitivity = tableData.getFloatField(14, float{});
|
||||
entry.mouse_zoom_wheel_sensitivity = tableData.getFloatField(15, float{});
|
||||
entry.x_mouse_move_sensitivity_modifier = tableData.getFloatField(16, float{});
|
||||
entry.y_mouse_move_sensitivity_modifier = tableData.getFloatField(17, float{});
|
||||
entry.freecam_speed_modifier = tableData.getFloatField(18, float{});
|
||||
entry.freecam_slow_speed_multiplier = tableData.getFloatField(19, float{});
|
||||
entry.freecam_fast_speed_multiplier = tableData.getFloatField(20, float{});
|
||||
entry.freecam_mouse_modifier = tableData.getFloatField(21, float{});
|
||||
entry.gamepad_pitch_rot_sensitivity = tableData.getFloatField(22, float{});
|
||||
entry.gamepad_yaw_rot_sensitivity = tableData.getFloatField(23, float{});
|
||||
entry.gamepad_trigger_sensitivity = tableData.getFloatField(24, float{});
|
||||
this->m_entries.push_back(entry);
|
||||
tableData.nextRow();
|
||||
}
|
||||
|
||||
tableData.finalize();
|
||||
}
|
||||
|
||||
CDControlSchemesTable::~CDControlSchemesTable() {
|
||||
}
|
||||
|
||||
std::string CDControlSchemesTable::GetName(void) const {
|
||||
return "ControlSchemes";
|
||||
}
|
||||
|
||||
std::vector<CDControlSchemes> CDControlSchemesTable::Query(std::function<bool(CDControlSchemes)> predicate) {
|
||||
std::vector<CDControlSchemes> data = cpplinq::from(this->m_entries)
|
||||
>> cpplinq::where(predicate)
|
||||
>> cpplinq::to_vector();
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
std::vector<CDControlSchemes> CDControlSchemesTable::GetEntries(void) const {
|
||||
return this->m_entries;
|
||||
}
|
||||
45
dDatabase/Tables/CDControlSchemesTable.h
Normal file
45
dDatabase/Tables/CDControlSchemesTable.h
Normal file
@@ -0,0 +1,45 @@
|
||||
#pragma once
|
||||
#include "CDTable.h"
|
||||
|
||||
//Generated by xmlDb2dDatabaseGenerator on 2022-03-04 00:23:32.925028
|
||||
//DO NOT EDIT THIS FILE MANUALLY!
|
||||
|
||||
struct CDControlSchemes {
|
||||
int control_scheme;
|
||||
std::string scheme_name;
|
||||
float rotation_speed;
|
||||
float walk_forward_speed;
|
||||
float walk_backward_speed;
|
||||
float walk_strafe_speed;
|
||||
float walk_strafe_forward_speed;
|
||||
float walk_strafe_backward_speed;
|
||||
float run_backward_speed;
|
||||
float run_strafe_speed;
|
||||
float run_strafe_forward_speed;
|
||||
float run_strafe_backward_speed;
|
||||
float keyboard_zoom_sensitivity;
|
||||
float keyboard_pitch_sensitivity;
|
||||
float keyboard_yaw_sensitivity;
|
||||
float mouse_zoom_wheel_sensitivity;
|
||||
float x_mouse_move_sensitivity_modifier;
|
||||
float y_mouse_move_sensitivity_modifier;
|
||||
float freecam_speed_modifier;
|
||||
float freecam_slow_speed_multiplier;
|
||||
float freecam_fast_speed_multiplier;
|
||||
float freecam_mouse_modifier;
|
||||
float gamepad_pitch_rot_sensitivity;
|
||||
float gamepad_yaw_rot_sensitivity;
|
||||
float gamepad_trigger_sensitivity;
|
||||
};
|
||||
|
||||
class CDControlSchemesTable : public CDTable {
|
||||
private:
|
||||
std::vector<CDControlSchemes> m_entries;
|
||||
public:
|
||||
CDControlSchemesTable();
|
||||
~CDControlSchemesTable();
|
||||
std::string GetName(void) const override;
|
||||
|
||||
std::vector<CDControlSchemes> Query(std::function<bool(CDControlSchemes)> predicate);
|
||||
std::vector<CDControlSchemes> GetEntries(void) const;
|
||||
};
|
||||
45
dDatabase/Tables/CDCurrencyDenominationsTable.cpp
Normal file
45
dDatabase/Tables/CDCurrencyDenominationsTable.cpp
Normal file
@@ -0,0 +1,45 @@
|
||||
#include "CDCurrencyDenominationsTable.h"
|
||||
//Generated by xmlDb2dDatabaseGenerator on 2022-03-04 00:23:32.934003
|
||||
//DO NOT EDIT THIS FILE MANUALLY!
|
||||
|
||||
CDCurrencyDenominationsTable::CDCurrencyDenominationsTable() {
|
||||
unsigned int size = 0;
|
||||
auto tableSize = CDClientDatabase::ExecuteQuery("SELECT COUNT(*) FROM CurrencyDenominations");
|
||||
while (!tableSize.eof()) {
|
||||
size = tableSize.getIntField(0, 0);
|
||||
tableSize.nextRow();
|
||||
}
|
||||
|
||||
tableSize.finalize();
|
||||
this->m_entries.reserve(size);
|
||||
|
||||
auto tableData = CDClientDatabase::ExecuteQuery("SELECT * FROM CurrencyDenominations");
|
||||
while (!tableData.eof()) {
|
||||
CDCurrencyDenominations entry;
|
||||
entry.value = tableData.getIntField(0, int{});
|
||||
entry.objectid = tableData.getIntField(1, int{});
|
||||
this->m_entries.push_back(entry);
|
||||
tableData.nextRow();
|
||||
}
|
||||
|
||||
tableData.finalize();
|
||||
}
|
||||
|
||||
CDCurrencyDenominationsTable::~CDCurrencyDenominationsTable() {
|
||||
}
|
||||
|
||||
std::string CDCurrencyDenominationsTable::GetName(void) const {
|
||||
return "CurrencyDenominations";
|
||||
}
|
||||
|
||||
std::vector<CDCurrencyDenominations> CDCurrencyDenominationsTable::Query(std::function<bool(CDCurrencyDenominations)> predicate) {
|
||||
std::vector<CDCurrencyDenominations> data = cpplinq::from(this->m_entries)
|
||||
>> cpplinq::where(predicate)
|
||||
>> cpplinq::to_vector();
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
std::vector<CDCurrencyDenominations> CDCurrencyDenominationsTable::GetEntries(void) const {
|
||||
return this->m_entries;
|
||||
}
|
||||
22
dDatabase/Tables/CDCurrencyDenominationsTable.h
Normal file
22
dDatabase/Tables/CDCurrencyDenominationsTable.h
Normal file
@@ -0,0 +1,22 @@
|
||||
#pragma once
|
||||
#include "CDTable.h"
|
||||
|
||||
//Generated by xmlDb2dDatabaseGenerator on 2022-03-04 00:23:32.933006
|
||||
//DO NOT EDIT THIS FILE MANUALLY!
|
||||
|
||||
struct CDCurrencyDenominations {
|
||||
int value;
|
||||
int objectid;
|
||||
};
|
||||
|
||||
class CDCurrencyDenominationsTable : public CDTable {
|
||||
private:
|
||||
std::vector<CDCurrencyDenominations> m_entries;
|
||||
public:
|
||||
CDCurrencyDenominationsTable();
|
||||
~CDCurrencyDenominationsTable();
|
||||
std::string GetName(void) const override;
|
||||
|
||||
std::vector<CDCurrencyDenominations> Query(std::function<bool(CDCurrencyDenominations)> predicate);
|
||||
std::vector<CDCurrencyDenominations> GetEntries(void) const;
|
||||
};
|
||||
45
dDatabase/Tables/CDCurrencyIndexTable.cpp
Normal file
45
dDatabase/Tables/CDCurrencyIndexTable.cpp
Normal file
@@ -0,0 +1,45 @@
|
||||
#include "CDCurrencyIndexTable.h"
|
||||
//Generated by xmlDb2dDatabaseGenerator on 2022-03-04 00:23:32.936996
|
||||
//DO NOT EDIT THIS FILE MANUALLY!
|
||||
|
||||
CDCurrencyIndexTable::CDCurrencyIndexTable() {
|
||||
unsigned int size = 0;
|
||||
auto tableSize = CDClientDatabase::ExecuteQuery("SELECT COUNT(*) FROM CurrencyIndex");
|
||||
while (!tableSize.eof()) {
|
||||
size = tableSize.getIntField(0, 0);
|
||||
tableSize.nextRow();
|
||||
}
|
||||
|
||||
tableSize.finalize();
|
||||
this->m_entries.reserve(size);
|
||||
|
||||
auto tableData = CDClientDatabase::ExecuteQuery("SELECT * FROM CurrencyIndex");
|
||||
while (!tableData.eof()) {
|
||||
CDCurrencyIndex entry;
|
||||
entry.CurrencyIndex = tableData.getIntField(0, int{});
|
||||
entry.description = tableData.getStringField(1, std::string{}.c_str());
|
||||
this->m_entries.push_back(entry);
|
||||
tableData.nextRow();
|
||||
}
|
||||
|
||||
tableData.finalize();
|
||||
}
|
||||
|
||||
CDCurrencyIndexTable::~CDCurrencyIndexTable() {
|
||||
}
|
||||
|
||||
std::string CDCurrencyIndexTable::GetName(void) const {
|
||||
return "CurrencyIndex";
|
||||
}
|
||||
|
||||
std::vector<CDCurrencyIndex> CDCurrencyIndexTable::Query(std::function<bool(CDCurrencyIndex)> predicate) {
|
||||
std::vector<CDCurrencyIndex> data = cpplinq::from(this->m_entries)
|
||||
>> cpplinq::where(predicate)
|
||||
>> cpplinq::to_vector();
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
std::vector<CDCurrencyIndex> CDCurrencyIndexTable::GetEntries(void) const {
|
||||
return this->m_entries;
|
||||
}
|
||||
22
dDatabase/Tables/CDCurrencyIndexTable.h
Normal file
22
dDatabase/Tables/CDCurrencyIndexTable.h
Normal file
@@ -0,0 +1,22 @@
|
||||
#pragma once
|
||||
#include "CDTable.h"
|
||||
|
||||
//Generated by xmlDb2dDatabaseGenerator on 2022-03-04 00:23:32.935999
|
||||
//DO NOT EDIT THIS FILE MANUALLY!
|
||||
|
||||
struct CDCurrencyIndex {
|
||||
int CurrencyIndex;
|
||||
std::string description;
|
||||
};
|
||||
|
||||
class CDCurrencyIndexTable : public CDTable {
|
||||
private:
|
||||
std::vector<CDCurrencyIndex> m_entries;
|
||||
public:
|
||||
CDCurrencyIndexTable();
|
||||
~CDCurrencyIndexTable();
|
||||
std::string GetName(void) const override;
|
||||
|
||||
std::vector<CDCurrencyIndex> Query(std::function<bool(CDCurrencyIndex)> predicate);
|
||||
std::vector<CDCurrencyIndex> GetEntries(void) const;
|
||||
};
|
||||
@@ -1,58 +1,48 @@
|
||||
#include "CDCurrencyTableTable.h"
|
||||
//Generated by xmlDb2dDatabaseGenerator on 2022-03-04 00:23:32.944043
|
||||
//DO NOT EDIT THIS FILE MANUALLY!
|
||||
|
||||
CDCurrencyTableTable::CDCurrencyTableTable() {
|
||||
unsigned int size = 0;
|
||||
auto tableSize = CDClientDatabase::ExecuteQuery("SELECT COUNT(*) FROM CurrencyTable");
|
||||
while (!tableSize.eof()) {
|
||||
size = tableSize.getIntField(0, 0);
|
||||
tableSize.nextRow();
|
||||
}
|
||||
|
||||
//! Constructor
|
||||
CDCurrencyTableTable::CDCurrencyTableTable(void) {
|
||||
|
||||
// First, get the size of the table
|
||||
unsigned int size = 0;
|
||||
auto tableSize = CDClientDatabase::ExecuteQuery("SELECT COUNT(*) FROM CurrencyTable");
|
||||
while (!tableSize.eof()) {
|
||||
size = tableSize.getIntField(0, 0);
|
||||
|
||||
tableSize.nextRow();
|
||||
}
|
||||
|
||||
tableSize.finalize();
|
||||
|
||||
// Reserve the size
|
||||
this->entries.reserve(size);
|
||||
|
||||
// Now get the data
|
||||
auto tableData = CDClientDatabase::ExecuteQuery("SELECT * FROM CurrencyTable");
|
||||
while (!tableData.eof()) {
|
||||
CDCurrencyTable entry;
|
||||
entry.currencyIndex = tableData.getIntField(0, -1);
|
||||
entry.npcminlevel = tableData.getIntField(1, -1);
|
||||
entry.minvalue = tableData.getIntField(2, -1);
|
||||
entry.maxvalue = tableData.getIntField(3, -1);
|
||||
entry.id = tableData.getIntField(4, -1);
|
||||
|
||||
this->entries.push_back(entry);
|
||||
tableData.nextRow();
|
||||
}
|
||||
this->m_entries.reserve(size);
|
||||
|
||||
auto tableData = CDClientDatabase::ExecuteQuery("SELECT * FROM CurrencyTable");
|
||||
while (!tableData.eof()) {
|
||||
CDCurrencyTable entry;
|
||||
entry.currencyIndex = tableData.getIntField(0, int{});
|
||||
entry.npcminlevel = tableData.getIntField(1, int{});
|
||||
entry.minvalue = tableData.getIntField(2, int{});
|
||||
entry.maxvalue = tableData.getIntField(3, int{});
|
||||
entry.id = tableData.getIntField(4, int{});
|
||||
this->m_entries.push_back(entry);
|
||||
tableData.nextRow();
|
||||
}
|
||||
|
||||
tableData.finalize();
|
||||
}
|
||||
|
||||
//! Destructor
|
||||
CDCurrencyTableTable::~CDCurrencyTableTable(void) { }
|
||||
CDCurrencyTableTable::~CDCurrencyTableTable() {
|
||||
}
|
||||
|
||||
//! Returns the table's name
|
||||
std::string CDCurrencyTableTable::GetName(void) const {
|
||||
return "CurrencyTable";
|
||||
return "CurrencyTable";
|
||||
}
|
||||
|
||||
//! Queries the table with a custom "where" clause
|
||||
std::vector<CDCurrencyTable> CDCurrencyTableTable::Query(std::function<bool(CDCurrencyTable)> predicate) {
|
||||
|
||||
std::vector<CDCurrencyTable> data = cpplinq::from(this->entries)
|
||||
>> cpplinq::where(predicate)
|
||||
>> cpplinq::to_vector();
|
||||
|
||||
return data;
|
||||
std::vector<CDCurrencyTable> data = cpplinq::from(this->m_entries)
|
||||
>> cpplinq::where(predicate)
|
||||
>> cpplinq::to_vector();
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
//! Gets all the entries in the table
|
||||
std::vector<CDCurrencyTable> CDCurrencyTableTable::GetEntries(void) const {
|
||||
return this->entries;
|
||||
return this->m_entries;
|
||||
}
|
||||
|
||||
@@ -1,51 +1,25 @@
|
||||
#pragma once
|
||||
|
||||
// Custom Classes
|
||||
#include "CDTable.h"
|
||||
|
||||
/*!
|
||||
\file CDCurrencyTableTable.hpp
|
||||
\brief Contains data for the CurrencyTable table
|
||||
*/
|
||||
//Generated by xmlDb2dDatabaseGenerator on 2022-03-04 00:23:32.941997
|
||||
//DO NOT EDIT THIS FILE MANUALLY!
|
||||
|
||||
//! 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
|
||||
int currencyIndex;
|
||||
int npcminlevel;
|
||||
int minvalue;
|
||||
int maxvalue;
|
||||
int id;
|
||||
};
|
||||
|
||||
//! CurrencyTable table
|
||||
class CDCurrencyTableTable : public CDTable {
|
||||
private:
|
||||
std::vector<CDCurrencyTable> entries;
|
||||
|
||||
std::vector<CDCurrencyTable> m_entries;
|
||||
public:
|
||||
|
||||
//! Constructor
|
||||
CDCurrencyTableTable(void);
|
||||
|
||||
//! Destructor
|
||||
~CDCurrencyTableTable(void);
|
||||
|
||||
//! Returns the table's name
|
||||
/*!
|
||||
\return The table name
|
||||
*/
|
||||
std::string GetName(void) const override;
|
||||
|
||||
//! Queries the table with a custom "where" clause
|
||||
/*!
|
||||
\param predicate The predicate
|
||||
*/
|
||||
std::vector<CDCurrencyTable> Query(std::function<bool(CDCurrencyTable)> predicate);
|
||||
|
||||
//! Gets all the entries in the table
|
||||
/*!
|
||||
\return The entries
|
||||
*/
|
||||
std::vector<CDCurrencyTable> GetEntries(void) const;
|
||||
|
||||
CDCurrencyTableTable();
|
||||
~CDCurrencyTableTable();
|
||||
std::string GetName(void) const override;
|
||||
|
||||
std::vector<CDCurrencyTable> Query(std::function<bool(CDCurrencyTable)> predicate);
|
||||
std::vector<CDCurrencyTable> GetEntries(void) const;
|
||||
};
|
||||
|
||||
47
dDatabase/Tables/CDDeletionRestrictionsTable.cpp
Normal file
47
dDatabase/Tables/CDDeletionRestrictionsTable.cpp
Normal file
@@ -0,0 +1,47 @@
|
||||
#include "CDDeletionRestrictionsTable.h"
|
||||
//Generated by xmlDb2dDatabaseGenerator on 2022-03-04 00:23:32.950958
|
||||
//DO NOT EDIT THIS FILE MANUALLY!
|
||||
|
||||
CDDeletionRestrictionsTable::CDDeletionRestrictionsTable() {
|
||||
unsigned int size = 0;
|
||||
auto tableSize = CDClientDatabase::ExecuteQuery("SELECT COUNT(*) FROM DeletionRestrictions");
|
||||
while (!tableSize.eof()) {
|
||||
size = tableSize.getIntField(0, 0);
|
||||
tableSize.nextRow();
|
||||
}
|
||||
|
||||
tableSize.finalize();
|
||||
this->m_entries.reserve(size);
|
||||
|
||||
auto tableData = CDClientDatabase::ExecuteQuery("SELECT * FROM DeletionRestrictions");
|
||||
while (!tableData.eof()) {
|
||||
CDDeletionRestrictions entry;
|
||||
entry.id = tableData.getIntField(0, int{});
|
||||
entry.restricted = tableData.getIntField(1, bool{});
|
||||
entry.ids = tableData.getStringField(2, std::string{}.c_str());
|
||||
entry.checkType = tableData.getIntField(3, int{});
|
||||
this->m_entries.push_back(entry);
|
||||
tableData.nextRow();
|
||||
}
|
||||
|
||||
tableData.finalize();
|
||||
}
|
||||
|
||||
CDDeletionRestrictionsTable::~CDDeletionRestrictionsTable() {
|
||||
}
|
||||
|
||||
std::string CDDeletionRestrictionsTable::GetName(void) const {
|
||||
return "DeletionRestrictions";
|
||||
}
|
||||
|
||||
std::vector<CDDeletionRestrictions> CDDeletionRestrictionsTable::Query(std::function<bool(CDDeletionRestrictions)> predicate) {
|
||||
std::vector<CDDeletionRestrictions> data = cpplinq::from(this->m_entries)
|
||||
>> cpplinq::where(predicate)
|
||||
>> cpplinq::to_vector();
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
std::vector<CDDeletionRestrictions> CDDeletionRestrictionsTable::GetEntries(void) const {
|
||||
return this->m_entries;
|
||||
}
|
||||
24
dDatabase/Tables/CDDeletionRestrictionsTable.h
Normal file
24
dDatabase/Tables/CDDeletionRestrictionsTable.h
Normal file
@@ -0,0 +1,24 @@
|
||||
#pragma once
|
||||
#include "CDTable.h"
|
||||
|
||||
//Generated by xmlDb2dDatabaseGenerator on 2022-03-04 00:23:32.948964
|
||||
//DO NOT EDIT THIS FILE MANUALLY!
|
||||
|
||||
struct CDDeletionRestrictions {
|
||||
int id;
|
||||
bool restricted;
|
||||
std::string ids;
|
||||
int checkType;
|
||||
};
|
||||
|
||||
class CDDeletionRestrictionsTable : public CDTable {
|
||||
private:
|
||||
std::vector<CDDeletionRestrictions> m_entries;
|
||||
public:
|
||||
CDDeletionRestrictionsTable();
|
||||
~CDDeletionRestrictionsTable();
|
||||
std::string GetName(void) const override;
|
||||
|
||||
std::vector<CDDeletionRestrictions> Query(std::function<bool(CDDeletionRestrictions)> predicate);
|
||||
std::vector<CDDeletionRestrictions> GetEntries(void) const;
|
||||
};
|
||||
@@ -1,67 +1,58 @@
|
||||
#include "CDDestructibleComponentTable.h"
|
||||
//Generated by xmlDb2dDatabaseGenerator on 2022-03-04 00:23:32.955944
|
||||
//DO NOT EDIT THIS FILE MANUALLY!
|
||||
|
||||
CDDestructibleComponentTable::CDDestructibleComponentTable() {
|
||||
unsigned int size = 0;
|
||||
auto tableSize = CDClientDatabase::ExecuteQuery("SELECT COUNT(*) FROM DestructibleComponent");
|
||||
while (!tableSize.eof()) {
|
||||
size = tableSize.getIntField(0, 0);
|
||||
tableSize.nextRow();
|
||||
}
|
||||
|
||||
//! Constructor
|
||||
CDDestructibleComponentTable::CDDestructibleComponentTable(void) {
|
||||
|
||||
// First, get the size of the table
|
||||
unsigned int size = 0;
|
||||
auto tableSize = CDClientDatabase::ExecuteQuery("SELECT COUNT(*) FROM DestructibleComponent");
|
||||
while (!tableSize.eof()) {
|
||||
size = tableSize.getIntField(0, 0);
|
||||
|
||||
tableSize.nextRow();
|
||||
}
|
||||
|
||||
tableSize.finalize();
|
||||
|
||||
// Reserve the size
|
||||
this->entries.reserve(size);
|
||||
|
||||
// Now get the data
|
||||
auto tableData = CDClientDatabase::ExecuteQuery("SELECT * FROM DestructibleComponent");
|
||||
while (!tableData.eof()) {
|
||||
CDDestructibleComponent entry;
|
||||
entry.id = tableData.getIntField(0, -1);
|
||||
entry.faction = tableData.getIntField(1, -1);
|
||||
entry.factionList = tableData.getStringField(2, "");
|
||||
entry.life = tableData.getIntField(3, -1);
|
||||
entry.imagination = tableData.getIntField(4, -1);
|
||||
entry.LootMatrixIndex = tableData.getIntField(5, -1);
|
||||
entry.CurrencyIndex = tableData.getIntField(6, -1);
|
||||
entry.level = tableData.getIntField(7, -1);
|
||||
entry.armor = tableData.getFloatField(8, -1.0f);
|
||||
entry.death_behavior = tableData.getIntField(9, -1);
|
||||
entry.isnpc = tableData.getIntField(10, -1) == 1 ? true : false;
|
||||
entry.attack_priority = tableData.getIntField(11, -1);
|
||||
entry.isSmashable = tableData.getIntField(12, -1) == 1 ? true : false;
|
||||
entry.difficultyLevel = tableData.getIntField(13, -1);
|
||||
|
||||
this->entries.push_back(entry);
|
||||
tableData.nextRow();
|
||||
}
|
||||
this->m_entries.reserve(size);
|
||||
|
||||
auto tableData = CDClientDatabase::ExecuteQuery("SELECT * FROM DestructibleComponent");
|
||||
while (!tableData.eof()) {
|
||||
CDDestructibleComponent entry;
|
||||
entry.id = tableData.getIntField(0, int{});
|
||||
entry.faction = tableData.getIntField(1, int{});
|
||||
entry.life = tableData.getIntField(2, int{});
|
||||
entry.imagination = tableData.getIntField(3, int{});
|
||||
entry.LootMatrixIndex = tableData.getIntField(4, int{});
|
||||
entry.CurrencyIndex = tableData.getIntField(5, int{});
|
||||
entry.level = tableData.getIntField(6, int{});
|
||||
entry.armor = tableData.getFloatField(7, float{});
|
||||
entry.death_behavior = tableData.getIntField(8, int{});
|
||||
entry.protection_disruption = tableData.getFloatField(9, float{});
|
||||
entry.protection_elemental = tableData.getFloatField(10, float{});
|
||||
entry.protection_physical = tableData.getFloatField(11, float{});
|
||||
entry.isnpc = tableData.getIntField(12, bool{});
|
||||
entry.attack_priority = tableData.getIntField(13, int{});
|
||||
entry.isSmashable = tableData.getIntField(14, bool{});
|
||||
this->m_entries.push_back(entry);
|
||||
tableData.nextRow();
|
||||
}
|
||||
|
||||
tableData.finalize();
|
||||
}
|
||||
|
||||
//! Destructor
|
||||
CDDestructibleComponentTable::~CDDestructibleComponentTable(void) { }
|
||||
CDDestructibleComponentTable::~CDDestructibleComponentTable() {
|
||||
}
|
||||
|
||||
//! Returns the table's name
|
||||
std::string CDDestructibleComponentTable::GetName(void) const {
|
||||
return "DestructibleComponent";
|
||||
return "DestructibleComponent";
|
||||
}
|
||||
|
||||
//! Queries the table with a custom "where" clause
|
||||
std::vector<CDDestructibleComponent> CDDestructibleComponentTable::Query(std::function<bool(CDDestructibleComponent)> predicate) {
|
||||
|
||||
std::vector<CDDestructibleComponent> data = cpplinq::from(this->entries)
|
||||
>> cpplinq::where(predicate)
|
||||
>> cpplinq::to_vector();
|
||||
|
||||
return data;
|
||||
std::vector<CDDestructibleComponent> data = cpplinq::from(this->m_entries)
|
||||
>> cpplinq::where(predicate)
|
||||
>> cpplinq::to_vector();
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
//! Gets all the entries in the table
|
||||
std::vector<CDDestructibleComponent> CDDestructibleComponentTable::GetEntries(void) const {
|
||||
return this->entries;
|
||||
return this->m_entries;
|
||||
}
|
||||
|
||||
@@ -1,60 +1,35 @@
|
||||
#pragma once
|
||||
|
||||
// Custom Classes
|
||||
#include "CDTable.h"
|
||||
|
||||
/*!
|
||||
\file CDDestructibleComponentTable.hpp
|
||||
\brief Contains data for the DestructibleComponent table
|
||||
*/
|
||||
//Generated by xmlDb2dDatabaseGenerator on 2022-03-04 00:23:32.954948
|
||||
//DO NOT EDIT THIS FILE MANUALLY!
|
||||
|
||||
//! ItemComponent Struct
|
||||
struct CDDestructibleComponent {
|
||||
unsigned int id; //!< The component ID from the ComponentsRegistry Table
|
||||
int 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; //!< ???
|
||||
float armor; //!< The amount of armor of the object
|
||||
unsigned int death_behavior; //!< The behavior ID of the death behavior
|
||||
bool isnpc; //!< Whether or not the object is an NPC
|
||||
unsigned int attack_priority; //!< ???
|
||||
bool isSmashable; //!< Whether or not the object is smashable
|
||||
int difficultyLevel; //!< ???
|
||||
int id;
|
||||
int faction;
|
||||
int life;
|
||||
int imagination;
|
||||
int LootMatrixIndex;
|
||||
int CurrencyIndex;
|
||||
int level;
|
||||
float armor;
|
||||
int death_behavior;
|
||||
float protection_disruption;
|
||||
float protection_elemental;
|
||||
float protection_physical;
|
||||
bool isnpc;
|
||||
int attack_priority;
|
||||
bool isSmashable;
|
||||
};
|
||||
|
||||
//! ItemComponent table
|
||||
class CDDestructibleComponentTable : public CDTable {
|
||||
private:
|
||||
std::vector<CDDestructibleComponent> entries;
|
||||
|
||||
std::vector<CDDestructibleComponent> m_entries;
|
||||
public:
|
||||
|
||||
//! Constructor
|
||||
CDDestructibleComponentTable(void);
|
||||
|
||||
//! Destructor
|
||||
~CDDestructibleComponentTable(void);
|
||||
|
||||
//! Returns the table's name
|
||||
/*!
|
||||
\return The table name
|
||||
*/
|
||||
std::string GetName(void) const override;
|
||||
|
||||
//! Queries the table with a custom "where" clause
|
||||
/*!
|
||||
\param predicate The predicate
|
||||
*/
|
||||
std::vector<CDDestructibleComponent> Query(std::function<bool(CDDestructibleComponent)> predicate);
|
||||
|
||||
//! Gets all the entries in the table
|
||||
/*!
|
||||
\return The entries
|
||||
*/
|
||||
std::vector<CDDestructibleComponent> GetEntries(void) const;
|
||||
|
||||
CDDestructibleComponentTable();
|
||||
~CDDestructibleComponentTable();
|
||||
std::string GetName(void) const override;
|
||||
|
||||
std::vector<CDDestructibleComponent> Query(std::function<bool(CDDestructibleComponent)> predicate);
|
||||
std::vector<CDDestructibleComponent> GetEntries(void) const;
|
||||
};
|
||||
|
||||
45
dDatabase/Tables/CDDevModelBehaviorsTable.cpp
Normal file
45
dDatabase/Tables/CDDevModelBehaviorsTable.cpp
Normal file
@@ -0,0 +1,45 @@
|
||||
#include "CDDevModelBehaviorsTable.h"
|
||||
//Generated by xmlDb2dDatabaseGenerator on 2022-03-04 00:23:32.961930
|
||||
//DO NOT EDIT THIS FILE MANUALLY!
|
||||
|
||||
CDDevModelBehaviorsTable::CDDevModelBehaviorsTable() {
|
||||
unsigned int size = 0;
|
||||
auto tableSize = CDClientDatabase::ExecuteQuery("SELECT COUNT(*) FROM DevModelBehaviors");
|
||||
while (!tableSize.eof()) {
|
||||
size = tableSize.getIntField(0, 0);
|
||||
tableSize.nextRow();
|
||||
}
|
||||
|
||||
tableSize.finalize();
|
||||
this->m_entries.reserve(size);
|
||||
|
||||
auto tableData = CDClientDatabase::ExecuteQuery("SELECT * FROM DevModelBehaviors");
|
||||
while (!tableData.eof()) {
|
||||
CDDevModelBehaviors entry;
|
||||
entry.ModelID = tableData.getIntField(0, int{});
|
||||
entry.BehaviorID = tableData.getIntField(1, int{});
|
||||
this->m_entries.push_back(entry);
|
||||
tableData.nextRow();
|
||||
}
|
||||
|
||||
tableData.finalize();
|
||||
}
|
||||
|
||||
CDDevModelBehaviorsTable::~CDDevModelBehaviorsTable() {
|
||||
}
|
||||
|
||||
std::string CDDevModelBehaviorsTable::GetName(void) const {
|
||||
return "DevModelBehaviors";
|
||||
}
|
||||
|
||||
std::vector<CDDevModelBehaviors> CDDevModelBehaviorsTable::Query(std::function<bool(CDDevModelBehaviors)> predicate) {
|
||||
std::vector<CDDevModelBehaviors> data = cpplinq::from(this->m_entries)
|
||||
>> cpplinq::where(predicate)
|
||||
>> cpplinq::to_vector();
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
std::vector<CDDevModelBehaviors> CDDevModelBehaviorsTable::GetEntries(void) const {
|
||||
return this->m_entries;
|
||||
}
|
||||
22
dDatabase/Tables/CDDevModelBehaviorsTable.h
Normal file
22
dDatabase/Tables/CDDevModelBehaviorsTable.h
Normal file
@@ -0,0 +1,22 @@
|
||||
#pragma once
|
||||
#include "CDTable.h"
|
||||
|
||||
//Generated by xmlDb2dDatabaseGenerator on 2022-03-04 00:23:32.958937
|
||||
//DO NOT EDIT THIS FILE MANUALLY!
|
||||
|
||||
struct CDDevModelBehaviors {
|
||||
int ModelID;
|
||||
int BehaviorID;
|
||||
};
|
||||
|
||||
class CDDevModelBehaviorsTable : public CDTable {
|
||||
private:
|
||||
std::vector<CDDevModelBehaviors> m_entries;
|
||||
public:
|
||||
CDDevModelBehaviorsTable();
|
||||
~CDDevModelBehaviorsTable();
|
||||
std::string GetName(void) const override;
|
||||
|
||||
std::vector<CDDevModelBehaviors> Query(std::function<bool(CDDevModelBehaviors)> predicate);
|
||||
std::vector<CDDevModelBehaviors> GetEntries(void) const;
|
||||
};
|
||||
@@ -1,44 +0,0 @@
|
||||
#include "CDEmoteTable.h"
|
||||
|
||||
//! Constructor
|
||||
CDEmoteTableTable::CDEmoteTableTable(void) {
|
||||
auto tableData = CDClientDatabase::ExecuteQuery("SELECT * FROM Emotes");
|
||||
while (!tableData.eof()) {
|
||||
CDEmoteTable* entry = new CDEmoteTable();
|
||||
entry->ID = tableData.getIntField(0, -1);
|
||||
entry->animationName = tableData.getStringField(1, "");
|
||||
entry->iconFilename = tableData.getStringField(2, "");
|
||||
entry->channel = tableData.getIntField(3, -1);
|
||||
entry->locked = tableData.getIntField(5, -1) != 0;
|
||||
entry->localize = tableData.getIntField(6, -1) != 0;
|
||||
entry->locState = tableData.getIntField(7, -1);
|
||||
entry->gateVersion = tableData.getIntField(8, -1);
|
||||
|
||||
entries.insert(std::make_pair(entry->ID, entry));
|
||||
tableData.nextRow();
|
||||
}
|
||||
|
||||
tableData.finalize();
|
||||
}
|
||||
|
||||
//! Destructor
|
||||
CDEmoteTableTable::~CDEmoteTableTable(void) {
|
||||
for (auto e : entries) {
|
||||
if (e.second) delete e.second;
|
||||
}
|
||||
|
||||
entries.clear();
|
||||
}
|
||||
|
||||
//! Returns the table's name
|
||||
std::string CDEmoteTableTable::GetName(void) const {
|
||||
return "Emotes";
|
||||
}
|
||||
|
||||
CDEmoteTable * CDEmoteTableTable::GetEmote(int id) {
|
||||
for (auto e : entries) {
|
||||
if (e.first == id) return e.second;
|
||||
}
|
||||
|
||||
return nullptr;
|
||||
}
|
||||
@@ -1,56 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
// Custom Classes
|
||||
#include "CDTable.h"
|
||||
#include <map>
|
||||
|
||||
/*!
|
||||
\file CDEmoteTable.hpp
|
||||
\brief Contains data for the CDEmoteTable table
|
||||
*/
|
||||
|
||||
//! CDEmoteEntry Struct
|
||||
struct CDEmoteTable {
|
||||
CDEmoteTable() {
|
||||
ID = -1;
|
||||
animationName = "";
|
||||
iconFilename = "";
|
||||
locState = -1;
|
||||
channel = -1;
|
||||
locked = false;
|
||||
localize = false;
|
||||
gateVersion = -1;
|
||||
}
|
||||
|
||||
int ID;
|
||||
std::string animationName;
|
||||
std::string iconFilename;
|
||||
int locState;
|
||||
int channel;
|
||||
bool locked;
|
||||
bool localize;
|
||||
int gateVersion;
|
||||
};
|
||||
|
||||
//! CDEmoteTable table
|
||||
class CDEmoteTableTable : public CDTable {
|
||||
private:
|
||||
std::map<int, CDEmoteTable*> entries;
|
||||
|
||||
public:
|
||||
|
||||
//! Constructor
|
||||
CDEmoteTableTable(void);
|
||||
|
||||
//! Destructor
|
||||
~CDEmoteTableTable(void);
|
||||
|
||||
//! Returns the table's name
|
||||
/*!
|
||||
\return The table name
|
||||
*/
|
||||
std::string GetName(void) const override;
|
||||
|
||||
//! Returns an emote by ID
|
||||
CDEmoteTable* GetEmote(int id);
|
||||
};
|
||||
51
dDatabase/Tables/CDEmotesTable.cpp
Normal file
51
dDatabase/Tables/CDEmotesTable.cpp
Normal file
@@ -0,0 +1,51 @@
|
||||
#include "CDEmotesTable.h"
|
||||
//Generated by xmlDb2dDatabaseGenerator on 2022-03-04 00:23:32.969908
|
||||
//DO NOT EDIT THIS FILE MANUALLY!
|
||||
|
||||
CDEmotesTable::CDEmotesTable() {
|
||||
unsigned int size = 0;
|
||||
auto tableSize = CDClientDatabase::ExecuteQuery("SELECT COUNT(*) FROM Emotes");
|
||||
while (!tableSize.eof()) {
|
||||
size = tableSize.getIntField(0, 0);
|
||||
tableSize.nextRow();
|
||||
}
|
||||
|
||||
tableSize.finalize();
|
||||
this->m_entries.reserve(size);
|
||||
|
||||
auto tableData = CDClientDatabase::ExecuteQuery("SELECT * FROM Emotes");
|
||||
while (!tableData.eof()) {
|
||||
CDEmotes entry;
|
||||
entry.id = tableData.getIntField(0, int{});
|
||||
entry.outputText = tableData.getStringField(1, std::string{}.c_str());
|
||||
entry.targetText = tableData.getStringField(2, std::string{}.c_str());
|
||||
entry.animationName = tableData.getStringField(3, std::string{}.c_str());
|
||||
entry.iconFilename = tableData.getStringField(4, std::string{}.c_str());
|
||||
entry.channel = tableData.getStringField(5, std::string{}.c_str());
|
||||
entry.command = tableData.getStringField(6, std::string{}.c_str());
|
||||
entry.locked = tableData.getIntField(7, bool{});
|
||||
this->m_entries.push_back(entry);
|
||||
tableData.nextRow();
|
||||
}
|
||||
|
||||
tableData.finalize();
|
||||
}
|
||||
|
||||
CDEmotesTable::~CDEmotesTable() {
|
||||
}
|
||||
|
||||
std::string CDEmotesTable::GetName(void) const {
|
||||
return "Emotes";
|
||||
}
|
||||
|
||||
std::vector<CDEmotes> CDEmotesTable::Query(std::function<bool(CDEmotes)> predicate) {
|
||||
std::vector<CDEmotes> data = cpplinq::from(this->m_entries)
|
||||
>> cpplinq::where(predicate)
|
||||
>> cpplinq::to_vector();
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
std::vector<CDEmotes> CDEmotesTable::GetEntries(void) const {
|
||||
return this->m_entries;
|
||||
}
|
||||
28
dDatabase/Tables/CDEmotesTable.h
Normal file
28
dDatabase/Tables/CDEmotesTable.h
Normal file
@@ -0,0 +1,28 @@
|
||||
#pragma once
|
||||
#include "CDTable.h"
|
||||
|
||||
//Generated by xmlDb2dDatabaseGenerator on 2022-03-04 00:23:32.968910
|
||||
//DO NOT EDIT THIS FILE MANUALLY!
|
||||
|
||||
struct CDEmotes {
|
||||
int id;
|
||||
std::string outputText;
|
||||
std::string targetText;
|
||||
std::string animationName;
|
||||
std::string iconFilename;
|
||||
std::string channel;
|
||||
std::string command;
|
||||
bool locked;
|
||||
};
|
||||
|
||||
class CDEmotesTable : public CDTable {
|
||||
private:
|
||||
std::vector<CDEmotes> m_entries;
|
||||
public:
|
||||
CDEmotesTable();
|
||||
~CDEmotesTable();
|
||||
std::string GetName(void) const override;
|
||||
|
||||
std::vector<CDEmotes> Query(std::function<bool(CDEmotes)> predicate);
|
||||
std::vector<CDEmotes> GetEntries(void) const;
|
||||
};
|
||||
52
dDatabase/Tables/CDExhibitComponentTable.cpp
Normal file
52
dDatabase/Tables/CDExhibitComponentTable.cpp
Normal file
@@ -0,0 +1,52 @@
|
||||
#include "CDExhibitComponentTable.h"
|
||||
//Generated by xmlDb2dDatabaseGenerator on 2022-03-04 00:23:32.974894
|
||||
//DO NOT EDIT THIS FILE MANUALLY!
|
||||
|
||||
CDExhibitComponentTable::CDExhibitComponentTable() {
|
||||
unsigned int size = 0;
|
||||
auto tableSize = CDClientDatabase::ExecuteQuery("SELECT COUNT(*) FROM ExhibitComponent");
|
||||
while (!tableSize.eof()) {
|
||||
size = tableSize.getIntField(0, 0);
|
||||
tableSize.nextRow();
|
||||
}
|
||||
|
||||
tableSize.finalize();
|
||||
this->m_entries.reserve(size);
|
||||
|
||||
auto tableData = CDClientDatabase::ExecuteQuery("SELECT * FROM ExhibitComponent");
|
||||
while (!tableData.eof()) {
|
||||
CDExhibitComponent entry;
|
||||
entry.id = tableData.getIntField(0, int{});
|
||||
entry.length = tableData.getFloatField(1, float{});
|
||||
entry.width = tableData.getFloatField(2, float{});
|
||||
entry.height = tableData.getFloatField(3, float{});
|
||||
entry.offsetX = tableData.getFloatField(4, float{});
|
||||
entry.offsetY = tableData.getFloatField(5, float{});
|
||||
entry.offsetZ = tableData.getFloatField(6, float{});
|
||||
entry.fReputationSizeMultiplier = tableData.getFloatField(7, float{});
|
||||
entry.fImaginationCost = tableData.getFloatField(8, float{});
|
||||
this->m_entries.push_back(entry);
|
||||
tableData.nextRow();
|
||||
}
|
||||
|
||||
tableData.finalize();
|
||||
}
|
||||
|
||||
CDExhibitComponentTable::~CDExhibitComponentTable() {
|
||||
}
|
||||
|
||||
std::string CDExhibitComponentTable::GetName(void) const {
|
||||
return "ExhibitComponent";
|
||||
}
|
||||
|
||||
std::vector<CDExhibitComponent> CDExhibitComponentTable::Query(std::function<bool(CDExhibitComponent)> predicate) {
|
||||
std::vector<CDExhibitComponent> data = cpplinq::from(this->m_entries)
|
||||
>> cpplinq::where(predicate)
|
||||
>> cpplinq::to_vector();
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
std::vector<CDExhibitComponent> CDExhibitComponentTable::GetEntries(void) const {
|
||||
return this->m_entries;
|
||||
}
|
||||
29
dDatabase/Tables/CDExhibitComponentTable.h
Normal file
29
dDatabase/Tables/CDExhibitComponentTable.h
Normal file
@@ -0,0 +1,29 @@
|
||||
#pragma once
|
||||
#include "CDTable.h"
|
||||
|
||||
//Generated by xmlDb2dDatabaseGenerator on 2022-03-04 00:23:32.972899
|
||||
//DO NOT EDIT THIS FILE MANUALLY!
|
||||
|
||||
struct CDExhibitComponent {
|
||||
int id;
|
||||
float length;
|
||||
float width;
|
||||
float height;
|
||||
float offsetX;
|
||||
float offsetY;
|
||||
float offsetZ;
|
||||
float fReputationSizeMultiplier;
|
||||
float fImaginationCost;
|
||||
};
|
||||
|
||||
class CDExhibitComponentTable : public CDTable {
|
||||
private:
|
||||
std::vector<CDExhibitComponent> m_entries;
|
||||
public:
|
||||
CDExhibitComponentTable();
|
||||
~CDExhibitComponentTable();
|
||||
std::string GetName(void) const override;
|
||||
|
||||
std::vector<CDExhibitComponent> Query(std::function<bool(CDExhibitComponent)> predicate);
|
||||
std::vector<CDExhibitComponent> GetEntries(void) const;
|
||||
};
|
||||
47
dDatabase/Tables/CDFactionsTable.cpp
Normal file
47
dDatabase/Tables/CDFactionsTable.cpp
Normal file
@@ -0,0 +1,47 @@
|
||||
#include "CDFactionsTable.h"
|
||||
//Generated by xmlDb2dDatabaseGenerator on 2022-03-04 00:23:32.979881
|
||||
//DO NOT EDIT THIS FILE MANUALLY!
|
||||
|
||||
CDFactionsTable::CDFactionsTable() {
|
||||
unsigned int size = 0;
|
||||
auto tableSize = CDClientDatabase::ExecuteQuery("SELECT COUNT(*) FROM Factions");
|
||||
while (!tableSize.eof()) {
|
||||
size = tableSize.getIntField(0, 0);
|
||||
tableSize.nextRow();
|
||||
}
|
||||
|
||||
tableSize.finalize();
|
||||
this->m_entries.reserve(size);
|
||||
|
||||
auto tableData = CDClientDatabase::ExecuteQuery("SELECT * FROM Factions");
|
||||
while (!tableData.eof()) {
|
||||
CDFactions entry;
|
||||
entry.faction = tableData.getIntField(0, int{});
|
||||
entry.factionList = tableData.getStringField(1, std::string{}.c_str());
|
||||
entry.factionListFriendly = tableData.getIntField(2, bool{});
|
||||
entry.description = tableData.getStringField(3, std::string{}.c_str());
|
||||
this->m_entries.push_back(entry);
|
||||
tableData.nextRow();
|
||||
}
|
||||
|
||||
tableData.finalize();
|
||||
}
|
||||
|
||||
CDFactionsTable::~CDFactionsTable() {
|
||||
}
|
||||
|
||||
std::string CDFactionsTable::GetName(void) const {
|
||||
return "Factions";
|
||||
}
|
||||
|
||||
std::vector<CDFactions> CDFactionsTable::Query(std::function<bool(CDFactions)> predicate) {
|
||||
std::vector<CDFactions> data = cpplinq::from(this->m_entries)
|
||||
>> cpplinq::where(predicate)
|
||||
>> cpplinq::to_vector();
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
std::vector<CDFactions> CDFactionsTable::GetEntries(void) const {
|
||||
return this->m_entries;
|
||||
}
|
||||
24
dDatabase/Tables/CDFactionsTable.h
Normal file
24
dDatabase/Tables/CDFactionsTable.h
Normal file
@@ -0,0 +1,24 @@
|
||||
#pragma once
|
||||
#include "CDTable.h"
|
||||
|
||||
//Generated by xmlDb2dDatabaseGenerator on 2022-03-04 00:23:32.977888
|
||||
//DO NOT EDIT THIS FILE MANUALLY!
|
||||
|
||||
struct CDFactions {
|
||||
int faction;
|
||||
std::string factionList;
|
||||
bool factionListFriendly;
|
||||
std::string description;
|
||||
};
|
||||
|
||||
class CDFactionsTable : public CDTable {
|
||||
private:
|
||||
std::vector<CDFactions> m_entries;
|
||||
public:
|
||||
CDFactionsTable();
|
||||
~CDFactionsTable();
|
||||
std::string GetName(void) const override;
|
||||
|
||||
std::vector<CDFactions> Query(std::function<bool(CDFactions)> predicate);
|
||||
std::vector<CDFactions> GetEntries(void) const;
|
||||
};
|
||||
@@ -1,71 +0,0 @@
|
||||
#include "CDFeatureGatingTable.h"
|
||||
|
||||
//! Constructor
|
||||
CDFeatureGatingTable::CDFeatureGatingTable(void) {
|
||||
|
||||
// First, get the size of the table
|
||||
unsigned int size = 0;
|
||||
auto tableSize = CDClientDatabase::ExecuteQuery("SELECT COUNT(*) FROM FeatureGating");
|
||||
while (!tableSize.eof()) {
|
||||
size = tableSize.getIntField(0, 0);
|
||||
|
||||
tableSize.nextRow();
|
||||
}
|
||||
|
||||
tableSize.finalize();
|
||||
|
||||
// Reserve the size
|
||||
this->entries.reserve(size);
|
||||
|
||||
// Now get the data
|
||||
auto tableData = CDClientDatabase::ExecuteQuery("SELECT * FROM FeatureGating");
|
||||
while (!tableData.eof()) {
|
||||
CDFeatureGating entry;
|
||||
entry.featureName = tableData.getStringField(0, "");
|
||||
entry.major = tableData.getIntField(1, -1);
|
||||
entry.current = tableData.getIntField(2, -1);
|
||||
entry.minor = tableData.getIntField(3, -1);
|
||||
entry.description = tableData.getStringField(4, "");
|
||||
|
||||
this->entries.push_back(entry);
|
||||
tableData.nextRow();
|
||||
}
|
||||
|
||||
tableData.finalize();
|
||||
}
|
||||
|
||||
//! Destructor
|
||||
CDFeatureGatingTable::~CDFeatureGatingTable(void) { }
|
||||
|
||||
//! Returns the table's name
|
||||
std::string CDFeatureGatingTable::GetName(void) const {
|
||||
return "FeatureGating";
|
||||
}
|
||||
|
||||
//! Queries the table with a custom "where" clause
|
||||
std::vector<CDFeatureGating> CDFeatureGatingTable::Query(std::function<bool(CDFeatureGating)> predicate) {
|
||||
|
||||
std::vector<CDFeatureGating> data = cpplinq::from(this->entries)
|
||||
>> cpplinq::where(predicate)
|
||||
>> cpplinq::to_vector();
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
bool CDFeatureGatingTable::FeatureUnlocked(const std::string& feature) const
|
||||
{
|
||||
for (const auto& entry : entries)
|
||||
{
|
||||
if (entry.featureName == feature)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
//! Gets all the entries in the table
|
||||
std::vector<CDFeatureGating> CDFeatureGatingTable::GetEntries(void) const {
|
||||
return this->entries;
|
||||
}
|
||||
@@ -1,52 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
// Custom Classes
|
||||
#include "CDTable.h"
|
||||
|
||||
/*!
|
||||
\file CDFeatureGatingTable.hpp
|
||||
*/
|
||||
|
||||
//! ItemComponent Struct
|
||||
struct CDFeatureGating {
|
||||
std::string featureName;
|
||||
int32_t major;
|
||||
int32_t current;
|
||||
int32_t minor;
|
||||
std::string description;
|
||||
};
|
||||
|
||||
//! ItemComponent table
|
||||
class CDFeatureGatingTable : public CDTable {
|
||||
private:
|
||||
std::vector<CDFeatureGating> entries;
|
||||
|
||||
public:
|
||||
|
||||
//! Constructor
|
||||
CDFeatureGatingTable(void);
|
||||
|
||||
//! Destructor
|
||||
~CDFeatureGatingTable(void);
|
||||
|
||||
//! Returns the table's name
|
||||
/*!
|
||||
\return The table name
|
||||
*/
|
||||
std::string GetName(void) const override;
|
||||
|
||||
//! Queries the table with a custom "where" clause
|
||||
/*!
|
||||
\param predicate The predicate
|
||||
*/
|
||||
std::vector<CDFeatureGating> Query(std::function<bool(CDFeatureGating)> predicate);
|
||||
|
||||
bool FeatureUnlocked(const std::string& feature) const;
|
||||
|
||||
//! Gets all the entries in the table
|
||||
/*!
|
||||
\return The entries
|
||||
*/
|
||||
std::vector<CDFeatureGating> GetEntries(void) const;
|
||||
|
||||
};
|
||||
45
dDatabase/Tables/CDFlairTableTable.cpp
Normal file
45
dDatabase/Tables/CDFlairTableTable.cpp
Normal file
@@ -0,0 +1,45 @@
|
||||
#include "CDFlairTableTable.h"
|
||||
//Generated by xmlDb2dDatabaseGenerator on 2022-03-04 00:23:32.985865
|
||||
//DO NOT EDIT THIS FILE MANUALLY!
|
||||
|
||||
CDFlairTableTable::CDFlairTableTable() {
|
||||
unsigned int size = 0;
|
||||
auto tableSize = CDClientDatabase::ExecuteQuery("SELECT COUNT(*) FROM FlairTable");
|
||||
while (!tableSize.eof()) {
|
||||
size = tableSize.getIntField(0, 0);
|
||||
tableSize.nextRow();
|
||||
}
|
||||
|
||||
tableSize.finalize();
|
||||
this->m_entries.reserve(size);
|
||||
|
||||
auto tableData = CDClientDatabase::ExecuteQuery("SELECT * FROM FlairTable");
|
||||
while (!tableData.eof()) {
|
||||
CDFlairTable entry;
|
||||
entry.id = tableData.getIntField(0, int{});
|
||||
entry.asset = tableData.getStringField(1, std::string{}.c_str());
|
||||
this->m_entries.push_back(entry);
|
||||
tableData.nextRow();
|
||||
}
|
||||
|
||||
tableData.finalize();
|
||||
}
|
||||
|
||||
CDFlairTableTable::~CDFlairTableTable() {
|
||||
}
|
||||
|
||||
std::string CDFlairTableTable::GetName(void) const {
|
||||
return "FlairTable";
|
||||
}
|
||||
|
||||
std::vector<CDFlairTable> CDFlairTableTable::Query(std::function<bool(CDFlairTable)> predicate) {
|
||||
std::vector<CDFlairTable> data = cpplinq::from(this->m_entries)
|
||||
>> cpplinq::where(predicate)
|
||||
>> cpplinq::to_vector();
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
std::vector<CDFlairTable> CDFlairTableTable::GetEntries(void) const {
|
||||
return this->m_entries;
|
||||
}
|
||||
22
dDatabase/Tables/CDFlairTableTable.h
Normal file
22
dDatabase/Tables/CDFlairTableTable.h
Normal file
@@ -0,0 +1,22 @@
|
||||
#pragma once
|
||||
#include "CDTable.h"
|
||||
|
||||
//Generated by xmlDb2dDatabaseGenerator on 2022-03-04 00:23:32.982873
|
||||
//DO NOT EDIT THIS FILE MANUALLY!
|
||||
|
||||
struct CDFlairTable {
|
||||
int id;
|
||||
std::string asset;
|
||||
};
|
||||
|
||||
class CDFlairTableTable : public CDTable {
|
||||
private:
|
||||
std::vector<CDFlairTable> m_entries;
|
||||
public:
|
||||
CDFlairTableTable();
|
||||
~CDFlairTableTable();
|
||||
std::string GetName(void) const override;
|
||||
|
||||
std::vector<CDFlairTable> Query(std::function<bool(CDFlairTable)> predicate);
|
||||
std::vector<CDFlairTable> GetEntries(void) const;
|
||||
};
|
||||
50
dDatabase/Tables/CDFootstepsTable.cpp
Normal file
50
dDatabase/Tables/CDFootstepsTable.cpp
Normal file
@@ -0,0 +1,50 @@
|
||||
#include "CDFootstepsTable.h"
|
||||
//Generated by xmlDb2dDatabaseGenerator on 2022-03-04 00:23:32.988857
|
||||
//DO NOT EDIT THIS FILE MANUALLY!
|
||||
|
||||
CDFootstepsTable::CDFootstepsTable() {
|
||||
unsigned int size = 0;
|
||||
auto tableSize = CDClientDatabase::ExecuteQuery("SELECT COUNT(*) FROM Footsteps");
|
||||
while (!tableSize.eof()) {
|
||||
size = tableSize.getIntField(0, 0);
|
||||
tableSize.nextRow();
|
||||
}
|
||||
|
||||
tableSize.finalize();
|
||||
this->m_entries.reserve(size);
|
||||
|
||||
auto tableData = CDClientDatabase::ExecuteQuery("SELECT * FROM Footsteps");
|
||||
while (!tableData.eof()) {
|
||||
CDFootsteps entry;
|
||||
entry.objectType = tableData.getStringField(0, std::string{}.c_str());
|
||||
entry.stone = tableData.getStringField(1, std::string{}.c_str());
|
||||
entry.grass = tableData.getStringField(2, std::string{}.c_str());
|
||||
entry.wood = tableData.getStringField(3, std::string{}.c_str());
|
||||
entry.plastic = tableData.getStringField(4, std::string{}.c_str());
|
||||
entry.gravel = tableData.getStringField(5, std::string{}.c_str());
|
||||
entry.mud = tableData.getStringField(6, std::string{}.c_str());
|
||||
this->m_entries.push_back(entry);
|
||||
tableData.nextRow();
|
||||
}
|
||||
|
||||
tableData.finalize();
|
||||
}
|
||||
|
||||
CDFootstepsTable::~CDFootstepsTable() {
|
||||
}
|
||||
|
||||
std::string CDFootstepsTable::GetName(void) const {
|
||||
return "Footsteps";
|
||||
}
|
||||
|
||||
std::vector<CDFootsteps> CDFootstepsTable::Query(std::function<bool(CDFootsteps)> predicate) {
|
||||
std::vector<CDFootsteps> data = cpplinq::from(this->m_entries)
|
||||
>> cpplinq::where(predicate)
|
||||
>> cpplinq::to_vector();
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
std::vector<CDFootsteps> CDFootstepsTable::GetEntries(void) const {
|
||||
return this->m_entries;
|
||||
}
|
||||
27
dDatabase/Tables/CDFootstepsTable.h
Normal file
27
dDatabase/Tables/CDFootstepsTable.h
Normal file
@@ -0,0 +1,27 @@
|
||||
#pragma once
|
||||
#include "CDTable.h"
|
||||
|
||||
//Generated by xmlDb2dDatabaseGenerator on 2022-03-04 00:23:32.987860
|
||||
//DO NOT EDIT THIS FILE MANUALLY!
|
||||
|
||||
struct CDFootsteps {
|
||||
std::string objectType;
|
||||
std::string stone;
|
||||
std::string grass;
|
||||
std::string wood;
|
||||
std::string plastic;
|
||||
std::string gravel;
|
||||
std::string mud;
|
||||
};
|
||||
|
||||
class CDFootstepsTable : public CDTable {
|
||||
private:
|
||||
std::vector<CDFootsteps> m_entries;
|
||||
public:
|
||||
CDFootstepsTable();
|
||||
~CDFootstepsTable();
|
||||
std::string GetName(void) const override;
|
||||
|
||||
std::vector<CDFootsteps> Query(std::function<bool(CDFootsteps)> predicate);
|
||||
std::vector<CDFootsteps> GetEntries(void) const;
|
||||
};
|
||||
46
dDatabase/Tables/CDIconsTable.cpp
Normal file
46
dDatabase/Tables/CDIconsTable.cpp
Normal file
@@ -0,0 +1,46 @@
|
||||
#include "CDIconsTable.h"
|
||||
//Generated by xmlDb2dDatabaseGenerator on 2022-03-04 00:23:32.990911
|
||||
//DO NOT EDIT THIS FILE MANUALLY!
|
||||
|
||||
CDIconsTable::CDIconsTable() {
|
||||
unsigned int size = 0;
|
||||
auto tableSize = CDClientDatabase::ExecuteQuery("SELECT COUNT(*) FROM Icons");
|
||||
while (!tableSize.eof()) {
|
||||
size = tableSize.getIntField(0, 0);
|
||||
tableSize.nextRow();
|
||||
}
|
||||
|
||||
tableSize.finalize();
|
||||
this->m_entries.reserve(size);
|
||||
|
||||
auto tableData = CDClientDatabase::ExecuteQuery("SELECT * FROM Icons");
|
||||
while (!tableData.eof()) {
|
||||
CDIcons entry;
|
||||
entry.IconID = tableData.getIntField(0, int{});
|
||||
entry.IconPath = tableData.getStringField(1, std::string{}.c_str());
|
||||
entry.IconName = tableData.getStringField(2, std::string{}.c_str());
|
||||
this->m_entries.push_back(entry);
|
||||
tableData.nextRow();
|
||||
}
|
||||
|
||||
tableData.finalize();
|
||||
}
|
||||
|
||||
CDIconsTable::~CDIconsTable() {
|
||||
}
|
||||
|
||||
std::string CDIconsTable::GetName(void) const {
|
||||
return "Icons";
|
||||
}
|
||||
|
||||
std::vector<CDIcons> CDIconsTable::Query(std::function<bool(CDIcons)> predicate) {
|
||||
std::vector<CDIcons> data = cpplinq::from(this->m_entries)
|
||||
>> cpplinq::where(predicate)
|
||||
>> cpplinq::to_vector();
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
std::vector<CDIcons> CDIconsTable::GetEntries(void) const {
|
||||
return this->m_entries;
|
||||
}
|
||||
23
dDatabase/Tables/CDIconsTable.h
Normal file
23
dDatabase/Tables/CDIconsTable.h
Normal file
@@ -0,0 +1,23 @@
|
||||
#pragma once
|
||||
#include "CDTable.h"
|
||||
|
||||
//Generated by xmlDb2dDatabaseGenerator on 2022-03-04 00:23:32.989854
|
||||
//DO NOT EDIT THIS FILE MANUALLY!
|
||||
|
||||
struct CDIcons {
|
||||
int IconID;
|
||||
std::string IconPath;
|
||||
std::string IconName;
|
||||
};
|
||||
|
||||
class CDIconsTable : public CDTable {
|
||||
private:
|
||||
std::vector<CDIcons> m_entries;
|
||||
public:
|
||||
CDIconsTable();
|
||||
~CDIconsTable();
|
||||
std::string GetName(void) const override;
|
||||
|
||||
std::vector<CDIcons> Query(std::function<bool(CDIcons)> predicate);
|
||||
std::vector<CDIcons> GetEntries(void) const;
|
||||
};
|
||||
@@ -1,57 +1,47 @@
|
||||
#include "CDInventoryComponentTable.h"
|
||||
//Generated by xmlDb2dDatabaseGenerator on 2022-03-04 00:23:32.994844
|
||||
//DO NOT EDIT THIS FILE MANUALLY!
|
||||
|
||||
CDInventoryComponentTable::CDInventoryComponentTable() {
|
||||
unsigned int size = 0;
|
||||
auto tableSize = CDClientDatabase::ExecuteQuery("SELECT COUNT(*) FROM InventoryComponent");
|
||||
while (!tableSize.eof()) {
|
||||
size = tableSize.getIntField(0, 0);
|
||||
tableSize.nextRow();
|
||||
}
|
||||
|
||||
//! Constructor
|
||||
CDInventoryComponentTable::CDInventoryComponentTable(void) {
|
||||
|
||||
// First, get the size of the table
|
||||
unsigned int size = 0;
|
||||
auto tableSize = CDClientDatabase::ExecuteQuery("SELECT COUNT(*) FROM InventoryComponent");
|
||||
while (!tableSize.eof()) {
|
||||
size = tableSize.getIntField(0, 0);
|
||||
|
||||
tableSize.nextRow();
|
||||
}
|
||||
|
||||
tableSize.finalize();
|
||||
|
||||
// Reserve the size
|
||||
this->entries.reserve(size);
|
||||
|
||||
// Now get the data
|
||||
auto tableData = CDClientDatabase::ExecuteQuery("SELECT * FROM InventoryComponent");
|
||||
while (!tableData.eof()) {
|
||||
CDInventoryComponent entry;
|
||||
entry.id = tableData.getIntField(0, -1);
|
||||
entry.itemid = tableData.getIntField(1, -1);
|
||||
entry.count = tableData.getIntField(2, -1);
|
||||
entry.equip = tableData.getIntField(3, -1) == 1 ? true : false;
|
||||
|
||||
this->entries.push_back(entry);
|
||||
tableData.nextRow();
|
||||
}
|
||||
this->m_entries.reserve(size);
|
||||
|
||||
auto tableData = CDClientDatabase::ExecuteQuery("SELECT * FROM InventoryComponent");
|
||||
while (!tableData.eof()) {
|
||||
CDInventoryComponent entry;
|
||||
entry.id = tableData.getIntField(0, int{});
|
||||
entry.itemid = tableData.getIntField(1, int{});
|
||||
entry.count = tableData.getIntField(2, int{});
|
||||
entry.equip = tableData.getIntField(3, bool{});
|
||||
this->m_entries.push_back(entry);
|
||||
tableData.nextRow();
|
||||
}
|
||||
|
||||
tableData.finalize();
|
||||
}
|
||||
|
||||
//! Destructor
|
||||
CDInventoryComponentTable::~CDInventoryComponentTable(void) { }
|
||||
CDInventoryComponentTable::~CDInventoryComponentTable() {
|
||||
}
|
||||
|
||||
//! Returns the table's name
|
||||
std::string CDInventoryComponentTable::GetName(void) const {
|
||||
return "InventoryComponent";
|
||||
return "InventoryComponent";
|
||||
}
|
||||
|
||||
//! Queries the table with a custom "where" clause
|
||||
std::vector<CDInventoryComponent> CDInventoryComponentTable::Query(std::function<bool(CDInventoryComponent)> predicate) {
|
||||
|
||||
std::vector<CDInventoryComponent> data = cpplinq::from(this->entries)
|
||||
>> cpplinq::where(predicate)
|
||||
>> cpplinq::to_vector();
|
||||
|
||||
return data;
|
||||
std::vector<CDInventoryComponent> data = cpplinq::from(this->m_entries)
|
||||
>> cpplinq::where(predicate)
|
||||
>> cpplinq::to_vector();
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
//! Gets all the entries in the table
|
||||
std::vector<CDInventoryComponent> CDInventoryComponentTable::GetEntries(void) const {
|
||||
return this->entries;
|
||||
return this->m_entries;
|
||||
}
|
||||
|
||||
@@ -1,50 +1,24 @@
|
||||
#pragma once
|
||||
|
||||
// Custom Classes
|
||||
#include "CDTable.h"
|
||||
|
||||
/*!
|
||||
\file CDInventoryComponentTable.hpp
|
||||
\brief Contains data for the InventoryComponent table
|
||||
*/
|
||||
//Generated by xmlDb2dDatabaseGenerator on 2022-03-04 00:23:32.993843
|
||||
//DO NOT EDIT THIS FILE MANUALLY!
|
||||
|
||||
//! ItemComponent Struct
|
||||
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
|
||||
bool equip; //!< Whether or not to equip the item
|
||||
int id;
|
||||
int itemid;
|
||||
int count;
|
||||
bool equip;
|
||||
};
|
||||
|
||||
//! ItemComponent table
|
||||
class CDInventoryComponentTable : public CDTable {
|
||||
private:
|
||||
std::vector<CDInventoryComponent> entries;
|
||||
|
||||
std::vector<CDInventoryComponent> m_entries;
|
||||
public:
|
||||
|
||||
//! Constructor
|
||||
CDInventoryComponentTable(void);
|
||||
|
||||
//! Destructor
|
||||
~CDInventoryComponentTable(void);
|
||||
|
||||
//! Returns the table's name
|
||||
/*!
|
||||
\return The table name
|
||||
*/
|
||||
std::string GetName(void) const override;
|
||||
|
||||
//! Queries the table with a custom "where" clause
|
||||
/*!
|
||||
\param predicate The predicate
|
||||
*/
|
||||
std::vector<CDInventoryComponent> Query(std::function<bool(CDInventoryComponent)> predicate);
|
||||
|
||||
//! Gets all the entries in the table
|
||||
/*!
|
||||
\return The entries
|
||||
*/
|
||||
std::vector<CDInventoryComponent> GetEntries(void) const;
|
||||
|
||||
CDInventoryComponentTable();
|
||||
~CDInventoryComponentTable();
|
||||
std::string GetName(void) const override;
|
||||
|
||||
std::vector<CDInventoryComponent> Query(std::function<bool(CDInventoryComponent)> predicate);
|
||||
std::vector<CDInventoryComponent> GetEntries(void) const;
|
||||
};
|
||||
|
||||
@@ -1,179 +1,74 @@
|
||||
#include "CDItemComponentTable.h"
|
||||
#include "GeneralUtils.h"
|
||||
//Generated by xmlDb2dDatabaseGenerator on 2022-03-04 00:23:32.999829
|
||||
//DO NOT EDIT THIS FILE MANUALLY!
|
||||
|
||||
CDItemComponent CDItemComponentTable::Default = {};
|
||||
CDItemComponentTable::CDItemComponentTable() {
|
||||
unsigned int size = 0;
|
||||
auto tableSize = CDClientDatabase::ExecuteQuery("SELECT COUNT(*) FROM ItemComponent");
|
||||
while (!tableSize.eof()) {
|
||||
size = tableSize.getIntField(0, 0);
|
||||
tableSize.nextRow();
|
||||
}
|
||||
|
||||
//! Constructor
|
||||
CDItemComponentTable::CDItemComponentTable(void) {
|
||||
Default = CDItemComponent();
|
||||
|
||||
#ifdef CDCLIENT_CACHE_ALL
|
||||
// First, get the size of the table
|
||||
unsigned int size = 0;
|
||||
auto tableSize = CDClientDatabase::ExecuteQuery("SELECT COUNT(*) FROM ItemComponent");
|
||||
while (!tableSize.eof()) {
|
||||
size = tableSize.getIntField(0, 0);
|
||||
|
||||
tableSize.nextRow();
|
||||
}
|
||||
|
||||
tableSize.finalize();
|
||||
|
||||
// Now get the data
|
||||
auto tableData = CDClientDatabase::ExecuteQuery("SELECT * FROM ItemComponent");
|
||||
while (!tableData.eof()) {
|
||||
CDItemComponent entry;
|
||||
entry.id = tableData.getIntField(0, -1);
|
||||
entry.equipLocation = tableData.getStringField(1, "");
|
||||
entry.baseValue = tableData.getIntField(2, -1);
|
||||
entry.isKitPiece = tableData.getIntField(3, -1) == 1 ? true : false;
|
||||
entry.rarity = tableData.getIntField(4, 0);
|
||||
entry.itemType = tableData.getIntField(5, -1);
|
||||
entry.itemInfo = tableData.getInt64Field(6, -1);
|
||||
entry.inLootTable = tableData.getIntField(7, -1) == 1 ? true : false;
|
||||
entry.inVendor = tableData.getIntField(8, -1) == 1 ? true : false;
|
||||
entry.isUnique = tableData.getIntField(9, -1) == 1 ? true : false;
|
||||
entry.isBOP = tableData.getIntField(10, -1) == 1 ? true : false;
|
||||
entry.isBOE = tableData.getIntField(11, -1) == 1 ? true : false;
|
||||
entry.reqFlagID = tableData.getIntField(12, -1);
|
||||
entry.reqSpecialtyID = tableData.getIntField(13, -1);
|
||||
entry.reqSpecRank = tableData.getIntField(14, -1);
|
||||
entry.reqAchievementID = tableData.getIntField(15, -1);
|
||||
entry.stackSize = tableData.getIntField(16, -1);
|
||||
entry.color1 = tableData.getIntField(17, -1);
|
||||
entry.decal = tableData.getIntField(18, -1);
|
||||
entry.offsetGroupID = tableData.getIntField(19, -1);
|
||||
entry.buildTypes = tableData.getIntField(20, -1);
|
||||
entry.reqPrecondition = tableData.getStringField(21, "");
|
||||
entry.animationFlag = tableData.getIntField(22, -1);
|
||||
entry.equipEffects = tableData.getIntField(23, -1);
|
||||
entry.readyForQA = tableData.getIntField(24, -1) == 1 ? true : false;
|
||||
entry.itemRating = tableData.getIntField(25, -1);
|
||||
entry.isTwoHanded = tableData.getIntField(26, -1) == 1 ? true : false;
|
||||
entry.minNumRequired = tableData.getIntField(27, -1);
|
||||
entry.delResIndex = tableData.getIntField(28, -1);
|
||||
entry.currencyLOT = tableData.getIntField(29, -1);
|
||||
entry.altCurrencyCost = tableData.getIntField(30, -1);
|
||||
entry.subItems = tableData.getStringField(31, "");
|
||||
entry.audioEventUse = tableData.getStringField(32, "");
|
||||
entry.noEquipAnimation = tableData.getIntField(33, -1) == 1 ? true : false;
|
||||
entry.commendationLOT = tableData.getIntField(34, -1);
|
||||
entry.commendationCost = tableData.getIntField(35, -1);
|
||||
entry.audioEquipMetaEventSet = tableData.getStringField(36, "");
|
||||
entry.currencyCosts = tableData.getStringField(37, "");
|
||||
entry.ingredientInfo = tableData.getStringField(38, "");
|
||||
entry.locStatus = tableData.getIntField(39, -1);
|
||||
entry.forgeType = tableData.getIntField(40, -1);
|
||||
entry.SellMultiplier = tableData.getFloatField(41, -1.0f);
|
||||
|
||||
this->entries.insert(std::make_pair(entry.id, entry));
|
||||
this->m_entries.reserve(size);
|
||||
|
||||
auto tableData = CDClientDatabase::ExecuteQuery("SELECT * FROM ItemComponent");
|
||||
while (!tableData.eof()) {
|
||||
CDItemComponent entry;
|
||||
entry.id = tableData.getIntField(0, int{});
|
||||
entry.equipLocation = tableData.getStringField(1, std::string{}.c_str());
|
||||
entry.baseValue = tableData.getIntField(2, int{});
|
||||
entry.isKitPiece = tableData.getIntField(3, bool{});
|
||||
entry.rarity = tableData.getIntField(4, int{});
|
||||
entry.itemType = tableData.getIntField(5, int{});
|
||||
entry.itemInfo = tableData.getIntField(6, int{});
|
||||
entry.inLootTable = tableData.getIntField(7, bool{});
|
||||
entry.inVendor = tableData.getIntField(8, bool{});
|
||||
entry.isUnique = tableData.getIntField(9, bool{});
|
||||
entry.isBOP = tableData.getIntField(10, bool{});
|
||||
entry.isBOE = tableData.getIntField(11, bool{});
|
||||
entry.reqFactionID = tableData.getIntField(12, int{});
|
||||
entry.reqSpecialtyID = tableData.getIntField(13, int{});
|
||||
entry.reqSpecRank = tableData.getIntField(14, int{});
|
||||
entry.reqAchievementID = tableData.getIntField(15, int{});
|
||||
entry.stackSize = tableData.getIntField(16, int{});
|
||||
entry.color1 = tableData.getIntField(17, int{});
|
||||
entry.decal = tableData.getIntField(18, int{});
|
||||
entry.offsetGroupID = tableData.getIntField(19, int{});
|
||||
entry.buildTypes = tableData.getIntField(20, int{});
|
||||
entry.reqPrecondition = tableData.getStringField(21, std::string{}.c_str());
|
||||
entry.weaponType = tableData.getIntField(22, int{});
|
||||
entry.equipEffects = tableData.getIntField(23, int{});
|
||||
entry.readyForQA = tableData.getIntField(24, bool{});
|
||||
entry.itemRating = tableData.getIntField(25, int{});
|
||||
entry.isTwoHanded = tableData.getIntField(26, bool{});
|
||||
entry.minNumRequired = tableData.getIntField(27, int{});
|
||||
entry.delResIndex = tableData.getIntField(28, int{});
|
||||
entry.currencyLOT = tableData.getIntField(29, int{});
|
||||
entry.altCurrencyCost = tableData.getIntField(30, int{});
|
||||
this->m_entries.push_back(entry);
|
||||
tableData.nextRow();
|
||||
}
|
||||
}
|
||||
|
||||
tableData.finalize();
|
||||
#endif
|
||||
}
|
||||
|
||||
//! Destructor
|
||||
CDItemComponentTable::~CDItemComponentTable(void) { }
|
||||
CDItemComponentTable::~CDItemComponentTable() {
|
||||
}
|
||||
|
||||
//! Returns the table's name
|
||||
std::string CDItemComponentTable::GetName(void) const {
|
||||
return "ItemComponent";
|
||||
return "ItemComponent";
|
||||
}
|
||||
|
||||
const CDItemComponent & CDItemComponentTable::GetItemComponentByID(unsigned int skillID) {
|
||||
const auto& it = this->entries.find(skillID);
|
||||
if (it != this->entries.end()) {
|
||||
return it->second;
|
||||
}
|
||||
std::vector<CDItemComponent> CDItemComponentTable::Query(std::function<bool(CDItemComponent)> predicate) {
|
||||
std::vector<CDItemComponent> data = cpplinq::from(this->m_entries)
|
||||
>> cpplinq::where(predicate)
|
||||
>> cpplinq::to_vector();
|
||||
|
||||
#ifndef CDCLIENT_CACHE_ALL
|
||||
std::stringstream query;
|
||||
|
||||
query << "SELECT * FROM ItemComponent WHERE id = " << std::to_string(skillID);
|
||||
|
||||
auto tableData = CDClientDatabase::ExecuteQuery(query.str());
|
||||
if (tableData.eof()) {
|
||||
entries.insert(std::make_pair(skillID, Default));
|
||||
return Default;
|
||||
}
|
||||
|
||||
while (!tableData.eof()) {
|
||||
CDItemComponent entry;
|
||||
entry.id = tableData.getIntField(0, -1);
|
||||
entry.equipLocation = tableData.getStringField(1, "");
|
||||
entry.baseValue = tableData.getIntField(2, -1);
|
||||
entry.isKitPiece = tableData.getIntField(3, -1) == 1 ? true : false;
|
||||
entry.rarity = tableData.getIntField(4, 0);
|
||||
entry.itemType = tableData.getIntField(5, -1);
|
||||
entry.itemInfo = tableData.getInt64Field(6, -1);
|
||||
entry.inLootTable = tableData.getIntField(7, -1) == 1 ? true : false;
|
||||
entry.inVendor = tableData.getIntField(8, -1) == 1 ? true : false;
|
||||
entry.isUnique = tableData.getIntField(9, -1) == 1 ? true : false;
|
||||
entry.isBOP = tableData.getIntField(10, -1) == 1 ? true : false;
|
||||
entry.isBOE = tableData.getIntField(11, -1) == 1 ? true : false;
|
||||
entry.reqFlagID = tableData.getIntField(12, -1);
|
||||
entry.reqSpecialtyID = tableData.getIntField(13, -1);
|
||||
entry.reqSpecRank = tableData.getIntField(14, -1);
|
||||
entry.reqAchievementID = tableData.getIntField(15, -1);
|
||||
entry.stackSize = tableData.getIntField(16, -1);
|
||||
entry.color1 = tableData.getIntField(17, -1);
|
||||
entry.decal = tableData.getIntField(18, -1);
|
||||
entry.offsetGroupID = tableData.getIntField(19, -1);
|
||||
entry.buildTypes = tableData.getIntField(20, -1);
|
||||
entry.reqPrecondition = tableData.getStringField(21, "");
|
||||
entry.animationFlag = tableData.getIntField(22, -1);
|
||||
entry.equipEffects = tableData.getIntField(23, -1);
|
||||
entry.readyForQA = tableData.getIntField(24, -1) == 1 ? true : false;
|
||||
entry.itemRating = tableData.getIntField(25, -1);
|
||||
entry.isTwoHanded = tableData.getIntField(26, -1) == 1 ? true : false;
|
||||
entry.minNumRequired = tableData.getIntField(27, -1);
|
||||
entry.delResIndex = tableData.getIntField(28, -1);
|
||||
entry.currencyLOT = tableData.getIntField(29, -1);
|
||||
entry.altCurrencyCost = tableData.getIntField(30, -1);
|
||||
entry.subItems = tableData.getStringField(31, "");
|
||||
UNUSED(entry.audioEventUse = tableData.getStringField(32, ""));
|
||||
entry.noEquipAnimation = tableData.getIntField(33, -1) == 1 ? true : false;
|
||||
entry.commendationLOT = tableData.getIntField(34, -1);
|
||||
entry.commendationCost = tableData.getIntField(35, -1);
|
||||
UNUSED(entry.audioEquipMetaEventSet = tableData.getStringField(36, ""));
|
||||
entry.currencyCosts = tableData.getStringField(37, "");
|
||||
UNUSED(entry.ingredientInfo = tableData.getStringField(38, ""));
|
||||
entry.locStatus = tableData.getIntField(39, -1);
|
||||
entry.forgeType = tableData.getIntField(40, -1);
|
||||
entry.SellMultiplier = tableData.getFloatField(41, -1.0f);
|
||||
|
||||
this->entries.insert(std::make_pair(entry.id, entry));
|
||||
tableData.nextRow();
|
||||
}
|
||||
|
||||
const auto& it2 = this->entries.find(skillID);
|
||||
if (it2 != this->entries.end()) {
|
||||
return it2->second;
|
||||
}
|
||||
#endif
|
||||
|
||||
return Default;
|
||||
return data;
|
||||
}
|
||||
|
||||
std::map<LOT, uint32_t> CDItemComponentTable::ParseCraftingCurrencies(const CDItemComponent& itemComponent) {
|
||||
std::map<LOT, uint32_t> currencies = {};
|
||||
|
||||
if (!itemComponent.currencyCosts.empty()) {
|
||||
auto currencySplit = GeneralUtils::SplitString(itemComponent.currencyCosts, ',');
|
||||
for (const auto& currencyAmount : currencySplit) {
|
||||
auto amountSplit = GeneralUtils::SplitString(currencyAmount, ':');
|
||||
|
||||
// Checking for 2 here, not sure what to do when there's more stuff than expected
|
||||
if (amountSplit.size() == 2) {
|
||||
currencies.insert({
|
||||
std::stol(amountSplit[0]),
|
||||
std::stoi(amountSplit[1])
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return currencies;
|
||||
std::vector<CDItemComponent> CDItemComponentTable::GetEntries(void) const {
|
||||
return this->m_entries;
|
||||
}
|
||||
|
||||
@@ -1,83 +1,51 @@
|
||||
#pragma once
|
||||
|
||||
// Custom Classes
|
||||
#include "CDTable.h"
|
||||
#include "dCommonVars.h"
|
||||
|
||||
/*!
|
||||
\file CDItemComponentTable.hpp
|
||||
\brief Contains data for the ItemComponent table
|
||||
*/
|
||||
//Generated by xmlDb2dDatabaseGenerator on 2022-03-04 00:23:32.998113
|
||||
//DO NOT EDIT THIS FILE MANUALLY!
|
||||
|
||||
//! ItemComponent Struct
|
||||
struct CDItemComponent {
|
||||
unsigned int id; //!< The Component ID
|
||||
std::string equipLocation; //!< The equip location
|
||||
unsigned int 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
|
||||
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
|
||||
std::string reqPrecondition; //!< The required precondition
|
||||
unsigned int animationFlag; //!< The Animation Flag
|
||||
unsigned int equipEffects; //!< The effect played when the item is equipped
|
||||
bool readyForQA; //!< ???
|
||||
unsigned int 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; //!< ???
|
||||
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
|
||||
UNUSED(std::string audioEquipMetaEventSet); //!< ???
|
||||
std::string currencyCosts; //!< Used for crafting
|
||||
UNUSED(std::string ingredientInfo); //!< Unused
|
||||
unsigned int locStatus; //!< ???
|
||||
unsigned int forgeType; //!< Forge Type
|
||||
float SellMultiplier; //!< Something to do with early vendors perhaps (but replaced)
|
||||
int id;
|
||||
std::string equipLocation;
|
||||
int baseValue;
|
||||
bool isKitPiece;
|
||||
int rarity;
|
||||
int itemType;
|
||||
int itemInfo;
|
||||
bool inLootTable;
|
||||
bool inVendor;
|
||||
bool isUnique;
|
||||
bool isBOP;
|
||||
bool isBOE;
|
||||
int reqFactionID;
|
||||
int reqSpecialtyID;
|
||||
int reqSpecRank;
|
||||
int reqAchievementID;
|
||||
int stackSize;
|
||||
int color1;
|
||||
int decal;
|
||||
int offsetGroupID;
|
||||
int buildTypes;
|
||||
std::string reqPrecondition;
|
||||
int weaponType;
|
||||
int equipEffects;
|
||||
bool readyForQA;
|
||||
int itemRating;
|
||||
bool isTwoHanded;
|
||||
int minNumRequired;
|
||||
int delResIndex;
|
||||
int currencyLOT;
|
||||
int altCurrencyCost;
|
||||
};
|
||||
|
||||
//! ItemComponent table
|
||||
class CDItemComponentTable : public CDTable {
|
||||
private:
|
||||
std::map<unsigned int, CDItemComponent> entries;
|
||||
|
||||
std::vector<CDItemComponent> m_entries;
|
||||
public:
|
||||
|
||||
//! Constructor
|
||||
CDItemComponentTable(void);
|
||||
|
||||
//! Destructor
|
||||
~CDItemComponentTable(void);
|
||||
|
||||
//! Returns the table's name
|
||||
/*!
|
||||
\return The table name
|
||||
*/
|
||||
std::string GetName(void) const override;
|
||||
CDItemComponentTable();
|
||||
~CDItemComponentTable();
|
||||
std::string GetName(void) const override;
|
||||
|
||||
static std::map<LOT, uint32_t> ParseCraftingCurrencies(const CDItemComponent& itemComponent);
|
||||
|
||||
//! Gets an entry by ID
|
||||
const CDItemComponent& GetItemComponentByID(unsigned int skillID);
|
||||
|
||||
static CDItemComponent Default;
|
||||
std::vector<CDItemComponent> Query(std::function<bool(CDItemComponent)> predicate);
|
||||
std::vector<CDItemComponent> GetEntries(void) const;
|
||||
};
|
||||
|
||||
45
dDatabase/Tables/CDItemEggDataTable.cpp
Normal file
45
dDatabase/Tables/CDItemEggDataTable.cpp
Normal file
@@ -0,0 +1,45 @@
|
||||
#include "CDItemEggDataTable.h"
|
||||
//Generated by xmlDb2dDatabaseGenerator on 2022-03-04 00:23:33.004814
|
||||
//DO NOT EDIT THIS FILE MANUALLY!
|
||||
|
||||
CDItemEggDataTable::CDItemEggDataTable() {
|
||||
unsigned int size = 0;
|
||||
auto tableSize = CDClientDatabase::ExecuteQuery("SELECT COUNT(*) FROM ItemEggData");
|
||||
while (!tableSize.eof()) {
|
||||
size = tableSize.getIntField(0, 0);
|
||||
tableSize.nextRow();
|
||||
}
|
||||
|
||||
tableSize.finalize();
|
||||
this->m_entries.reserve(size);
|
||||
|
||||
auto tableData = CDClientDatabase::ExecuteQuery("SELECT * FROM ItemEggData");
|
||||
while (!tableData.eof()) {
|
||||
CDItemEggData entry;
|
||||
entry.id = tableData.getIntField(0, int{});
|
||||
entry.chassie_type_id = tableData.getIntField(1, int{});
|
||||
this->m_entries.push_back(entry);
|
||||
tableData.nextRow();
|
||||
}
|
||||
|
||||
tableData.finalize();
|
||||
}
|
||||
|
||||
CDItemEggDataTable::~CDItemEggDataTable() {
|
||||
}
|
||||
|
||||
std::string CDItemEggDataTable::GetName(void) const {
|
||||
return "ItemEggData";
|
||||
}
|
||||
|
||||
std::vector<CDItemEggData> CDItemEggDataTable::Query(std::function<bool(CDItemEggData)> predicate) {
|
||||
std::vector<CDItemEggData> data = cpplinq::from(this->m_entries)
|
||||
>> cpplinq::where(predicate)
|
||||
>> cpplinq::to_vector();
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
std::vector<CDItemEggData> CDItemEggDataTable::GetEntries(void) const {
|
||||
return this->m_entries;
|
||||
}
|
||||
22
dDatabase/Tables/CDItemEggDataTable.h
Normal file
22
dDatabase/Tables/CDItemEggDataTable.h
Normal file
@@ -0,0 +1,22 @@
|
||||
#pragma once
|
||||
#include "CDTable.h"
|
||||
|
||||
//Generated by xmlDb2dDatabaseGenerator on 2022-03-04 00:23:33.003604
|
||||
//DO NOT EDIT THIS FILE MANUALLY!
|
||||
|
||||
struct CDItemEggData {
|
||||
int id;
|
||||
int chassie_type_id;
|
||||
};
|
||||
|
||||
class CDItemEggDataTable : public CDTable {
|
||||
private:
|
||||
std::vector<CDItemEggData> m_entries;
|
||||
public:
|
||||
CDItemEggDataTable();
|
||||
~CDItemEggDataTable();
|
||||
std::string GetName(void) const override;
|
||||
|
||||
std::vector<CDItemEggData> Query(std::function<bool(CDItemEggData)> predicate);
|
||||
std::vector<CDItemEggData> GetEntries(void) const;
|
||||
};
|
||||
52
dDatabase/Tables/CDItemFoodDataTable.cpp
Normal file
52
dDatabase/Tables/CDItemFoodDataTable.cpp
Normal file
@@ -0,0 +1,52 @@
|
||||
#include "CDItemFoodDataTable.h"
|
||||
//Generated by xmlDb2dDatabaseGenerator on 2022-03-04 00:23:33.006810
|
||||
//DO NOT EDIT THIS FILE MANUALLY!
|
||||
|
||||
CDItemFoodDataTable::CDItemFoodDataTable() {
|
||||
unsigned int size = 0;
|
||||
auto tableSize = CDClientDatabase::ExecuteQuery("SELECT COUNT(*) FROM ItemFoodData");
|
||||
while (!tableSize.eof()) {
|
||||
size = tableSize.getIntField(0, 0);
|
||||
tableSize.nextRow();
|
||||
}
|
||||
|
||||
tableSize.finalize();
|
||||
this->m_entries.reserve(size);
|
||||
|
||||
auto tableData = CDClientDatabase::ExecuteQuery("SELECT * FROM ItemFoodData");
|
||||
while (!tableData.eof()) {
|
||||
CDItemFoodData entry;
|
||||
entry.id = tableData.getIntField(0, int{});
|
||||
entry.element_1 = tableData.getIntField(1, int{});
|
||||
entry.element_1_amount = tableData.getIntField(2, int{});
|
||||
entry.element_2 = tableData.getIntField(3, int{});
|
||||
entry.element_2_amount = tableData.getIntField(4, int{});
|
||||
entry.element_3 = tableData.getIntField(5, int{});
|
||||
entry.element_3_amount = tableData.getIntField(6, int{});
|
||||
entry.element_4 = tableData.getIntField(7, int{});
|
||||
entry.element_4_amount = tableData.getIntField(8, int{});
|
||||
this->m_entries.push_back(entry);
|
||||
tableData.nextRow();
|
||||
}
|
||||
|
||||
tableData.finalize();
|
||||
}
|
||||
|
||||
CDItemFoodDataTable::~CDItemFoodDataTable() {
|
||||
}
|
||||
|
||||
std::string CDItemFoodDataTable::GetName(void) const {
|
||||
return "ItemFoodData";
|
||||
}
|
||||
|
||||
std::vector<CDItemFoodData> CDItemFoodDataTable::Query(std::function<bool(CDItemFoodData)> predicate) {
|
||||
std::vector<CDItemFoodData> data = cpplinq::from(this->m_entries)
|
||||
>> cpplinq::where(predicate)
|
||||
>> cpplinq::to_vector();
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
std::vector<CDItemFoodData> CDItemFoodDataTable::GetEntries(void) const {
|
||||
return this->m_entries;
|
||||
}
|
||||
29
dDatabase/Tables/CDItemFoodDataTable.h
Normal file
29
dDatabase/Tables/CDItemFoodDataTable.h
Normal file
@@ -0,0 +1,29 @@
|
||||
#pragma once
|
||||
#include "CDTable.h"
|
||||
|
||||
//Generated by xmlDb2dDatabaseGenerator on 2022-03-04 00:23:33.006810
|
||||
//DO NOT EDIT THIS FILE MANUALLY!
|
||||
|
||||
struct CDItemFoodData {
|
||||
int id;
|
||||
int element_1;
|
||||
int element_1_amount;
|
||||
int element_2;
|
||||
int element_2_amount;
|
||||
int element_3;
|
||||
int element_3_amount;
|
||||
int element_4;
|
||||
int element_4_amount;
|
||||
};
|
||||
|
||||
class CDItemFoodDataTable : public CDTable {
|
||||
private:
|
||||
std::vector<CDItemFoodData> m_entries;
|
||||
public:
|
||||
CDItemFoodDataTable();
|
||||
~CDItemFoodDataTable();
|
||||
std::string GetName(void) const override;
|
||||
|
||||
std::vector<CDItemFoodData> Query(std::function<bool(CDItemFoodData)> predicate);
|
||||
std::vector<CDItemFoodData> GetEntries(void) const;
|
||||
};
|
||||
@@ -1,68 +1,46 @@
|
||||
#include "CDItemSetSkillsTable.h"
|
||||
//Generated by xmlDb2dDatabaseGenerator on 2022-03-04 00:23:33.063657
|
||||
//DO NOT EDIT THIS FILE MANUALLY!
|
||||
|
||||
CDItemSetSkillsTable::CDItemSetSkillsTable() {
|
||||
unsigned int size = 0;
|
||||
auto tableSize = CDClientDatabase::ExecuteQuery("SELECT COUNT(*) FROM ItemSetSkills");
|
||||
while (!tableSize.eof()) {
|
||||
size = tableSize.getIntField(0, 0);
|
||||
tableSize.nextRow();
|
||||
}
|
||||
|
||||
//! Constructor
|
||||
CDItemSetSkillsTable::CDItemSetSkillsTable(void) {
|
||||
|
||||
// First, get the size of the table
|
||||
unsigned int size = 0;
|
||||
auto tableSize = CDClientDatabase::ExecuteQuery("SELECT COUNT(*) FROM ItemSetSkills");
|
||||
while (!tableSize.eof()) {
|
||||
size = tableSize.getIntField(0, 0);
|
||||
|
||||
tableSize.nextRow();
|
||||
}
|
||||
|
||||
tableSize.finalize();
|
||||
|
||||
// Reserve the size
|
||||
this->entries.reserve(size);
|
||||
|
||||
// Now get the data
|
||||
auto tableData = CDClientDatabase::ExecuteQuery("SELECT * FROM ItemSetSkills");
|
||||
while (!tableData.eof()) {
|
||||
CDItemSetSkills entry;
|
||||
entry.SkillSetID = tableData.getIntField(0, -1);
|
||||
entry.SkillID = tableData.getIntField(1, -1);
|
||||
entry.SkillCastType = tableData.getIntField(2, -1);
|
||||
|
||||
this->entries.push_back(entry);
|
||||
tableData.nextRow();
|
||||
}
|
||||
this->m_entries.reserve(size);
|
||||
|
||||
auto tableData = CDClientDatabase::ExecuteQuery("SELECT * FROM ItemSetSkills");
|
||||
while (!tableData.eof()) {
|
||||
CDItemSetSkills entry;
|
||||
entry.SkillSetID = tableData.getIntField(0, int{});
|
||||
entry.SkillID = tableData.getIntField(1, int{});
|
||||
entry.SkillCastType = tableData.getIntField(2, int{});
|
||||
this->m_entries.push_back(entry);
|
||||
tableData.nextRow();
|
||||
}
|
||||
|
||||
tableData.finalize();
|
||||
}
|
||||
|
||||
//! Destructor
|
||||
CDItemSetSkillsTable::~CDItemSetSkillsTable(void) { }
|
||||
CDItemSetSkillsTable::~CDItemSetSkillsTable() {
|
||||
}
|
||||
|
||||
//! Returns the table's name
|
||||
std::string CDItemSetSkillsTable::GetName(void) const {
|
||||
return "ItemSetSkills";
|
||||
return "ItemSetSkills";
|
||||
}
|
||||
|
||||
//! Queries the table with a custom "where" clause
|
||||
std::vector<CDItemSetSkills> CDItemSetSkillsTable::Query(std::function<bool(CDItemSetSkills)> predicate) {
|
||||
|
||||
std::vector<CDItemSetSkills> data = cpplinq::from(this->entries)
|
||||
>> cpplinq::where(predicate)
|
||||
>> cpplinq::to_vector();
|
||||
|
||||
return data;
|
||||
std::vector<CDItemSetSkills> data = cpplinq::from(this->m_entries)
|
||||
>> cpplinq::where(predicate)
|
||||
>> cpplinq::to_vector();
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
//! Gets all the entries in the table
|
||||
std::vector<CDItemSetSkills> CDItemSetSkillsTable::GetEntries(void) const {
|
||||
return this->entries;
|
||||
}
|
||||
|
||||
std::vector<CDItemSetSkills> CDItemSetSkillsTable::GetBySkillID(unsigned int SkillSetID)
|
||||
{
|
||||
std::vector<CDItemSetSkills> toReturn;
|
||||
|
||||
for (CDItemSetSkills entry : this->entries) {
|
||||
if (entry.SkillSetID == SkillSetID) toReturn.push_back(entry);
|
||||
if (entry.SkillSetID > SkillSetID) return toReturn; //stop seeking in the db if it's not needed.
|
||||
}
|
||||
|
||||
return toReturn;
|
||||
return this->m_entries;
|
||||
}
|
||||
|
||||
@@ -1,52 +1,23 @@
|
||||
#pragma once
|
||||
|
||||
// Custom Classes
|
||||
#include "CDTable.h"
|
||||
|
||||
/*!
|
||||
\file CDItemSetSkillsTable.hpp
|
||||
\brief Contains data for the ItemSetSkills table
|
||||
*/
|
||||
//Generated by xmlDb2dDatabaseGenerator on 2022-03-04 00:23:33.050691
|
||||
//DO NOT EDIT THIS FILE MANUALLY!
|
||||
|
||||
//! ZoneTable Struct
|
||||
struct CDItemSetSkills {
|
||||
unsigned int SkillSetID; //!< The skill set ID
|
||||
unsigned int SkillID; //!< The skill ID
|
||||
unsigned int SkillCastType; //!< The skill cast type
|
||||
int SkillSetID;
|
||||
int SkillID;
|
||||
int SkillCastType;
|
||||
};
|
||||
|
||||
//! ItemSets table
|
||||
class CDItemSetSkillsTable : public CDTable {
|
||||
private:
|
||||
std::vector<CDItemSetSkills> entries;
|
||||
|
||||
std::vector<CDItemSetSkills> m_entries;
|
||||
public:
|
||||
|
||||
//! Constructor
|
||||
CDItemSetSkillsTable(void);
|
||||
|
||||
//! Destructor
|
||||
~CDItemSetSkillsTable(void);
|
||||
|
||||
//! Returns the table's name
|
||||
/*!
|
||||
\return The table name
|
||||
*/
|
||||
std::string GetName(void) const override;
|
||||
|
||||
//! Queries the table with a custom "where" clause
|
||||
/*!
|
||||
\param predicate The predicate
|
||||
*/
|
||||
std::vector<CDItemSetSkills> Query(std::function<bool(CDItemSetSkills)> predicate);
|
||||
|
||||
//! Gets all the entries in the table
|
||||
/*!
|
||||
\return The entries
|
||||
*/
|
||||
std::vector<CDItemSetSkills> GetEntries(void) const;
|
||||
CDItemSetSkillsTable();
|
||||
~CDItemSetSkillsTable();
|
||||
std::string GetName(void) const override;
|
||||
|
||||
std::vector<CDItemSetSkills> GetBySkillID(unsigned int SkillSetID);
|
||||
|
||||
std::vector<CDItemSetSkills> Query(std::function<bool(CDItemSetSkills)> predicate);
|
||||
std::vector<CDItemSetSkills> GetEntries(void) const;
|
||||
};
|
||||
|
||||
|
||||
@@ -1,68 +1,60 @@
|
||||
#include "CDItemSetsTable.h"
|
||||
//Generated by xmlDb2dDatabaseGenerator on 2022-03-04 00:23:33.013275
|
||||
//DO NOT EDIT THIS FILE MANUALLY!
|
||||
|
||||
CDItemSetsTable::CDItemSetsTable() {
|
||||
unsigned int size = 0;
|
||||
auto tableSize = CDClientDatabase::ExecuteQuery("SELECT COUNT(*) FROM ItemSets");
|
||||
while (!tableSize.eof()) {
|
||||
size = tableSize.getIntField(0, 0);
|
||||
tableSize.nextRow();
|
||||
}
|
||||
|
||||
//! Constructor
|
||||
CDItemSetsTable::CDItemSetsTable(void) {
|
||||
|
||||
// First, get the size of the table
|
||||
unsigned int size = 0;
|
||||
auto tableSize = CDClientDatabase::ExecuteQuery("SELECT COUNT(*) FROM ItemSets");
|
||||
while (!tableSize.eof()) {
|
||||
size = tableSize.getIntField(0, 0);
|
||||
|
||||
tableSize.nextRow();
|
||||
}
|
||||
|
||||
tableSize.finalize();
|
||||
|
||||
// Reserve the size
|
||||
this->entries.reserve(size);
|
||||
|
||||
// Now get the data
|
||||
auto tableData = CDClientDatabase::ExecuteQuery("SELECT * FROM ItemSets");
|
||||
while (!tableData.eof()) {
|
||||
CDItemSets entry;
|
||||
entry.setID = tableData.getIntField(0, -1);
|
||||
entry.locStatus = tableData.getIntField(1, -1);
|
||||
entry.itemIDs = tableData.getStringField(2, "");
|
||||
entry.kitType = tableData.getIntField(3, -1);
|
||||
entry.kitRank = tableData.getIntField(4, -1);
|
||||
entry.kitImage = tableData.getIntField(5, -1);
|
||||
entry.skillSetWith2 = tableData.getIntField(6, -1);
|
||||
entry.skillSetWith3 = tableData.getIntField(7, -1);
|
||||
entry.skillSetWith4 = tableData.getIntField(8, -1);
|
||||
entry.skillSetWith5 = tableData.getIntField(9, -1);
|
||||
entry.skillSetWith6 = tableData.getIntField(10, -1);
|
||||
entry.localize = tableData.getIntField(11, -1) == 1 ? true : false;
|
||||
entry.gate_version = tableData.getStringField(12, "");
|
||||
entry.kitID = tableData.getIntField(13, -1);
|
||||
entry.priority = tableData.getFloatField(14, -1.0f);
|
||||
|
||||
this->entries.push_back(entry);
|
||||
tableData.nextRow();
|
||||
}
|
||||
this->m_entries.reserve(size);
|
||||
|
||||
auto tableData = CDClientDatabase::ExecuteQuery("SELECT * FROM ItemSets");
|
||||
while (!tableData.eof()) {
|
||||
CDItemSets entry;
|
||||
entry.setID = tableData.getIntField(0, int{});
|
||||
entry.itemIDs = tableData.getStringField(1, std::string{}.c_str());
|
||||
entry.displayName = tableData.getStringField(2, std::string{}.c_str());
|
||||
entry.description = tableData.getStringField(3, std::string{}.c_str());
|
||||
entry.skillWith2 = tableData.getIntField(4, int{});
|
||||
entry.castType2 = tableData.getIntField(5, int{});
|
||||
entry.skillWith3 = tableData.getIntField(6, int{});
|
||||
entry.castType3 = tableData.getIntField(7, int{});
|
||||
entry.skillWith4 = tableData.getIntField(8, int{});
|
||||
entry.castType4 = tableData.getIntField(9, int{});
|
||||
entry.skillWith5 = tableData.getIntField(10, int{});
|
||||
entry.castType5 = tableData.getIntField(11, int{});
|
||||
entry.skillSetWith2 = tableData.getIntField(12, int{});
|
||||
entry.skillSetWith3 = tableData.getIntField(13, int{});
|
||||
entry.skillSetWith4 = tableData.getIntField(14, int{});
|
||||
entry.skillSetWith5 = tableData.getIntField(15, int{});
|
||||
entry.skillSetWith6 = tableData.getIntField(16, int{});
|
||||
this->m_entries.push_back(entry);
|
||||
tableData.nextRow();
|
||||
}
|
||||
|
||||
tableData.finalize();
|
||||
}
|
||||
|
||||
//! Destructor
|
||||
CDItemSetsTable::~CDItemSetsTable(void) { }
|
||||
CDItemSetsTable::~CDItemSetsTable() {
|
||||
}
|
||||
|
||||
//! Returns the table's name
|
||||
std::string CDItemSetsTable::GetName(void) const {
|
||||
return "ItemSets";
|
||||
return "ItemSets";
|
||||
}
|
||||
|
||||
//! Queries the table with a custom "where" clause
|
||||
std::vector<CDItemSets> CDItemSetsTable::Query(std::function<bool(CDItemSets)> predicate) {
|
||||
|
||||
std::vector<CDItemSets> data = cpplinq::from(this->entries)
|
||||
>> cpplinq::where(predicate)
|
||||
>> cpplinq::to_vector();
|
||||
|
||||
return data;
|
||||
std::vector<CDItemSets> data = cpplinq::from(this->m_entries)
|
||||
>> cpplinq::where(predicate)
|
||||
>> cpplinq::to_vector();
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
//! Gets all the entries in the table
|
||||
std::vector<CDItemSets> CDItemSetsTable::GetEntries(void) const {
|
||||
return this->entries;
|
||||
return this->m_entries;
|
||||
}
|
||||
|
||||
@@ -1,62 +1,37 @@
|
||||
#pragma once
|
||||
|
||||
// Custom Classes
|
||||
#include "CDTable.h"
|
||||
|
||||
/*!
|
||||
\file CDItemSetsTable.hpp
|
||||
\brief Contains data for the ItemSets table
|
||||
*/
|
||||
//Generated by xmlDb2dDatabaseGenerator on 2022-03-04 00:23:33.009803
|
||||
//DO NOT EDIT THIS FILE MANUALLY!
|
||||
|
||||
//! ZoneTable Struct
|
||||
struct CDItemSets {
|
||||
unsigned int setID; //!< The item set ID
|
||||
unsigned int locStatus; //!< The loc status
|
||||
std::string itemIDs; //!< THe item IDs
|
||||
unsigned int kitType; //!< The item kit type
|
||||
unsigned int kitRank; //!< The item kit rank
|
||||
unsigned int kitImage; //!< The item kit image
|
||||
unsigned int skillSetWith2; //!< The skill set with 2
|
||||
unsigned int skillSetWith3; //!< The skill set with 3
|
||||
unsigned int skillSetWith4; //!< The skill set with 4
|
||||
unsigned int skillSetWith5; //!< The skill set with 5
|
||||
unsigned int skillSetWith6; //!< The skill set with 6
|
||||
bool localize; //!< Whether or localize
|
||||
std::string gate_version; //!< The gate version
|
||||
unsigned int kitID; //!< The kit ID
|
||||
float priority; //!< The priority
|
||||
int setID;
|
||||
std::string itemIDs;
|
||||
std::string displayName;
|
||||
std::string description;
|
||||
int skillWith2;
|
||||
int castType2;
|
||||
int skillWith3;
|
||||
int castType3;
|
||||
int skillWith4;
|
||||
int castType4;
|
||||
int skillWith5;
|
||||
int castType5;
|
||||
int skillSetWith2;
|
||||
int skillSetWith3;
|
||||
int skillSetWith4;
|
||||
int skillSetWith5;
|
||||
int skillSetWith6;
|
||||
};
|
||||
|
||||
//! ItemSets table
|
||||
class CDItemSetsTable : public CDTable {
|
||||
private:
|
||||
std::vector<CDItemSets> entries;
|
||||
|
||||
std::vector<CDItemSets> m_entries;
|
||||
public:
|
||||
|
||||
//! Constructor
|
||||
CDItemSetsTable(void);
|
||||
|
||||
//! Destructor
|
||||
~CDItemSetsTable(void);
|
||||
|
||||
//! Returns the table's name
|
||||
/*!
|
||||
\return The table name
|
||||
*/
|
||||
std::string GetName(void) const override;
|
||||
|
||||
//! Queries the table with a custom "where" clause
|
||||
/*!
|
||||
\param predicate The predicate
|
||||
*/
|
||||
std::vector<CDItemSets> Query(std::function<bool(CDItemSets)> predicate);
|
||||
|
||||
//! Gets all the entries in the table
|
||||
/*!
|
||||
\return The entries
|
||||
*/
|
||||
std::vector<CDItemSets> GetEntries(void) const;
|
||||
|
||||
};
|
||||
CDItemSetsTable();
|
||||
~CDItemSetsTable();
|
||||
std::string GetName(void) const override;
|
||||
|
||||
std::vector<CDItemSets> Query(std::function<bool(CDItemSets)> predicate);
|
||||
std::vector<CDItemSets> GetEntries(void) const;
|
||||
};
|
||||
|
||||
45
dDatabase/Tables/CDLanguageTypeTable.cpp
Normal file
45
dDatabase/Tables/CDLanguageTypeTable.cpp
Normal file
@@ -0,0 +1,45 @@
|
||||
#include "CDLanguageTypeTable.h"
|
||||
//Generated by xmlDb2dDatabaseGenerator on 2022-03-04 00:23:33.100558
|
||||
//DO NOT EDIT THIS FILE MANUALLY!
|
||||
|
||||
CDLanguageTypeTable::CDLanguageTypeTable() {
|
||||
unsigned int size = 0;
|
||||
auto tableSize = CDClientDatabase::ExecuteQuery("SELECT COUNT(*) FROM LanguageType");
|
||||
while (!tableSize.eof()) {
|
||||
size = tableSize.getIntField(0, 0);
|
||||
tableSize.nextRow();
|
||||
}
|
||||
|
||||
tableSize.finalize();
|
||||
this->m_entries.reserve(size);
|
||||
|
||||
auto tableData = CDClientDatabase::ExecuteQuery("SELECT * FROM LanguageType");
|
||||
while (!tableData.eof()) {
|
||||
CDLanguageType entry;
|
||||
entry.LanguageID = tableData.getIntField(0, int{});
|
||||
entry.LanguageDescription = tableData.getStringField(1, std::string{}.c_str());
|
||||
this->m_entries.push_back(entry);
|
||||
tableData.nextRow();
|
||||
}
|
||||
|
||||
tableData.finalize();
|
||||
}
|
||||
|
||||
CDLanguageTypeTable::~CDLanguageTypeTable() {
|
||||
}
|
||||
|
||||
std::string CDLanguageTypeTable::GetName(void) const {
|
||||
return "LanguageType";
|
||||
}
|
||||
|
||||
std::vector<CDLanguageType> CDLanguageTypeTable::Query(std::function<bool(CDLanguageType)> predicate) {
|
||||
std::vector<CDLanguageType> data = cpplinq::from(this->m_entries)
|
||||
>> cpplinq::where(predicate)
|
||||
>> cpplinq::to_vector();
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
std::vector<CDLanguageType> CDLanguageTypeTable::GetEntries(void) const {
|
||||
return this->m_entries;
|
||||
}
|
||||
22
dDatabase/Tables/CDLanguageTypeTable.h
Normal file
22
dDatabase/Tables/CDLanguageTypeTable.h
Normal file
@@ -0,0 +1,22 @@
|
||||
#pragma once
|
||||
#include "CDTable.h"
|
||||
|
||||
//Generated by xmlDb2dDatabaseGenerator on 2022-03-04 00:23:33.098563
|
||||
//DO NOT EDIT THIS FILE MANUALLY!
|
||||
|
||||
struct CDLanguageType {
|
||||
int LanguageID;
|
||||
std::string LanguageDescription;
|
||||
};
|
||||
|
||||
class CDLanguageTypeTable : public CDTable {
|
||||
private:
|
||||
std::vector<CDLanguageType> m_entries;
|
||||
public:
|
||||
CDLanguageTypeTable();
|
||||
~CDLanguageTypeTable();
|
||||
std::string GetName(void) const override;
|
||||
|
||||
std::vector<CDLanguageType> Query(std::function<bool(CDLanguageType)> predicate);
|
||||
std::vector<CDLanguageType> GetEntries(void) const;
|
||||
};
|
||||
@@ -1,56 +0,0 @@
|
||||
#include "CDLevelProgressionLookupTable.h"
|
||||
|
||||
//! Constructor
|
||||
CDLevelProgressionLookupTable::CDLevelProgressionLookupTable(void) {
|
||||
|
||||
// First, get the size of the table
|
||||
unsigned int size = 0;
|
||||
auto tableSize = CDClientDatabase::ExecuteQuery("SELECT COUNT(*) FROM LevelProgressionLookup");
|
||||
while (!tableSize.eof()) {
|
||||
size = tableSize.getIntField(0, 0);
|
||||
|
||||
tableSize.nextRow();
|
||||
}
|
||||
|
||||
tableSize.finalize();
|
||||
|
||||
// Reserve the size
|
||||
this->entries.reserve(size);
|
||||
|
||||
// Now get the data
|
||||
auto tableData = CDClientDatabase::ExecuteQuery("SELECT * FROM LevelProgressionLookup");
|
||||
while (!tableData.eof()) {
|
||||
CDLevelProgressionLookup entry;
|
||||
entry.id = tableData.getIntField(0, -1);
|
||||
entry.requiredUScore = tableData.getIntField(1, -1);
|
||||
entry.BehaviorEffect = tableData.getStringField(2, "");
|
||||
|
||||
this->entries.push_back(entry);
|
||||
tableData.nextRow();
|
||||
}
|
||||
|
||||
tableData.finalize();
|
||||
}
|
||||
|
||||
//! Destructor
|
||||
CDLevelProgressionLookupTable::~CDLevelProgressionLookupTable(void) { }
|
||||
|
||||
//! Returns the table's name
|
||||
std::string CDLevelProgressionLookupTable::GetName(void) const {
|
||||
return "LevelProgressionLookup";
|
||||
}
|
||||
|
||||
//! Queries the table with a custom "where" clause
|
||||
std::vector<CDLevelProgressionLookup> CDLevelProgressionLookupTable::Query(std::function<bool(CDLevelProgressionLookup)> predicate) {
|
||||
|
||||
std::vector<CDLevelProgressionLookup> data = cpplinq::from(this->entries)
|
||||
>> cpplinq::where(predicate)
|
||||
>> cpplinq::to_vector();
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
//! Gets all the entries in the table
|
||||
std::vector<CDLevelProgressionLookup> CDLevelProgressionLookupTable::GetEntries(void) const {
|
||||
return this->entries;
|
||||
}
|
||||
@@ -1,49 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
// Custom Classes
|
||||
#include "CDTable.h"
|
||||
|
||||
/*!
|
||||
\file CDLevelProgressionLookupTable.hpp
|
||||
\brief Contains data for the LevelProgressionLookup table
|
||||
*/
|
||||
|
||||
//! LevelProgressionLookup Entry Struct
|
||||
struct CDLevelProgressionLookup {
|
||||
unsigned int id; //!< The Level ID
|
||||
unsigned int requiredUScore; //!< The required LEGO Score
|
||||
std::string BehaviorEffect; //!< The behavior effect attached to this
|
||||
};
|
||||
|
||||
//! LevelProgressionLookup table
|
||||
class CDLevelProgressionLookupTable : public CDTable {
|
||||
private:
|
||||
std::vector<CDLevelProgressionLookup> entries;
|
||||
|
||||
public:
|
||||
|
||||
//! Constructor
|
||||
CDLevelProgressionLookupTable(void);
|
||||
|
||||
//! Destructor
|
||||
~CDLevelProgressionLookupTable(void);
|
||||
|
||||
//! Returns the table's name
|
||||
/*!
|
||||
\return The table name
|
||||
*/
|
||||
std::string GetName(void) const override;
|
||||
|
||||
//! Queries the table with a custom "where" clause
|
||||
/*!
|
||||
\param predicate The predicate
|
||||
*/
|
||||
std::vector<CDLevelProgressionLookup> Query(std::function<bool(CDLevelProgressionLookup)> predicate);
|
||||
|
||||
//! Gets all the entries in the table
|
||||
/*!
|
||||
\return The entries
|
||||
*/
|
||||
std::vector<CDLevelProgressionLookup> GetEntries(void) const;
|
||||
|
||||
};
|
||||
46
dDatabase/Tables/CDLootMatrixIndexTable.cpp
Normal file
46
dDatabase/Tables/CDLootMatrixIndexTable.cpp
Normal file
@@ -0,0 +1,46 @@
|
||||
#include "CDLootMatrixIndexTable.h"
|
||||
//Generated by xmlDb2dDatabaseGenerator on 2022-03-04 00:23:33.116515
|
||||
//DO NOT EDIT THIS FILE MANUALLY!
|
||||
|
||||
CDLootMatrixIndexTable::CDLootMatrixIndexTable() {
|
||||
unsigned int size = 0;
|
||||
auto tableSize = CDClientDatabase::ExecuteQuery("SELECT COUNT(*) FROM LootMatrixIndex");
|
||||
while (!tableSize.eof()) {
|
||||
size = tableSize.getIntField(0, 0);
|
||||
tableSize.nextRow();
|
||||
}
|
||||
|
||||
tableSize.finalize();
|
||||
this->m_entries.reserve(size);
|
||||
|
||||
auto tableData = CDClientDatabase::ExecuteQuery("SELECT * FROM LootMatrixIndex");
|
||||
while (!tableData.eof()) {
|
||||
CDLootMatrixIndex entry;
|
||||
entry.LootMatrixIndex = tableData.getIntField(0, int{});
|
||||
entry.description = tableData.getStringField(1, std::string{}.c_str());
|
||||
entry.inNpcEditor = tableData.getIntField(2, bool{});
|
||||
this->m_entries.push_back(entry);
|
||||
tableData.nextRow();
|
||||
}
|
||||
|
||||
tableData.finalize();
|
||||
}
|
||||
|
||||
CDLootMatrixIndexTable::~CDLootMatrixIndexTable() {
|
||||
}
|
||||
|
||||
std::string CDLootMatrixIndexTable::GetName(void) const {
|
||||
return "LootMatrixIndex";
|
||||
}
|
||||
|
||||
std::vector<CDLootMatrixIndex> CDLootMatrixIndexTable::Query(std::function<bool(CDLootMatrixIndex)> predicate) {
|
||||
std::vector<CDLootMatrixIndex> data = cpplinq::from(this->m_entries)
|
||||
>> cpplinq::where(predicate)
|
||||
>> cpplinq::to_vector();
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
std::vector<CDLootMatrixIndex> CDLootMatrixIndexTable::GetEntries(void) const {
|
||||
return this->m_entries;
|
||||
}
|
||||
23
dDatabase/Tables/CDLootMatrixIndexTable.h
Normal file
23
dDatabase/Tables/CDLootMatrixIndexTable.h
Normal file
@@ -0,0 +1,23 @@
|
||||
#pragma once
|
||||
#include "CDTable.h"
|
||||
|
||||
//Generated by xmlDb2dDatabaseGenerator on 2022-03-04 00:23:33.115518
|
||||
//DO NOT EDIT THIS FILE MANUALLY!
|
||||
|
||||
struct CDLootMatrixIndex {
|
||||
int LootMatrixIndex;
|
||||
std::string description;
|
||||
bool inNpcEditor;
|
||||
};
|
||||
|
||||
class CDLootMatrixIndexTable : public CDTable {
|
||||
private:
|
||||
std::vector<CDLootMatrixIndex> m_entries;
|
||||
public:
|
||||
CDLootMatrixIndexTable();
|
||||
~CDLootMatrixIndexTable();
|
||||
std::string GetName(void) const override;
|
||||
|
||||
std::vector<CDLootMatrixIndex> Query(std::function<bool(CDLootMatrixIndex)> predicate);
|
||||
std::vector<CDLootMatrixIndex> GetEntries(void) const;
|
||||
};
|
||||
@@ -1,62 +1,50 @@
|
||||
#include "CDLootMatrixTable.h"
|
||||
//Generated by xmlDb2dDatabaseGenerator on 2022-03-04 00:23:33.108537
|
||||
//DO NOT EDIT THIS FILE MANUALLY!
|
||||
|
||||
CDLootMatrixTable::CDLootMatrixTable() {
|
||||
unsigned int size = 0;
|
||||
auto tableSize = CDClientDatabase::ExecuteQuery("SELECT COUNT(*) FROM LootMatrix");
|
||||
while (!tableSize.eof()) {
|
||||
size = tableSize.getIntField(0, 0);
|
||||
tableSize.nextRow();
|
||||
}
|
||||
|
||||
//! Constructor
|
||||
CDLootMatrixTable::CDLootMatrixTable(void) {
|
||||
|
||||
// First, get the size of the table
|
||||
unsigned int size = 0;
|
||||
auto tableSize = CDClientDatabase::ExecuteQuery("SELECT COUNT(*) FROM LootMatrix");
|
||||
while (!tableSize.eof()) {
|
||||
size = tableSize.getIntField(0, 0);
|
||||
|
||||
tableSize.nextRow();
|
||||
}
|
||||
|
||||
tableSize.finalize();
|
||||
|
||||
// Reserve the size
|
||||
this->entries.reserve(size);
|
||||
|
||||
// Now get the data
|
||||
auto tableData = CDClientDatabase::ExecuteQuery("SELECT * FROM LootMatrix");
|
||||
while (!tableData.eof()) {
|
||||
CDLootMatrix entry;
|
||||
entry.LootMatrixIndex = tableData.getIntField(0, -1);
|
||||
entry.LootTableIndex = tableData.getIntField(1, -1);
|
||||
entry.RarityTableIndex = tableData.getIntField(2, -1);
|
||||
entry.percent = tableData.getFloatField(3, -1.0f);
|
||||
entry.minToDrop = tableData.getIntField(4, -1);
|
||||
entry.maxToDrop = tableData.getIntField(5, -1);
|
||||
entry.id = tableData.getIntField(6, -1);
|
||||
entry.flagID = tableData.getIntField(7, -1);
|
||||
UNUSED(entry.gate_version = tableData.getStringField(8, ""));
|
||||
|
||||
this->entries.push_back(entry);
|
||||
tableData.nextRow();
|
||||
}
|
||||
this->m_entries.reserve(size);
|
||||
|
||||
auto tableData = CDClientDatabase::ExecuteQuery("SELECT * FROM LootMatrix");
|
||||
while (!tableData.eof()) {
|
||||
CDLootMatrix entry;
|
||||
entry.LootMatrixIndex = tableData.getIntField(0, int{});
|
||||
entry.LootTableIndex = tableData.getIntField(1, int{});
|
||||
entry.RarityTableIndex = tableData.getIntField(2, int{});
|
||||
entry.percent = tableData.getFloatField(3, float{});
|
||||
entry.minToDrop = tableData.getIntField(4, int{});
|
||||
entry.maxToDrop = tableData.getIntField(5, int{});
|
||||
entry.id = tableData.getIntField(6, int{});
|
||||
this->m_entries.push_back(entry);
|
||||
tableData.nextRow();
|
||||
}
|
||||
|
||||
tableData.finalize();
|
||||
}
|
||||
|
||||
//! Destructor
|
||||
CDLootMatrixTable::~CDLootMatrixTable(void) { }
|
||||
CDLootMatrixTable::~CDLootMatrixTable() {
|
||||
}
|
||||
|
||||
//! Returns the table's name
|
||||
std::string CDLootMatrixTable::GetName(void) const {
|
||||
return "LootMatrix";
|
||||
return "LootMatrix";
|
||||
}
|
||||
|
||||
//! Queries the table with a custom "where" clause
|
||||
std::vector<CDLootMatrix> CDLootMatrixTable::Query(std::function<bool(CDLootMatrix)> predicate) {
|
||||
|
||||
std::vector<CDLootMatrix> data = cpplinq::from(this->entries)
|
||||
>> cpplinq::where(predicate)
|
||||
>> cpplinq::to_vector();
|
||||
|
||||
return data;
|
||||
std::vector<CDLootMatrix> data = cpplinq::from(this->m_entries)
|
||||
>> cpplinq::where(predicate)
|
||||
>> cpplinq::to_vector();
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
//! Gets all the entries in the table
|
||||
const std::vector<CDLootMatrix>& CDLootMatrixTable::GetEntries(void) const {
|
||||
return this->entries;
|
||||
std::vector<CDLootMatrix> CDLootMatrixTable::GetEntries(void) const {
|
||||
return this->m_entries;
|
||||
}
|
||||
|
||||
@@ -1,56 +1,27 @@
|
||||
#pragma once
|
||||
|
||||
// Custom Classes
|
||||
#include "CDTable.h"
|
||||
|
||||
/*!
|
||||
\file CDLootMatrixTable.hpp
|
||||
\brief Contains data for the ObjectSkills table
|
||||
*/
|
||||
//Generated by xmlDb2dDatabaseGenerator on 2022-03-04 00:23:33.107539
|
||||
//DO NOT EDIT THIS FILE MANUALLY!
|
||||
|
||||
//! LootMatrix Struct
|
||||
struct CDLootMatrix {
|
||||
unsigned int LootMatrixIndex; //!< The Loot Matrix Index
|
||||
unsigned int LootTableIndex; //!< The Loot Table Index
|
||||
unsigned int RarityTableIndex; //!< The Rarity Table Index
|
||||
float percent; //!< The percent that this matrix is used?
|
||||
unsigned int minToDrop; //!< The minimum amount of loot from this matrix to drop
|
||||
unsigned int maxToDrop; //!< The maximum amount of loot from this matrix to drop
|
||||
unsigned int id; //!< The ID of the Loot Matrix
|
||||
unsigned int flagID; //!< ???
|
||||
UNUSED(std::string gate_version); //!< The Gate Version
|
||||
int LootMatrixIndex;
|
||||
int LootTableIndex;
|
||||
int RarityTableIndex;
|
||||
float percent;
|
||||
int minToDrop;
|
||||
int maxToDrop;
|
||||
int id;
|
||||
};
|
||||
|
||||
//! MissionNPCComponent table
|
||||
class CDLootMatrixTable : public CDTable {
|
||||
private:
|
||||
std::vector<CDLootMatrix> entries;
|
||||
|
||||
std::vector<CDLootMatrix> m_entries;
|
||||
public:
|
||||
|
||||
//! Constructor
|
||||
CDLootMatrixTable(void);
|
||||
|
||||
//! Destructor
|
||||
~CDLootMatrixTable(void);
|
||||
|
||||
//! Returns the table's name
|
||||
/*!
|
||||
\return The table name
|
||||
*/
|
||||
std::string GetName(void) const override;
|
||||
|
||||
//! Queries the table with a custom "where" clause
|
||||
/*!
|
||||
\param predicate The predicate
|
||||
*/
|
||||
std::vector<CDLootMatrix> Query(std::function<bool(CDLootMatrix)> predicate);
|
||||
|
||||
//! Gets all the entries in the table
|
||||
/*!
|
||||
\return The entries
|
||||
*/
|
||||
const std::vector<CDLootMatrix>& GetEntries(void) const;
|
||||
|
||||
};
|
||||
CDLootMatrixTable();
|
||||
~CDLootMatrixTable();
|
||||
std::string GetName(void) const override;
|
||||
|
||||
std::vector<CDLootMatrix> Query(std::function<bool(CDLootMatrix)> predicate);
|
||||
std::vector<CDLootMatrix> GetEntries(void) const;
|
||||
};
|
||||
|
||||
45
dDatabase/Tables/CDLootTableIndexTable.cpp
Normal file
45
dDatabase/Tables/CDLootTableIndexTable.cpp
Normal file
@@ -0,0 +1,45 @@
|
||||
#include "CDLootTableIndexTable.h"
|
||||
//Generated by xmlDb2dDatabaseGenerator on 2022-03-04 00:23:33.128534
|
||||
//DO NOT EDIT THIS FILE MANUALLY!
|
||||
|
||||
CDLootTableIndexTable::CDLootTableIndexTable() {
|
||||
unsigned int size = 0;
|
||||
auto tableSize = CDClientDatabase::ExecuteQuery("SELECT COUNT(*) FROM LootTableIndex");
|
||||
while (!tableSize.eof()) {
|
||||
size = tableSize.getIntField(0, 0);
|
||||
tableSize.nextRow();
|
||||
}
|
||||
|
||||
tableSize.finalize();
|
||||
this->m_entries.reserve(size);
|
||||
|
||||
auto tableData = CDClientDatabase::ExecuteQuery("SELECT * FROM LootTableIndex");
|
||||
while (!tableData.eof()) {
|
||||
CDLootTableIndex entry;
|
||||
entry.LootTableIndex = tableData.getIntField(0, int{});
|
||||
entry.description = tableData.getStringField(1, std::string{}.c_str());
|
||||
this->m_entries.push_back(entry);
|
||||
tableData.nextRow();
|
||||
}
|
||||
|
||||
tableData.finalize();
|
||||
}
|
||||
|
||||
CDLootTableIndexTable::~CDLootTableIndexTable() {
|
||||
}
|
||||
|
||||
std::string CDLootTableIndexTable::GetName(void) const {
|
||||
return "LootTableIndex";
|
||||
}
|
||||
|
||||
std::vector<CDLootTableIndex> CDLootTableIndexTable::Query(std::function<bool(CDLootTableIndex)> predicate) {
|
||||
std::vector<CDLootTableIndex> data = cpplinq::from(this->m_entries)
|
||||
>> cpplinq::where(predicate)
|
||||
>> cpplinq::to_vector();
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
std::vector<CDLootTableIndex> CDLootTableIndexTable::GetEntries(void) const {
|
||||
return this->m_entries;
|
||||
}
|
||||
22
dDatabase/Tables/CDLootTableIndexTable.h
Normal file
22
dDatabase/Tables/CDLootTableIndexTable.h
Normal file
@@ -0,0 +1,22 @@
|
||||
#pragma once
|
||||
#include "CDTable.h"
|
||||
|
||||
//Generated by xmlDb2dDatabaseGenerator on 2022-03-04 00:23:33.126067
|
||||
//DO NOT EDIT THIS FILE MANUALLY!
|
||||
|
||||
struct CDLootTableIndex {
|
||||
int LootTableIndex;
|
||||
std::string description;
|
||||
};
|
||||
|
||||
class CDLootTableIndexTable : public CDTable {
|
||||
private:
|
||||
std::vector<CDLootTableIndex> m_entries;
|
||||
public:
|
||||
CDLootTableIndexTable();
|
||||
~CDLootTableIndexTable();
|
||||
std::string GetName(void) const override;
|
||||
|
||||
std::vector<CDLootTableIndex> Query(std::function<bool(CDLootTableIndex)> predicate);
|
||||
std::vector<CDLootTableIndex> GetEntries(void) const;
|
||||
};
|
||||
@@ -1,59 +1,47 @@
|
||||
#include "CDLootTableTable.h"
|
||||
//Generated by xmlDb2dDatabaseGenerator on 2022-03-04 00:23:33.123497
|
||||
//DO NOT EDIT THIS FILE MANUALLY!
|
||||
|
||||
CDLootTableTable::CDLootTableTable() {
|
||||
unsigned int size = 0;
|
||||
auto tableSize = CDClientDatabase::ExecuteQuery("SELECT COUNT(*) FROM LootTable");
|
||||
while (!tableSize.eof()) {
|
||||
size = tableSize.getIntField(0, 0);
|
||||
tableSize.nextRow();
|
||||
}
|
||||
|
||||
//! Constructor
|
||||
CDLootTableTable::CDLootTableTable(void) {
|
||||
|
||||
// First, get the size of the table
|
||||
unsigned int size = 0;
|
||||
auto tableSize = CDClientDatabase::ExecuteQuery("SELECT COUNT(*) FROM LootTable");
|
||||
while (!tableSize.eof()) {
|
||||
size = tableSize.getIntField(0, 0);
|
||||
|
||||
tableSize.nextRow();
|
||||
}
|
||||
|
||||
tableSize.finalize();
|
||||
|
||||
// Reserve the size
|
||||
this->entries.reserve(size);
|
||||
|
||||
// Now get the data
|
||||
auto tableData = CDClientDatabase::ExecuteQuery("SELECT * FROM LootTable");
|
||||
while (!tableData.eof()) {
|
||||
CDLootTable entry;
|
||||
entry.id = tableData.getIntField(0, -1);
|
||||
entry.itemid = tableData.getIntField(0, -1);
|
||||
entry.LootTableIndex = tableData.getIntField(1, -1);
|
||||
entry.id = tableData.getIntField(2, -1);
|
||||
entry.MissionDrop = tableData.getIntField(3, -1) == 1 ? true : false;
|
||||
entry.sortPriority = tableData.getIntField(4, -1);
|
||||
|
||||
this->entries.push_back(entry);
|
||||
tableData.nextRow();
|
||||
}
|
||||
this->m_entries.reserve(size);
|
||||
|
||||
auto tableData = CDClientDatabase::ExecuteQuery("SELECT * FROM LootTable");
|
||||
while (!tableData.eof()) {
|
||||
CDLootTable entry;
|
||||
entry.itemid = tableData.getIntField(0, int{});
|
||||
entry.LootTableIndex = tableData.getIntField(1, int{});
|
||||
entry.id = tableData.getIntField(2, int{});
|
||||
entry.MissionDrop = tableData.getIntField(3, bool{});
|
||||
this->m_entries.push_back(entry);
|
||||
tableData.nextRow();
|
||||
}
|
||||
|
||||
tableData.finalize();
|
||||
}
|
||||
|
||||
//! Destructor
|
||||
CDLootTableTable::~CDLootTableTable(void) { }
|
||||
CDLootTableTable::~CDLootTableTable() {
|
||||
}
|
||||
|
||||
//! Returns the table's name
|
||||
std::string CDLootTableTable::GetName(void) const {
|
||||
return "LootTable";
|
||||
return "LootTable";
|
||||
}
|
||||
|
||||
//! Queries the table with a custom "where" clause
|
||||
std::vector<CDLootTable> CDLootTableTable::Query(std::function<bool(CDLootTable)> predicate) {
|
||||
|
||||
std::vector<CDLootTable> data = cpplinq::from(this->entries)
|
||||
>> cpplinq::where(predicate)
|
||||
>> cpplinq::to_vector();
|
||||
|
||||
return data;
|
||||
std::vector<CDLootTable> data = cpplinq::from(this->m_entries)
|
||||
>> cpplinq::where(predicate)
|
||||
>> cpplinq::to_vector();
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
//! Gets all the entries in the table
|
||||
const std::vector<CDLootTable>& CDLootTableTable::GetEntries(void) const {
|
||||
return this->entries;
|
||||
std::vector<CDLootTable> CDLootTableTable::GetEntries(void) const {
|
||||
return this->m_entries;
|
||||
}
|
||||
|
||||
@@ -1,52 +1,24 @@
|
||||
#pragma once
|
||||
|
||||
// Custom Classes
|
||||
#include "CDTable.h"
|
||||
|
||||
/*!
|
||||
\file CDLootTableTable.hpp
|
||||
\brief Contains data for the LootTable table
|
||||
*/
|
||||
//Generated by xmlDb2dDatabaseGenerator on 2022-03-04 00:23:33.121834
|
||||
//DO NOT EDIT THIS FILE MANUALLY!
|
||||
|
||||
//! LootTable Struct
|
||||
struct CDLootTable {
|
||||
unsigned int itemid; //!< The LOT of the item
|
||||
unsigned int LootTableIndex; //!< The Loot Table Index
|
||||
unsigned int id; //!< The ID
|
||||
bool MissionDrop; //!< Whether or not this loot table is a mission drop
|
||||
unsigned int sortPriority; //!< The sorting priority
|
||||
int itemid;
|
||||
int LootTableIndex;
|
||||
int id;
|
||||
bool MissionDrop;
|
||||
};
|
||||
|
||||
//! LootTable table
|
||||
class CDLootTableTable : public CDTable {
|
||||
private:
|
||||
std::vector<CDLootTable> entries;
|
||||
|
||||
std::vector<CDLootTable> m_entries;
|
||||
public:
|
||||
|
||||
//! Constructor
|
||||
CDLootTableTable(void);
|
||||
|
||||
//! Destructor
|
||||
~CDLootTableTable(void);
|
||||
|
||||
//! Returns the table's name
|
||||
/*!
|
||||
\return The table name
|
||||
*/
|
||||
std::string GetName(void) const override;
|
||||
|
||||
//! Queries the table with a custom "where" clause
|
||||
/*!
|
||||
\param predicate The predicate
|
||||
*/
|
||||
std::vector<CDLootTable> Query(std::function<bool(CDLootTable)> predicate);
|
||||
|
||||
//! Gets all the entries in the table
|
||||
/*!
|
||||
\return The entries
|
||||
*/
|
||||
const std::vector<CDLootTable>& GetEntries(void) const;
|
||||
|
||||
};
|
||||
CDLootTableTable();
|
||||
~CDLootTableTable();
|
||||
std::string GetName(void) const override;
|
||||
|
||||
std::vector<CDLootTable> Query(std::function<bool(CDLootTable)> predicate);
|
||||
std::vector<CDLootTable> GetEntries(void) const;
|
||||
};
|
||||
|
||||
56
dDatabase/Tables/CDMinifigComponentTable.cpp
Normal file
56
dDatabase/Tables/CDMinifigComponentTable.cpp
Normal file
@@ -0,0 +1,56 @@
|
||||
#include "CDMinifigComponentTable.h"
|
||||
//Generated by xmlDb2dDatabaseGenerator on 2022-03-04 00:23:33.187405
|
||||
//DO NOT EDIT THIS FILE MANUALLY!
|
||||
|
||||
CDMinifigComponentTable::CDMinifigComponentTable() {
|
||||
unsigned int size = 0;
|
||||
auto tableSize = CDClientDatabase::ExecuteQuery("SELECT COUNT(*) FROM MinifigComponent");
|
||||
while (!tableSize.eof()) {
|
||||
size = tableSize.getIntField(0, 0);
|
||||
tableSize.nextRow();
|
||||
}
|
||||
|
||||
tableSize.finalize();
|
||||
this->m_entries.reserve(size);
|
||||
|
||||
auto tableData = CDClientDatabase::ExecuteQuery("SELECT * FROM MinifigComponent");
|
||||
while (!tableData.eof()) {
|
||||
CDMinifigComponent entry;
|
||||
entry.id = tableData.getIntField(0, int{});
|
||||
entry.head = tableData.getIntField(1, int{});
|
||||
entry.chest = tableData.getIntField(2, int{});
|
||||
entry.legs = tableData.getIntField(3, int{});
|
||||
entry.hairstyle = tableData.getIntField(4, int{});
|
||||
entry.haircolor = tableData.getIntField(5, int{});
|
||||
entry.chestdecal = tableData.getIntField(6, int{});
|
||||
entry.headcolor = tableData.getIntField(7, int{});
|
||||
entry.lefthand = tableData.getIntField(8, int{});
|
||||
entry.righthand = tableData.getIntField(9, int{});
|
||||
entry.eyebrowstyle = tableData.getIntField(10, int{});
|
||||
entry.eyesstyle = tableData.getIntField(11, int{});
|
||||
entry.mouthstyle = tableData.getIntField(12, int{});
|
||||
this->m_entries.push_back(entry);
|
||||
tableData.nextRow();
|
||||
}
|
||||
|
||||
tableData.finalize();
|
||||
}
|
||||
|
||||
CDMinifigComponentTable::~CDMinifigComponentTable() {
|
||||
}
|
||||
|
||||
std::string CDMinifigComponentTable::GetName(void) const {
|
||||
return "MinifigComponent";
|
||||
}
|
||||
|
||||
std::vector<CDMinifigComponent> CDMinifigComponentTable::Query(std::function<bool(CDMinifigComponent)> predicate) {
|
||||
std::vector<CDMinifigComponent> data = cpplinq::from(this->m_entries)
|
||||
>> cpplinq::where(predicate)
|
||||
>> cpplinq::to_vector();
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
std::vector<CDMinifigComponent> CDMinifigComponentTable::GetEntries(void) const {
|
||||
return this->m_entries;
|
||||
}
|
||||
33
dDatabase/Tables/CDMinifigComponentTable.h
Normal file
33
dDatabase/Tables/CDMinifigComponentTable.h
Normal file
@@ -0,0 +1,33 @@
|
||||
#pragma once
|
||||
#include "CDTable.h"
|
||||
|
||||
//Generated by xmlDb2dDatabaseGenerator on 2022-03-04 00:23:33.185562
|
||||
//DO NOT EDIT THIS FILE MANUALLY!
|
||||
|
||||
struct CDMinifigComponent {
|
||||
int id;
|
||||
int head;
|
||||
int chest;
|
||||
int legs;
|
||||
int hairstyle;
|
||||
int haircolor;
|
||||
int chestdecal;
|
||||
int headcolor;
|
||||
int lefthand;
|
||||
int righthand;
|
||||
int eyebrowstyle;
|
||||
int eyesstyle;
|
||||
int mouthstyle;
|
||||
};
|
||||
|
||||
class CDMinifigComponentTable : public CDTable {
|
||||
private:
|
||||
std::vector<CDMinifigComponent> m_entries;
|
||||
public:
|
||||
CDMinifigComponentTable();
|
||||
~CDMinifigComponentTable();
|
||||
std::string GetName(void) const override;
|
||||
|
||||
std::vector<CDMinifigComponent> Query(std::function<bool(CDMinifigComponent)> predicate);
|
||||
std::vector<CDMinifigComponent> GetEntries(void) const;
|
||||
};
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user