From e4be4d6895a4f6db0748e8e36d3271b2ad76badf Mon Sep 17 00:00:00 2001 From: Uleat Date: Sun, 15 Feb 2015 10:30:43 -0500 Subject: [PATCH] Pre-purposed clean-up --- common/eq_packet_structs.h | 119 ++++++++++++--------------- common/patches/rof.cpp | 104 +++++++++++------------ common/patches/rof2.cpp | 104 +++++++++++------------ common/patches/rof2_structs.h | 131 ++++++++++++++--------------- common/patches/rof_structs.h | 132 +++++++++++++++--------------- common/patches/sod.cpp | 92 ++++++++++----------- common/patches/sod_structs.h | 103 +++++++++++------------ common/patches/sof.cpp | 90 ++++++++++---------- common/patches/sof_structs.h | 100 +++++++++++----------- common/patches/titanium.cpp | 58 ++++++------- common/patches/titanium_structs.h | 69 ++++++++-------- common/patches/uf.cpp | 92 ++++++++++----------- common/patches/uf_structs.h | 102 ++++++++++++----------- world/client.cpp | 8 +- world/worlddb.cpp | 82 +++++++++---------- zone/bot.cpp | 22 ++--- zone/client.cpp | 6 +- zone/client_packet.cpp | 4 +- zone/command.cpp | 2 +- zone/corpse.cpp | 22 ++--- zone/inventory.cpp | 22 ++--- zone/mob.cpp | 18 ++-- zone/zonedb.cpp | 50 +++++------ 23 files changed, 762 insertions(+), 770 deletions(-) diff --git a/common/eq_packet_structs.h b/common/eq_packet_structs.h index 17fe7e913..0f1b63136 100644 --- a/common/eq_packet_structs.h +++ b/common/eq_packet_structs.h @@ -124,83 +124,66 @@ struct LDoNTrapTemplate /////////////////////////////////////////////////////////////////////////////// -/* -** Color_Struct -** Size: 4 bytes -** Used for convenience -** Merth: Gave struct a name so gcc 2.96 would compile -** -*/ +// All clients translate the character select information to some degree + struct Color_Struct { - union - { - struct - { - uint8 blue; - uint8 green; - uint8 red; - uint8 use_tint; // if there's a tint this is FF - } rgb; - uint32 color; + union { + struct { + uint8 Blue; + uint8 Green; + uint8 Red; + uint8 UseTint; // if there's a tint this is FF + } RGB; + uint32 Color; }; }; -/* -* Visible equiptment. -* Size: 20 Octets -*/ -struct EquipStruct { - /*00*/ uint32 material; - /*04*/ uint32 unknown1; - /*08*/ uint32 elitematerial; - /*12*/ uint32 heroforgemodel; - /*16*/ uint32 material2; // Same as material? - /*20*/ +struct EquipStruct +{ + uint32 Material; + uint32 Unknown1; + uint32 EliteMaterial; + uint32 HeroForgeModel; + uint32 Material2; // Same as material? }; -struct CharSelectEquip { - uint32 material; - uint32 unknown1; - uint32 elitematerial; - uint32 heroforgemodel; - uint32 material2; - Color_Struct color; +struct CharSelectEquip +{ + uint32 Material; + uint32 Unknown1; + uint32 EliteMaterial; + uint32 HeroForgeModel; + uint32 Material2; + Color_Struct Color; }; -/* -** Character Selection Struct -** Length: 1704 Bytes -** -*/ -struct CharacterSelect_Struct { -/*0000*/ uint32 race[10]; // Characters Race -/*0040*/ //Color_Struct cs_colors[10][9]; // Characters Equipment Colors -/*0400*/ uint8 beardcolor[10]; // Characters beard Color -/*0410*/ uint8 hairstyle[10]; // Characters hair style -/*0420*/ //uint32 equip[10][9]; // 0=helm, 1=chest, 2=arm, 3=bracer, 4=hand, 5=leg, 6=boot, 7=melee1, 8=melee2 (Might not be) -/*0000*/ CharSelectEquip equip[10][9]; -/*0780*/ uint32 secondary[10]; // Characters secondary IDFile number -/*0820*/ uint32 drakkin_heritage[10]; // added for SoF -/*0860*/ uint32 drakkin_tattoo[10]; // added for SoF -/*0900*/ uint32 drakkin_details[10]; // added for SoF -/*0940*/ uint32 deity[10]; // Characters Deity -/*0980*/ uint8 gohome[10]; // 1=Go Home available, 0=not -/*0990*/ uint8 tutorial[10]; // 1=Tutorial available, 0=not -/*1000*/ uint8 beard[10]; // Characters Beard Type -/*1010*/ uint8 unknown902[10]; // 10x ff -/*1020*/ uint32 primary[10]; // Characters primary IDFile number -/*1060*/ uint8 haircolor[10]; // Characters Hair Color -/*1070*/ uint8 unknown0962[2]; // 2x 00 -/*1072*/ uint32 zone[10]; // Characters Current Zone -/*1112*/ uint8 class_[10]; // Characters Classes -/*1022*/ uint8 face[10]; // Characters Face Type -/*1032*/ char name[10][64]; // Characters Names -/*1672*/ uint8 gender[10]; // Characters Gender -/*1682*/ uint8 eyecolor1[10]; // Characters Eye Color -/*1692*/ uint8 eyecolor2[10]; // Characters Eye 2 Color -/*1702*/ uint8 level[10]; // Characters Levels -/*1712*/ +struct CharacterSelect_Struct +{ + uint32 Race[10]; // Characters Race + uint8 BeardColor[10]; // Characters beard Color + uint8 HairStyle[10]; // Characters hair style + CharSelectEquip Equip[10][9]; + uint32 Secondary[10]; // Characters secondary IDFile number + uint32 DrakkinHeritage[10]; // added for SoF + uint32 DrakkinTattoo[10]; // added for SoF + uint32 DrakkinDetails[10]; // added for SoF + uint32 Deity[10]; // Characters Deity + uint8 GoHome[10]; // 1=Go Home available, 0=not + uint8 Tutorial[10]; // 1=Tutorial available, 0=not + uint8 Beard[10]; // Characters Beard Type + uint8 Unknown902[10]; // 10x ff + uint32 Primary[10]; // Characters primary IDFile number + uint8 HairColor[10]; // Characters Hair Color + uint8 Unknown0962[2]; // 2x 00 + uint32 Zone[10]; // Characters Current Zone + uint8 Class_[10]; // Characters Classes + uint8 Face[10]; // Characters Face Type + char Name[10][64]; // Characters Names + uint8 Gender[10]; // Characters Gender + uint8 EyeColor1[10]; // Characters Eye Color + uint8 EyeColor2[10]; // Characters Eye 2 Color + uint8 Level[10]; // Characters Levels }; /* diff --git a/common/patches/rof.cpp b/common/patches/rof.cpp index ed943db97..6e89f7d39 100644 --- a/common/patches/rof.cpp +++ b/common/patches/rof.cpp @@ -2043,7 +2043,7 @@ namespace RoF for (int r = 0; r < 7; r++) { - outapp->WriteUInt32(emu->item_tint[r].color); + outapp->WriteUInt32(emu->item_tint[r].Color); } // Write zeroes for extra two tint values outapp->WriteUInt32(0); @@ -2053,7 +2053,7 @@ namespace RoF for (int r = 0; r < 7; r++) { - outapp->WriteUInt32(emu->item_tint[r].color); + outapp->WriteUInt32(emu->item_tint[r].Color); } // Write zeroes for extra two tint values outapp->WriteUInt32(0); @@ -2906,11 +2906,11 @@ namespace RoF int char_count; int namelen = 0; for (char_count = 0; char_count < 10; char_count++) { - if (emu->name[char_count][0] == '\0') + if (emu->Name[char_count][0] == '\0') break; - if (strcmp(emu->name[char_count], "") == 0) + if (strcmp(emu->Name[char_count], "") == 0) break; - namelen += strlen(emu->name[char_count]); + namelen += strlen(emu->Name[char_count]); } int total_length = sizeof(structs::CharacterSelect_Struct) @@ -2922,58 +2922,58 @@ namespace RoF //unsigned char *eq_buffer = new unsigned char[total_length]; //structs::CharacterSelect_Struct *eq_head = (structs::CharacterSelect_Struct *) eq_buffer; - eq->char_count = char_count; + eq->CharCount = char_count; //eq->total_chars = 10; - unsigned char *bufptr = (unsigned char *)eq->entries; + unsigned char *bufptr = (unsigned char *)eq->Entries; int r; for (r = 0; r < char_count; r++) { { //pre-name section... structs::CharacterSelectEntry_Struct *eq2 = (structs::CharacterSelectEntry_Struct *) bufptr; - memcpy(eq2->name, emu->name[r], strlen(emu->name[r]) + 1); + memcpy(eq2->Name, emu->Name[r], strlen(emu->Name[r]) + 1); } //adjust for name. - bufptr += strlen(emu->name[r]); + bufptr += strlen(emu->Name[r]); { //post-name section... structs::CharacterSelectEntry_Struct *eq2 = (structs::CharacterSelectEntry_Struct *) bufptr; - eq2->class_ = emu->class_[r]; - eq2->race = emu->race[r]; - eq2->level = emu->level[r]; - eq2->class_2 = emu->class_[r]; - eq2->race2 = emu->race[r]; - eq2->zone = emu->zone[r]; - eq2->instance = 0; - eq2->gender = emu->gender[r]; - eq2->face = emu->face[r]; + eq2->Class_ = emu->Class_[r]; + eq2->Race = emu->Race[r]; + eq2->Level = emu->Level[r]; + eq2->Class_2 = emu->Class_[r]; + eq2->Race2 = emu->Race[r]; + eq2->Zone = emu->Zone[r]; + eq2->Instance = 0; + eq2->Gender = emu->Gender[r]; + eq2->Face = emu->Face[r]; int k; for (k = 0; k < _MaterialCount; k++) { - eq2->equip[k].material = emu->equip[r][k].material; - eq2->equip[k].unknown1 = emu->equip[r][k].unknown1; - eq2->equip[k].elitematerial = emu->equip[r][k].elitematerial; - eq2->equip[k].heroforgemodel = emu->equip[r][k].heroforgemodel; - eq2->equip[k].material2 = emu->equip[r][k].material2; - eq2->equip[k].color.color = emu->equip[r][k].color.color; + eq2->Equip[k].Material = emu->Equip[r][k].Material; + eq2->Equip[k].Unknown1 = emu->Equip[r][k].Unknown1; + eq2->Equip[k].EliteMaterial = emu->Equip[r][k].EliteMaterial; + eq2->Equip[k].HeroForgeModel = emu->Equip[r][k].HeroForgeModel; + eq2->Equip[k].Material2 = emu->Equip[r][k].Material2; + eq2->Equip[k].Color.Color = emu->Equip[r][k].Color.Color; } - eq2->u15 = 0xff; - eq2->u19 = 0xFF; - eq2->drakkin_tattoo = emu->drakkin_tattoo[r]; - eq2->drakkin_details = emu->drakkin_details[r]; - eq2->deity = emu->deity[r]; - eq2->primary = emu->primary[r]; - eq2->secondary = emu->secondary[r]; - eq2->haircolor = emu->haircolor[r]; - eq2->beardcolor = emu->beardcolor[r]; - eq2->eyecolor1 = emu->eyecolor1[r]; - eq2->eyecolor2 = emu->eyecolor2[r]; - eq2->hairstyle = emu->hairstyle[r]; - eq2->beard = emu->beard[r]; - eq2->char_enabled = 1; - eq2->tutorial = emu->tutorial[r]; - eq2->drakkin_heritage = emu->drakkin_heritage[r]; - eq2->unknown1 = 0; - eq2->gohome = emu->gohome[r]; + eq2->Unknown15 = 0xFF; + eq2->Uknown19 = 0xFF; + eq2->DrakkinTattoo = emu->DrakkinTattoo[r]; + eq2->DrakkinDetails = emu->DrakkinDetails[r]; + eq2->Deity = emu->Deity[r]; + eq2->Primary = emu->Primary[r]; + eq2->Secondary = emu->Secondary[r]; + eq2->HairColor = emu->HairColor[r]; + eq2->BeardColor = emu->BeardColor[r]; + eq2->EyeColor1 = emu->EyeColor1[r]; + eq2->EyeColor2 = emu->EyeColor2[r]; + eq2->HairStyle = emu->HairStyle[r]; + eq2->Beard = emu->Beard[r]; + eq2->CharEnabled = 1; + eq2->Tutorial = emu->Tutorial[r]; + eq2->DrakkinHeritage = emu->DrakkinHeritage[r]; + eq2->Unknown1 = 0; + eq2->GoHome = emu->GoHome[r]; eq2->LastLogin = 1212696584; - eq2->unknown2 = 0; + eq2->Unknown2 = 0; } bufptr += sizeof(structs::CharacterSelectEntry_Struct); } @@ -3639,7 +3639,7 @@ namespace RoF OUT(elite_material); OUT(hero_forge_model); OUT(unknown18); - OUT(color.color); + OUT(color.Color); OUT(wear_slot_id); FINISH_ENCODE(); @@ -3950,18 +3950,18 @@ namespace RoF for (k = 0; k < 9; ++k) { { - VARSTRUCT_ENCODE_TYPE(uint32, Buffer, emu->colors[k].color); + VARSTRUCT_ENCODE_TYPE(uint32, Buffer, emu->colors[k].Color); } } structs::EquipStruct *Equipment = (structs::EquipStruct *)Buffer; for (k = 0; k < 9; k++) { - Equipment[k].material = emu->equipment[k].material; - Equipment[k].unknown1 = emu->equipment[k].unknown1; - Equipment[k].elitematerial = emu->equipment[k].elitematerial; - Equipment[k].heroforgemodel = emu->equipment[k].heroforgemodel; - Equipment[k].material2 = emu->equipment[k].material2; + Equipment[k].Material = emu->equipment[k].Material; + Equipment[k].Unknown1 = emu->equipment[k].Unknown1; + Equipment[k].EliteMaterial = emu->equipment[k].EliteMaterial; + Equipment[k].HeroForgeModel = emu->equipment[k].HeroForgeModel; + Equipment[k].Material2 = emu->equipment[k].Material2; } Buffer += (sizeof(structs::EquipStruct) * 9); @@ -3974,13 +3974,13 @@ namespace RoF VARSTRUCT_ENCODE_TYPE(uint32, Buffer, 0); VARSTRUCT_ENCODE_TYPE(uint32, Buffer, 0); - VARSTRUCT_ENCODE_TYPE(uint32, Buffer, emu->equipment[MaterialPrimary].material); + VARSTRUCT_ENCODE_TYPE(uint32, Buffer, emu->equipment[MaterialPrimary].Material); VARSTRUCT_ENCODE_TYPE(uint32, Buffer, 0); VARSTRUCT_ENCODE_TYPE(uint32, Buffer, 0); VARSTRUCT_ENCODE_TYPE(uint32, Buffer, 0); VARSTRUCT_ENCODE_TYPE(uint32, Buffer, 0); - VARSTRUCT_ENCODE_TYPE(uint32, Buffer, emu->equipment[MaterialSecondary].material); + VARSTRUCT_ENCODE_TYPE(uint32, Buffer, emu->equipment[MaterialSecondary].Material); VARSTRUCT_ENCODE_TYPE(uint32, Buffer, 0); VARSTRUCT_ENCODE_TYPE(uint32, Buffer, 0); VARSTRUCT_ENCODE_TYPE(uint32, Buffer, 0); diff --git a/common/patches/rof2.cpp b/common/patches/rof2.cpp index e6f4775ac..0215911e6 100644 --- a/common/patches/rof2.cpp +++ b/common/patches/rof2.cpp @@ -2118,7 +2118,7 @@ namespace RoF2 for (int r = 0; r < 7; r++) { - outapp->WriteUInt32(emu->item_tint[r].color); + outapp->WriteUInt32(emu->item_tint[r].Color); } // Write zeroes for extra two tint values outapp->WriteUInt32(0); @@ -2128,7 +2128,7 @@ namespace RoF2 for (int r = 0; r < 7; r++) { - outapp->WriteUInt32(emu->item_tint[r].color); + outapp->WriteUInt32(emu->item_tint[r].Color); } // Write zeroes for extra two tint values outapp->WriteUInt32(0); @@ -2990,11 +2990,11 @@ namespace RoF2 int char_count; int namelen = 0; for (char_count = 0; char_count < 10; char_count++) { - if (emu->name[char_count][0] == '\0') + if (emu->Name[char_count][0] == '\0') break; - if (strcmp(emu->name[char_count], "") == 0) + if (strcmp(emu->Name[char_count], "") == 0) break; - namelen += strlen(emu->name[char_count]); + namelen += strlen(emu->Name[char_count]); } int total_length = sizeof(structs::CharacterSelect_Struct) @@ -3006,58 +3006,58 @@ namespace RoF2 //unsigned char *eq_buffer = new unsigned char[total_length]; //structs::CharacterSelect_Struct *eq_head = (structs::CharacterSelect_Struct *) eq_buffer; - eq->char_count = char_count; + eq->CharCount = char_count; //eq->total_chars = 10; - unsigned char *bufptr = (unsigned char *)eq->entries; + unsigned char *bufptr = (unsigned char *)eq->Entries; int r; for (r = 0; r < char_count; r++) { { //pre-name section... structs::CharacterSelectEntry_Struct *eq2 = (structs::CharacterSelectEntry_Struct *) bufptr; - memcpy(eq2->name, emu->name[r], strlen(emu->name[r]) + 1); + memcpy(eq2->Name, emu->Name[r], strlen(emu->Name[r]) + 1); } //adjust for name. - bufptr += strlen(emu->name[r]); + bufptr += strlen(emu->Name[r]); { //post-name section... structs::CharacterSelectEntry_Struct *eq2 = (structs::CharacterSelectEntry_Struct *) bufptr; - eq2->class_ = emu->class_[r]; - eq2->race = emu->race[r]; - eq2->level = emu->level[r]; - eq2->class_2 = emu->class_[r]; - eq2->race2 = emu->race[r]; - eq2->zone = emu->zone[r]; - eq2->instance = 0; - eq2->gender = emu->gender[r]; - eq2->face = emu->face[r]; + eq2->Class_ = emu->Class_[r]; + eq2->Race = emu->Race[r]; + eq2->Level = emu->Level[r]; + eq2->Class_2 = emu->Class_[r]; + eq2->Race2 = emu->Race[r]; + eq2->Zone = emu->Zone[r]; + eq2->Instance = 0; + eq2->Gender = emu->Gender[r]; + eq2->Face = emu->Face[r]; int k; for (k = 0; k < _MaterialCount; k++) { - eq2->equip[k].material = emu->equip[r][k].material; - eq2->equip[k].unknown1 = emu->equip[r][k].unknown1; - eq2->equip[k].elitematerial = emu->equip[r][k].elitematerial; - eq2->equip[k].heroforgemodel = emu->equip[r][k].heroforgemodel; - eq2->equip[k].material2 = emu->equip[r][k].material2; - eq2->equip[k].color.color = emu->equip[r][k].color.color; + eq2->Equip[k].Material = emu->Equip[r][k].Material; + eq2->Equip[k].Unknown1 = emu->Equip[r][k].Unknown1; + eq2->Equip[k].EliteMaterial = emu->Equip[r][k].EliteMaterial; + eq2->Equip[k].HeroForgeModel = emu->Equip[r][k].HeroForgeModel; + eq2->Equip[k].Material2 = emu->Equip[r][k].Material2; + eq2->Equip[k].Color.Color = emu->Equip[r][k].Color.Color; } - eq2->u15 = 0xff; - eq2->u19 = 0xFF; - eq2->drakkin_tattoo = emu->drakkin_tattoo[r]; - eq2->drakkin_details = emu->drakkin_details[r]; - eq2->deity = emu->deity[r]; - eq2->primary = emu->primary[r]; - eq2->secondary = emu->secondary[r]; - eq2->haircolor = emu->haircolor[r]; - eq2->beardcolor = emu->beardcolor[r]; - eq2->eyecolor1 = emu->eyecolor1[r]; - eq2->eyecolor2 = emu->eyecolor2[r]; - eq2->hairstyle = emu->hairstyle[r]; - eq2->beard = emu->beard[r]; - eq2->char_enabled = 1; - eq2->tutorial = emu->tutorial[r]; - eq2->drakkin_heritage = emu->drakkin_heritage[r]; - eq2->unknown1 = 0; - eq2->gohome = emu->gohome[r]; + eq2->Unknown15 = 0xFF; + eq2->Unknown19 = 0xFF; + eq2->DrakkinTattoo = emu->DrakkinTattoo[r]; + eq2->DrakkinDetails = emu->DrakkinDetails[r]; + eq2->Deity = emu->Deity[r]; + eq2->Primary = emu->Primary[r]; + eq2->Secondary = emu->Secondary[r]; + eq2->HairColor = emu->HairColor[r]; + eq2->BeardColor = emu->BeardColor[r]; + eq2->EyeColor1 = emu->EyeColor1[r]; + eq2->EyeColor2 = emu->EyeColor2[r]; + eq2->HairStyle = emu->HairStyle[r]; + eq2->Beard = emu->Beard[r]; + eq2->CharEnabled = 1; + eq2->Tutorial = emu->Tutorial[r]; + eq2->DrakkinHeritage = emu->DrakkinHeritage[r]; + eq2->Unknown1 = 0; + eq2->GoHome = emu->GoHome[r]; eq2->LastLogin = 1212696584; - eq2->unknown2 = 0; + eq2->Unknown2 = 0; } bufptr += sizeof(structs::CharacterSelectEntry_Struct); } @@ -3763,7 +3763,7 @@ namespace RoF2 OUT(elite_material); OUT(hero_forge_model); OUT(unknown18); - OUT(color.color); + OUT(color.Color); OUT(wear_slot_id); FINISH_ENCODE(); @@ -4078,18 +4078,18 @@ namespace RoF2 for (k = 0; k < 9; ++k) { { - VARSTRUCT_ENCODE_TYPE(uint32, Buffer, emu->colors[k].color); + VARSTRUCT_ENCODE_TYPE(uint32, Buffer, emu->colors[k].Color); } } structs::EquipStruct *Equipment = (structs::EquipStruct *)Buffer; for (k = 0; k < 9; k++) { - Equipment[k].material = emu->equipment[k].material; - Equipment[k].unknown1 = emu->equipment[k].unknown1; - Equipment[k].elitematerial = emu->equipment[k].elitematerial; - Equipment[k].heroforgemodel = emu->equipment[k].heroforgemodel; - Equipment[k].material2 = emu->equipment[k].material2; + Equipment[k].Material = emu->equipment[k].Material; + Equipment[k].Unknown1 = emu->equipment[k].Unknown1; + Equipment[k].EliteMaterial = emu->equipment[k].EliteMaterial; + Equipment[k].HeroForgeModel = emu->equipment[k].HeroForgeModel; + Equipment[k].Material2 = emu->equipment[k].Material2; } Buffer += (sizeof(structs::EquipStruct) * 9); @@ -4102,13 +4102,13 @@ namespace RoF2 VARSTRUCT_ENCODE_TYPE(uint32, Buffer, 0); VARSTRUCT_ENCODE_TYPE(uint32, Buffer, 0); - VARSTRUCT_ENCODE_TYPE(uint32, Buffer, emu->equipment[MaterialPrimary].material); + VARSTRUCT_ENCODE_TYPE(uint32, Buffer, emu->equipment[MaterialPrimary].Material); VARSTRUCT_ENCODE_TYPE(uint32, Buffer, 0); VARSTRUCT_ENCODE_TYPE(uint32, Buffer, 0); VARSTRUCT_ENCODE_TYPE(uint32, Buffer, 0); VARSTRUCT_ENCODE_TYPE(uint32, Buffer, 0); - VARSTRUCT_ENCODE_TYPE(uint32, Buffer, emu->equipment[MaterialSecondary].material); + VARSTRUCT_ENCODE_TYPE(uint32, Buffer, emu->equipment[MaterialSecondary].Material); VARSTRUCT_ENCODE_TYPE(uint32, Buffer, 0); VARSTRUCT_ENCODE_TYPE(uint32, Buffer, 0); VARSTRUCT_ENCODE_TYPE(uint32, Buffer, 0); diff --git a/common/patches/rof2_structs.h b/common/patches/rof2_structs.h index 94f8bf4e7..7f8fc6978 100644 --- a/common/patches/rof2_structs.h +++ b/common/patches/rof2_structs.h @@ -142,84 +142,87 @@ struct AdventureInfo { */ struct Color_Struct { - union - { - struct - { - uint8 blue; - uint8 green; - uint8 red; - uint8 use_tint; // if there's a tint this is FF - } rgb; - uint32 color; + union { + struct { + uint8 Blue; + uint8 Green; + uint8 Red; + uint8 UseTint; // if there's a tint this is FF + } RGB; + uint32 Color; }; }; -/* -* Visible equiptment. -* Size: 20 Octets -*/ -struct EquipStruct { - /*00*/ uint32 material; - /*04*/ uint32 unknown1; - /*08*/ uint32 elitematerial; - /*12*/ uint32 heroforgemodel; - /*16*/ uint32 material2; // Same as material? - /*20*/ +struct CharSelectEquip +{ + uint32 Material; + uint32 Unknown1; + uint32 EliteMaterial; + uint32 HeroForgeModel; + uint32 Material2; + Color_Struct Color; }; -struct CharSelectEquip { - uint32 material; - uint32 unknown1; - uint32 elitematerial; - uint32 heroforgemodel; - uint32 material2; - Color_Struct color; -}; - -struct CharacterSelectEntry_Struct { -/*0000*/ char name[1]; // Name null terminated -/*0000*/ uint8 class_; -/*0000*/ uint32 race; -/*0000*/ uint8 level; -/*0000*/ uint8 class_2; -/*0000*/ uint32 race2; -/*0000*/ uint16 zone; -/*0000*/ uint16 instance; -/*0000*/ uint8 gender; -/*0000*/ uint8 face; -/*0000*/ CharSelectEquip equip[9]; -/*0000*/ uint8 u15; // Seen FF -/*0000*/ uint8 u19; // Seen FF -/*0000*/ uint32 drakkin_tattoo; -/*0000*/ uint32 drakkin_details; -/*0000*/ uint32 deity; -/*0000*/ uint32 primary; -/*0000*/ uint32 secondary; -/*0000*/ uint8 haircolor; -/*0000*/ uint8 beardcolor; -/*0000*/ uint8 eyecolor1; -/*0000*/ uint8 eyecolor2; -/*0000*/ uint8 hairstyle; -/*0000*/ uint8 beard; -/*0000*/ uint8 char_enabled; -/*0000*/ uint8 tutorial; // Seen 1 for new char or 0 for existing -/*0000*/ uint32 drakkin_heritage; -/*0000*/ uint8 unknown1; // Seen 0 -/*0000*/ uint8 gohome; // Seen 0 for new char and 1 for existing +struct CharacterSelectEntry_Struct +{ +/*0000*/ char Name[1]; // Name null terminated +/*0000*/ uint8 Class_; +/*0000*/ uint32 Race; +/*0000*/ uint8 Level; +/*0000*/ uint8 Class_2; +/*0000*/ uint32 Race2; +/*0000*/ uint16 Zone; +/*0000*/ uint16 Instance; +/*0000*/ uint8 Gender; +/*0000*/ uint8 Face; +/*0000*/ CharSelectEquip Equip[9]; +/*0000*/ uint8 Unknown15; // Seen FF +/*0000*/ uint8 Unknown19; // Seen FF +/*0000*/ uint32 DrakkinTattoo; +/*0000*/ uint32 DrakkinDetails; +/*0000*/ uint32 Deity; +/*0000*/ uint32 Primary; +/*0000*/ uint32 Secondary; +/*0000*/ uint8 HairColor; +/*0000*/ uint8 BeardColor; +/*0000*/ uint8 EyeColor1; +/*0000*/ uint8 EyeColor2; +/*0000*/ uint8 HairStyle; +/*0000*/ uint8 Beard; +/*0000*/ uint8 CharEnabled; +/*0000*/ uint8 Tutorial; // Seen 1 for new char or 0 for existing +/*0000*/ uint32 DrakkinHeritage; +/*0000*/ uint8 Unknown1; // Seen 0 +/*0000*/ uint8 GoHome; // Seen 0 for new char and 1 for existing /*0000*/ uint32 LastLogin; -/*0000*/ uint8 unknown2; // Seen 0 +/*0000*/ uint8 Unknown2; // Seen 0 }; /* ** Character Selection Struct ** */ -struct CharacterSelect_Struct { -/*000*/ uint32 char_count; //number of chars in this packet -/*004*/ CharacterSelectEntry_Struct entries[0]; +struct CharacterSelect_Struct +{ +/*000*/ uint32 CharCount; //number of chars in this packet +/*004*/ CharacterSelectEntry_Struct Entries[0]; }; +/* +* Visible equiptment. +* Size: 20 Octets +*/ +struct EquipStruct +{ + /*00*/ uint32 Material; + /*04*/ uint32 Unknown1; + /*08*/ uint32 EliteMaterial; + /*12*/ uint32 HeroForgeModel; + /*16*/ uint32 Material2; // Same as material? + /*20*/ +}; + + struct Membership_Entry_Struct { /*000*/ uint32 purchase_id; // Seen 1, then increments 90287 to 90300 diff --git a/common/patches/rof_structs.h b/common/patches/rof_structs.h index 05cc5a346..a1260fe72 100644 --- a/common/patches/rof_structs.h +++ b/common/patches/rof_structs.h @@ -142,71 +142,87 @@ struct AdventureInfo { */ struct Color_Struct { - union - { - struct - { - uint8 blue; - uint8 green; - uint8 red; - uint8 use_tint; // if there's a tint this is FF - } rgb; - uint32 color; + union { + struct { + uint8 Blue; + uint8 Green; + uint8 Red; + uint8 UseTint; // if there's a tint this is FF + } RGB; + uint32 Color; }; }; -struct CharSelectEquip { - uint32 material; - uint32 unknown1; - uint32 elitematerial; - uint32 heroforgemodel; - uint32 material2; - Color_Struct color; +struct CharSelectEquip +{ + uint32 Material; + uint32 Unknown1; + uint32 EliteMaterial; + uint32 HeroForgeModel; + uint32 Material2; + Color_Struct Color; }; -struct CharacterSelectEntry_Struct { -/*0000*/ char name[1]; // Name null terminated -/*0000*/ uint8 class_; -/*0000*/ uint32 race; -/*0000*/ uint8 level; -/*0000*/ uint8 class_2; -/*0000*/ uint32 race2; -/*0000*/ uint16 zone; -/*0000*/ uint16 instance; -/*0000*/ uint8 gender; -/*0000*/ uint8 face; -/*0000*/ CharSelectEquip equip[9]; -/*0000*/ uint8 u15; // Seen FF -/*0000*/ uint8 u19; // Seen FF -/*0000*/ uint32 drakkin_tattoo; -/*0000*/ uint32 drakkin_details; -/*0000*/ uint32 deity; -/*0000*/ uint32 primary; -/*0000*/ uint32 secondary; -/*0000*/ uint8 haircolor; -/*0000*/ uint8 beardcolor; -/*0000*/ uint8 eyecolor1; -/*0000*/ uint8 eyecolor2; -/*0000*/ uint8 hairstyle; -/*0000*/ uint8 beard; -/*0000*/ uint8 char_enabled; -/*0000*/ uint8 tutorial; // Seen 1 for new char or 0 for existing -/*0000*/ uint32 drakkin_heritage; -/*0000*/ uint8 unknown1; // Seen 0 -/*0000*/ uint8 gohome; // Seen 0 for new char and 1 for existing +struct CharacterSelectEntry_Struct +{ +/*0000*/ char Name[1]; // Name null terminated +/*0000*/ uint8 Class_; +/*0000*/ uint32 Race; +/*0000*/ uint8 Level; +/*0000*/ uint8 Class_2; +/*0000*/ uint32 Race2; +/*0000*/ uint16 Zone; +/*0000*/ uint16 Instance; +/*0000*/ uint8 Gender; +/*0000*/ uint8 Face; +/*0000*/ CharSelectEquip Equip[9]; +/*0000*/ uint8 Unknown15; // Seen FF +/*0000*/ uint8 Uknown19; // Seen FF +/*0000*/ uint32 DrakkinTattoo; +/*0000*/ uint32 DrakkinDetails; +/*0000*/ uint32 Deity; +/*0000*/ uint32 Primary; +/*0000*/ uint32 Secondary; +/*0000*/ uint8 HairColor; +/*0000*/ uint8 BeardColor; +/*0000*/ uint8 EyeColor1; +/*0000*/ uint8 EyeColor2; +/*0000*/ uint8 HairStyle; +/*0000*/ uint8 Beard; +/*0000*/ uint8 CharEnabled; +/*0000*/ uint8 Tutorial; // Seen 1 for new char or 0 for existing +/*0000*/ uint32 DrakkinHeritage; +/*0000*/ uint8 Unknown1; // Seen 0 +/*0000*/ uint8 GoHome; // Seen 0 for new char and 1 for existing /*0000*/ uint32 LastLogin; -/*0000*/ uint8 unknown2; // Seen 0 +/*0000*/ uint8 Unknown2; // Seen 0 }; /* ** Character Selection Struct ** */ -struct CharacterSelect_Struct { -/*000*/ uint32 char_count; //number of chars in this packet -/*004*/ CharacterSelectEntry_Struct entries[0]; +struct CharacterSelect_Struct +{ +/*000*/ uint32 CharCount; //number of chars in this packet +/*004*/ CharacterSelectEntry_Struct Entries[0]; }; +/* +* Visible equiptment. +* Size: 20 Octets +*/ +struct EquipStruct +{ + /*00*/ uint32 Material; + /*04*/ uint32 Unknown1; + /*08*/ uint32 EliteMaterial; + /*12*/ uint32 HeroForgeModel; + /*16*/ uint32 Material2; // Same as material? + /*20*/ +}; + + struct Membership_Entry_Struct { /*000*/ uint32 purchase_id; // Seen 1, then increments 90287 to 90300 @@ -247,20 +263,6 @@ struct Membership_Struct }; -/* -* Visible equiptment. -* Size: 20 Octets -*/ -struct EquipStruct { -/*00*/ uint32 material; -/*04*/ uint32 unknown1; -/*08*/ uint32 elitematerial; -/*12*/ uint32 heroforgemodel; -/*16*/ uint32 material2; // Same as material? -/*20*/ -}; - - /* ** Generic Spawn Struct ** Length: 897 Octets diff --git a/common/patches/sod.cpp b/common/patches/sod.cpp index b1ae218ed..c2ac79d7d 100644 --- a/common/patches/sod.cpp +++ b/common/patches/sod.cpp @@ -1542,13 +1542,13 @@ namespace SoD OUT(beard); // OUT(unknown00178[10]); for (r = 0; r < 9; r++) { - eq->equipment[r].material = emu->item_material[r]; - eq->equipment[r].unknown1 = 0; - eq->equipment[r].elitematerial = 0; + eq->equipment[r].Material = emu->item_material[r]; + eq->equipment[r].Unknown1 = 0; + eq->equipment[r].EliteMaterial = 0; //eq->colors[r].color = emu->colors[r].color; } for (r = 0; r < 7; r++) { - OUT(item_tint[r].color); + OUT(item_tint[r].Color); } // OUT(unknown00224[48]); //NOTE: new client supports 300 AAs, our internal rep/PP @@ -1920,11 +1920,11 @@ namespace SoD int char_count; int namelen = 0; for (char_count = 0; char_count < 10; char_count++) { - if (emu->name[char_count][0] == '\0') + if (emu->Name[char_count][0] == '\0') break; - if (strcmp(emu->name[char_count], "") == 0) + if (strcmp(emu->Name[char_count], "") == 0) break; - namelen += strlen(emu->name[char_count]); + namelen += strlen(emu->Name[char_count]); } int total_length = sizeof(structs::CharacterSelect_Struct) @@ -1936,49 +1936,49 @@ namespace SoD //unsigned char *eq_buffer = new unsigned char[total_length]; //structs::CharacterSelect_Struct *eq_head = (structs::CharacterSelect_Struct *) eq_buffer; - eq->char_count = char_count; - eq->total_chars = 10; + eq->CharCount = char_count; + eq->TotalChars = 10; - unsigned char *bufptr = (unsigned char *)eq->entries; + unsigned char *bufptr = (unsigned char *)eq->Entries; int r; for (r = 0; r < char_count; r++) { { //pre-name section... structs::CharacterSelectEntry_Struct *eq2 = (structs::CharacterSelectEntry_Struct *) bufptr; - eq2->level = emu->level[r]; - eq2->hairstyle = emu->hairstyle[r]; - eq2->gender = emu->gender[r]; - memcpy(eq2->name, emu->name[r], strlen(emu->name[r]) + 1); + eq2->Level = emu->Level[r]; + eq2->HairStyle = emu->HairStyle[r]; + eq2->Gender = emu->Gender[r]; + memcpy(eq2->Name, emu->Name[r], strlen(emu->Name[r]) + 1); } //adjust for name. - bufptr += strlen(emu->name[r]); + bufptr += strlen(emu->Name[r]); { //post-name section... structs::CharacterSelectEntry_Struct *eq2 = (structs::CharacterSelectEntry_Struct *) bufptr; - eq2->beard = emu->beard[r]; - eq2->haircolor = emu->haircolor[r]; - eq2->face = emu->face[r]; + eq2->Beard = emu->Beard[r]; + eq2->HairColor = emu->HairColor[r]; + eq2->Face = emu->Face[r]; int k; for (k = 0; k < _MaterialCount; k++) { - eq2->equip[k].material = emu->equip[r][k].material; - eq2->equip[k].unknown1 = emu->equip[r][k].unknown1; - eq2->equip[k].elitematerial = emu->equip[r][k].elitematerial; - eq2->equip[k].color.color = emu->equip[r][k].color.color; + eq2->Equip[k].Material = emu->Equip[r][k].Material; + eq2->Equip[k].Unknown1 = emu->Equip[r][k].Unknown1; + eq2->Equip[k].EliteMaterial = emu->Equip[r][k].EliteMaterial; + eq2->Equip[k].Color.Color = emu->Equip[r][k].Color.Color; } - eq2->primary = emu->primary[r]; - eq2->secondary = emu->secondary[r]; - eq2->tutorial = emu->tutorial[r]; // was u15 - eq2->u15 = 0xff; - eq2->deity = emu->deity[r]; - eq2->zone = emu->zone[r]; - eq2->u19 = 0xFF; - eq2->race = emu->race[r]; - eq2->gohome = emu->gohome[r]; - eq2->class_ = emu->class_[r]; - eq2->eyecolor1 = emu->eyecolor1[r]; - eq2->beardcolor = emu->beardcolor[r]; - eq2->eyecolor2 = emu->eyecolor2[r]; - eq2->drakkin_heritage = emu->drakkin_heritage[r]; - eq2->drakkin_tattoo = emu->drakkin_tattoo[r]; - eq2->drakkin_details = emu->drakkin_details[r]; + eq2->Primary = emu->Primary[r]; + eq2->Secondary = emu->Secondary[r]; + eq2->Tutorial = emu->Tutorial[r]; // was u15 + eq2->Unknown15 = 0xFF; + eq2->Deity = emu->Deity[r]; + eq2->Zone = emu->Zone[r]; + eq2->Unknown19 = 0xFF; + eq2->Race = emu->Race[r]; + eq2->GoHome = emu->GoHome[r]; + eq2->Class_ = emu->Class_[r]; + eq2->EyeColor1 = emu->EyeColor1[r]; + eq2->BeardColor = emu->BeardColor[r]; + eq2->EyeColor2 = emu->EyeColor2[r]; + eq2->DrakkinHeritage = emu->DrakkinHeritage[r]; + eq2->DrakkinTattoo = emu->DrakkinTattoo[r]; + eq2->DrakkinDetails = emu->DrakkinDetails[r]; } bufptr += sizeof(structs::CharacterSelectEntry_Struct); } @@ -2375,7 +2375,7 @@ namespace SoD OUT(material); OUT(unknown06); OUT(elite_material); - OUT(color.color); + OUT(color.Color); OUT(wear_slot_id); FINISH_ENCODE(); @@ -2743,7 +2743,7 @@ namespace SoD for (k = 0; k < 9; ++k) { { - VARSTRUCT_ENCODE_TYPE(uint32, Buffer, emu->colors[k].color); + VARSTRUCT_ENCODE_TYPE(uint32, Buffer, emu->colors[k].Color); } } } @@ -2753,11 +2753,11 @@ namespace SoD VARSTRUCT_ENCODE_TYPE(uint32, Buffer, 0); VARSTRUCT_ENCODE_TYPE(uint32, Buffer, 0); - VARSTRUCT_ENCODE_TYPE(uint32, Buffer, emu->equipment[MaterialPrimary].material); + VARSTRUCT_ENCODE_TYPE(uint32, Buffer, emu->equipment[MaterialPrimary].Material); VARSTRUCT_ENCODE_TYPE(uint32, Buffer, 0); VARSTRUCT_ENCODE_TYPE(uint32, Buffer, 0); - VARSTRUCT_ENCODE_TYPE(uint32, Buffer, emu->equipment[MaterialSecondary].material); + VARSTRUCT_ENCODE_TYPE(uint32, Buffer, emu->equipment[MaterialSecondary].Material); VARSTRUCT_ENCODE_TYPE(uint32, Buffer, 0); VARSTRUCT_ENCODE_TYPE(uint32, Buffer, 0); } @@ -2768,9 +2768,9 @@ namespace SoD structs::EquipStruct *Equipment = (structs::EquipStruct *)Buffer; for (k = 0; k < 9; k++) { - Equipment[k].material = emu->equipment[k].material; - Equipment[k].unknown1 = emu->equipment[k].unknown1; - Equipment[k].elitematerial = emu->equipment[k].elitematerial; + Equipment[k].Material = emu->equipment[k].Material; + Equipment[k].Unknown1 = emu->equipment[k].Unknown1; + Equipment[k].EliteMaterial = emu->equipment[k].EliteMaterial; } Buffer += (sizeof(structs::EquipStruct) * 9); @@ -3485,7 +3485,7 @@ namespace SoD IN(material); IN(unknown06); IN(elite_material); - IN(color.color); + IN(color.Color); IN(wear_slot_id); emu->hero_forge_model = 0; emu->unknown18 = 0; diff --git a/common/patches/sod_structs.h b/common/patches/sod_structs.h index f929ec744..f18e3d2f6 100644 --- a/common/patches/sod_structs.h +++ b/common/patches/sod_structs.h @@ -103,54 +103,53 @@ struct AdventureInfo { */ struct Color_Struct { - union - { - struct - { - uint8 blue; - uint8 green; - uint8 red; - uint8 use_tint; // if there's a tint this is FF - } rgb; - uint32 color; + union { + struct { + uint8 Blue; + uint8 Green; + uint8 Red; + uint8 UseTint; // if there's a tint this is FF + } RGB; + uint32 Color; }; }; -struct CharSelectEquip { - //totally guessed; - uint32 material; - uint32 unknown1; - uint32 elitematerial; - Color_Struct color; +struct CharSelectEquip +{ + uint32 Material; + uint32 Unknown1; + uint32 EliteMaterial; + Color_Struct Color; }; -struct CharacterSelectEntry_Struct { -/*0000*/ uint8 level; // -/*0000*/ uint8 hairstyle; // -/*0002*/ uint8 gender; // -/*0003*/ char name[1]; //variable length, edi+0 -/*0000*/ uint8 beard; // -/*0001*/ uint8 haircolor; // -/*0000*/ uint8 face; // -/*0000*/ CharSelectEquip equip[9]; -/*0000*/ uint32 primary; // -/*0000*/ uint32 secondary; // -/*0000*/ uint8 u15; // 0xff -/*0000*/ uint32 deity; // -/*0000*/ uint16 zone; // -/*0000*/ uint16 instance; -/*0000*/ uint8 gohome; // -/*0000*/ uint8 u19; // 0xff -/*0000*/ uint32 race; // -/*0000*/ uint8 tutorial; // -/*0000*/ uint8 class_; // -/*0000*/ uint8 eyecolor1; // -/*0000*/ uint8 beardcolor; // -/*0000*/ uint8 eyecolor2; // -/*0000*/ uint32 drakkin_heritage; // Drakkin Heritage -/*0000*/ uint32 drakkin_tattoo; // Drakkin Tattoo -/*0000*/ uint32 drakkin_details; // Drakkin Details (Facial Spikes) -/*0000*/ uint8 unknown; // New field to SoD +struct CharacterSelectEntry_Struct +{ +/*0000*/ uint8 Level; // +/*0000*/ uint8 HairStyle; // +/*0002*/ uint8 Gender; // +/*0003*/ char Name[1]; // variable length, edi+0 +/*0000*/ uint8 Beard; // +/*0001*/ uint8 HairColor; // +/*0000*/ uint8 Face; // +/*0000*/ CharSelectEquip Equip[9]; +/*0000*/ uint32 Primary; // +/*0000*/ uint32 Secondary; // +/*0000*/ uint8 Unknown15; // 0xff +/*0000*/ uint32 Deity; // +/*0000*/ uint16 Zone; // +/*0000*/ uint16 Instance; +/*0000*/ uint8 GoHome; // +/*0000*/ uint8 Unknown19; // 0xff +/*0000*/ uint32 Race; // +/*0000*/ uint8 Tutorial; // +/*0000*/ uint8 Class_; // +/*0000*/ uint8 EyeColor1; // +/*0000*/ uint8 BeardColor; // +/*0000*/ uint8 EyeColor2; // +/*0000*/ uint32 DrakkinHeritage; // Drakkin Heritage +/*0000*/ uint32 DrakkinTattoo; // Drakkin Tattoo +/*0000*/ uint32 DrakkinDetails; // Drakkin Details (Facial Spikes) +/*0000*/ uint8 Unknown; // New field to SoD }; @@ -158,20 +157,22 @@ struct CharacterSelectEntry_Struct { ** Character Selection Struct ** */ -struct CharacterSelect_Struct { -/*0000*/ uint32 char_count; //number of chars in this packet -/*0004*/ uint32 total_chars; //total number of chars allowed? -/*0008*/ CharacterSelectEntry_Struct entries[0]; +struct CharacterSelect_Struct +{ +/*0000*/ uint32 CharCount; //number of chars in this packet +/*0004*/ uint32 TotalChars; //total number of chars allowed? +/*0008*/ CharacterSelectEntry_Struct Entries[0]; }; /* * Visible equiptment. * Size: 12 Octets */ -struct EquipStruct { -/*00*/ uint32 material; -/*04*/ uint32 unknown1; -/*08*/ uint32 elitematerial; +struct EquipStruct +{ +/*00*/ uint32 Material; +/*04*/ uint32 Unknown1; +/*08*/ uint32 EliteMaterial; /*12*/ }; diff --git a/common/patches/sof.cpp b/common/patches/sof.cpp index 4ba534ac7..5220a0a6e 100644 --- a/common/patches/sof.cpp +++ b/common/patches/sof.cpp @@ -1200,13 +1200,13 @@ namespace SoF OUT(beard); // OUT(unknown00178[10]); for (r = 0; r < 9; r++) { - eq->equipment[r].material = emu->item_material[r]; - eq->equipment[r].unknown1 = 0; - eq->equipment[r].elitematerial = 0; + eq->equipment[r].Material = emu->item_material[r]; + eq->equipment[r].Unknown1 = 0; + eq->equipment[r].EliteMaterial = 0; //eq->colors[r].color = emu->colors[r].color; } for (r = 0; r < 7; r++) { - OUT(item_tint[r].color); + OUT(item_tint[r].Color); } // OUT(unknown00224[48]); //NOTE: new client supports 300 AAs, our internal rep/PP @@ -1579,11 +1579,11 @@ namespace SoF int char_count; int namelen = 0; for (char_count = 0; char_count < 10; char_count++) { - if (emu->name[char_count][0] == '\0') + if (emu->Name[char_count][0] == '\0') break; - if (strcmp(emu->name[char_count], "") == 0) + if (strcmp(emu->Name[char_count], "") == 0) break; - namelen += strlen(emu->name[char_count]); + namelen += strlen(emu->Name[char_count]); } int total_length = sizeof(structs::CharacterSelect_Struct) @@ -1595,49 +1595,49 @@ namespace SoF //unsigned char *eq_buffer = new unsigned char[total_length]; //structs::CharacterSelect_Struct *eq_head = (structs::CharacterSelect_Struct *) eq_buffer; - eq->char_count = char_count; - eq->total_chars = 10; + eq->CharCount = char_count; + eq->TotalChars = 10; - unsigned char *bufptr = (unsigned char *)eq->entries; + unsigned char *bufptr = (unsigned char *)eq->Entries; int r; for (r = 0; r < char_count; r++) { { //pre-name section... structs::CharacterSelectEntry_Struct *eq2 = (structs::CharacterSelectEntry_Struct *) bufptr; - eq2->level = emu->level[r]; - eq2->hairstyle = emu->hairstyle[r]; - eq2->gender = emu->gender[r]; - memcpy(eq2->name, emu->name[r], strlen(emu->name[r]) + 1); + eq2->Level = emu->Level[r]; + eq2->HairStyle = emu->HairStyle[r]; + eq2->Gender = emu->Gender[r]; + memcpy(eq2->Name, emu->Name[r], strlen(emu->Name[r]) + 1); } //adjust for name. - bufptr += strlen(emu->name[r]); + bufptr += strlen(emu->Name[r]); { //post-name section... structs::CharacterSelectEntry_Struct *eq2 = (structs::CharacterSelectEntry_Struct *) bufptr; - eq2->beard = emu->beard[r]; - eq2->haircolor = emu->haircolor[r]; - eq2->face = emu->face[r]; + eq2->Beard = emu->Beard[r]; + eq2->HairColor = emu->HairColor[r]; + eq2->Face = emu->Face[r]; int k; for (k = 0; k < _MaterialCount; k++) { - eq2->equip[k].material = emu->equip[r][k].material; - eq2->equip[k].unknown1 = emu->equip[r][k].unknown1; - eq2->equip[k].elitematerial = emu->equip[r][k].elitematerial; - eq2->equip[k].color.color = emu->equip[r][k].color.color; + eq2->Equip[k].Material = emu->Equip[r][k].Material; + eq2->Equip[k].Unknown1 = emu->Equip[r][k].Unknown1; + eq2->Equip[k].EliteMaterial = emu->Equip[r][k].EliteMaterial; + eq2->Equip[k].Color.Color = emu->Equip[r][k].Color.Color; } - eq2->primary = emu->primary[r]; - eq2->secondary = emu->secondary[r]; - eq2->tutorial = emu->tutorial[r]; // was u15 - eq2->u15 = 0xff; - eq2->deity = emu->deity[r]; - eq2->zone = emu->zone[r]; - eq2->u19 = 0xFF; - eq2->race = emu->race[r]; - eq2->gohome = emu->gohome[r]; - eq2->class_ = emu->class_[r]; - eq2->eyecolor1 = emu->eyecolor1[r]; - eq2->beardcolor = emu->beardcolor[r]; - eq2->eyecolor2 = emu->eyecolor2[r]; - eq2->drakkin_heritage = emu->drakkin_heritage[r]; - eq2->drakkin_tattoo = emu->drakkin_tattoo[r]; - eq2->drakkin_details = emu->drakkin_details[r]; + eq2->Primary = emu->Primary[r]; + eq2->Secondary = emu->Secondary[r]; + eq2->Tutorial = emu->Tutorial[r]; // was u15 + eq2->Unknown15 = 0xff; + eq2->Deity = emu->Deity[r]; + eq2->Zone = emu->Zone[r]; + eq2->Unknown19 = 0xFF; + eq2->Race = emu->Race[r]; + eq2->GoHome = emu->GoHome[r]; + eq2->Class_ = emu->Class_[r]; + eq2->EyeColor1 = emu->EyeColor1[r]; + eq2->BeardColor = emu->BeardColor[r]; + eq2->EyeColor2 = emu->EyeColor2[r]; + eq2->DrakkinHeritage = emu->DrakkinHeritage[r]; + eq2->DrakkinTattoo = emu->DrakkinTattoo[r]; + eq2->DrakkinDetails = emu->DrakkinDetails[r]; } bufptr += sizeof(structs::CharacterSelectEntry_Struct); } @@ -1961,7 +1961,7 @@ namespace SoF OUT(material); OUT(unknown06); OUT(elite_material); - OUT(color.color); + OUT(color.Color); OUT(wear_slot_id); FINISH_ENCODE(); @@ -2045,10 +2045,10 @@ namespace SoF eq->drakkin_heritage = emu->drakkin_heritage; eq->gender = emu->gender; for (k = 0; k < 9; k++) { - eq->equipment[k].material = emu->equipment[k].material; - eq->equipment[k].unknown1 = emu->equipment[k].unknown1; - eq->equipment[k].elitematerial = emu->equipment[k].elitematerial; - eq->colors[k].color = emu->colors[k].color; + eq->equipment[k].Material = emu->equipment[k].Material; + eq->equipment[k].Unknown1 = emu->equipment[k].Unknown1; + eq->equipment[k].EliteMaterial = emu->equipment[k].EliteMaterial; + eq->colors[k].Color = emu->colors[k].Color; } eq->StandState = emu->StandState; eq->guildID = emu->guildID; @@ -2110,7 +2110,7 @@ namespace SoF eq->petOwnerId = emu->petOwnerId; eq->pvp = 0; // 0 = non-pvp colored name, 1 = red pvp name for (k = 0; k < 9; k++) { - eq->colors[k].color = emu->colors[k].color; + eq->colors[k].Color = emu->colors[k].Color; } eq->anon = emu->anon; eq->face = emu->face; @@ -2809,7 +2809,7 @@ namespace SoF IN(material); IN(unknown06); IN(elite_material); - IN(color.color); + IN(color.Color); IN(wear_slot_id); emu->hero_forge_model = 0; emu->unknown18 = 0; diff --git a/common/patches/sof_structs.h b/common/patches/sof_structs.h index 1510ded59..e66ace468 100644 --- a/common/patches/sof_structs.h +++ b/common/patches/sof_structs.h @@ -103,72 +103,74 @@ struct AdventureInfo { */ struct Color_Struct { - union - { - struct - { - uint8 blue; - uint8 green; - uint8 red; - uint8 use_tint; // if there's a tint this is FF - } rgb; - uint32 color; + union { + struct { + uint8 Blue; + uint8 Green; + uint8 Red; + uint8 UseTint; // if there's a tint this is FF + } RGB; + uint32 Color; }; }; -struct CharSelectEquip { - uint32 material; - uint32 unknown1; - uint32 elitematerial; - Color_Struct color; +struct CharSelectEquip +{ + uint32 Material; + uint32 Unknown1; + uint32 EliteMaterial; + Color_Struct Color; }; -struct CharacterSelectEntry_Struct { -/*0000*/ uint8 level; // -/*0000*/ uint8 hairstyle; // -/*0002*/ uint8 gender; // -/*0003*/ char name[1]; //variable length, edi+0 -/*0000*/ uint8 beard; // -/*0001*/ uint8 haircolor; // -/*0000*/ uint8 face; // -/*0000*/ CharSelectEquip equip[9]; -/*0000*/ uint32 primary; // -/*0000*/ uint32 secondary; // -/*0000*/ uint8 u15; // 0xff -/*0000*/ uint32 deity; // -/*0000*/ uint16 zone; // -/*0000*/ uint16 instance; -/*0000*/ uint8 gohome; // -/*0000*/ uint8 u19; // 0xff -/*0000*/ uint32 race; // -/*0000*/ uint8 tutorial; // -/*0000*/ uint8 class_; // -/*0000*/ uint8 eyecolor1; // -/*0000*/ uint8 beardcolor; // -/*0000*/ uint8 eyecolor2; // -/*0000*/ uint32 drakkin_heritage; // Drakkin Heritage -/*0000*/ uint32 drakkin_tattoo; // Drakkin Tattoo -/*0000*/ uint32 drakkin_details; // Drakkin Details (Facial Spikes) +struct CharacterSelectEntry_Struct +{ +/*0000*/ uint8 Level; // +/*0000*/ uint8 HairStyle; // +/*0002*/ uint8 Gender; // +/*0003*/ char Name[1]; // variable length, edi+0 +/*0000*/ uint8 Beard; // +/*0001*/ uint8 HairColor; // +/*0000*/ uint8 Face; // +/*0000*/ CharSelectEquip Equip[9]; +/*0000*/ uint32 Primary; // +/*0000*/ uint32 Secondary; // +/*0000*/ uint8 Unknown15; // 0xff +/*0000*/ uint32 Deity; // +/*0000*/ uint16 Zone; // +/*0000*/ uint16 Instance; +/*0000*/ uint8 GoHome; // +/*0000*/ uint8 Unknown19; // 0xff +/*0000*/ uint32 Race; // +/*0000*/ uint8 Tutorial; // +/*0000*/ uint8 Class_; // +/*0000*/ uint8 EyeColor1; // +/*0000*/ uint8 BeardColor; // +/*0000*/ uint8 EyeColor2; // +/*0000*/ uint32 DrakkinHeritage; // Drakkin Heritage +/*0000*/ uint32 DrakkinTattoo; // Drakkin Tattoo +/*0000*/ uint32 DrakkinDetails; // Drakkin Details (Facial Spikes) }; /* ** Character Selection Struct ** */ -struct CharacterSelect_Struct { -/*0000*/ uint32 char_count; //number of chars in this packet -/*0004*/ uint32 total_chars; //total number of chars allowed? -/*0008*/ CharacterSelectEntry_Struct entries[0]; +struct CharacterSelect_Struct +{ +/*0000*/ uint32 CharCount; //number of chars in this packet +/*0004*/ uint32 TotalChars; //total number of chars allowed? +/*0008*/ CharacterSelectEntry_Struct Entries[0]; }; /* * Visible equiptment. * Size: 12 Octets */ -struct EquipStruct { -/*00*/ uint32 material; -/*04*/ uint32 unknown1; -/*08*/ uint32 elitematerial; +struct EquipStruct +{ +/*00*/ uint32 Material; +/*04*/ uint32 Unknown1; +/*08*/ uint32 EliteMaterial; /*12*/ }; diff --git a/common/patches/titanium.cpp b/common/patches/titanium.cpp index d048f0e5d..e636b6a9c 100644 --- a/common/patches/titanium.cpp +++ b/common/patches/titanium.cpp @@ -865,7 +865,7 @@ namespace Titanium // OUT(unknown00178[10]); for (r = 0; r < 9; r++) { OUT(item_material[r]); - OUT(item_tint[r].color); + OUT(item_tint[r].Color); } // OUT(unknown00224[48]); for (r = 0; r < structs::MAX_PP_AA_ARRAY; r++) { @@ -1160,34 +1160,34 @@ namespace Titanium int r; for (r = 0; r < 10; r++) { - OUT(zone[r]); - OUT(eyecolor1[r]); - OUT(eyecolor2[r]); - OUT(hairstyle[r]); - OUT(primary[r]); - if (emu->race[r] > 473) - eq->race[r] = 1; + OUT(Zone[r]); + OUT(EyeColor1[r]); + OUT(EyeColor2[r]); + OUT(HairStyle[r]); + OUT(Primary[r]); + if (emu->Race[r] > 473) + eq->Race[r] = 1; else - eq->race[r] = emu->race[r]; - OUT(class_[r]); - OUT_str(name[r]); - OUT(gender[r]); - OUT(level[r]); - OUT(secondary[r]); - OUT(face[r]); - OUT(beard[r]); + eq->Race[r] = emu->Race[r]; + OUT(Class_[r]); + OUT_str(Name[r]); + OUT(Gender[r]); + OUT(Level[r]); + OUT(Secondary[r]); + OUT(Face[r]); + OUT(Beard[r]); int k; for (k = 0; k < 9; k++) { - eq->equip[r][k] = emu->equip[r][k].material; - eq->cs_colors[r][k].color = emu->equip[r][k].color.color; + eq->Equip[r][k] = emu->Equip[r][k].Material; + eq->CS_Colors[r][k].Color = emu->Equip[r][k].Color.Color; } - OUT(haircolor[r]); - OUT(gohome[r]); - OUT(tutorial[r]); - OUT(deity[r]); - OUT(beardcolor[r]); - eq->unknown820[r] = 0xFF; - eq->unknown902[r] = 0xFF; + OUT(HairColor[r]); + OUT(GoHome[r]); + OUT(Tutorial[r]); + OUT(Deity[r]); + OUT(BeardColor[r]); + eq->Unknown820[r] = 0xFF; + eq->Unknown902[r] = 0xFF; } FINISH_ENCODE(); @@ -1405,7 +1405,7 @@ namespace Titanium OUT(spawn_id); OUT(material); - OUT(color.color); + OUT(color.Color); OUT(wear_slot_id); FINISH_ENCODE(); @@ -1497,8 +1497,8 @@ namespace Titanium eq->guildrank = emu->guildrank; // eq->unknown0194[3] = emu->unknown0194[3]; for (k = 0; k < 9; k++) { - eq->equipment[k] = emu->equipment[k].material; - eq->colors[k].color = emu->colors[k].color; + eq->equipment[k] = emu->equipment[k].Material; + eq->colors[k].Color = emu->colors[k].Color; } for (k = 0; k < 8; k++) { eq->set_to_0xFF[k] = 0xFF; @@ -1974,7 +1974,7 @@ namespace Titanium IN(spawn_id); IN(material); - IN(color.color); + IN(color.Color); IN(wear_slot_id); emu->unknown06 = 0; emu->elite_material = 0; diff --git a/common/patches/titanium_structs.h b/common/patches/titanium_structs.h index 9a165a33d..a61b96a94 100644 --- a/common/patches/titanium_structs.h +++ b/common/patches/titanium_structs.h @@ -99,16 +99,14 @@ struct AdventureInfo { */ struct Color_Struct { - union - { - struct - { - uint8 blue; - uint8 green; - uint8 red; - uint8 use_tint; // if there's a tint this is FF - } rgb; - uint32 color; + union { + struct { + uint8 Blue; + uint8 Green; + uint8 Red; + uint8 UseTint; // if there's a tint this is FF + } RGB; + uint32 Color; }; }; @@ -117,31 +115,32 @@ struct Color_Struct ** Length: 1704 Bytes ** */ -struct CharacterSelect_Struct { -/*0000*/ uint32 race[10]; // Characters Race -/*0040*/ Color_Struct cs_colors[10][9]; // Characters Equipment Colors -/*0400*/ uint8 beardcolor[10]; // Characters beard Color -/*0410*/ uint8 hairstyle[10]; // Characters hair style -/*0420*/ uint32 equip[10][9]; // 0=helm, 1=chest, 2=arm, 3=bracer, 4=hand, 5=leg, 6=boot, 7=melee1, 8=melee2 (Might not be) -/*0780*/ uint32 secondary[10]; // Characters secondary IDFile number -/*0820*/ uint8 unknown820[10]; // 10x ff -/*0830*/ uint8 unknown830[2]; // 2x 00 -/*0832*/ uint32 deity[10]; // Characters Deity -/*0872*/ uint8 gohome[10]; // 1=Go Home available, 0=not -/*0882*/ uint8 tutorial[10]; // 1=Tutorial available, 0=not -/*0892*/ uint8 beard[10]; // Characters Beard Type -/*0902*/ uint8 unknown902[10]; // 10x ff -/*0912*/ uint32 primary[10]; // Characters primary IDFile number -/*0952*/ uint8 haircolor[10]; // Characters Hair Color -/*0962*/ uint8 unknown0962[2]; // 2x 00 -/*0964*/ uint32 zone[10]; // Characters Current Zone -/*1004*/ uint8 class_[10]; // Characters Classes -/*1014*/ uint8 face[10]; // Characters Face Type -/*1024*/ char name[10][64]; // Characters Names -/*1664*/ uint8 gender[10]; // Characters Gender -/*1674*/ uint8 eyecolor1[10]; // Characters Eye Color -/*1684*/ uint8 eyecolor2[10]; // Characters Eye 2 Color -/*1694*/ uint8 level[10]; // Characters Levels +struct CharacterSelect_Struct +{ +/*0000*/ uint32 Race[10]; // Characters Race +/*0040*/ Color_Struct CS_Colors[10][9]; // Characters Equipment Colors +/*0400*/ uint8 BeardColor[10]; // Characters beard Color +/*0410*/ uint8 HairStyle[10]; // Characters hair style +/*0420*/ uint32 Equip[10][9]; // 0=helm, 1=chest, 2=arm, 3=bracer, 4=hand, 5=leg, 6=boot, 7=melee1, 8=melee2 (Might not be) +/*0780*/ uint32 Secondary[10]; // Characters secondary IDFile number +/*0820*/ uint8 Unknown820[10]; // 10x ff +/*0830*/ uint8 Unknown830[2]; // 2x 00 +/*0832*/ uint32 Deity[10]; // Characters Deity +/*0872*/ uint8 GoHome[10]; // 1=Go Home available, 0=not +/*0882*/ uint8 Tutorial[10]; // 1=Tutorial available, 0=not +/*0892*/ uint8 Beard[10]; // Characters Beard Type +/*0902*/ uint8 Unknown902[10]; // 10x ff +/*0912*/ uint32 Primary[10]; // Characters primary IDFile number +/*0952*/ uint8 HairColor[10]; // Characters Hair Color +/*0962*/ uint8 Unknown0962[2]; // 2x 00 +/*0964*/ uint32 Zone[10]; // Characters Current Zone +/*1004*/ uint8 Class_[10]; // Characters Classes +/*1014*/ uint8 Face[10]; // Characters Face Type +/*1024*/ char Name[10][64]; // Characters Names +/*1664*/ uint8 Gender[10]; // Characters Gender +/*1674*/ uint8 EyeColor1[10]; // Characters Eye Color +/*1684*/ uint8 EyeColor2[10]; // Characters Eye 2 Color +/*1694*/ uint8 Level[10]; // Characters Levels /*1704*/ }; diff --git a/common/patches/uf.cpp b/common/patches/uf.cpp index 991b35aa4..18ea67af0 100644 --- a/common/patches/uf.cpp +++ b/common/patches/uf.cpp @@ -1791,13 +1791,13 @@ namespace UF OUT(beard); // OUT(unknown00178[10]); for (r = 0; r < 9; r++) { - eq->equipment[r].material = emu->item_material[r]; - eq->equipment[r].unknown1 = 0; - eq->equipment[r].elitematerial = 0; + eq->equipment[r].Material = emu->item_material[r]; + eq->equipment[r].Unknown1 = 0; + eq->equipment[r].EliteMaterial = 0; //eq->colors[r].color = emu->colors[r].color; } for (r = 0; r < 7; r++) { - OUT(item_tint[r].color); + OUT(item_tint[r].Color); } // OUT(unknown00224[48]); //NOTE: new client supports 300 AAs, our internal rep/PP @@ -2203,11 +2203,11 @@ namespace UF int char_count; int namelen = 0; for (char_count = 0; char_count < 10; char_count++) { - if (emu->name[char_count][0] == '\0') + if (emu->Name[char_count][0] == '\0') break; - if (strcmp(emu->name[char_count], "") == 0) + if (strcmp(emu->Name[char_count], "") == 0) break; - namelen += strlen(emu->name[char_count]); + namelen += strlen(emu->Name[char_count]); } int total_length = sizeof(structs::CharacterSelect_Struct) @@ -2219,49 +2219,49 @@ namespace UF //unsigned char *eq_buffer = new unsigned char[total_length]; //structs::CharacterSelect_Struct *eq_head = (structs::CharacterSelect_Struct *) eq_buffer; - eq->char_count = char_count; - eq->total_chars = 10; + eq->CharCount = char_count; + eq->TotalChars = 10; - unsigned char *bufptr = (unsigned char *)eq->entries; + unsigned char *bufptr = (unsigned char *)eq->Entries; int r; for (r = 0; r < char_count; r++) { { //pre-name section... structs::CharacterSelectEntry_Struct *eq2 = (structs::CharacterSelectEntry_Struct *) bufptr; - eq2->level = emu->level[r]; - eq2->hairstyle = emu->hairstyle[r]; - eq2->gender = emu->gender[r]; - memcpy(eq2->name, emu->name[r], strlen(emu->name[r]) + 1); + eq2->Level = emu->Level[r]; + eq2->HairStyle = emu->HairStyle[r]; + eq2->Gender = emu->Gender[r]; + memcpy(eq2->Name, emu->Name[r], strlen(emu->Name[r]) + 1); } //adjust for name. - bufptr += strlen(emu->name[r]); + bufptr += strlen(emu->Name[r]); { //post-name section... structs::CharacterSelectEntry_Struct *eq2 = (structs::CharacterSelectEntry_Struct *) bufptr; - eq2->beard = emu->beard[r]; - eq2->haircolor = emu->haircolor[r]; - eq2->face = emu->face[r]; + eq2->Beard = emu->Beard[r]; + eq2->HairColor = emu->HairColor[r]; + eq2->Face = emu->Face[r]; int k; for (k = 0; k < _MaterialCount; k++) { - eq2->equip[k].material = emu->equip[r][k].material; - eq2->equip[k].unknown1 = emu->equip[r][k].unknown1; - eq2->equip[k].elitematerial = emu->equip[r][k].elitematerial; - eq2->equip[k].color.color = emu->equip[r][k].color.color; + eq2->Equip[k].Material = emu->Equip[r][k].Material; + eq2->Equip[k].Unknown1 = emu->Equip[r][k].Unknown1; + eq2->Equip[k].EliteMaterial = emu->Equip[r][k].EliteMaterial; + eq2->Equip[k].Color.Color = emu->Equip[r][k].Color.Color; } - eq2->primary = emu->primary[r]; - eq2->secondary = emu->secondary[r]; - eq2->tutorial = emu->tutorial[r]; // was u15 - eq2->u15 = 0xff; - eq2->deity = emu->deity[r]; - eq2->zone = emu->zone[r]; - eq2->u19 = 0xFF; - eq2->race = emu->race[r]; - eq2->gohome = emu->gohome[r]; - eq2->class_ = emu->class_[r]; - eq2->eyecolor1 = emu->eyecolor1[r]; - eq2->beardcolor = emu->beardcolor[r]; - eq2->eyecolor2 = emu->eyecolor2[r]; - eq2->drakkin_heritage = emu->drakkin_heritage[r]; - eq2->drakkin_tattoo = emu->drakkin_tattoo[r]; - eq2->drakkin_details = emu->drakkin_details[r]; + eq2->Primary = emu->Primary[r]; + eq2->Secondary = emu->Secondary[r]; + eq2->Tutorial = emu->Tutorial[r]; // was u15 + eq2->Unknown15 = 0xFF; + eq2->Deity = emu->Deity[r]; + eq2->Zone = emu->Zone[r]; + eq2->Unknown19 = 0xFF; + eq2->Race = emu->Race[r]; + eq2->GoHome = emu->GoHome[r]; + eq2->Class_ = emu->Class_[r]; + eq2->EyeColor1 = emu->EyeColor1[r]; + eq2->BeardColor = emu->BeardColor[r]; + eq2->EyeColor2 = emu->EyeColor2[r]; + eq2->DrakkinHeritage = emu->DrakkinHeritage[r]; + eq2->DrakkinTattoo = emu->DrakkinTattoo[r]; + eq2->DrakkinDetails = emu->DrakkinDetails[r]; } bufptr += sizeof(structs::CharacterSelectEntry_Struct); @@ -2641,7 +2641,7 @@ namespace UF OUT(material); OUT(unknown06); OUT(elite_material); - OUT(color.color); + OUT(color.Color); OUT(wear_slot_id); FINISH_ENCODE(); @@ -3003,7 +3003,7 @@ namespace UF for (k = 0; k < 9; ++k) { { - VARSTRUCT_ENCODE_TYPE(uint32, Buffer, emu->colors[k].color); + VARSTRUCT_ENCODE_TYPE(uint32, Buffer, emu->colors[k].Color); } } } @@ -3013,11 +3013,11 @@ namespace UF VARSTRUCT_ENCODE_TYPE(uint32, Buffer, 0); VARSTRUCT_ENCODE_TYPE(uint32, Buffer, 0); - VARSTRUCT_ENCODE_TYPE(uint32, Buffer, emu->equipment[MaterialPrimary].material); + VARSTRUCT_ENCODE_TYPE(uint32, Buffer, emu->equipment[MaterialPrimary].Material); VARSTRUCT_ENCODE_TYPE(uint32, Buffer, 0); VARSTRUCT_ENCODE_TYPE(uint32, Buffer, 0); - VARSTRUCT_ENCODE_TYPE(uint32, Buffer, emu->equipment[MaterialSecondary].material); + VARSTRUCT_ENCODE_TYPE(uint32, Buffer, emu->equipment[MaterialSecondary].Material); VARSTRUCT_ENCODE_TYPE(uint32, Buffer, 0); VARSTRUCT_ENCODE_TYPE(uint32, Buffer, 0); } @@ -3027,9 +3027,9 @@ namespace UF structs::EquipStruct *Equipment = (structs::EquipStruct *)Buffer; for (k = 0; k < 9; k++) { - Equipment[k].material = emu->equipment[k].material; - Equipment[k].unknown1 = emu->equipment[k].unknown1; - Equipment[k].elitematerial = emu->equipment[k].elitematerial; + Equipment[k].Material = emu->equipment[k].Material; + Equipment[k].Unknown1 = emu->equipment[k].Unknown1; + Equipment[k].EliteMaterial = emu->equipment[k].EliteMaterial; } Buffer += (sizeof(structs::EquipStruct) * 9); @@ -3729,7 +3729,7 @@ namespace UF IN(material); IN(unknown06); IN(elite_material); - IN(color.color); + IN(color.Color); IN(wear_slot_id); emu->hero_forge_model = 0; emu->unknown18 = 0; diff --git a/common/patches/uf_structs.h b/common/patches/uf_structs.h index f33ab7b4c..ec912b681 100644 --- a/common/patches/uf_structs.h +++ b/common/patches/uf_structs.h @@ -103,53 +103,53 @@ struct AdventureInfo { */ struct Color_Struct { - union - { - struct - { - uint8 blue; - uint8 green; - uint8 red; - uint8 use_tint; // if there's a tint this is FF - } rgb; - uint32 color; + union { + struct { + uint8 blue; + uint8 Green; + uint8 Red; + uint8 UseTint; // if there's a tint this is FF + } RGB; + uint32 Color; }; }; -struct CharSelectEquip { - uint32 material; - uint32 unknown1; - uint32 elitematerial; - Color_Struct color; +struct CharSelectEquip +{ + uint32 Material; + uint32 Unknown1; + uint32 EliteMaterial; + Color_Struct Color; }; -struct CharacterSelectEntry_Struct { -/*0000*/ uint8 level; // -/*0000*/ uint8 hairstyle; // -/*0002*/ uint8 gender; // -/*0003*/ char name[1]; //variable length, edi+0 -/*0000*/ uint8 beard; // -/*0001*/ uint8 haircolor; // -/*0000*/ uint8 face; // -/*0000*/ CharSelectEquip equip[9]; -/*0000*/ uint32 primary; // -/*0000*/ uint32 secondary; // -/*0000*/ uint8 u15; // 0xff -/*0000*/ uint32 deity; // -/*0000*/ uint16 zone; // -/*0000*/ uint16 instance; -/*0000*/ uint8 gohome; // -/*0000*/ uint8 u19; // 0xff -/*0000*/ uint32 race; // -/*0000*/ uint8 tutorial; // -/*0000*/ uint8 class_; // -/*0000*/ uint8 eyecolor1; // -/*0000*/ uint8 beardcolor; // -/*0000*/ uint8 eyecolor2; // -/*0000*/ uint32 drakkin_heritage; // Drakkin Heritage -/*0000*/ uint32 drakkin_tattoo; // Drakkin Tattoo -/*0000*/ uint32 drakkin_details; // Drakkin Details (Facial Spikes) -/*0000*/ uint8 unknown; // New field to Underfoot +struct CharacterSelectEntry_Struct +{ +/*0000*/ uint8 Level; // +/*0000*/ uint8 HairStyle; // +/*0002*/ uint8 Gender; // +/*0003*/ char Name[1]; // variable length, edi+0 +/*0000*/ uint8 Beard; // +/*0001*/ uint8 HairColor; // +/*0000*/ uint8 Face; // +/*0000*/ CharSelectEquip Equip[9]; +/*0000*/ uint32 Primary; // +/*0000*/ uint32 Secondary; // +/*0000*/ uint8 Unknown15; // 0xff +/*0000*/ uint32 Deity; // +/*0000*/ uint16 Zone; // +/*0000*/ uint16 Instance; +/*0000*/ uint8 GoHome; // +/*0000*/ uint8 Unknown19; // 0xff +/*0000*/ uint32 Race; // +/*0000*/ uint8 Tutorial; // +/*0000*/ uint8 Class_; // +/*0000*/ uint8 EyeColor1; // +/*0000*/ uint8 BeardColor; // +/*0000*/ uint8 EyeColor2; // +/*0000*/ uint32 DrakkinHeritage; // Drakkin Heritage +/*0000*/ uint32 DrakkinTattoo; // Drakkin Tattoo +/*0000*/ uint32 DrakkinDetails; // Drakkin Details (Facial Spikes) +/*0000*/ uint8 Unknown; // New field to Underfoot }; @@ -157,20 +157,22 @@ struct CharacterSelectEntry_Struct { ** Character Selection Struct ** */ -struct CharacterSelect_Struct { -/*0000*/ uint32 char_count; //number of chars in this packet -/*0004*/ uint32 total_chars; //total number of chars allowed? -/*0008*/ CharacterSelectEntry_Struct entries[0]; +struct CharacterSelect_Struct +{ +/*0000*/ uint32 CharCount; //number of chars in this packet +/*0004*/ uint32 TotalChars; //total number of chars allowed? +/*0008*/ CharacterSelectEntry_Struct Entries[0]; }; /* * Visible equiptment. * Size: 12 Octets */ -struct EquipStruct { -/*00*/ uint32 material; -/*04*/ uint32 unknown1; -/*08*/ uint32 elitematerial; +struct EquipStruct +{ +/*00*/ uint32 Material; +/*04*/ uint32 Unknown1; +/*08*/ uint32 EliteMaterial; /*12*/ }; diff --git a/world/client.cpp b/world/client.cpp index f26328e12..55ca440cc 100644 --- a/world/client.cpp +++ b/world/client.cpp @@ -724,9 +724,9 @@ bool Client::HandleEnterWorldPacket(const EQApplicationPacket *app) { for(int x = 0; x < 10; ++x) { - if(strcasecmp(cs->name[x], char_name) == 0) + if(strcasecmp(cs->Name[x], char_name) == 0) { - if(cs->gohome[x] == 1) + if(cs->GoHome[x] == 1) { home_enabled = true; break; @@ -754,9 +754,9 @@ bool Client::HandleEnterWorldPacket(const EQApplicationPacket *app) { for(int x = 0; x < 10; ++x) { - if(strcasecmp(cs->name[x], char_name) == 0) + if(strcasecmp(cs->Name[x], char_name) == 0) { - if(cs->tutorial[x] == 1) + if(cs->Tutorial[x] == 1) { tutorial_enabled = true; break; diff --git a/world/worlddb.cpp b/world/worlddb.cpp index 3409a1e17..e47d9d54a 100644 --- a/world/worlddb.cpp +++ b/world/worlddb.cpp @@ -41,11 +41,11 @@ void WorldDatabase::GetCharSelectInfo(uint32 account_id, CharacterSelect_Struct* /* Initialize Variables */ for (int i=0; i<10; i++) { - strcpy(cs->name[i], ""); - cs->zone[i] = 0; - cs->level[i] = 0; - cs->tutorial[i] = 0; - cs->gohome[i] = 0; + strcpy(cs->Name[i], ""); + cs->Zone[i] = 0; + cs->Level[i] = 0; + cs->Tutorial[i] = 0; + cs->GoHome[i] = 0; } /* Get Character Info */ @@ -80,32 +80,32 @@ void WorldDatabase::GetCharSelectInfo(uint32 account_id, CharacterSelect_Struct* memset(&pp, 0, sizeof(PlayerProfile_Struct)); uint32 character_id = atoi(row[0]); - strcpy(cs->name[char_num], row[1]); + strcpy(cs->Name[char_num], row[1]); uint8 lvl = atoi(row[5]); - cs->level[char_num] = lvl; - cs->class_[char_num] = atoi(row[4]); - cs->race[char_num] = atoi(row[3]); - cs->gender[char_num] = atoi(row[2]); - cs->deity[char_num] = atoi(row[6]); - cs->zone[char_num] = atoi(row[19]); - cs->face[char_num] = atoi(row[15]); - cs->haircolor[char_num] = atoi(row[9]); - cs->beardcolor[char_num] = atoi(row[10]); - cs->eyecolor2[char_num] = atoi(row[12]); - cs->eyecolor1[char_num] = atoi(row[11]); - cs->hairstyle[char_num] = atoi(row[13]); - cs->beard[char_num] = atoi(row[14]); - cs->drakkin_heritage[char_num] = atoi(row[16]); - cs->drakkin_tattoo[char_num] = atoi(row[17]); - cs->drakkin_details[char_num] = atoi(row[18]); + cs->Level[char_num] = lvl; + cs->Class_[char_num] = atoi(row[4]); + cs->Race[char_num] = atoi(row[3]); + cs->Gender[char_num] = atoi(row[2]); + cs->Deity[char_num] = atoi(row[6]); + cs->Zone[char_num] = atoi(row[19]); + cs->Face[char_num] = atoi(row[15]); + cs->HairColor[char_num] = atoi(row[9]); + cs->BeardColor[char_num] = atoi(row[10]); + cs->EyeColor2[char_num] = atoi(row[12]); + cs->EyeColor1[char_num] = atoi(row[11]); + cs->HairStyle[char_num] = atoi(row[13]); + cs->Beard[char_num] = atoi(row[14]); + cs->DrakkinHeritage[char_num] = atoi(row[16]); + cs->DrakkinTattoo[char_num] = atoi(row[17]); + cs->DrakkinDetails[char_num] = atoi(row[18]); if (RuleB(World, EnableTutorialButton) && (lvl <= RuleI(World, MaxLevelForTutorial))) - cs->tutorial[char_num] = 1; + cs->Tutorial[char_num] = 1; if (RuleB(World, EnableReturnHomeButton)) { int now = time(nullptr); if ((now - atoi(row[7])) >= RuleI(World, MinOfflineTimeToReturnHome)) - cs->gohome[char_num] = 1; + cs->GoHome[char_num] = 1; } /* Set Bind Point Data for any character that may possibly be missing it for any reason */ @@ -118,7 +118,7 @@ void WorldDatabase::GetCharSelectInfo(uint32 account_id, CharacterSelect_Struct* if (has_home == 0 || has_bind == 0){ cquery = StringFormat("SELECT `zone_id`, `bind_id`, `x`, `y`, `z` FROM `start_zones` WHERE `player_class` = %i AND `player_deity` = %i AND `player_race` = %i", - cs->class_[char_num], cs->deity[char_num], cs->race[char_num]); + cs->Class_[char_num], cs->Deity[char_num], cs->Race[char_num]); auto results_bind = database.QueryDatabase(cquery); for (auto row_d = results_bind.begin(); row_d != results_bind.end(); ++row_d) { /* If a bind_id is specified, make them start there */ @@ -161,16 +161,16 @@ void WorldDatabase::GetCharSelectInfo(uint32 account_id, CharacterSelect_Struct* 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.use_tint = atoi(row_b[4]); + 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]); } /* Load Inventory */ // If we ensure that the material data is updated appropriately, we can do away with inventory loads inv = new Inventory; - if (GetInventory(account_id, cs->name[char_num], inv)) + if (GetInventory(account_id, cs->Name[char_num], inv)) { const Item_Struct* item = nullptr; const ItemInst* inst = nullptr; @@ -194,31 +194,31 @@ void WorldDatabase::GetCharSelectInfo(uint32 account_id, CharacterSelect_Struct* if (inst->GetOrnamentationIDFile() != 0) { idfile = inst->GetOrnamentationIDFile(); - cs->equip[char_num][matslot].material = idfile; + cs->Equip[char_num][matslot].Material = idfile; } else { if (strlen(item->IDFile) > 2) { idfile = atoi(&item->IDFile[2]); - cs->equip[char_num][matslot].material = idfile; + cs->Equip[char_num][matslot].Material = idfile; } } if (matslot == MaterialPrimary) { - cs->primary[char_num] = idfile; + cs->Primary[char_num] = idfile; } else { - cs->secondary[char_num] = idfile; + cs->Secondary[char_num] = idfile; } } else { uint32 color = 0; - if (pp.item_tint[matslot].rgb.use_tint) + if (pp.item_tint[matslot].RGB.UseTint) { - color = pp.item_tint[matslot].color; + color = pp.item_tint[matslot].Color; } else { @@ -226,16 +226,16 @@ void WorldDatabase::GetCharSelectInfo(uint32 account_id, CharacterSelect_Struct* } // Armor Materials/Models - cs->equip[char_num][matslot].material = item->Material; - cs->equip[char_num][matslot].elitematerial = item->EliteMaterial; - cs->equip[char_num][matslot].heroforgemodel = inst->GetOrnamentHeroModel(matslot); - cs->equip[char_num][matslot].color.color = color; + cs->Equip[char_num][matslot].Material = item->Material; + cs->Equip[char_num][matslot].EliteMaterial = item->EliteMaterial; + cs->Equip[char_num][matslot].HeroForgeModel = inst->GetOrnamentHeroModel(matslot); + cs->Equip[char_num][matslot].Color.Color = color; } } } else { - printf("Error loading inventory for %s\n", cs->name[char_num]); + printf("Error loading inventory for %s\n", cs->Name[char_num]); } safe_delete(inv); diff --git a/zone/bot.cpp b/zone/bot.cpp index 4b42fac37..6eb90551f 100644 --- a/zone/bot.cpp +++ b/zone/bot.cpp @@ -4395,24 +4395,24 @@ void Bot::FillSpawnStruct(NewSpawn_Struct* ns, Mob* ForWho) { item = inst->GetItem(); if (item != 0) { - ns->spawn.equipment[i].material = item->Material; - ns->spawn.equipment[i].elitematerial = item->EliteMaterial; - ns->spawn.equipment[i].heroforgemodel = item->HerosForgeModel; + ns->spawn.equipment[i].Material = item->Material; + ns->spawn.equipment[i].EliteMaterial = item->EliteMaterial; + ns->spawn.equipment[i].HeroForgeModel = item->HerosForgeModel; if (armor_tint[i]) { - ns->spawn.colors[i].color = armor_tint[i]; + ns->spawn.colors[i].Color = armor_tint[i]; } else { - ns->spawn.colors[i].color = item->Color; + ns->spawn.colors[i].Color = item->Color; } } else { if (armor_tint[i]) { - ns->spawn.colors[i].color = armor_tint[i]; + ns->spawn.colors[i].Color = armor_tint[i]; } } } @@ -4426,9 +4426,9 @@ void Bot::FillSpawnStruct(NewSpawn_Struct* ns, Mob* ForWho) { { if(strlen(item->IDFile) > 2) { - ns->spawn.equipment[MaterialPrimary].material = atoi(&item->IDFile[2]); + ns->spawn.equipment[MaterialPrimary].Material = atoi(&item->IDFile[2]); } - ns->spawn.colors[MaterialPrimary].color = GetEquipmentColor(MaterialPrimary); + ns->spawn.colors[MaterialPrimary].Color = GetEquipmentColor(MaterialPrimary); } } @@ -4440,9 +4440,9 @@ void Bot::FillSpawnStruct(NewSpawn_Struct* ns, Mob* ForWho) { { if(strlen(item->IDFile) > 2) { - ns->spawn.equipment[MaterialSecondary].material = atoi(&item->IDFile[2]); + ns->spawn.equipment[MaterialSecondary].Material = atoi(&item->IDFile[2]); } - ns->spawn.colors[MaterialSecondary].color = GetEquipmentColor(MaterialSecondary); + ns->spawn.colors[MaterialSecondary].Color = GetEquipmentColor(MaterialSecondary); } } } @@ -5061,7 +5061,7 @@ void Bot::SendBotArcheryWearChange(uint8 material_slot, uint32 material, uint32 wc->spawn_id = GetID(); wc->material = material; - wc->color.color = color; + wc->color.Color = color; wc->wear_slot_id = material_slot; entity_list.QueueClients(this, outapp); diff --git a/zone/client.cpp b/zone/client.cpp index 816b21e15..227bb4083 100644 --- a/zone/client.cpp +++ b/zone/client.cpp @@ -3039,7 +3039,7 @@ void Client::Tell_StringID(uint32 string_id, const char *who, const char *messag void Client::SetTint(int16 in_slot, uint32 color) { Color_Struct new_color; - new_color.color = color; + new_color.Color = color; SetTint(in_slot, new_color); database.SaveCharacterMaterialColor(this->CharacterID(), in_slot, color); } @@ -3050,8 +3050,8 @@ void Client::SetTint(int16 in_slot, Color_Struct& color) { uint8 matslot = Inventory::CalcMaterialFromSlot(in_slot); if (matslot != _MaterialInvalid) { - m_pp.item_tint[matslot].color = color.color; - database.SaveCharacterMaterialColor(this->CharacterID(), in_slot, color.color); + m_pp.item_tint[matslot].Color = color.Color; + database.SaveCharacterMaterialColor(this->CharacterID(), in_slot, color.Color); } } diff --git a/zone/client_packet.cpp b/zone/client_packet.cpp index 1b866073b..789071848 100644 --- a/zone/client_packet.cpp +++ b/zone/client_packet.cpp @@ -1306,9 +1306,9 @@ void Client::Handle_Connect_OP_ZoneEntry(const EQApplicationPacket *app) /* Set item material tint */ for (int i = EmuConstants::MATERIAL_BEGIN; i <= EmuConstants::MATERIAL_END; i++) { - if (m_pp.item_tint[i].rgb.use_tint == 1 || m_pp.item_tint[i].rgb.use_tint == 255) + if (m_pp.item_tint[i].RGB.UseTint == 1 || m_pp.item_tint[i].RGB.UseTint == 255) { - m_pp.item_tint[i].rgb.use_tint = 0xFF; + m_pp.item_tint[i].RGB.UseTint = 0xFF; } } diff --git a/zone/command.cpp b/zone/command.cpp index ff81e73ed..612228fde 100644 --- a/zone/command.cpp +++ b/zone/command.cpp @@ -7020,7 +7020,7 @@ void Client::Undye() { database.SaveInventory(CharacterID(), inst, slot2); } - m_pp.item_tint[cur_slot].color = 0; + m_pp.item_tint[cur_slot].Color = 0; SendWearChange(cur_slot); } diff --git a/zone/corpse.cpp b/zone/corpse.cpp index 767159ce7..236128048 100644 --- a/zone/corpse.cpp +++ b/zone/corpse.cpp @@ -113,15 +113,15 @@ Corpse* Corpse::LoadCharacterCorpseEntity(uint32 in_dbid, uint32 in_charid, std: pc->Lock(); /* Load Item Tints */ - pc->item_tint[0].color = pcs->item_tint[0].color; - pc->item_tint[1].color = pcs->item_tint[1].color; - pc->item_tint[2].color = pcs->item_tint[2].color; - pc->item_tint[3].color = pcs->item_tint[3].color; - pc->item_tint[4].color = pcs->item_tint[4].color; - pc->item_tint[5].color = pcs->item_tint[5].color; - pc->item_tint[6].color = pcs->item_tint[6].color; - pc->item_tint[7].color = pcs->item_tint[7].color; - pc->item_tint[8].color = pcs->item_tint[8].color; + pc->item_tint[0].Color = pcs->item_tint[0].Color; + pc->item_tint[1].Color = pcs->item_tint[1].Color; + pc->item_tint[2].Color = pcs->item_tint[2].Color; + pc->item_tint[3].Color = pcs->item_tint[3].Color; + pc->item_tint[4].Color = pcs->item_tint[4].Color; + pc->item_tint[5].Color = pcs->item_tint[5].Color; + pc->item_tint[6].Color = pcs->item_tint[6].Color; + pc->item_tint[7].Color = pcs->item_tint[7].Color; + pc->item_tint[8].Color = pcs->item_tint[8].Color; /* Load Physical Appearance */ pc->haircolor = pcs->haircolor; @@ -1413,8 +1413,8 @@ uint32 Corpse::GetEquipmentColor(uint8 material_slot) const { item = database.GetItem(GetEquipment(material_slot)); if(item != NO_ITEM) { - return item_tint[material_slot].rgb.use_tint ? - item_tint[material_slot].color : + return item_tint[material_slot].RGB.UseTint ? + item_tint[material_slot].Color : item->Color; } diff --git a/zone/inventory.cpp b/zone/inventory.cpp index 7f2fa0173..35053731c 100644 --- a/zone/inventory.cpp +++ b/zone/inventory.cpp @@ -1984,9 +1984,9 @@ void Client::QSSwapItemAuditor(MoveItem_Struct* move_in, bool postaction_call) { void Client::DyeArmor(DyeStruct* dye){ int16 slot=0; for (int i = EmuConstants::MATERIAL_BEGIN; i <= EmuConstants::MATERIAL_TINT_END; i++) { - if (m_pp.item_tint[i].rgb.blue != dye->dye[i].rgb.blue || - m_pp.item_tint[i].rgb.red != dye->dye[i].rgb.red || - m_pp.item_tint[i].rgb.green != dye->dye[i].rgb.green + if (m_pp.item_tint[i].RGB.Blue != dye->dye[i].RGB.Blue || + m_pp.item_tint[i].RGB.Red != dye->dye[i].RGB.Red || + m_pp.item_tint[i].RGB.Green != dye->dye[i].RGB.Green ) { slot = m_inv.HasItem(32557, 1, invWherePersonal); if (slot != INVALID_INDEX){ @@ -1994,18 +1994,18 @@ void Client::DyeArmor(DyeStruct* dye){ uint8 slot2=SlotConvert(i); ItemInst* inst = this->m_inv.GetItem(slot2); if(inst){ - uint32 armor_color = ((uint32)dye->dye[i].rgb.red << 16) | ((uint32)dye->dye[i].rgb.green << 8) | ((uint32)dye->dye[i].rgb.blue); + uint32 armor_color = ((uint32)dye->dye[i].RGB.Red << 16) | ((uint32)dye->dye[i].RGB.Green << 8) | ((uint32)dye->dye[i].RGB.Blue); inst->SetColor(armor_color); database.SaveCharacterMaterialColor(this->CharacterID(), i, armor_color); database.SaveInventory(CharacterID(),inst,slot2); - if(dye->dye[i].rgb.use_tint) - m_pp.item_tint[i].rgb.use_tint = 0xFF; + if(dye->dye[i].RGB.UseTint) + m_pp.item_tint[i].RGB.UseTint = 0xFF; else - m_pp.item_tint[i].rgb.use_tint=0x00; + m_pp.item_tint[i].RGB.UseTint=0x00; } - m_pp.item_tint[i].rgb.blue=dye->dye[i].rgb.blue; - m_pp.item_tint[i].rgb.red=dye->dye[i].rgb.red; - m_pp.item_tint[i].rgb.green=dye->dye[i].rgb.green; + m_pp.item_tint[i].RGB.Blue=dye->dye[i].RGB.Blue; + m_pp.item_tint[i].RGB.Red=dye->dye[i].RGB.Red; + m_pp.item_tint[i].RGB.Green=dye->dye[i].RGB.Green; SendWearChange(i); } else{ @@ -2420,7 +2420,7 @@ uint32 Client::GetEquipmentColor(uint8 material_slot) const const Item_Struct *item = database.GetItem(GetEquipment(material_slot)); if(item != nullptr) - return ((m_pp.item_tint[material_slot].rgb.use_tint) ? m_pp.item_tint[material_slot].color : item->Color); + return ((m_pp.item_tint[material_slot].RGB.UseTint) ? m_pp.item_tint[material_slot].Color : item->Color); return 0; } diff --git a/zone/mob.cpp b/zone/mob.cpp index ea86ff4dc..57d04f344 100644 --- a/zone/mob.cpp +++ b/zone/mob.cpp @@ -961,10 +961,10 @@ void Mob::FillSpawnStruct(NewSpawn_Struct* ns, Mob* ForWho) // Only Player Races Wear Armor if (Mob::IsPlayerRace(race) || i > 6) { - ns->spawn.equipment[i].material = GetEquipmentMaterial(i); - ns->spawn.equipment[i].elitematerial = IsEliteMaterialItem(i); - ns->spawn.equipment[i].heroforgemodel = GetHerosForgeModel(i); - ns->spawn.colors[i].color = GetEquipmentColor(i); + ns->spawn.equipment[i].Material = GetEquipmentMaterial(i); + ns->spawn.equipment[i].EliteMaterial = IsEliteMaterialItem(i); + ns->spawn.equipment[i].HeroForgeModel = GetHerosForgeModel(i); + ns->spawn.colors[i].Color = GetEquipmentColor(i); } } @@ -2562,7 +2562,7 @@ void Mob::SendWearChange(uint8 material_slot) wc->material = GetEquipmentMaterial(material_slot); wc->elite_material = IsEliteMaterialItem(material_slot); wc->hero_forge_model = GetHerosForgeModel(material_slot); - wc->color.color = GetEquipmentColor(material_slot); + wc->color.Color = GetEquipmentColor(material_slot); wc->wear_slot_id = material_slot; entity_list.QueueClients(this, outapp); @@ -2577,9 +2577,9 @@ void Mob::SendTextureWC(uint8 slot, uint16 texture, uint32 hero_forge_model, uin wc->spawn_id = this->GetID(); wc->material = texture; if (this->IsClient()) - wc->color.color = GetEquipmentColor(slot); + wc->color.Color = GetEquipmentColor(slot); else - wc->color.color = this->GetArmorTint(slot); + wc->color.Color = this->GetArmorTint(slot); wc->wear_slot_id = slot; wc->unknown06 = unknown06; @@ -2607,7 +2607,7 @@ void Mob::SetSlotTint(uint8 material_slot, uint8 red_tint, uint8 green_tint, uin wc->spawn_id = this->GetID(); wc->material = GetEquipmentMaterial(material_slot); wc->hero_forge_model = GetHerosForgeModel(material_slot); - wc->color.color = color; + wc->color.Color = color; wc->wear_slot_id = material_slot; entity_list.QueueClients(this, outapp); @@ -2624,7 +2624,7 @@ void Mob::WearChange(uint8 material_slot, uint16 texture, uint32 color, uint32 h wc->spawn_id = this->GetID(); wc->material = texture; wc->hero_forge_model = hero_forge_model; - wc->color.color = color; + wc->color.Color = color; wc->wear_slot_id = material_slot; entity_list.QueueClients(this, outapp); diff --git a/zone/zonedb.cpp b/zone/zonedb.cpp index d9e564e29..07a3df930 100644 --- a/zone/zonedb.cpp +++ b/zone/zonedb.cpp @@ -1167,10 +1167,10 @@ bool ZoneDatabase::LoadCharacterMaterialColor(uint32 character_id, PlayerProfile for (auto row = results.begin(); row != results.end(); ++row) { r = 0; i = atoi(row[r]); /* Slot */ r++; - pp->item_tint[i].rgb.blue = atoi(row[r]); r++; - pp->item_tint[i].rgb.green = atoi(row[r]); r++; - pp->item_tint[i].rgb.red = atoi(row[r]); r++; - pp->item_tint[i].rgb.use_tint = atoi(row[r]); + pp->item_tint[i].RGB.Blue = atoi(row[r]); r++; + pp->item_tint[i].RGB.Green = atoi(row[r]); r++; + pp->item_tint[i].RGB.Red = atoi(row[r]); r++; + pp->item_tint[i].RGB.UseTint = atoi(row[r]); } return true; } @@ -3546,9 +3546,9 @@ uint32 ZoneDatabase::UpdateCharacterCorpse(uint32 db_id, uint32 char_id, const c dbpc->plat, dbpc->haircolor, dbpc->beardcolor, dbpc->eyecolor1, dbpc->eyecolor2, dbpc->hairstyle, dbpc->face, dbpc->beard, dbpc->drakkin_heritage, dbpc->drakkin_tattoo, dbpc->drakkin_details, - dbpc->item_tint[0].color, dbpc->item_tint[1].color, dbpc->item_tint[2].color, - dbpc->item_tint[3].color, dbpc->item_tint[4].color, dbpc->item_tint[5].color, - dbpc->item_tint[6].color, dbpc->item_tint[7].color, dbpc->item_tint[8].color, + dbpc->item_tint[0].Color, dbpc->item_tint[1].Color, dbpc->item_tint[2].Color, + dbpc->item_tint[3].Color, dbpc->item_tint[4].Color, dbpc->item_tint[5].Color, + dbpc->item_tint[6].Color, dbpc->item_tint[7].Color, dbpc->item_tint[8].Color, db_id); auto results = QueryDatabase(query); @@ -3639,15 +3639,15 @@ uint32 ZoneDatabase::SaveCharacterCorpse(uint32 charid, const char* charname, ui dbpc->drakkin_heritage, dbpc->drakkin_tattoo, dbpc->drakkin_details, - dbpc->item_tint[0].color, - dbpc->item_tint[1].color, - dbpc->item_tint[2].color, - dbpc->item_tint[3].color, - dbpc->item_tint[4].color, - dbpc->item_tint[5].color, - dbpc->item_tint[6].color, - dbpc->item_tint[7].color, - dbpc->item_tint[8].color + dbpc->item_tint[0].Color, + dbpc->item_tint[1].Color, + dbpc->item_tint[2].Color, + dbpc->item_tint[3].Color, + dbpc->item_tint[4].Color, + dbpc->item_tint[5].Color, + dbpc->item_tint[6].Color, + dbpc->item_tint[7].Color, + dbpc->item_tint[8].Color ); auto results = QueryDatabase(query); uint32 last_insert_id = results.LastInsertedID(); @@ -3819,15 +3819,15 @@ bool ZoneDatabase::LoadCharacterCorpseData(uint32 corpse_id, PlayerCorpse_Struct pcs->drakkin_heritage = atoul(row[i++]); // drakkin_heritage, pcs->drakkin_tattoo = atoul(row[i++]); // drakkin_tattoo, pcs->drakkin_details = atoul(row[i++]); // drakkin_details, - pcs->item_tint[0].color = atoul(row[i++]); // wc_1, - pcs->item_tint[1].color = atoul(row[i++]); // wc_2, - pcs->item_tint[2].color = atoul(row[i++]); // wc_3, - pcs->item_tint[3].color = atoul(row[i++]); // wc_4, - pcs->item_tint[4].color = atoul(row[i++]); // wc_5, - pcs->item_tint[5].color = atoul(row[i++]); // wc_6, - pcs->item_tint[6].color = atoul(row[i++]); // wc_7, - pcs->item_tint[7].color = atoul(row[i++]); // wc_8, - pcs->item_tint[8].color = atoul(row[i++]); // wc_9 + pcs->item_tint[0].Color = atoul(row[i++]); // wc_1, + pcs->item_tint[1].Color = atoul(row[i++]); // wc_2, + pcs->item_tint[2].Color = atoul(row[i++]); // wc_3, + pcs->item_tint[3].Color = atoul(row[i++]); // wc_4, + pcs->item_tint[4].Color = atoul(row[i++]); // wc_5, + pcs->item_tint[5].Color = atoul(row[i++]); // wc_6, + pcs->item_tint[6].Color = atoul(row[i++]); // wc_7, + pcs->item_tint[7].Color = atoul(row[i++]); // wc_8, + pcs->item_tint[8].Color = atoul(row[i++]); // wc_9 } query = StringFormat( "SELECT \n"