DB/ChrCustomization

From wowdev
Revision as of 15:17, 26 February 2018 by Schlumpf (talk | contribs)
Jump to navigation Jump to search

≥ Legion (7.3.5.25600)

struct ChrCustomizationRec {
  uint32_t m_ID;
  stringref m_name;
  uint32_t m_sexID;       // 0x1 female, 0x3 both
  uint32_t m_baseSection;
  uint32_t m_field0C;     // similar to previous field...
  uint32_t m_field10;     // something to do with tattoos (0 or 1)...
  int32_t m_field14[3];   // field14[0] is textureRegion for tattoos, rest are -1...
  uint32_t m_raceID;      // 0 for all races
};

C# parsing example

(by TOM_RUS)

public static void DumpCustomizations()
{
    foreach (var raceRec in ClientDB.ChrRaces.Records)
    {
        for (int gender = 0; gender < 2; gender++)
        {
            Console.WriteLine("Customizations for {0} {1}:", (Races)raceRec.Id, (Gender)gender);

            foreach (var cust in ClientDB.ChrCustomization.Records)
            {
                if ((cust.m_raceID == 0 || cust.m_raceID == raceRec.Id) && (cust.m_sexID == 3 || cust.m_sexID == gender))
                {
                    Console.WriteLine("{0}: field08 {1}, field0C {2}, field10 {3}, field14 [{4}, {5}, {6}]", cust.m_name, cust.field08, cust.field0C, cust.field10,  cust.field14[0], cust.field14[1], cust.field14[2]);
                }
            }

            Console.WriteLine();
        }
    }
}