Fix for tints not showing up at character select (world server)

This commit is contained in:
Uleat 2015-02-18 19:18:53 -05:00
parent 7deb4d5e78
commit 414db873b7

View File

@ -194,6 +194,18 @@ void WorldDatabase::GetCharSelectInfo(uint32 accountID, EQApplicationPacket **ou
}
/* Bind End */
/* Load Character Material Data for Char Select */
cquery = StringFormat("SELECT slot, red, green, blue, use_tint, color FROM `character_material` WHERE `id` = %u", character_id);
auto results_b = database.QueryDatabase(cquery); uint8 slot = 0;
for (auto row_b = results_b.begin(); row_b != results_b.end(); ++row_b) {
slot = atoi(row_b[0]);
pp.item_tint[slot].RGB.Red = atoi(row_b[1]);
pp.item_tint[slot].RGB.Green = atoi(row_b[2]);
pp.item_tint[slot].RGB.Blue = atoi(row_b[3]);
pp.item_tint[slot].RGB.UseTint = atoi(row_b[4]);
}
/* Character Material Data End */
/* Load Inventory */
// If we ensure that the material data is updated appropriately, we can do away with inventory loads
if (GetInventory(accountID, cse->Name, &inv)) {
@ -251,17 +263,6 @@ void WorldDatabase::GetCharSelectInfo(uint32 accountID, EQApplicationPacket **ou
}
/* Load Inventory End */
/* Load Character Material Data for Char Select */
cquery = StringFormat("SELECT slot, red, green, blue, use_tint, color FROM `character_material` WHERE `id` = %u", character_id);
auto results_b = database.QueryDatabase(cquery); uint8 slot = 0;
for (auto row_b = results_b.begin(); row_b != results_b.end(); ++row_b) {
slot = atoi(row_b[0]);
pp.item_tint[slot].RGB.Red = atoi(row_b[1]);
pp.item_tint[slot].RGB.Green = atoi(row_b[2]);
pp.item_tint[slot].RGB.Blue = atoi(row_b[3]);
pp.item_tint[slot].RGB.UseTint = atoi(row_b[4]);
}
buff_ptr += sizeof(CharacterSelectEntry_Struct);
}
}