diff --git a/world/worlddb.cpp b/world/worlddb.cpp index 4ba21101c..8099b9ee2 100644 --- a/world/worlddb.cpp +++ b/world/worlddb.cpp @@ -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); } }