diff --git a/dDatabase/Tables/CDActivitiesTable.cpp b/dDatabase/Tables/CDActivitiesTable.cpp index 835ca3d2..d6fa354e 100644 --- a/dDatabase/Tables/CDActivitiesTable.cpp +++ b/dDatabase/Tables/CDActivitiesTable.cpp @@ -21,25 +21,25 @@ CDActivitiesTable::CDActivitiesTable(void) { 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); + entry.ActivityID = tableData.getIntField("ActivityID", -1); + entry.locStatus = tableData.getIntField("locStatus", -1); + entry.instanceMapID = tableData.getIntField("instanceMapID", -1); + entry.minTeams = tableData.getIntField("minTeams", -1); + entry.maxTeams = tableData.getIntField("maxTeams", -1); + entry.minTeamSize = tableData.getIntField("minTeamSize", -1); + entry.maxTeamSize = tableData.getIntField("maxTeamSize", -1); + entry.waitTime = tableData.getIntField("waitTime", -1); + entry.startDelay = tableData.getIntField("startDelay", -1); + entry.requiresUniqueData = tableData.getIntField("requiresUniqueData", -1); + entry.leaderboardType = tableData.getIntField("leaderboardType", -1); + entry.localize = tableData.getIntField("localize", -1); + entry.optionalCostLOT = tableData.getIntField("optionalCostLOT", -1); + entry.optionalCostCount = tableData.getIntField("optionalCostCount", -1); + entry.showUIRewards = tableData.getIntField("showUIRewards", -1); + entry.CommunityActivityFlagID = tableData.getIntField("CommunityActivityFlagID", -1); + entry.gate_version = tableData.getStringField("gate_version", ""); + entry.noTeamLootOnDeath = tableData.getIntField("noTeamLootOnDeath", -1); + entry.optionalPercentage = tableData.getFloatField("optionalPercentage", -1.0f); this->entries.push_back(entry); tableData.nextRow(); @@ -70,3 +70,4 @@ std::vector CDActivitiesTable::Query(std::function CDActivitiesTable::GetEntries(void) const { return this->entries; } + diff --git a/dDatabase/Tables/CDActivityRewardsTable.cpp b/dDatabase/Tables/CDActivityRewardsTable.cpp index f1719204..3922d9fb 100644 --- a/dDatabase/Tables/CDActivityRewardsTable.cpp +++ b/dDatabase/Tables/CDActivityRewardsTable.cpp @@ -21,13 +21,13 @@ CDActivityRewardsTable::CDActivityRewardsTable(void) { 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, ""); + entry.objectTemplate = tableData.getIntField("objectTemplate", -1); + entry.ActivityRewardIndex = tableData.getIntField("ActivityRewardIndex", -1); + entry.activityRating = tableData.getIntField("activityRating", -1); + entry.LootMatrixIndex = tableData.getIntField("LootMatrixIndex", -1); + entry.CurrencyIndex = tableData.getIntField("CurrencyIndex", -1); + entry.ChallengeRating = tableData.getIntField("ChallengeRating", -1); + entry.description = tableData.getStringField("description", ""); this->entries.push_back(entry); tableData.nextRow(); @@ -58,3 +58,4 @@ std::vector CDActivityRewardsTable::Query(std::function CDActivityRewardsTable::GetEntries(void) const { return this->entries; } + diff --git a/dDatabase/Tables/CDAnimationsTable.cpp b/dDatabase/Tables/CDAnimationsTable.cpp index 399804f8..e21d44c5 100644 --- a/dDatabase/Tables/CDAnimationsTable.cpp +++ b/dDatabase/Tables/CDAnimationsTable.cpp @@ -21,19 +21,19 @@ CDAnimationsTable::CDAnimationsTable(void) { 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); + entry.animationGroupID = tableData.getIntField("animationGroupID", -1); + entry.animation_type = tableData.getStringField("animation_type", ""); + entry.animation_name = tableData.getStringField("animation_name", ""); + entry.chance_to_play = tableData.getFloatField("chance_to_play", -1.0f); + entry.min_loops = tableData.getIntField("min_loops", -1); + entry.max_loops = tableData.getIntField("max_loops", -1); + entry.animation_length = tableData.getFloatField("animation_length", -1.0f); + entry.hideEquip = tableData.getIntField("hideEquip", -1) == 1 ? true : false; + entry.ignoreUpperBody = tableData.getIntField("ignoreUpperBody", -1) == 1 ? true : false; + entry.restartable = tableData.getIntField("restartable", -1) == 1 ? true : false; + entry.face_animation_name = tableData.getStringField("face_animation_name", ""); + entry.priority = tableData.getFloatField("priority", -1.0f); + entry.blendTime = tableData.getFloatField("blendTime", -1.0f); this->entries.push_back(entry); tableData.nextRow(); @@ -64,3 +64,4 @@ std::vector CDAnimationsTable::Query(std::function CDAnimationsTable::GetEntries(void) const { return this->entries; } + diff --git a/dDatabase/Tables/CDBehaviorParameterTable.cpp b/dDatabase/Tables/CDBehaviorParameterTable.cpp index d09a71b2..b894688b 100644 --- a/dDatabase/Tables/CDBehaviorParameterTable.cpp +++ b/dDatabase/Tables/CDBehaviorParameterTable.cpp @@ -8,8 +8,8 @@ CDBehaviorParameterTable::CDBehaviorParameterTable(void) { uint64_t hash = 0; while (!tableData.eof()) { CDBehaviorParameter entry; - entry.behaviorID = tableData.getIntField(0, -1); - auto candidateStringToAdd = std::string(tableData.getStringField(1, "")); + entry.behaviorID = tableData.getIntField("behaviorID", -1); + auto candidateStringToAdd = std::string(tableData.getStringField("parameterID", "")); auto parameter = m_ParametersList.find(candidateStringToAdd); if (parameter != m_ParametersList.end()) { entry.parameterID = parameter; @@ -19,7 +19,7 @@ CDBehaviorParameterTable::CDBehaviorParameterTable(void) { } hash = entry.behaviorID; hash = (hash << 31U) | entry.parameterID->second; - entry.value = tableData.getFloatField(2, -1.0f); + entry.value = tableData.getFloatField("value", -1.0f); m_Entries.insert(std::make_pair(hash, entry)); @@ -62,3 +62,4 @@ std::map CDBehaviorParameterTable::GetParametersByBehaviorID } return returnInfo; } + diff --git a/dDatabase/Tables/CDBehaviorTemplateTable.cpp b/dDatabase/Tables/CDBehaviorTemplateTable.cpp index 1628756f..4adb9bce 100644 --- a/dDatabase/Tables/CDBehaviorTemplateTable.cpp +++ b/dDatabase/Tables/CDBehaviorTemplateTable.cpp @@ -21,9 +21,9 @@ CDBehaviorTemplateTable::CDBehaviorTemplateTable(void) { 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.behaviorID = tableData.getIntField("behaviorID", -1); + entry.templateID = tableData.getIntField("templateID", -1); + entry.effectID = tableData.getIntField("effectID", -1); auto candidateToAdd = tableData.getStringField(3, ""); auto parameter = m_EffectHandles.find(candidateToAdd); if (parameter != m_EffectHandles.end()) { @@ -75,3 +75,4 @@ const CDBehaviorTemplate CDBehaviorTemplateTable::GetByBehaviorID(uint32_t behav return entry->second; } } + diff --git a/dDatabase/Tables/CDBrickIDTableTable.cpp b/dDatabase/Tables/CDBrickIDTableTable.cpp index 9dbdf2c0..7cd3e86f 100644 --- a/dDatabase/Tables/CDBrickIDTableTable.cpp +++ b/dDatabase/Tables/CDBrickIDTableTable.cpp @@ -21,8 +21,8 @@ CDBrickIDTableTable::CDBrickIDTableTable(void) { auto tableData = CDClientDatabase::ExecuteQuery("SELECT * FROM BrickIDTable"); while (!tableData.eof()) { CDBrickIDTable entry; - entry.NDObjectID = tableData.getIntField(0, -1); - entry.LEGOBrickID = tableData.getIntField(1, -1); + entry.NDObjectID = tableData.getIntField("NDObjectID", -1); + entry.LEGOBrickID = tableData.getIntField("LEGOBrickID", -1); this->entries.push_back(entry); tableData.nextRow(); @@ -53,3 +53,4 @@ std::vector CDBrickIDTableTable::Query(std::function CDBrickIDTableTable::GetEntries(void) const { return this->entries; } + diff --git a/dDatabase/Tables/CDComponentsRegistryTable.cpp b/dDatabase/Tables/CDComponentsRegistryTable.cpp index 8e5ae108..987c66ab 100644 --- a/dDatabase/Tables/CDComponentsRegistryTable.cpp +++ b/dDatabase/Tables/CDComponentsRegistryTable.cpp @@ -24,9 +24,9 @@ CDComponentsRegistryTable::CDComponentsRegistryTable(void) { 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); + entry.id = tableData.getIntField("id", -1); + entry.component_type = tableData.getIntField("component_type", -1); + entry.component_id = tableData.getIntField("component_id", -1); this->mappedEntries.insert_or_assign(((uint64_t)entry.component_type) << 32 | ((uint64_t)entry.id), entry.component_id); @@ -91,9 +91,9 @@ int32_t CDComponentsRegistryTable::GetByIDAndType(uint32_t id, uint32_t componen 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); + entry.id = tableData.getIntField("id", -1); + entry.component_type = tableData.getIntField("component_type", -1); + entry.component_id = tableData.getIntField("component_id", -1); //this->entries.push_back(entry); @@ -126,3 +126,4 @@ int32_t CDComponentsRegistryTable::GetByIDAndType(uint32_t id, uint32_t componen return defaultValue; #endif } + diff --git a/dDatabase/Tables/CDCurrencyTableTable.cpp b/dDatabase/Tables/CDCurrencyTableTable.cpp index a1923a73..21870f00 100644 --- a/dDatabase/Tables/CDCurrencyTableTable.cpp +++ b/dDatabase/Tables/CDCurrencyTableTable.cpp @@ -21,11 +21,11 @@ CDCurrencyTableTable::CDCurrencyTableTable(void) { 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); + entry.currencyIndex = tableData.getIntField("currencyIndex", -1); + entry.npcminlevel = tableData.getIntField("npcminlevel", -1); + entry.minvalue = tableData.getIntField("minvalue", -1); + entry.maxvalue = tableData.getIntField("maxvalue", -1); + entry.id = tableData.getIntField("id", -1); this->entries.push_back(entry); tableData.nextRow(); @@ -56,3 +56,4 @@ std::vector CDCurrencyTableTable::Query(std::function CDCurrencyTableTable::GetEntries(void) const { return this->entries; } + diff --git a/dDatabase/Tables/CDDestructibleComponentTable.cpp b/dDatabase/Tables/CDDestructibleComponentTable.cpp index d7438fc7..2480fc24 100644 --- a/dDatabase/Tables/CDDestructibleComponentTable.cpp +++ b/dDatabase/Tables/CDDestructibleComponentTable.cpp @@ -21,20 +21,20 @@ CDDestructibleComponentTable::CDDestructibleComponentTable(void) { 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); + entry.id = tableData.getIntField("id", -1); + entry.faction = tableData.getIntField("faction", -1); + entry.factionList = tableData.getStringField("factionList", ""); + entry.life = tableData.getIntField("life", -1); + entry.imagination = tableData.getIntField("imagination", -1); + entry.LootMatrixIndex = tableData.getIntField("LootMatrixIndex", -1); + entry.CurrencyIndex = tableData.getIntField("CurrencyIndex", -1); + entry.level = tableData.getIntField("level", -1); + entry.armor = tableData.getFloatField("armor", -1.0f); + entry.death_behavior = tableData.getIntField("death_behavior", -1); + entry.isnpc = tableData.getIntField("isnpc", -1) == 1 ? true : false; + entry.attack_priority = tableData.getIntField("attack_priority", -1); + entry.isSmashable = tableData.getIntField("isSmashable", -1) == 1 ? true : false; + entry.difficultyLevel = tableData.getIntField("difficultyLevel", -1); this->entries.push_back(entry); tableData.nextRow(); @@ -65,3 +65,4 @@ std::vector CDDestructibleComponentTable::Query(std::fu std::vector CDDestructibleComponentTable::GetEntries(void) const { return this->entries; } + diff --git a/dDatabase/Tables/CDEmoteTable.cpp b/dDatabase/Tables/CDEmoteTable.cpp index e3898422..b97e02e8 100644 --- a/dDatabase/Tables/CDEmoteTable.cpp +++ b/dDatabase/Tables/CDEmoteTable.cpp @@ -5,14 +5,14 @@ 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); + entry->ID = tableData.getIntField("id", -1); + entry->animationName = tableData.getStringField("animationName", ""); + entry->iconFilename = tableData.getStringField("iconFilename", ""); + entry->channel = tableData.getIntField("channel", -1); + entry->locked = tableData.getIntField("locked", -1) != 0; + entry->localize = tableData.getIntField("localize", -1) != 0; + entry->locState = tableData.getIntField("locStatus", -1); + entry->gateVersion = tableData.getStringField("gate_version", ""); entries.insert(std::make_pair(entry->ID, entry)); tableData.nextRow(); @@ -42,3 +42,4 @@ CDEmoteTable* CDEmoteTableTable::GetEmote(int id) { return nullptr; } + diff --git a/dDatabase/Tables/CDEmoteTable.h b/dDatabase/Tables/CDEmoteTable.h index a22ae23e..1f4fb246 100644 --- a/dDatabase/Tables/CDEmoteTable.h +++ b/dDatabase/Tables/CDEmoteTable.h @@ -19,7 +19,7 @@ struct CDEmoteTable { channel = -1; locked = false; localize = false; - gateVersion = -1; + gateVersion = ""; } int ID; @@ -29,7 +29,7 @@ struct CDEmoteTable { int channel; bool locked; bool localize; - int gateVersion; + std::string gateVersion; }; //! CDEmoteTable table diff --git a/dDatabase/Tables/CDFeatureGatingTable.cpp b/dDatabase/Tables/CDFeatureGatingTable.cpp index dfc65387..0abcdb25 100644 --- a/dDatabase/Tables/CDFeatureGatingTable.cpp +++ b/dDatabase/Tables/CDFeatureGatingTable.cpp @@ -21,11 +21,11 @@ CDFeatureGatingTable::CDFeatureGatingTable(void) { 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, ""); + entry.featureName = tableData.getStringField("featureName", ""); + entry.major = tableData.getIntField("major", -1); + entry.current = tableData.getIntField("current", -1); + entry.minor = tableData.getIntField("minor", -1); + entry.description = tableData.getStringField("description", ""); this->entries.push_back(entry); tableData.nextRow(); @@ -66,3 +66,4 @@ bool CDFeatureGatingTable::FeatureUnlocked(const std::string& feature) const { std::vector CDFeatureGatingTable::GetEntries(void) const { return this->entries; } + diff --git a/dDatabase/Tables/CDInventoryComponentTable.cpp b/dDatabase/Tables/CDInventoryComponentTable.cpp index 65f09c9b..cf956775 100644 --- a/dDatabase/Tables/CDInventoryComponentTable.cpp +++ b/dDatabase/Tables/CDInventoryComponentTable.cpp @@ -21,10 +21,10 @@ CDInventoryComponentTable::CDInventoryComponentTable(void) { 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; + entry.id = tableData.getIntField("id", -1); + entry.itemid = tableData.getIntField("itemid", -1); + entry.count = tableData.getIntField("count", -1); + entry.equip = tableData.getIntField("equip", -1) == 1 ? true : false; this->entries.push_back(entry); tableData.nextRow(); @@ -55,3 +55,4 @@ std::vector CDInventoryComponentTable::Query(std::function std::vector CDInventoryComponentTable::GetEntries(void) const { return this->entries; } + diff --git a/dDatabase/Tables/CDItemComponentTable.cpp b/dDatabase/Tables/CDItemComponentTable.cpp index 6ff192fd..a3cb4159 100644 --- a/dDatabase/Tables/CDItemComponentTable.cpp +++ b/dDatabase/Tables/CDItemComponentTable.cpp @@ -23,48 +23,48 @@ CDItemComponentTable::CDItemComponentTable(void) { 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, 0); - 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); + entry.id = tableData.getIntField("id", -1); + entry.equipLocation = tableData.getStringField("equipLocation", ""); + entry.baseValue = tableData.getIntField("baseValue", -1); + entry.isKitPiece = tableData.getIntField("isKitPiece", -1) == 1 ? true : false; + entry.rarity = tableData.getIntField("rarity", 0); + entry.itemType = tableData.getIntField("itemType", -1); + entry.itemInfo = tableData.getInt64Field("itemInfo", -1); + entry.inLootTable = tableData.getIntField("inLootTable", -1) == 1 ? true : false; + entry.inVendor = tableData.getIntField("inVendor", -1) == 1 ? true : false; + entry.isUnique = tableData.getIntField("isUnique", -1) == 1 ? true : false; + entry.isBOP = tableData.getIntField("isBOP", -1) == 1 ? true : false; + entry.isBOE = tableData.getIntField("isBOE", -1) == 1 ? true : false; + entry.reqFlagID = tableData.getIntField("reqFlagID", -1); + entry.reqSpecialtyID = tableData.getIntField("reqSpecialtyID", -1); + entry.reqSpecRank = tableData.getIntField("reqSpecRank", -1); + entry.reqAchievementID = tableData.getIntField("reqAchievementID", -1); + entry.stackSize = tableData.getIntField("stackSize", -1); + entry.color1 = tableData.getIntField("color1", -1); + entry.decal = tableData.getIntField("decal", -1); + entry.offsetGroupID = tableData.getIntField("offsetGroupID", -1); + entry.buildTypes = tableData.getIntField("buildTypes", -1); + entry.reqPrecondition = tableData.getStringField("reqPrecondition", ""); + entry.animationFlag = tableData.getIntField("animationFlag", 0); + entry.equipEffects = tableData.getIntField("equipEffects", -1); + entry.readyForQA = tableData.getIntField("readyForQA", -1) == 1 ? true : false; + entry.itemRating = tableData.getIntField("itemRating", -1); + entry.isTwoHanded = tableData.getIntField("isTwoHanded", -1) == 1 ? true : false; + entry.minNumRequired = tableData.getIntField("minNumRequired", -1); + entry.delResIndex = tableData.getIntField("delResIndex", -1); + entry.currencyLOT = tableData.getIntField("currencyLOT", -1); + entry.altCurrencyCost = tableData.getIntField("altCurrencyCost", -1); + entry.subItems = tableData.getStringField("subItems", ""); + entry.audioEventUse = tableData.getStringField("audioEventUse", ""); + entry.noEquipAnimation = tableData.getIntField("noEquipAnimation", -1) == 1 ? true : false; + entry.commendationLOT = tableData.getIntField("commendationLOT", -1); + entry.commendationCost = tableData.getIntField("commendationCost", -1); + entry.audioEquipMetaEventSet = tableData.getStringField("audioEquipMetaEventSet", ""); + entry.currencyCosts = tableData.getStringField("currencyCosts", ""); + entry.ingredientInfo = tableData.getStringField("ingredientInfo", ""); + entry.locStatus = tableData.getIntField("locStatus", -1); + entry.forgeType = tableData.getIntField("forgeType", -1); + entry.SellMultiplier = tableData.getFloatField("SellMultiplier", -1.0f); this->entries.insert(std::make_pair(entry.id, entry)); tableData.nextRow(); @@ -101,48 +101,48 @@ const CDItemComponent& CDItemComponentTable::GetItemComponentByID(unsigned int s 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, 0); - 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); + entry.id = tableData.getIntField("id", -1); + entry.equipLocation = tableData.getStringField("equipLocation", ""); + entry.baseValue = tableData.getIntField("baseValue", -1); + entry.isKitPiece = tableData.getIntField("isKitPiece", -1) == 1 ? true : false; + entry.rarity = tableData.getIntField("rarity", 0); + entry.itemType = tableData.getIntField("itemType", -1); + entry.itemInfo = tableData.getInt64Field("itemInfo", -1); + entry.inLootTable = tableData.getIntField("inLootTable", -1) == 1 ? true : false; + entry.inVendor = tableData.getIntField("inVendor", -1) == 1 ? true : false; + entry.isUnique = tableData.getIntField("isUnique", -1) == 1 ? true : false; + entry.isBOP = tableData.getIntField("isBOP", -1) == 1 ? true : false; + entry.isBOE = tableData.getIntField("isBOE", -1) == 1 ? true : false; + entry.reqFlagID = tableData.getIntField("reqFlagID", -1); + entry.reqSpecialtyID = tableData.getIntField("reqSpecialtyID", -1); + entry.reqSpecRank = tableData.getIntField("reqSpecRank", -1); + entry.reqAchievementID = tableData.getIntField("reqAchievementID", -1); + entry.stackSize = tableData.getIntField("stackSize", -1); + entry.color1 = tableData.getIntField("color1", -1); + entry.decal = tableData.getIntField("decal", -1); + entry.offsetGroupID = tableData.getIntField("offsetGroupID", -1); + entry.buildTypes = tableData.getIntField("buildTypes", -1); + entry.reqPrecondition = tableData.getStringField("reqPrecondition", ""); + entry.animationFlag = tableData.getIntField("animationFlag", 0); + entry.equipEffects = tableData.getIntField("equipEffects", -1); + entry.readyForQA = tableData.getIntField("readyForQA", -1) == 1 ? true : false; + entry.itemRating = tableData.getIntField("itemRating", -1); + entry.isTwoHanded = tableData.getIntField("isTwoHanded", -1) == 1 ? true : false; + entry.minNumRequired = tableData.getIntField("minNumRequired", -1); + entry.delResIndex = tableData.getIntField("delResIndex", -1); + entry.currencyLOT = tableData.getIntField("currencyLOT", -1); + entry.altCurrencyCost = tableData.getIntField("altCurrencyCost", -1); + entry.subItems = tableData.getStringField("subItems", ""); + UNUSED(entry.audioEventUse = tableData.getStringField("audioEventUse", "")); + entry.noEquipAnimation = tableData.getIntField("noEquipAnimation", -1) == 1 ? true : false; + entry.commendationLOT = tableData.getIntField("commendationLOT", -1); + entry.commendationCost = tableData.getIntField("commendationCost", -1); + UNUSED(entry.audioEquipMetaEventSet = tableData.getStringField("audioEquipMetaEventSet", "")); + entry.currencyCosts = tableData.getStringField("currencyCosts", ""); + UNUSED(entry.ingredientInfo = tableData.getStringField("ingredientInfo", "")); + entry.locStatus = tableData.getIntField("locStatus", -1); + entry.forgeType = tableData.getIntField("forgeType", -1); + entry.SellMultiplier = tableData.getFloatField("SellMultiplier", -1.0f); this->entries.insert(std::make_pair(entry.id, entry)); tableData.nextRow(); @@ -177,3 +177,4 @@ std::map CDItemComponentTable::ParseCraftingCurrencies(const CDIt return currencies; } + diff --git a/dDatabase/Tables/CDItemSetSkillsTable.cpp b/dDatabase/Tables/CDItemSetSkillsTable.cpp index e94cf527..107e25d9 100644 --- a/dDatabase/Tables/CDItemSetSkillsTable.cpp +++ b/dDatabase/Tables/CDItemSetSkillsTable.cpp @@ -21,9 +21,9 @@ CDItemSetSkillsTable::CDItemSetSkillsTable(void) { 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); + entry.SkillSetID = tableData.getIntField("SkillSetID", -1); + entry.SkillID = tableData.getIntField("SkillID", -1); + entry.SkillCastType = tableData.getIntField("SkillCastType", -1); this->entries.push_back(entry); tableData.nextRow(); @@ -65,3 +65,4 @@ std::vector CDItemSetSkillsTable::GetBySkillID(unsigned int Ski return toReturn; } + diff --git a/dDatabase/Tables/CDItemSetsTable.cpp b/dDatabase/Tables/CDItemSetsTable.cpp index 606e0cf9..1f9d7409 100644 --- a/dDatabase/Tables/CDItemSetsTable.cpp +++ b/dDatabase/Tables/CDItemSetsTable.cpp @@ -21,21 +21,21 @@ CDItemSetsTable::CDItemSetsTable(void) { 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); + entry.setID = tableData.getIntField("setID", -1); + entry.locStatus = tableData.getIntField("locStatus", -1); + entry.itemIDs = tableData.getStringField("itemIDs", ""); + entry.kitType = tableData.getIntField("kitType", -1); + entry.kitRank = tableData.getIntField("kitRank", -1); + entry.kitImage = tableData.getIntField("kitImage", -1); + entry.skillSetWith2 = tableData.getIntField("skillSetWith2", -1); + entry.skillSetWith3 = tableData.getIntField("skillSetWith3", -1); + entry.skillSetWith4 = tableData.getIntField("skillSetWith4", -1); + entry.skillSetWith5 = tableData.getIntField("skillSetWith5", -1); + entry.skillSetWith6 = tableData.getIntField("skillSetWith6", -1); + entry.localize = tableData.getIntField("localize", -1) == 1 ? true : false; + entry.gate_version = tableData.getStringField("gate_version", ""); + entry.kitID = tableData.getIntField("kitID", -1); + entry.priority = tableData.getFloatField("priority", -1.0f); this->entries.push_back(entry); tableData.nextRow(); @@ -66,3 +66,4 @@ std::vector CDItemSetsTable::Query(std::function p std::vector CDItemSetsTable::GetEntries(void) const { return this->entries; } + diff --git a/dDatabase/Tables/CDLevelProgressionLookupTable.cpp b/dDatabase/Tables/CDLevelProgressionLookupTable.cpp index 121c9f62..b3231308 100644 --- a/dDatabase/Tables/CDLevelProgressionLookupTable.cpp +++ b/dDatabase/Tables/CDLevelProgressionLookupTable.cpp @@ -21,9 +21,9 @@ CDLevelProgressionLookupTable::CDLevelProgressionLookupTable(void) { 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, ""); + entry.id = tableData.getIntField("id", -1); + entry.requiredUScore = tableData.getIntField("requiredUScore", -1); + entry.BehaviorEffect = tableData.getStringField("BehaviorEffect", ""); this->entries.push_back(entry); tableData.nextRow(); @@ -54,3 +54,4 @@ std::vector CDLevelProgressionLookupTable::Query(std:: std::vector CDLevelProgressionLookupTable::GetEntries(void) const { return this->entries; } + diff --git a/dDatabase/Tables/CDLootMatrixTable.cpp b/dDatabase/Tables/CDLootMatrixTable.cpp index d47c081b..93a2fda1 100644 --- a/dDatabase/Tables/CDLootMatrixTable.cpp +++ b/dDatabase/Tables/CDLootMatrixTable.cpp @@ -21,15 +21,15 @@ CDLootMatrixTable::CDLootMatrixTable(void) { 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, "")); + entry.LootMatrixIndex = tableData.getIntField("LootMatrixIndex", -1); + entry.LootTableIndex = tableData.getIntField("LootTableIndex", -1); + entry.RarityTableIndex = tableData.getIntField("RarityTableIndex", -1); + entry.percent = tableData.getFloatField("percent", -1.0f); + entry.minToDrop = tableData.getIntField("minToDrop", -1); + entry.maxToDrop = tableData.getIntField("maxToDrop", -1); + entry.id = tableData.getIntField("id", -1); + entry.flagID = tableData.getIntField("flagID", -1); + UNUSED(entry.gate_version = tableData.getStringField("gate_version", "")); this->entries.push_back(entry); tableData.nextRow(); @@ -60,3 +60,4 @@ std::vector CDLootMatrixTable::Query(std::function& CDLootMatrixTable::GetEntries(void) const { return this->entries; } + diff --git a/dDatabase/Tables/CDLootTableTable.cpp b/dDatabase/Tables/CDLootTableTable.cpp index da8c824b..91cced47 100644 --- a/dDatabase/Tables/CDLootTableTable.cpp +++ b/dDatabase/Tables/CDLootTableTable.cpp @@ -21,12 +21,12 @@ CDLootTableTable::CDLootTableTable(void) { 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); + entry.id = tableData.getIntField("id", -1); + entry.itemid = tableData.getIntField("itemid", -1); + entry.LootTableIndex = tableData.getIntField("LootTableIndex", -1); + entry.id = tableData.getIntField("id", -1); + entry.MissionDrop = tableData.getIntField("MissionDrop", -1) == 1 ? true : false; + entry.sortPriority = tableData.getIntField("sortPriority", -1); this->entries.push_back(entry); tableData.nextRow(); @@ -57,3 +57,4 @@ std::vector CDLootTableTable::Query(std::function& CDLootTableTable::GetEntries(void) const { return this->entries; } + diff --git a/dDatabase/Tables/CDMissionEmailTable.cpp b/dDatabase/Tables/CDMissionEmailTable.cpp index a8beb95b..4fac7be2 100644 --- a/dDatabase/Tables/CDMissionEmailTable.cpp +++ b/dDatabase/Tables/CDMissionEmailTable.cpp @@ -21,14 +21,14 @@ CDMissionEmailTable::CDMissionEmailTable(void) { auto tableData = CDClientDatabase::ExecuteQuery("SELECT * FROM MissionEmail"); while (!tableData.eof()) { CDMissionEmail entry; - entry.ID = tableData.getIntField(0, -1); - entry.messageType = tableData.getIntField(1, -1); - entry.notificationGroup = tableData.getIntField(2, -1); - entry.missionID = tableData.getIntField(3, -1); - entry.attachmentLOT = tableData.getIntField(4, 0); - entry.localize = (bool)tableData.getIntField(5, -1); - entry.locStatus = tableData.getIntField(6, -1); - entry.gate_version = tableData.getStringField(7, ""); + entry.ID = tableData.getIntField("ID", -1); + entry.messageType = tableData.getIntField("messageType", -1); + entry.notificationGroup = tableData.getIntField("notificationGroup", -1); + entry.missionID = tableData.getIntField("missionID", -1); + entry.attachmentLOT = tableData.getIntField("attachmentLOT", 0); + entry.localize = (bool)tableData.getIntField("localize", -1); + entry.locStatus = tableData.getIntField("locStatus", -1); + entry.gate_version = tableData.getStringField("gate_version", ""); this->entries.push_back(entry); tableData.nextRow(); @@ -59,3 +59,4 @@ std::vector CDMissionEmailTable::Query(std::function CDMissionEmailTable::GetEntries(void) const { return this->entries; } + diff --git a/dDatabase/Tables/CDMissionNPCComponentTable.cpp b/dDatabase/Tables/CDMissionNPCComponentTable.cpp index e2589890..461cc909 100644 --- a/dDatabase/Tables/CDMissionNPCComponentTable.cpp +++ b/dDatabase/Tables/CDMissionNPCComponentTable.cpp @@ -21,11 +21,11 @@ CDMissionNPCComponentTable::CDMissionNPCComponentTable(void) { auto tableData = CDClientDatabase::ExecuteQuery("SELECT * FROM MissionNPCComponent"); while (!tableData.eof()) { CDMissionNPCComponent entry; - entry.id = tableData.getIntField(0, -1); - entry.missionID = tableData.getIntField(1, -1); - entry.offersMission = tableData.getIntField(2, -1) == 1 ? true : false; - entry.acceptsMission = tableData.getIntField(3, -1) == 1 ? true : false; - entry.gate_version = tableData.getStringField(4, ""); + entry.id = tableData.getIntField("id", -1); + entry.missionID = tableData.getIntField("missionID", -1); + entry.offersMission = tableData.getIntField("offersMission", -1) == 1 ? true : false; + entry.acceptsMission = tableData.getIntField("acceptsMission", -1) == 1 ? true : false; + entry.gate_version = tableData.getStringField("gate_version", ""); this->entries.push_back(entry); tableData.nextRow(); @@ -56,3 +56,4 @@ std::vector CDMissionNPCComponentTable::Query(std::functi std::vector CDMissionNPCComponentTable::GetEntries(void) const { return this->entries; } + diff --git a/dDatabase/Tables/CDMissionTasksTable.cpp b/dDatabase/Tables/CDMissionTasksTable.cpp index 81de2088..c22da1ef 100644 --- a/dDatabase/Tables/CDMissionTasksTable.cpp +++ b/dDatabase/Tables/CDMissionTasksTable.cpp @@ -21,19 +21,19 @@ CDMissionTasksTable::CDMissionTasksTable(void) { auto tableData = CDClientDatabase::ExecuteQuery("SELECT * FROM MissionTasks"); while (!tableData.eof()) { CDMissionTasks entry; - entry.id = tableData.getIntField(0, -1); - UNUSED(entry.locStatus = tableData.getIntField(1, -1)); - entry.taskType = tableData.getIntField(2, -1); - entry.target = tableData.getIntField(3, -1); - entry.targetGroup = tableData.getStringField(4, ""); - entry.targetValue = tableData.getIntField(5, -1); - entry.taskParam1 = tableData.getStringField(6, ""); - UNUSED(entry.largeTaskIcon = tableData.getStringField(7, "")); - UNUSED(entry.IconID = tableData.getIntField(8, -1)); - entry.uid = tableData.getIntField(9, -1); - UNUSED(entry.largeTaskIconID = tableData.getIntField(10, -1)); - UNUSED(entry.localize = tableData.getIntField(11, -1) == 1 ? true : false); - UNUSED(entry.gate_version = tableData.getStringField(12, "")); + entry.id = tableData.getIntField("id", -1); + UNUSED(entry.locStatus = tableData.getIntField("locStatus", -1)); + entry.taskType = tableData.getIntField("taskType", -1); + entry.target = tableData.getIntField("target", -1); + entry.targetGroup = tableData.getStringField("targetGroup", ""); + entry.targetValue = tableData.getIntField("targetValue", -1); + entry.taskParam1 = tableData.getStringField("taskParam1", ""); + UNUSED(entry.largeTaskIcon = tableData.getStringField("largeTaskIcon", "")); + UNUSED(entry.IconID = tableData.getIntField("IconID", -1)); + entry.uid = tableData.getIntField("uid", -1); + UNUSED(entry.largeTaskIconID = tableData.getIntField("largeTaskIconID", -1)); + UNUSED(entry.localize = tableData.getIntField("localize", -1) == 1 ? true : false); + UNUSED(entry.gate_version = tableData.getStringField("gate_version", "")); this->entries.push_back(entry); tableData.nextRow(); @@ -78,3 +78,4 @@ std::vector CDMissionTasksTable::GetByMissionID(uint32_t missio const std::vector& CDMissionTasksTable::GetEntries(void) const { return this->entries; } + diff --git a/dDatabase/Tables/CDMissionsTable.cpp b/dDatabase/Tables/CDMissionsTable.cpp index 7e59657d..a87b4327 100644 --- a/dDatabase/Tables/CDMissionsTable.cpp +++ b/dDatabase/Tables/CDMissionsTable.cpp @@ -23,58 +23,58 @@ CDMissionsTable::CDMissionsTable(void) { auto tableData = CDClientDatabase::ExecuteQuery("SELECT * FROM Missions"); while (!tableData.eof()) { CDMissions entry; - entry.id = tableData.getIntField(0, -1); - entry.defined_type = tableData.getStringField(1, ""); - entry.defined_subtype = tableData.getStringField(2, ""); - entry.UISortOrder = tableData.getIntField(3, -1); - entry.offer_objectID = tableData.getIntField(4, -1); - entry.target_objectID = tableData.getIntField(5, -1); - entry.reward_currency = tableData.getInt64Field(6, -1); - entry.LegoScore = tableData.getIntField(7, -1); - entry.reward_reputation = tableData.getIntField(8, -1); - entry.isChoiceReward = tableData.getIntField(9, -1) == 1 ? true : false; - entry.reward_item1 = tableData.getIntField(10, 0); - entry.reward_item1_count = tableData.getIntField(11, 0); - entry.reward_item2 = tableData.getIntField(12, 0); - entry.reward_item2_count = tableData.getIntField(13, 0); - entry.reward_item3 = tableData.getIntField(14, 0); - entry.reward_item3_count = tableData.getIntField(15, 0); - entry.reward_item4 = tableData.getIntField(16, 0); - entry.reward_item4_count = tableData.getIntField(17, 0); - entry.reward_emote = tableData.getIntField(18, -1); - entry.reward_emote2 = tableData.getIntField(19, -1); - entry.reward_emote3 = tableData.getIntField(20, -1); - entry.reward_emote4 = tableData.getIntField(21, -1); - entry.reward_maximagination = tableData.getIntField(22, -1); - entry.reward_maxhealth = tableData.getIntField(23, -1); - entry.reward_maxinventory = tableData.getIntField(24, -1); - entry.reward_maxmodel = tableData.getIntField(25, -1); - entry.reward_maxwidget = tableData.getIntField(26, -1); - entry.reward_maxwallet = tableData.getIntField(27, -1); - entry.repeatable = tableData.getIntField(28, -1) == 1 ? true : false; - entry.reward_currency_repeatable = tableData.getIntField(29, -1); - entry.reward_item1_repeatable = tableData.getIntField(30, -1); - entry.reward_item1_repeat_count = tableData.getIntField(31, -1); - entry.reward_item2_repeatable = tableData.getIntField(32, -1); - entry.reward_item2_repeat_count = tableData.getIntField(33, -1); - entry.reward_item3_repeatable = tableData.getIntField(34, -1); - entry.reward_item3_repeat_count = tableData.getIntField(35, -1); - entry.reward_item4_repeatable = tableData.getIntField(36, -1); - entry.reward_item4_repeat_count = tableData.getIntField(37, -1); - entry.time_limit = tableData.getIntField(38, -1); - entry.isMission = tableData.getIntField(39, -1) ? true : false; - entry.missionIconID = tableData.getIntField(40, -1); - entry.prereqMissionID = tableData.getStringField(41, ""); - entry.localize = tableData.getIntField(42, -1) == 1 ? true : false; - entry.inMOTD = tableData.getIntField(43, -1) == 1 ? true : false; - entry.cooldownTime = tableData.getInt64Field(44, -1); - entry.isRandom = tableData.getIntField(45, -1) == 1 ? true : false; - entry.randomPool = tableData.getStringField(46, ""); - entry.UIPrereqID = tableData.getIntField(47, -1); - UNUSED(entry.gate_version = tableData.getStringField(48, "")); - UNUSED(entry.HUDStates = tableData.getStringField(49, "")); - UNUSED(entry.locStatus = tableData.getIntField(50, -1)); - entry.reward_bankinventory = tableData.getIntField(51, -1); + entry.id = tableData.getIntField("id", -1); + entry.defined_type = tableData.getStringField("defined_type", ""); + entry.defined_subtype = tableData.getStringField("defined_subtype", ""); + entry.UISortOrder = tableData.getIntField("UISortOrder", -1); + entry.offer_objectID = tableData.getIntField("offer_objectID", -1); + entry.target_objectID = tableData.getIntField("target_objectID", -1); + entry.reward_currency = tableData.getInt64Field("reward_currency", -1); + entry.LegoScore = tableData.getIntField("LegoScore", -1); + entry.reward_reputation = tableData.getIntField("reward_reputation", -1); + entry.isChoiceReward = tableData.getIntField("isChoiceReward", -1) == 1 ? true : false; + entry.reward_item1 = tableData.getIntField("reward_item1", 0); + entry.reward_item1_count = tableData.getIntField("reward_item1_count", 0); + entry.reward_item2 = tableData.getIntField("reward_item2", 0); + entry.reward_item2_count = tableData.getIntField("reward_item2_count", 0); + entry.reward_item3 = tableData.getIntField("reward_item3", 0); + entry.reward_item3_count = tableData.getIntField("reward_item3_count", 0); + entry.reward_item4 = tableData.getIntField("reward_item4", 0); + entry.reward_item4_count = tableData.getIntField("reward_item4_count", 0); + entry.reward_emote = tableData.getIntField("reward_emote", -1); + entry.reward_emote2 = tableData.getIntField("reward_emote2", -1); + entry.reward_emote3 = tableData.getIntField("reward_emote3", -1); + entry.reward_emote4 = tableData.getIntField("reward_emote4", -1); + entry.reward_maximagination = tableData.getIntField("reward_maximagination", -1); + entry.reward_maxhealth = tableData.getIntField("reward_maxhealth", -1); + entry.reward_maxinventory = tableData.getIntField("reward_maxinventory", -1); + entry.reward_maxmodel = tableData.getIntField("reward_maxmodel", -1); + entry.reward_maxwidget = tableData.getIntField("reward_maxwidget", -1); + entry.reward_maxwallet = tableData.getIntField("reward_maxwallet", -1); + entry.repeatable = tableData.getIntField("repeatable", -1) == 1 ? true : false; + entry.reward_currency_repeatable = tableData.getIntField("reward_currency_repeatable", -1); + entry.reward_item1_repeatable = tableData.getIntField("reward_item1_repeatable", -1); + entry.reward_item1_repeat_count = tableData.getIntField("reward_item1_repeat_count", -1); + entry.reward_item2_repeatable = tableData.getIntField("reward_item2_repeatable", -1); + entry.reward_item2_repeat_count = tableData.getIntField("reward_item2_repeat_count", -1); + entry.reward_item3_repeatable = tableData.getIntField("reward_item3_repeatable", -1); + entry.reward_item3_repeat_count = tableData.getIntField("reward_item3_repeat_count", -1); + entry.reward_item4_repeatable = tableData.getIntField("reward_item4_repeatable", -1); + entry.reward_item4_repeat_count = tableData.getIntField("reward_item4_repeat_count", -1); + entry.time_limit = tableData.getIntField("time_limit", -1); + entry.isMission = tableData.getIntField("isMission", -1) ? true : false; + entry.missionIconID = tableData.getIntField("missionIconID", -1); + entry.prereqMissionID = tableData.getStringField("prereqMissionID", ""); + entry.localize = tableData.getIntField("localize", -1) == 1 ? true : false; + entry.inMOTD = tableData.getIntField("inMOTD", -1) == 1 ? true : false; + entry.cooldownTime = tableData.getInt64Field("cooldownTime", -1); + entry.isRandom = tableData.getIntField("isRandom", -1) == 1 ? true : false; + entry.randomPool = tableData.getStringField("randomPool", ""); + entry.UIPrereqID = tableData.getIntField("UIPrereqID", -1); + UNUSED(entry.gate_version = tableData.getStringField("gate_version", "")); + UNUSED(entry.HUDStates = tableData.getStringField("HUDStates", "")); + UNUSED(entry.locStatus = tableData.getIntField("locStatus", -1)); + entry.reward_bankinventory = tableData.getIntField("reward_bankinventory", -1); this->entries.push_back(entry); tableData.nextRow(); @@ -131,3 +131,4 @@ const CDMissions& CDMissionsTable::GetByMissionID(uint32_t missionID, bool& foun return Default; } + diff --git a/dDatabase/Tables/CDMovementAIComponentTable.cpp b/dDatabase/Tables/CDMovementAIComponentTable.cpp index a98be8ba..333ec202 100644 --- a/dDatabase/Tables/CDMovementAIComponentTable.cpp +++ b/dDatabase/Tables/CDMovementAIComponentTable.cpp @@ -21,14 +21,14 @@ CDMovementAIComponentTable::CDMovementAIComponentTable(void) { auto tableData = CDClientDatabase::ExecuteQuery("SELECT * FROM MovementAIComponent"); while (!tableData.eof()) { CDMovementAIComponent entry; - entry.id = tableData.getIntField(0, -1); - entry.MovementType = tableData.getStringField(1, ""); - entry.WanderChance = tableData.getFloatField(2, -1.0f); - entry.WanderDelayMin = tableData.getFloatField(3, -1.0f); - entry.WanderDelayMax = tableData.getFloatField(4, -1.0f); - entry.WanderSpeed = tableData.getFloatField(5, -1.0f); - entry.WanderRadius = tableData.getFloatField(6, -1.0f); - entry.attachedPath = tableData.getStringField(7, ""); + entry.id = tableData.getIntField("id", -1); + entry.MovementType = tableData.getStringField("MovementType", ""); + entry.WanderChance = tableData.getFloatField("WanderChance", -1.0f); + entry.WanderDelayMin = tableData.getFloatField("WanderDelayMin", -1.0f); + entry.WanderDelayMax = tableData.getFloatField("WanderDelayMax", -1.0f); + entry.WanderSpeed = tableData.getFloatField("WanderSpeed", -1.0f); + entry.WanderRadius = tableData.getFloatField("WanderRadius", -1.0f); + entry.attachedPath = tableData.getStringField("attachedPath", ""); this->entries.push_back(entry); tableData.nextRow(); @@ -59,3 +59,4 @@ std::vector CDMovementAIComponentTable::Query(std::functi std::vector CDMovementAIComponentTable::GetEntries(void) const { return this->entries; } + diff --git a/dDatabase/Tables/CDObjectSkillsTable.cpp b/dDatabase/Tables/CDObjectSkillsTable.cpp index 1a5c4790..dc797529 100644 --- a/dDatabase/Tables/CDObjectSkillsTable.cpp +++ b/dDatabase/Tables/CDObjectSkillsTable.cpp @@ -21,10 +21,10 @@ CDObjectSkillsTable::CDObjectSkillsTable(void) { auto tableData = CDClientDatabase::ExecuteQuery("SELECT * FROM ObjectSkills"); while (!tableData.eof()) { CDObjectSkills entry; - entry.objectTemplate = tableData.getIntField(0, -1); - entry.skillID = tableData.getIntField(1, -1); - entry.castOnType = tableData.getIntField(2, -1); - entry.AICombatWeight = tableData.getIntField(3, -1); + entry.objectTemplate = tableData.getIntField("objectTemplate", -1); + entry.skillID = tableData.getIntField("skillID", -1); + entry.castOnType = tableData.getIntField("castOnType", -1); + entry.AICombatWeight = tableData.getIntField("AICombatWeight", -1); this->entries.push_back(entry); tableData.nextRow(); @@ -55,3 +55,4 @@ std::vector CDObjectSkillsTable::Query(std::function CDObjectSkillsTable::GetEntries(void) const { return this->entries; } + diff --git a/dDatabase/Tables/CDObjectsTable.cpp b/dDatabase/Tables/CDObjectsTable.cpp index 03979af2..5133becc 100644 --- a/dDatabase/Tables/CDObjectsTable.cpp +++ b/dDatabase/Tables/CDObjectsTable.cpp @@ -18,20 +18,20 @@ CDObjectsTable::CDObjectsTable(void) { auto tableData = CDClientDatabase::ExecuteQuery("SELECT * FROM Objects"); while (!tableData.eof()) { CDObjects entry; - entry.id = tableData.getIntField(0, -1); - entry.name = tableData.getStringField(1, ""); - entry.placeable = tableData.getIntField(2, -1); - entry.type = tableData.getStringField(3, ""); - entry.description = tableData.getStringField(4, ""); - entry.localize = tableData.getIntField(5, -1); - entry.npcTemplateID = tableData.getIntField(6, -1); - entry.displayName = tableData.getStringField(7, ""); - entry.interactionDistance = tableData.getFloatField(8, -1.0f); - entry.nametag = tableData.getIntField(9, -1); - entry._internalNotes = tableData.getStringField(10, ""); - entry.locStatus = tableData.getIntField(11, -1); - entry.gate_version = tableData.getStringField(12, ""); - entry.HQ_valid = tableData.getIntField(13, -1); + entry.id = tableData.getIntField("id", -1); + entry.name = tableData.getStringField("name", ""); + entry.placeable = tableData.getIntField("placeable", -1); + entry.type = tableData.getStringField("type", ""); + entry.description = tableData.getStringField("description", ""); + entry.localize = tableData.getIntField("localize", -1); + entry.npcTemplateID = tableData.getIntField("npcTemplateID", -1); + entry.displayName = tableData.getStringField("displayName", ""); + entry.interactionDistance = tableData.getFloatField("interactionDistance", -1.0f); + entry.nametag = tableData.getIntField("nametag", -1); + entry._internalNotes = tableData.getStringField("_internalNotes", ""); + entry.locStatus = tableData.getIntField("locStatus", -1); + entry.gate_version = tableData.getStringField("gate_version", ""); + entry.HQ_valid = tableData.getIntField("HQ_valid", -1); this->entries.insert(std::make_pair(entry.id, entry)); tableData.nextRow(); @@ -71,20 +71,20 @@ const CDObjects& CDObjectsTable::GetByID(unsigned int LOT) { // Now get the data while (!tableData.eof()) { CDObjects entry; - entry.id = tableData.getIntField(0, -1); - entry.name = tableData.getStringField(1, ""); - UNUSED(entry.placeable = tableData.getIntField(2, -1)); - entry.type = tableData.getStringField(3, ""); + entry.id = tableData.getIntField("id", -1); + entry.name = tableData.getStringField("name", ""); + UNUSED(entry.placeable = tableData.getIntField("placeable", -1)); + entry.type = tableData.getStringField("type", ""); UNUSED(ntry.description = tableData.getStringField(4, "")); - UNUSED(entry.localize = tableData.getIntField(5, -1)); - UNUSED(entry.npcTemplateID = tableData.getIntField(6, -1)); - UNUSED(entry.displayName = tableData.getStringField(7, "")); - entry.interactionDistance = tableData.getFloatField(8, -1.0f); - UNUSED(entry.nametag = tableData.getIntField(9, -1)); - UNUSED(entry._internalNotes = tableData.getStringField(10, "")); - UNUSED(entry.locStatus = tableData.getIntField(11, -1)); - UNUSED(entry.gate_version = tableData.getStringField(12, "")); - UNUSED(entry.HQ_valid = tableData.getIntField(13, -1)); + UNUSED(entry.localize = tableData.getIntField("localize", -1)); + UNUSED(entry.npcTemplateID = tableData.getIntField("npcTemplateID", -1)); + UNUSED(entry.displayName = tableData.getStringField("displayName", "")); + entry.interactionDistance = tableData.getFloatField("interactionDistance", -1.0f); + UNUSED(entry.nametag = tableData.getIntField("nametag", -1)); + UNUSED(entry._internalNotes = tableData.getStringField("_internalNotes", "")); + UNUSED(entry.locStatus = tableData.getIntField("locStatus", -1)); + UNUSED(entry.gate_version = tableData.getStringField("gate_version", "")); + UNUSED(entry.HQ_valid = tableData.getIntField("HQ_valid", -1)); this->entries.insert(std::make_pair(entry.id, entry)); tableData.nextRow(); @@ -100,3 +100,4 @@ const CDObjects& CDObjectsTable::GetByID(unsigned int LOT) { return m_default; } + diff --git a/dDatabase/Tables/CDPackageComponentTable.cpp b/dDatabase/Tables/CDPackageComponentTable.cpp index 83673c6f..eabe68da 100644 --- a/dDatabase/Tables/CDPackageComponentTable.cpp +++ b/dDatabase/Tables/CDPackageComponentTable.cpp @@ -21,9 +21,9 @@ CDPackageComponentTable::CDPackageComponentTable(void) { auto tableData = CDClientDatabase::ExecuteQuery("SELECT * FROM PackageComponent"); while (!tableData.eof()) { CDPackageComponent entry; - entry.id = tableData.getIntField(0, -1); - entry.LootMatrixIndex = tableData.getIntField(1, -1); - entry.packageType = tableData.getIntField(2, -1); + entry.id = tableData.getIntField("id", -1); + entry.LootMatrixIndex = tableData.getIntField("LootMatrixIndex", -1); + entry.packageType = tableData.getIntField("packageType", -1); this->entries.push_back(entry); tableData.nextRow(); @@ -54,3 +54,4 @@ std::vector CDPackageComponentTable::Query(std::function CDPackageComponentTable::GetEntries(void) const { return this->entries; } + diff --git a/dDatabase/Tables/CDPhysicsComponentTable.cpp b/dDatabase/Tables/CDPhysicsComponentTable.cpp index 8cb7a3b0..f85d83c4 100644 --- a/dDatabase/Tables/CDPhysicsComponentTable.cpp +++ b/dDatabase/Tables/CDPhysicsComponentTable.cpp @@ -4,22 +4,22 @@ CDPhysicsComponentTable::CDPhysicsComponentTable(void) { auto tableData = CDClientDatabase::ExecuteQuery("SELECT * FROM PhysicsComponent"); while (!tableData.eof()) { CDPhysicsComponent* entry = new CDPhysicsComponent(); - entry->id = tableData.getIntField(0, -1); - entry->bStatic = tableData.getIntField(1, -1) != 0; - entry->physicsAsset = tableData.getStringField(2, ""); - UNUSED(entry->jump = tableData.getIntField(3, -1) != 0); - UNUSED(entry->doublejump = tableData.getIntField(4, -1) != 0); - entry->speed = tableData.getFloatField(5, -1); - UNUSED(entry->rotSpeed = tableData.getFloatField(6, -1)); - entry->playerHeight = tableData.getFloatField(7); - entry->playerRadius = tableData.getFloatField(8); - entry->pcShapeType = tableData.getIntField(9); - entry->collisionGroup = tableData.getIntField(10); - UNUSED(entry->airSpeed = tableData.getFloatField(11)); - UNUSED(entry->boundaryAsset = tableData.getStringField(12)); - UNUSED(entry->jumpAirSpeed = tableData.getFloatField(13)); - UNUSED(entry->friction = tableData.getFloatField(14)); - UNUSED(entry->gravityVolumeAsset = tableData.getStringField(15)); + entry->id = tableData.getIntField("id", -1); + entry->bStatic = tableData.getIntField("static", -1) != 0; + entry->physicsAsset = tableData.getStringField("physics_asset", ""); + UNUSED(entry->jump = tableData.getIntField("jump", -1) != 0); + UNUSED(entry->doublejump = tableData.getIntField("doublejump", -1) != 0); + entry->speed = tableData.getFloatField("speed", -1); + UNUSED(entry->rotSpeed = tableData.getFloatField("rotSpeed", -1)); + entry->playerHeight = tableData.getFloatField("playerHeight"); + entry->playerRadius = tableData.getFloatField("playerRadius"); + entry->pcShapeType = tableData.getIntField("pcShapeType"); + entry->collisionGroup = tableData.getIntField("collisionGroup"); + UNUSED(entry->airSpeed = tableData.getFloatField("airSpeed")); + UNUSED(entry->boundaryAsset = tableData.getStringField("boundaryAsset")); + UNUSED(entry->jumpAirSpeed = tableData.getFloatField("jumpAirSpeed")); + UNUSED(entry->friction = tableData.getFloatField("friction")); + UNUSED(entry->gravityVolumeAsset = tableData.getStringField("gravityVolumeAsset")); m_entries.insert(std::make_pair(entry->id, entry)); tableData.nextRow(); @@ -47,3 +47,4 @@ CDPhysicsComponent* CDPhysicsComponentTable::GetByID(unsigned int componentID) { return nullptr; } + diff --git a/dDatabase/Tables/CDPropertyEntranceComponentTable.cpp b/dDatabase/Tables/CDPropertyEntranceComponentTable.cpp index 01a2ae37..127ebc9d 100644 --- a/dDatabase/Tables/CDPropertyEntranceComponentTable.cpp +++ b/dDatabase/Tables/CDPropertyEntranceComponentTable.cpp @@ -18,11 +18,11 @@ CDPropertyEntranceComponentTable::CDPropertyEntranceComponentTable() { auto tableData = CDClientDatabase::ExecuteQuery("SELECT * FROM PropertyEntranceComponent;"); while (!tableData.eof()) { auto entry = CDPropertyEntranceComponent{ - static_cast(tableData.getIntField(0, -1)), - static_cast(tableData.getIntField(1, -1)), - tableData.getStringField(2, ""), - static_cast(tableData.getIntField(3, false)), - tableData.getStringField(4, "") + static_cast(tableData.getIntField("id", -1)), + static_cast(tableData.getIntField("mapID", -1)), + tableData.getStringField("propertyName", ""), + static_cast(tableData.getIntField("isOnProperty", false)), + tableData.getStringField("groupType", "") }; this->entries.push_back(entry); @@ -46,3 +46,4 @@ CDPropertyEntranceComponent CDPropertyEntranceComponentTable::GetByID(uint32_t i return defaultEntry; } + diff --git a/dDatabase/Tables/CDPropertyTemplateTable.cpp b/dDatabase/Tables/CDPropertyTemplateTable.cpp index 7dd118eb..bf56da7b 100644 --- a/dDatabase/Tables/CDPropertyTemplateTable.cpp +++ b/dDatabase/Tables/CDPropertyTemplateTable.cpp @@ -17,10 +17,10 @@ CDPropertyTemplateTable::CDPropertyTemplateTable() { auto tableData = CDClientDatabase::ExecuteQuery("SELECT * FROM PropertyTemplate;"); while (!tableData.eof()) { auto entry = CDPropertyTemplate{ - static_cast(tableData.getIntField(0, -1)), - static_cast(tableData.getIntField(1, -1)), - static_cast(tableData.getIntField(2, -1)), - tableData.getStringField(3, "") + static_cast(tableData.getIntField("id", -1)), + static_cast(tableData.getIntField("mapID", -1)), + static_cast(tableData.getIntField("vendorMapID", -1)), + tableData.getStringField("spawnName", "") }; this->entries.push_back(entry); @@ -44,3 +44,4 @@ CDPropertyTemplate CDPropertyTemplateTable::GetByMapID(uint32_t mapID) { return defaultEntry; } + diff --git a/dDatabase/Tables/CDProximityMonitorComponentTable.cpp b/dDatabase/Tables/CDProximityMonitorComponentTable.cpp index 092f3ca1..98cde098 100644 --- a/dDatabase/Tables/CDProximityMonitorComponentTable.cpp +++ b/dDatabase/Tables/CDProximityMonitorComponentTable.cpp @@ -21,10 +21,10 @@ CDProximityMonitorComponentTable::CDProximityMonitorComponentTable(void) { auto tableData = CDClientDatabase::ExecuteQuery("SELECT * FROM ProximityMonitorComponent"); while (!tableData.eof()) { CDProximityMonitorComponent entry; - entry.id = tableData.getIntField(0, -1); - entry.Proximities = tableData.getStringField(1, ""); - entry.LoadOnClient = tableData.getIntField(2, -1); - entry.LoadOnServer = tableData.getIntField(3, -1); + entry.id = tableData.getIntField("id", -1); + entry.Proximities = tableData.getStringField("Proximities", ""); + entry.LoadOnClient = tableData.getIntField("LoadOnClient", -1); + entry.LoadOnServer = tableData.getIntField("LoadOnServer", -1); this->entries.push_back(entry); tableData.nextRow(); @@ -55,3 +55,4 @@ std::vector CDProximityMonitorComponentTable::Query std::vector CDProximityMonitorComponentTable::GetEntries(void) const { return this->entries; } + diff --git a/dDatabase/Tables/CDRailActivatorComponent.cpp b/dDatabase/Tables/CDRailActivatorComponent.cpp index 4c141256..4d1b5e7e 100644 --- a/dDatabase/Tables/CDRailActivatorComponent.cpp +++ b/dDatabase/Tables/CDRailActivatorComponent.cpp @@ -6,35 +6,35 @@ CDRailActivatorComponentTable::CDRailActivatorComponentTable() { while (!tableData.eof()) { CDRailActivatorComponent entry; - entry.id = tableData.getIntField(0); + entry.id = tableData.getIntField("id", 0); - entry.startAnimation = GeneralUtils::ASCIIToUTF16(tableData.getStringField(1, "")); - entry.loopAnimation = GeneralUtils::ASCIIToUTF16(tableData.getStringField(2, "")); - entry.stopAnimation = GeneralUtils::ASCIIToUTF16(tableData.getStringField(3, "")); - entry.startSound = GeneralUtils::ASCIIToUTF16(tableData.getStringField(4, "")); - entry.loopSound = GeneralUtils::ASCIIToUTF16(tableData.getStringField(5, "")); - entry.stopSound = GeneralUtils::ASCIIToUTF16(tableData.getStringField(6, "")); + entry.startAnimation = GeneralUtils::ASCIIToUTF16(tableData.getStringField("startAnim", "")); + entry.loopAnimation = GeneralUtils::ASCIIToUTF16(tableData.getStringField("loopAnim", "")); + entry.stopAnimation = GeneralUtils::ASCIIToUTF16(tableData.getStringField("stopAnim", "")); + entry.startSound = GeneralUtils::ASCIIToUTF16(tableData.getStringField("startSound", "")); + entry.loopSound = GeneralUtils::ASCIIToUTF16(tableData.getStringField("loopSound", "")); + entry.stopSound = GeneralUtils::ASCIIToUTF16(tableData.getStringField("stopSound", "")); - std::string loopEffectString(tableData.getStringField(7, "")); + std::string loopEffectString(tableData.getStringField("effectIDs", "")); entry.loopEffectID = EffectPairFromString(loopEffectString); - entry.preconditions = tableData.getStringField(8, "-1"); + entry.preconditions = tableData.getStringField("preconditions", "-1"); - entry.playerCollision = tableData.getIntField(9, 0); + entry.playerCollision = tableData.getIntField("playerCollision", 0); - entry.cameraLocked = tableData.getIntField(10, 0); + entry.cameraLocked = tableData.getIntField("cameraLocked", 0); - std::string startEffectString(tableData.getStringField(11, "")); + std::string startEffectString(tableData.getStringField("StartEffectID", "")); entry.startEffectID = EffectPairFromString(startEffectString); - std::string stopEffectString(tableData.getStringField(12, "")); + std::string stopEffectString(tableData.getStringField("StopEffectID", "")); entry.stopEffectID = EffectPairFromString(stopEffectString); - entry.damageImmune = tableData.getIntField(13, 0); + entry.damageImmune = tableData.getIntField("DamageImmune", 0); - entry.noAggro = tableData.getIntField(14, 0); + entry.noAggro = tableData.getIntField("NoAggro", 0); - entry.showNameBillboard = tableData.getIntField(15, 0); + entry.showNameBillboard = tableData.getIntField("ShowNameBillboard", 0); m_Entries.push_back(entry); tableData.nextRow(); @@ -70,3 +70,4 @@ std::pair CDRailActivatorComponentTable::EffectPairFro return {}; } + diff --git a/dDatabase/Tables/CDRarityTableTable.cpp b/dDatabase/Tables/CDRarityTableTable.cpp index 67878cd2..cfa8d01c 100644 --- a/dDatabase/Tables/CDRarityTableTable.cpp +++ b/dDatabase/Tables/CDRarityTableTable.cpp @@ -21,10 +21,10 @@ CDRarityTableTable::CDRarityTableTable(void) { auto tableData = CDClientDatabase::ExecuteQuery("SELECT * FROM RarityTable"); while (!tableData.eof()) { CDRarityTable entry; - entry.id = tableData.getIntField(0, -1); - entry.randmax = tableData.getFloatField(1, -1); - entry.rarity = tableData.getIntField(2, -1); - entry.RarityTableIndex = tableData.getIntField(3, -1); + entry.id = tableData.getIntField("id", -1); + entry.randmax = tableData.getFloatField("randmax", -1); + entry.rarity = tableData.getIntField("rarity", -1); + entry.RarityTableIndex = tableData.getIntField("RarityTableIndex", -1); this->entries.push_back(entry); tableData.nextRow(); @@ -55,3 +55,4 @@ std::vector CDRarityTableTable::Query(std::function& CDRarityTableTable::GetEntries(void) const { return this->entries; } + diff --git a/dDatabase/Tables/CDRebuildComponentTable.cpp b/dDatabase/Tables/CDRebuildComponentTable.cpp index c4299b98..111592d4 100644 --- a/dDatabase/Tables/CDRebuildComponentTable.cpp +++ b/dDatabase/Tables/CDRebuildComponentTable.cpp @@ -21,16 +21,16 @@ CDRebuildComponentTable::CDRebuildComponentTable(void) { auto tableData = CDClientDatabase::ExecuteQuery("SELECT * FROM RebuildComponent"); while (!tableData.eof()) { CDRebuildComponent entry; - entry.id = tableData.getIntField(0, -1); - entry.reset_time = tableData.getFloatField(1, -1.0f); - entry.complete_time = tableData.getFloatField(2, -1.0f); - entry.take_imagination = tableData.getIntField(3, -1); - entry.interruptible = tableData.getIntField(4, -1) == 1 ? true : false; - entry.self_activator = tableData.getIntField(5, -1) == 1 ? true : false; - entry.custom_modules = tableData.getStringField(6, ""); - entry.activityID = tableData.getIntField(7, -1); - entry.post_imagination_cost = tableData.getIntField(8, -1); - entry.time_before_smash = tableData.getFloatField(9, -1.0f); + entry.id = tableData.getIntField("id", -1); + entry.reset_time = tableData.getFloatField("reset_time", -1.0f); + entry.complete_time = tableData.getFloatField("complete_time", -1.0f); + entry.take_imagination = tableData.getIntField("take_imagination", -1); + entry.interruptible = tableData.getIntField("interruptible", -1) == 1 ? true : false; + entry.self_activator = tableData.getIntField("self_activator", -1) == 1 ? true : false; + entry.custom_modules = tableData.getStringField("custom_modules", ""); + entry.activityID = tableData.getIntField("activityID", -1); + entry.post_imagination_cost = tableData.getIntField("post_imagination_cost", -1); + entry.time_before_smash = tableData.getFloatField("time_before_smash", -1.0f); this->entries.push_back(entry); tableData.nextRow(); @@ -61,3 +61,4 @@ std::vector CDRebuildComponentTable::Query(std::function CDRebuildComponentTable::GetEntries(void) const { return this->entries; } + diff --git a/dDatabase/Tables/CDRewardsTable.cpp b/dDatabase/Tables/CDRewardsTable.cpp index 99d56f26..a53e02b5 100644 --- a/dDatabase/Tables/CDRewardsTable.cpp +++ b/dDatabase/Tables/CDRewardsTable.cpp @@ -4,12 +4,12 @@ CDRewardsTable::CDRewardsTable(void) { auto tableData = CDClientDatabase::ExecuteQuery("SELECT * FROM Rewards"); while (!tableData.eof()) { CDRewards* entry = new CDRewards(); - entry->id = tableData.getIntField(0, -1); - entry->levelID = tableData.getIntField(1, -1); - entry->missionID = tableData.getIntField(2, -1); - entry->rewardType = tableData.getIntField(3, -1); - entry->value = tableData.getIntField(4, -1); - entry->count = tableData.getIntField(5, -1); + entry->id = tableData.getIntField("id", -1); + entry->levelID = tableData.getIntField("LevelID", -1); + entry->missionID = tableData.getIntField("MissionID", -1); + entry->rewardType = tableData.getIntField("RewardType", -1); + entry->value = tableData.getIntField("value", -1); + entry->count = tableData.getIntField("count", -1); m_entries.insert(std::make_pair(entry->id, entry)); tableData.nextRow(); @@ -38,3 +38,4 @@ std::vector CDRewardsTable::GetByLevelID(uint32_t levelID) { return result; } + diff --git a/dDatabase/Tables/CDScriptComponentTable.cpp b/dDatabase/Tables/CDScriptComponentTable.cpp index b34f96f1..d91dcee9 100644 --- a/dDatabase/Tables/CDScriptComponentTable.cpp +++ b/dDatabase/Tables/CDScriptComponentTable.cpp @@ -18,9 +18,9 @@ CDScriptComponentTable::CDScriptComponentTable(void) { auto tableData = CDClientDatabase::ExecuteQuery("SELECT * FROM ScriptComponent"); while (!tableData.eof()) { CDScriptComponent entry; - entry.id = tableData.getIntField(0, -1); - entry.script_name = tableData.getStringField(1, ""); - entry.client_script_name = tableData.getStringField(2, ""); + entry.id = tableData.getIntField("id", -1); + entry.script_name = tableData.getStringField("script_name", ""); + entry.client_script_name = tableData.getStringField("client_script_name", ""); this->entries.insert(std::make_pair(entry.id, entry)); tableData.nextRow(); @@ -45,3 +45,4 @@ const CDScriptComponent& CDScriptComponentTable::GetByID(unsigned int id) { return m_ToReturnWhenNoneFound; } + diff --git a/dDatabase/Tables/CDSkillBehaviorTable.cpp b/dDatabase/Tables/CDSkillBehaviorTable.cpp index e3986578..b6b601a1 100644 --- a/dDatabase/Tables/CDSkillBehaviorTable.cpp +++ b/dDatabase/Tables/CDSkillBehaviorTable.cpp @@ -23,25 +23,25 @@ CDSkillBehaviorTable::CDSkillBehaviorTable(void) { auto tableData = CDClientDatabase::ExecuteQuery("SELECT * FROM SkillBehavior"); while (!tableData.eof()) { CDSkillBehavior entry; - entry.skillID = tableData.getIntField(0, -1); - UNUSED(entry.locStatus = tableData.getIntField(1, -1)); - entry.behaviorID = tableData.getIntField(2, -1); - entry.imaginationcost = tableData.getIntField(3, -1); - entry.cooldowngroup = tableData.getIntField(4, -1); - entry.cooldown = tableData.getFloatField(5, -1.0f); - UNUSED(entry.isNpcEditor = tableData.getIntField(6, -1) == 1 ? true : false); - UNUSED(entry.skillIcon = tableData.getIntField(7, -1)); - UNUSED(entry.oomSkillID = tableData.getStringField(8, "")); - UNUSED(entry.oomBehaviorEffectID = tableData.getIntField(9, -1)); - UNUSED(entry.castTypeDesc = tableData.getIntField(10, -1)); - UNUSED(entry.imBonusUI = tableData.getIntField(11, -1)); - UNUSED(entry.lifeBonusUI = tableData.getIntField(12, -1)); - UNUSED(entry.armorBonusUI = tableData.getIntField(13, -1)); - UNUSED(entry.damageUI = tableData.getIntField(14, -1)); - UNUSED(entry.hideIcon = tableData.getIntField(15, -1) == 1 ? true : false); - UNUSED(entry.localize = tableData.getIntField(16, -1) == 1 ? true : false); - UNUSED(entry.gate_version = tableData.getStringField(17, "")); - UNUSED(entry.cancelType = tableData.getIntField(18, -1)); + entry.skillID = tableData.getIntField("skillID", -1); + UNUSED(entry.locStatus = tableData.getIntField("locStatus", -1)); + entry.behaviorID = tableData.getIntField("behaviorID", -1); + entry.imaginationcost = tableData.getIntField("imaginationcost", -1); + entry.cooldowngroup = tableData.getIntField("cooldowngroup", -1); + entry.cooldown = tableData.getFloatField("cooldown", -1.0f); + UNUSED(entry.isNpcEditor = tableData.getIntField("isNpcEditor", -1) == 1 ? true : false); + UNUSED(entry.skillIcon = tableData.getIntField("skillIcon", -1)); + UNUSED(entry.oomSkillID = tableData.getStringField("oomSkillID", "")); + UNUSED(entry.oomBehaviorEffectID = tableData.getIntField("oomBehaviorEffectID", -1)); + UNUSED(entry.castTypeDesc = tableData.getIntField("castTypeDesc", -1)); + UNUSED(entry.imBonusUI = tableData.getIntField("imBonusUI", -1)); + UNUSED(entry.lifeBonusUI = tableData.getIntField("lifeBonusUI", -1)); + UNUSED(entry.armorBonusUI = tableData.getIntField("armorBonusUI", -1)); + UNUSED(entry.damageUI = tableData.getIntField("damageUI", -1)); + UNUSED(entry.hideIcon = tableData.getIntField("hideIcon", -1) == 1 ? true : false); + UNUSED(entry.localize = tableData.getIntField("localize", -1) == 1 ? true : false); + UNUSED(entry.gate_version = tableData.getStringField("gate_version", "")); + UNUSED(entry.cancelType = tableData.getIntField("cancelType", -1)); this->entries.insert(std::make_pair(entry.skillID, entry)); //this->entries.push_back(entry); @@ -82,3 +82,4 @@ const CDSkillBehavior& CDSkillBehaviorTable::GetSkillByID(unsigned int skillID) return m_empty; } + diff --git a/dDatabase/Tables/CDVendorComponentTable.cpp b/dDatabase/Tables/CDVendorComponentTable.cpp index f1dd96db..86d87d4b 100644 --- a/dDatabase/Tables/CDVendorComponentTable.cpp +++ b/dDatabase/Tables/CDVendorComponentTable.cpp @@ -21,11 +21,11 @@ CDVendorComponentTable::CDVendorComponentTable(void) { auto tableData = CDClientDatabase::ExecuteQuery("SELECT * FROM VendorComponent"); while (!tableData.eof()) { CDVendorComponent entry; - entry.id = tableData.getIntField(0, -1); - entry.buyScalar = tableData.getFloatField(1, -1.0f); - entry.sellScalar = tableData.getFloatField(2, -1.0f); - entry.refreshTimeSeconds = tableData.getFloatField(3, -1.0f); - entry.LootMatrixIndex = tableData.getIntField(4, -1); + entry.id = tableData.getIntField("id", -1); + entry.buyScalar = tableData.getFloatField("buyScalar", -1.0f); + entry.sellScalar = tableData.getFloatField("sellScalar", -1.0f); + entry.refreshTimeSeconds = tableData.getFloatField("refreshTimeSeconds", -1.0f); + entry.LootMatrixIndex = tableData.getIntField("LootMatrixIndex", -1); this->entries.push_back(entry); tableData.nextRow(); @@ -56,3 +56,4 @@ std::vector CDVendorComponentTable::Query(std::function CDVendorComponentTable::GetEntries(void) const { return this->entries; } + diff --git a/dDatabase/Tables/CDZoneTableTable.cpp b/dDatabase/Tables/CDZoneTableTable.cpp index e172f79a..04f7d102 100644 --- a/dDatabase/Tables/CDZoneTableTable.cpp +++ b/dDatabase/Tables/CDZoneTableTable.cpp @@ -18,33 +18,33 @@ CDZoneTableTable::CDZoneTableTable(void) { auto tableData = CDClientDatabase::ExecuteQuery("SELECT * FROM ZoneTable"); while (!tableData.eof()) { CDZoneTable entry; - entry.zoneID = tableData.getIntField(0, -1); - entry.locStatus = tableData.getIntField(1, -1); - entry.zoneName = tableData.getStringField(2, ""); - entry.scriptID = tableData.getIntField(3, -1); - entry.ghostdistance_min = tableData.getFloatField(4, -1.0f); - entry.ghostdistance = tableData.getFloatField(5, -1.0f); - entry.population_soft_cap = tableData.getIntField(6, -1); - entry.population_hard_cap = tableData.getIntField(7, -1); - UNUSED(entry.DisplayDescription = tableData.getStringField(8, "")); - UNUSED(entry.mapFolder = tableData.getStringField(9, "")); - entry.smashableMinDistance = tableData.getFloatField(10, -1.0f); - entry.smashableMaxDistance = tableData.getFloatField(11, -1.0f); - UNUSED(entry.mixerProgram = tableData.getStringField(12, "")); - UNUSED(entry.clientPhysicsFramerate = tableData.getStringField(13, "")); - UNUSED(entry.serverPhysicsFramerate = tableData.getStringField(14, "")); - entry.zoneControlTemplate = tableData.getIntField(15, -1); - entry.widthInChunks = tableData.getIntField(16, -1); - entry.heightInChunks = tableData.getIntField(17, -1); - entry.petsAllowed = tableData.getIntField(18, -1) == 1 ? true : false; - entry.localize = tableData.getIntField(19, -1) == 1 ? true : false; - entry.fZoneWeight = tableData.getFloatField(20, -1.0f); - UNUSED(entry.thumbnail = tableData.getStringField(21, "")); - entry.PlayerLoseCoinsOnDeath = tableData.getIntField(22, -1) == 1 ? true : false; - UNUSED(entry.disableSaveLoc = tableData.getIntField(23, -1) == 1 ? true : false); - entry.teamRadius = tableData.getFloatField(24, -1.0f); - UNUSED(entry.gate_version = tableData.getStringField(25, "")); - UNUSED(entry.mountsAllowed = tableData.getIntField(26, -1) == 1 ? true : false); + entry.zoneID = tableData.getIntField("zoneID", -1); + entry.locStatus = tableData.getIntField("locStatus", -1); + entry.zoneName = tableData.getStringField("zoneName", ""); + entry.scriptID = tableData.getIntField("scriptID", -1); + entry.ghostdistance_min = tableData.getFloatField("ghostdistance_min", -1.0f); + entry.ghostdistance = tableData.getFloatField("ghostdistance", -1.0f); + entry.population_soft_cap = tableData.getIntField("population_soft_cap", -1); + entry.population_hard_cap = tableData.getIntField("population_hard_cap", -1); + UNUSED(entry.DisplayDescription = tableData.getStringField("DisplayDescription", "")); + UNUSED(entry.mapFolder = tableData.getStringField("mapFolder", "")); + entry.smashableMinDistance = tableData.getFloatField("smashableMinDistance", -1.0f); + entry.smashableMaxDistance = tableData.getFloatField("smashableMaxDistance", -1.0f); + UNUSED(entry.mixerProgram = tableData.getStringField("mixerProgram", "")); + UNUSED(entry.clientPhysicsFramerate = tableData.getStringField("clientPhysicsFramerate", "")); + UNUSED(entry.serverPhysicsFramerate = tableData.getStringField("serverPhysicsFramerate", "")); + entry.zoneControlTemplate = tableData.getIntField("zoneControlTemplate", -1); + entry.widthInChunks = tableData.getIntField("widthInChunks", -1); + entry.heightInChunks = tableData.getIntField("heightInChunks", -1); + entry.petsAllowed = tableData.getIntField("petsAllowed", -1) == 1 ? true : false; + entry.localize = tableData.getIntField("localize", -1) == 1 ? true : false; + entry.fZoneWeight = tableData.getFloatField("fZoneWeight", -1.0f); + UNUSED(entry.thumbnail = tableData.getStringField("thumbnail", "")); + entry.PlayerLoseCoinsOnDeath = tableData.getIntField("PlayerLoseCoinsOnDeath", -1) == 1 ? true : false; + UNUSED(entry.disableSaveLoc = tableData.getIntField("disableSaveLoc", -1) == 1 ? true : false); + entry.teamRadius = tableData.getFloatField("teamRadius", -1.0f); + UNUSED(entry.gate_version = tableData.getStringField("gate_version", "")); + UNUSED(entry.mountsAllowed = tableData.getIntField("mountsAllowed", -1) == 1 ? true : false); this->m_Entries.insert(std::make_pair(entry.zoneID, entry)); tableData.nextRow(); @@ -71,3 +71,4 @@ const CDZoneTable* CDZoneTableTable::Query(unsigned int zoneID) { return nullptr; } + diff --git a/dGame/dGameMessages/GameMessages.cpp b/dGame/dGameMessages/GameMessages.cpp index 7e9ea898..9aafd0fc 100644 --- a/dGame/dGameMessages/GameMessages.cpp +++ b/dGame/dGameMessages/GameMessages.cpp @@ -77,6 +77,7 @@ #include "AMFDeserialize.h" #include "eBlueprintSaveResponseType.h" #include "eAninmationFlags.h" +#include "AMFFormat_BitStream.h" void GameMessages::SendFireEventClientSide(const LWOOBJID& objectID, const SystemAddress& sysAddr, std::u16string args, const LWOOBJID& object, int64_t param1, int param2, const LWOOBJID& sender) { CBITSTREAM;