mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2025-11-28 12:18:15 +00:00
Use field names instead of numbers for CDClient tables (#945)
This commit is contained in:
@@ -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<LOT, uint32_t> CDItemComponentTable::ParseCraftingCurrencies(const CDIt
|
||||
|
||||
return currencies;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user