Pre-purposed clean-up

This commit is contained in:
Uleat 2015-02-15 10:30:43 -05:00
parent 53a1faa36f
commit e4be4d6895
23 changed files with 762 additions and 770 deletions

View File

@ -124,83 +124,66 @@ struct LDoNTrapTemplate
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
/* // All clients translate the character select information to some degree
** Color_Struct
** Size: 4 bytes
** Used for convenience
** Merth: Gave struct a name so gcc 2.96 would compile
**
*/
struct Color_Struct struct Color_Struct
{ {
union union {
{ struct {
struct uint8 Blue;
{ uint8 Green;
uint8 blue; uint8 Red;
uint8 green; uint8 UseTint; // if there's a tint this is FF
uint8 red; } RGB;
uint8 use_tint; // if there's a tint this is FF uint32 Color;
} rgb;
uint32 color;
}; };
}; };
/* struct EquipStruct
* Visible equiptment. {
* Size: 20 Octets uint32 Material;
*/ uint32 Unknown1;
struct EquipStruct { uint32 EliteMaterial;
/*00*/ uint32 material; uint32 HeroForgeModel;
/*04*/ uint32 unknown1; uint32 Material2; // Same as material?
/*08*/ uint32 elitematerial;
/*12*/ uint32 heroforgemodel;
/*16*/ uint32 material2; // Same as material?
/*20*/
}; };
struct CharSelectEquip { struct CharSelectEquip
uint32 material; {
uint32 unknown1; uint32 Material;
uint32 elitematerial; uint32 Unknown1;
uint32 heroforgemodel; uint32 EliteMaterial;
uint32 material2; uint32 HeroForgeModel;
Color_Struct color; uint32 Material2;
Color_Struct Color;
}; };
/* struct CharacterSelect_Struct
** Character Selection Struct {
** Length: 1704 Bytes uint32 Race[10]; // Characters Race
** uint8 BeardColor[10]; // Characters beard Color
*/ uint8 HairStyle[10]; // Characters hair style
struct CharacterSelect_Struct { CharSelectEquip Equip[10][9];
/*0000*/ uint32 race[10]; // Characters Race uint32 Secondary[10]; // Characters secondary IDFile number
/*0040*/ //Color_Struct cs_colors[10][9]; // Characters Equipment Colors uint32 DrakkinHeritage[10]; // added for SoF
/*0400*/ uint8 beardcolor[10]; // Characters beard Color uint32 DrakkinTattoo[10]; // added for SoF
/*0410*/ uint8 hairstyle[10]; // Characters hair style uint32 DrakkinDetails[10]; // added for SoF
/*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) uint32 Deity[10]; // Characters Deity
/*0000*/ CharSelectEquip equip[10][9]; uint8 GoHome[10]; // 1=Go Home available, 0=not
/*0780*/ uint32 secondary[10]; // Characters secondary IDFile number uint8 Tutorial[10]; // 1=Tutorial available, 0=not
/*0820*/ uint32 drakkin_heritage[10]; // added for SoF uint8 Beard[10]; // Characters Beard Type
/*0860*/ uint32 drakkin_tattoo[10]; // added for SoF uint8 Unknown902[10]; // 10x ff
/*0900*/ uint32 drakkin_details[10]; // added for SoF uint32 Primary[10]; // Characters primary IDFile number
/*0940*/ uint32 deity[10]; // Characters Deity uint8 HairColor[10]; // Characters Hair Color
/*0980*/ uint8 gohome[10]; // 1=Go Home available, 0=not uint8 Unknown0962[2]; // 2x 00
/*0990*/ uint8 tutorial[10]; // 1=Tutorial available, 0=not uint32 Zone[10]; // Characters Current Zone
/*1000*/ uint8 beard[10]; // Characters Beard Type uint8 Class_[10]; // Characters Classes
/*1010*/ uint8 unknown902[10]; // 10x ff uint8 Face[10]; // Characters Face Type
/*1020*/ uint32 primary[10]; // Characters primary IDFile number char Name[10][64]; // Characters Names
/*1060*/ uint8 haircolor[10]; // Characters Hair Color uint8 Gender[10]; // Characters Gender
/*1070*/ uint8 unknown0962[2]; // 2x 00 uint8 EyeColor1[10]; // Characters Eye Color
/*1072*/ uint32 zone[10]; // Characters Current Zone uint8 EyeColor2[10]; // Characters Eye 2 Color
/*1112*/ uint8 class_[10]; // Characters Classes uint8 Level[10]; // Characters Levels
/*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*/
}; };
/* /*

View File

@ -2043,7 +2043,7 @@ namespace RoF
for (int r = 0; r < 7; r++) 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 // Write zeroes for extra two tint values
outapp->WriteUInt32(0); outapp->WriteUInt32(0);
@ -2053,7 +2053,7 @@ namespace RoF
for (int r = 0; r < 7; r++) 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 // Write zeroes for extra two tint values
outapp->WriteUInt32(0); outapp->WriteUInt32(0);
@ -2906,11 +2906,11 @@ namespace RoF
int char_count; int char_count;
int namelen = 0; int namelen = 0;
for (char_count = 0; char_count < 10; char_count++) { for (char_count = 0; char_count < 10; char_count++) {
if (emu->name[char_count][0] == '\0') if (emu->Name[char_count][0] == '\0')
break; break;
if (strcmp(emu->name[char_count], "<none>") == 0) if (strcmp(emu->Name[char_count], "<none>") == 0)
break; break;
namelen += strlen(emu->name[char_count]); namelen += strlen(emu->Name[char_count]);
} }
int total_length = sizeof(structs::CharacterSelect_Struct) int total_length = sizeof(structs::CharacterSelect_Struct)
@ -2922,58 +2922,58 @@ namespace RoF
//unsigned char *eq_buffer = new unsigned char[total_length]; //unsigned char *eq_buffer = new unsigned char[total_length];
//structs::CharacterSelect_Struct *eq_head = (structs::CharacterSelect_Struct *) eq_buffer; //structs::CharacterSelect_Struct *eq_head = (structs::CharacterSelect_Struct *) eq_buffer;
eq->char_count = char_count; eq->CharCount = char_count;
//eq->total_chars = 10; //eq->total_chars = 10;
unsigned char *bufptr = (unsigned char *)eq->entries; unsigned char *bufptr = (unsigned char *)eq->Entries;
int r; int r;
for (r = 0; r < char_count; r++) { for (r = 0; r < char_count; r++) {
{ //pre-name section... { //pre-name section...
structs::CharacterSelectEntry_Struct *eq2 = (structs::CharacterSelectEntry_Struct *) bufptr; 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. //adjust for name.
bufptr += strlen(emu->name[r]); bufptr += strlen(emu->Name[r]);
{ //post-name section... { //post-name section...
structs::CharacterSelectEntry_Struct *eq2 = (structs::CharacterSelectEntry_Struct *) bufptr; structs::CharacterSelectEntry_Struct *eq2 = (structs::CharacterSelectEntry_Struct *) bufptr;
eq2->class_ = emu->class_[r]; eq2->Class_ = emu->Class_[r];
eq2->race = emu->race[r]; eq2->Race = emu->Race[r];
eq2->level = emu->level[r]; eq2->Level = emu->Level[r];
eq2->class_2 = emu->class_[r]; eq2->Class_2 = emu->Class_[r];
eq2->race2 = emu->race[r]; eq2->Race2 = emu->Race[r];
eq2->zone = emu->zone[r]; eq2->Zone = emu->Zone[r];
eq2->instance = 0; eq2->Instance = 0;
eq2->gender = emu->gender[r]; eq2->Gender = emu->Gender[r];
eq2->face = emu->face[r]; eq2->Face = emu->Face[r];
int k; int k;
for (k = 0; k < _MaterialCount; k++) { for (k = 0; k < _MaterialCount; k++) {
eq2->equip[k].material = emu->equip[r][k].material; eq2->Equip[k].Material = emu->Equip[r][k].Material;
eq2->equip[k].unknown1 = emu->equip[r][k].unknown1; eq2->Equip[k].Unknown1 = emu->Equip[r][k].Unknown1;
eq2->equip[k].elitematerial = emu->equip[r][k].elitematerial; eq2->Equip[k].EliteMaterial = emu->Equip[r][k].EliteMaterial;
eq2->equip[k].heroforgemodel = emu->equip[r][k].heroforgemodel; eq2->Equip[k].HeroForgeModel = emu->Equip[r][k].HeroForgeModel;
eq2->equip[k].material2 = emu->equip[r][k].material2; eq2->Equip[k].Material2 = emu->Equip[r][k].Material2;
eq2->equip[k].color.color = emu->equip[r][k].color.color; eq2->Equip[k].Color.Color = emu->Equip[r][k].Color.Color;
} }
eq2->u15 = 0xff; eq2->Unknown15 = 0xFF;
eq2->u19 = 0xFF; eq2->Uknown19 = 0xFF;
eq2->drakkin_tattoo = emu->drakkin_tattoo[r]; eq2->DrakkinTattoo = emu->DrakkinTattoo[r];
eq2->drakkin_details = emu->drakkin_details[r]; eq2->DrakkinDetails = emu->DrakkinDetails[r];
eq2->deity = emu->deity[r]; eq2->Deity = emu->Deity[r];
eq2->primary = emu->primary[r]; eq2->Primary = emu->Primary[r];
eq2->secondary = emu->secondary[r]; eq2->Secondary = emu->Secondary[r];
eq2->haircolor = emu->haircolor[r]; eq2->HairColor = emu->HairColor[r];
eq2->beardcolor = emu->beardcolor[r]; eq2->BeardColor = emu->BeardColor[r];
eq2->eyecolor1 = emu->eyecolor1[r]; eq2->EyeColor1 = emu->EyeColor1[r];
eq2->eyecolor2 = emu->eyecolor2[r]; eq2->EyeColor2 = emu->EyeColor2[r];
eq2->hairstyle = emu->hairstyle[r]; eq2->HairStyle = emu->HairStyle[r];
eq2->beard = emu->beard[r]; eq2->Beard = emu->Beard[r];
eq2->char_enabled = 1; eq2->CharEnabled = 1;
eq2->tutorial = emu->tutorial[r]; eq2->Tutorial = emu->Tutorial[r];
eq2->drakkin_heritage = emu->drakkin_heritage[r]; eq2->DrakkinHeritage = emu->DrakkinHeritage[r];
eq2->unknown1 = 0; eq2->Unknown1 = 0;
eq2->gohome = emu->gohome[r]; eq2->GoHome = emu->GoHome[r];
eq2->LastLogin = 1212696584; eq2->LastLogin = 1212696584;
eq2->unknown2 = 0; eq2->Unknown2 = 0;
} }
bufptr += sizeof(structs::CharacterSelectEntry_Struct); bufptr += sizeof(structs::CharacterSelectEntry_Struct);
} }
@ -3639,7 +3639,7 @@ namespace RoF
OUT(elite_material); OUT(elite_material);
OUT(hero_forge_model); OUT(hero_forge_model);
OUT(unknown18); OUT(unknown18);
OUT(color.color); OUT(color.Color);
OUT(wear_slot_id); OUT(wear_slot_id);
FINISH_ENCODE(); FINISH_ENCODE();
@ -3950,18 +3950,18 @@ namespace RoF
for (k = 0; k < 9; ++k) 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; structs::EquipStruct *Equipment = (structs::EquipStruct *)Buffer;
for (k = 0; k < 9; k++) { for (k = 0; k < 9; k++) {
Equipment[k].material = emu->equipment[k].material; Equipment[k].Material = emu->equipment[k].Material;
Equipment[k].unknown1 = emu->equipment[k].unknown1; Equipment[k].Unknown1 = emu->equipment[k].Unknown1;
Equipment[k].elitematerial = emu->equipment[k].elitematerial; Equipment[k].EliteMaterial = emu->equipment[k].EliteMaterial;
Equipment[k].heroforgemodel = emu->equipment[k].heroforgemodel; Equipment[k].HeroForgeModel = emu->equipment[k].HeroForgeModel;
Equipment[k].material2 = emu->equipment[k].material2; Equipment[k].Material2 = emu->equipment[k].Material2;
} }
Buffer += (sizeof(structs::EquipStruct) * 9); 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, 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, 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); VARSTRUCT_ENCODE_TYPE(uint32, Buffer, 0);
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, 0); VARSTRUCT_ENCODE_TYPE(uint32, Buffer, 0);

View File

@ -2118,7 +2118,7 @@ namespace RoF2
for (int r = 0; r < 7; r++) 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 // Write zeroes for extra two tint values
outapp->WriteUInt32(0); outapp->WriteUInt32(0);
@ -2128,7 +2128,7 @@ namespace RoF2
for (int r = 0; r < 7; r++) 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 // Write zeroes for extra two tint values
outapp->WriteUInt32(0); outapp->WriteUInt32(0);
@ -2990,11 +2990,11 @@ namespace RoF2
int char_count; int char_count;
int namelen = 0; int namelen = 0;
for (char_count = 0; char_count < 10; char_count++) { for (char_count = 0; char_count < 10; char_count++) {
if (emu->name[char_count][0] == '\0') if (emu->Name[char_count][0] == '\0')
break; break;
if (strcmp(emu->name[char_count], "<none>") == 0) if (strcmp(emu->Name[char_count], "<none>") == 0)
break; break;
namelen += strlen(emu->name[char_count]); namelen += strlen(emu->Name[char_count]);
} }
int total_length = sizeof(structs::CharacterSelect_Struct) int total_length = sizeof(structs::CharacterSelect_Struct)
@ -3006,58 +3006,58 @@ namespace RoF2
//unsigned char *eq_buffer = new unsigned char[total_length]; //unsigned char *eq_buffer = new unsigned char[total_length];
//structs::CharacterSelect_Struct *eq_head = (structs::CharacterSelect_Struct *) eq_buffer; //structs::CharacterSelect_Struct *eq_head = (structs::CharacterSelect_Struct *) eq_buffer;
eq->char_count = char_count; eq->CharCount = char_count;
//eq->total_chars = 10; //eq->total_chars = 10;
unsigned char *bufptr = (unsigned char *)eq->entries; unsigned char *bufptr = (unsigned char *)eq->Entries;
int r; int r;
for (r = 0; r < char_count; r++) { for (r = 0; r < char_count; r++) {
{ //pre-name section... { //pre-name section...
structs::CharacterSelectEntry_Struct *eq2 = (structs::CharacterSelectEntry_Struct *) bufptr; 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. //adjust for name.
bufptr += strlen(emu->name[r]); bufptr += strlen(emu->Name[r]);
{ //post-name section... { //post-name section...
structs::CharacterSelectEntry_Struct *eq2 = (structs::CharacterSelectEntry_Struct *) bufptr; structs::CharacterSelectEntry_Struct *eq2 = (structs::CharacterSelectEntry_Struct *) bufptr;
eq2->class_ = emu->class_[r]; eq2->Class_ = emu->Class_[r];
eq2->race = emu->race[r]; eq2->Race = emu->Race[r];
eq2->level = emu->level[r]; eq2->Level = emu->Level[r];
eq2->class_2 = emu->class_[r]; eq2->Class_2 = emu->Class_[r];
eq2->race2 = emu->race[r]; eq2->Race2 = emu->Race[r];
eq2->zone = emu->zone[r]; eq2->Zone = emu->Zone[r];
eq2->instance = 0; eq2->Instance = 0;
eq2->gender = emu->gender[r]; eq2->Gender = emu->Gender[r];
eq2->face = emu->face[r]; eq2->Face = emu->Face[r];
int k; int k;
for (k = 0; k < _MaterialCount; k++) { for (k = 0; k < _MaterialCount; k++) {
eq2->equip[k].material = emu->equip[r][k].material; eq2->Equip[k].Material = emu->Equip[r][k].Material;
eq2->equip[k].unknown1 = emu->equip[r][k].unknown1; eq2->Equip[k].Unknown1 = emu->Equip[r][k].Unknown1;
eq2->equip[k].elitematerial = emu->equip[r][k].elitematerial; eq2->Equip[k].EliteMaterial = emu->Equip[r][k].EliteMaterial;
eq2->equip[k].heroforgemodel = emu->equip[r][k].heroforgemodel; eq2->Equip[k].HeroForgeModel = emu->Equip[r][k].HeroForgeModel;
eq2->equip[k].material2 = emu->equip[r][k].material2; eq2->Equip[k].Material2 = emu->Equip[r][k].Material2;
eq2->equip[k].color.color = emu->equip[r][k].color.color; eq2->Equip[k].Color.Color = emu->Equip[r][k].Color.Color;
} }
eq2->u15 = 0xff; eq2->Unknown15 = 0xFF;
eq2->u19 = 0xFF; eq2->Unknown19 = 0xFF;
eq2->drakkin_tattoo = emu->drakkin_tattoo[r]; eq2->DrakkinTattoo = emu->DrakkinTattoo[r];
eq2->drakkin_details = emu->drakkin_details[r]; eq2->DrakkinDetails = emu->DrakkinDetails[r];
eq2->deity = emu->deity[r]; eq2->Deity = emu->Deity[r];
eq2->primary = emu->primary[r]; eq2->Primary = emu->Primary[r];
eq2->secondary = emu->secondary[r]; eq2->Secondary = emu->Secondary[r];
eq2->haircolor = emu->haircolor[r]; eq2->HairColor = emu->HairColor[r];
eq2->beardcolor = emu->beardcolor[r]; eq2->BeardColor = emu->BeardColor[r];
eq2->eyecolor1 = emu->eyecolor1[r]; eq2->EyeColor1 = emu->EyeColor1[r];
eq2->eyecolor2 = emu->eyecolor2[r]; eq2->EyeColor2 = emu->EyeColor2[r];
eq2->hairstyle = emu->hairstyle[r]; eq2->HairStyle = emu->HairStyle[r];
eq2->beard = emu->beard[r]; eq2->Beard = emu->Beard[r];
eq2->char_enabled = 1; eq2->CharEnabled = 1;
eq2->tutorial = emu->tutorial[r]; eq2->Tutorial = emu->Tutorial[r];
eq2->drakkin_heritage = emu->drakkin_heritage[r]; eq2->DrakkinHeritage = emu->DrakkinHeritage[r];
eq2->unknown1 = 0; eq2->Unknown1 = 0;
eq2->gohome = emu->gohome[r]; eq2->GoHome = emu->GoHome[r];
eq2->LastLogin = 1212696584; eq2->LastLogin = 1212696584;
eq2->unknown2 = 0; eq2->Unknown2 = 0;
} }
bufptr += sizeof(structs::CharacterSelectEntry_Struct); bufptr += sizeof(structs::CharacterSelectEntry_Struct);
} }
@ -3763,7 +3763,7 @@ namespace RoF2
OUT(elite_material); OUT(elite_material);
OUT(hero_forge_model); OUT(hero_forge_model);
OUT(unknown18); OUT(unknown18);
OUT(color.color); OUT(color.Color);
OUT(wear_slot_id); OUT(wear_slot_id);
FINISH_ENCODE(); FINISH_ENCODE();
@ -4078,18 +4078,18 @@ namespace RoF2
for (k = 0; k < 9; ++k) 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; structs::EquipStruct *Equipment = (structs::EquipStruct *)Buffer;
for (k = 0; k < 9; k++) { for (k = 0; k < 9; k++) {
Equipment[k].material = emu->equipment[k].material; Equipment[k].Material = emu->equipment[k].Material;
Equipment[k].unknown1 = emu->equipment[k].unknown1; Equipment[k].Unknown1 = emu->equipment[k].Unknown1;
Equipment[k].elitematerial = emu->equipment[k].elitematerial; Equipment[k].EliteMaterial = emu->equipment[k].EliteMaterial;
Equipment[k].heroforgemodel = emu->equipment[k].heroforgemodel; Equipment[k].HeroForgeModel = emu->equipment[k].HeroForgeModel;
Equipment[k].material2 = emu->equipment[k].material2; Equipment[k].Material2 = emu->equipment[k].Material2;
} }
Buffer += (sizeof(structs::EquipStruct) * 9); 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, 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, 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); VARSTRUCT_ENCODE_TYPE(uint32, Buffer, 0);
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, 0); VARSTRUCT_ENCODE_TYPE(uint32, Buffer, 0);

View File

@ -142,84 +142,87 @@ struct AdventureInfo {
*/ */
struct Color_Struct struct Color_Struct
{ {
union union {
{ struct {
struct uint8 Blue;
{ uint8 Green;
uint8 blue; uint8 Red;
uint8 green; uint8 UseTint; // if there's a tint this is FF
uint8 red; } RGB;
uint8 use_tint; // if there's a tint this is FF uint32 Color;
} rgb;
uint32 color;
}; };
}; };
/* struct CharSelectEquip
* Visible equiptment. {
* Size: 20 Octets uint32 Material;
*/ uint32 Unknown1;
struct EquipStruct { uint32 EliteMaterial;
/*00*/ uint32 material; uint32 HeroForgeModel;
/*04*/ uint32 unknown1; uint32 Material2;
/*08*/ uint32 elitematerial; Color_Struct Color;
/*12*/ uint32 heroforgemodel;
/*16*/ uint32 material2; // Same as material?
/*20*/
}; };
struct CharSelectEquip { struct CharacterSelectEntry_Struct
uint32 material; {
uint32 unknown1; /*0000*/ char Name[1]; // Name null terminated
uint32 elitematerial; /*0000*/ uint8 Class_;
uint32 heroforgemodel; /*0000*/ uint32 Race;
uint32 material2; /*0000*/ uint8 Level;
Color_Struct color; /*0000*/ uint8 Class_2;
}; /*0000*/ uint32 Race2;
/*0000*/ uint16 Zone;
struct CharacterSelectEntry_Struct { /*0000*/ uint16 Instance;
/*0000*/ char name[1]; // Name null terminated /*0000*/ uint8 Gender;
/*0000*/ uint8 class_; /*0000*/ uint8 Face;
/*0000*/ uint32 race; /*0000*/ CharSelectEquip Equip[9];
/*0000*/ uint8 level; /*0000*/ uint8 Unknown15; // Seen FF
/*0000*/ uint8 class_2; /*0000*/ uint8 Unknown19; // Seen FF
/*0000*/ uint32 race2; /*0000*/ uint32 DrakkinTattoo;
/*0000*/ uint16 zone; /*0000*/ uint32 DrakkinDetails;
/*0000*/ uint16 instance; /*0000*/ uint32 Deity;
/*0000*/ uint8 gender; /*0000*/ uint32 Primary;
/*0000*/ uint8 face; /*0000*/ uint32 Secondary;
/*0000*/ CharSelectEquip equip[9]; /*0000*/ uint8 HairColor;
/*0000*/ uint8 u15; // Seen FF /*0000*/ uint8 BeardColor;
/*0000*/ uint8 u19; // Seen FF /*0000*/ uint8 EyeColor1;
/*0000*/ uint32 drakkin_tattoo; /*0000*/ uint8 EyeColor2;
/*0000*/ uint32 drakkin_details; /*0000*/ uint8 HairStyle;
/*0000*/ uint32 deity; /*0000*/ uint8 Beard;
/*0000*/ uint32 primary; /*0000*/ uint8 CharEnabled;
/*0000*/ uint32 secondary; /*0000*/ uint8 Tutorial; // Seen 1 for new char or 0 for existing
/*0000*/ uint8 haircolor; /*0000*/ uint32 DrakkinHeritage;
/*0000*/ uint8 beardcolor; /*0000*/ uint8 Unknown1; // Seen 0
/*0000*/ uint8 eyecolor1; /*0000*/ uint8 GoHome; // Seen 0 for new char and 1 for existing
/*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
/*0000*/ uint32 LastLogin; /*0000*/ uint32 LastLogin;
/*0000*/ uint8 unknown2; // Seen 0 /*0000*/ uint8 Unknown2; // Seen 0
}; };
/* /*
** Character Selection Struct ** Character Selection Struct
** **
*/ */
struct CharacterSelect_Struct { struct CharacterSelect_Struct
/*000*/ uint32 char_count; //number of chars in this packet {
/*004*/ CharacterSelectEntry_Struct entries[0]; /*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 struct Membership_Entry_Struct
{ {
/*000*/ uint32 purchase_id; // Seen 1, then increments 90287 to 90300 /*000*/ uint32 purchase_id; // Seen 1, then increments 90287 to 90300

View File

@ -142,71 +142,87 @@ struct AdventureInfo {
*/ */
struct Color_Struct struct Color_Struct
{ {
union union {
{ struct {
struct uint8 Blue;
{ uint8 Green;
uint8 blue; uint8 Red;
uint8 green; uint8 UseTint; // if there's a tint this is FF
uint8 red; } RGB;
uint8 use_tint; // if there's a tint this is FF uint32 Color;
} rgb;
uint32 color;
}; };
}; };
struct CharSelectEquip { struct CharSelectEquip
uint32 material; {
uint32 unknown1; uint32 Material;
uint32 elitematerial; uint32 Unknown1;
uint32 heroforgemodel; uint32 EliteMaterial;
uint32 material2; uint32 HeroForgeModel;
Color_Struct color; uint32 Material2;
Color_Struct Color;
}; };
struct CharacterSelectEntry_Struct { struct CharacterSelectEntry_Struct
/*0000*/ char name[1]; // Name null terminated {
/*0000*/ uint8 class_; /*0000*/ char Name[1]; // Name null terminated
/*0000*/ uint32 race; /*0000*/ uint8 Class_;
/*0000*/ uint8 level; /*0000*/ uint32 Race;
/*0000*/ uint8 class_2; /*0000*/ uint8 Level;
/*0000*/ uint32 race2; /*0000*/ uint8 Class_2;
/*0000*/ uint16 zone; /*0000*/ uint32 Race2;
/*0000*/ uint16 instance; /*0000*/ uint16 Zone;
/*0000*/ uint8 gender; /*0000*/ uint16 Instance;
/*0000*/ uint8 face; /*0000*/ uint8 Gender;
/*0000*/ CharSelectEquip equip[9]; /*0000*/ uint8 Face;
/*0000*/ uint8 u15; // Seen FF /*0000*/ CharSelectEquip Equip[9];
/*0000*/ uint8 u19; // Seen FF /*0000*/ uint8 Unknown15; // Seen FF
/*0000*/ uint32 drakkin_tattoo; /*0000*/ uint8 Uknown19; // Seen FF
/*0000*/ uint32 drakkin_details; /*0000*/ uint32 DrakkinTattoo;
/*0000*/ uint32 deity; /*0000*/ uint32 DrakkinDetails;
/*0000*/ uint32 primary; /*0000*/ uint32 Deity;
/*0000*/ uint32 secondary; /*0000*/ uint32 Primary;
/*0000*/ uint8 haircolor; /*0000*/ uint32 Secondary;
/*0000*/ uint8 beardcolor; /*0000*/ uint8 HairColor;
/*0000*/ uint8 eyecolor1; /*0000*/ uint8 BeardColor;
/*0000*/ uint8 eyecolor2; /*0000*/ uint8 EyeColor1;
/*0000*/ uint8 hairstyle; /*0000*/ uint8 EyeColor2;
/*0000*/ uint8 beard; /*0000*/ uint8 HairStyle;
/*0000*/ uint8 char_enabled; /*0000*/ uint8 Beard;
/*0000*/ uint8 tutorial; // Seen 1 for new char or 0 for existing /*0000*/ uint8 CharEnabled;
/*0000*/ uint32 drakkin_heritage; /*0000*/ uint8 Tutorial; // Seen 1 for new char or 0 for existing
/*0000*/ uint8 unknown1; // Seen 0 /*0000*/ uint32 DrakkinHeritage;
/*0000*/ uint8 gohome; // Seen 0 for new char and 1 for existing /*0000*/ uint8 Unknown1; // Seen 0
/*0000*/ uint8 GoHome; // Seen 0 for new char and 1 for existing
/*0000*/ uint32 LastLogin; /*0000*/ uint32 LastLogin;
/*0000*/ uint8 unknown2; // Seen 0 /*0000*/ uint8 Unknown2; // Seen 0
}; };
/* /*
** Character Selection Struct ** Character Selection Struct
** **
*/ */
struct CharacterSelect_Struct { struct CharacterSelect_Struct
/*000*/ uint32 char_count; //number of chars in this packet {
/*004*/ CharacterSelectEntry_Struct entries[0]; /*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 struct Membership_Entry_Struct
{ {
/*000*/ uint32 purchase_id; // Seen 1, then increments 90287 to 90300 /*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 ** Generic Spawn Struct
** Length: 897 Octets ** Length: 897 Octets

View File

@ -1542,13 +1542,13 @@ namespace SoD
OUT(beard); OUT(beard);
// OUT(unknown00178[10]); // OUT(unknown00178[10]);
for (r = 0; r < 9; r++) { for (r = 0; r < 9; r++) {
eq->equipment[r].material = emu->item_material[r]; eq->equipment[r].Material = emu->item_material[r];
eq->equipment[r].unknown1 = 0; eq->equipment[r].Unknown1 = 0;
eq->equipment[r].elitematerial = 0; eq->equipment[r].EliteMaterial = 0;
//eq->colors[r].color = emu->colors[r].color; //eq->colors[r].color = emu->colors[r].color;
} }
for (r = 0; r < 7; r++) { for (r = 0; r < 7; r++) {
OUT(item_tint[r].color); OUT(item_tint[r].Color);
} }
// OUT(unknown00224[48]); // OUT(unknown00224[48]);
//NOTE: new client supports 300 AAs, our internal rep/PP //NOTE: new client supports 300 AAs, our internal rep/PP
@ -1920,11 +1920,11 @@ namespace SoD
int char_count; int char_count;
int namelen = 0; int namelen = 0;
for (char_count = 0; char_count < 10; char_count++) { for (char_count = 0; char_count < 10; char_count++) {
if (emu->name[char_count][0] == '\0') if (emu->Name[char_count][0] == '\0')
break; break;
if (strcmp(emu->name[char_count], "<none>") == 0) if (strcmp(emu->Name[char_count], "<none>") == 0)
break; break;
namelen += strlen(emu->name[char_count]); namelen += strlen(emu->Name[char_count]);
} }
int total_length = sizeof(structs::CharacterSelect_Struct) int total_length = sizeof(structs::CharacterSelect_Struct)
@ -1936,49 +1936,49 @@ namespace SoD
//unsigned char *eq_buffer = new unsigned char[total_length]; //unsigned char *eq_buffer = new unsigned char[total_length];
//structs::CharacterSelect_Struct *eq_head = (structs::CharacterSelect_Struct *) eq_buffer; //structs::CharacterSelect_Struct *eq_head = (structs::CharacterSelect_Struct *) eq_buffer;
eq->char_count = char_count; eq->CharCount = char_count;
eq->total_chars = 10; eq->TotalChars = 10;
unsigned char *bufptr = (unsigned char *)eq->entries; unsigned char *bufptr = (unsigned char *)eq->Entries;
int r; int r;
for (r = 0; r < char_count; r++) { for (r = 0; r < char_count; r++) {
{ //pre-name section... { //pre-name section...
structs::CharacterSelectEntry_Struct *eq2 = (structs::CharacterSelectEntry_Struct *) bufptr; structs::CharacterSelectEntry_Struct *eq2 = (structs::CharacterSelectEntry_Struct *) bufptr;
eq2->level = emu->level[r]; eq2->Level = emu->Level[r];
eq2->hairstyle = emu->hairstyle[r]; eq2->HairStyle = emu->HairStyle[r];
eq2->gender = emu->gender[r]; eq2->Gender = emu->Gender[r];
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. //adjust for name.
bufptr += strlen(emu->name[r]); bufptr += strlen(emu->Name[r]);
{ //post-name section... { //post-name section...
structs::CharacterSelectEntry_Struct *eq2 = (structs::CharacterSelectEntry_Struct *) bufptr; structs::CharacterSelectEntry_Struct *eq2 = (structs::CharacterSelectEntry_Struct *) bufptr;
eq2->beard = emu->beard[r]; eq2->Beard = emu->Beard[r];
eq2->haircolor = emu->haircolor[r]; eq2->HairColor = emu->HairColor[r];
eq2->face = emu->face[r]; eq2->Face = emu->Face[r];
int k; int k;
for (k = 0; k < _MaterialCount; k++) { for (k = 0; k < _MaterialCount; k++) {
eq2->equip[k].material = emu->equip[r][k].material; eq2->Equip[k].Material = emu->Equip[r][k].Material;
eq2->equip[k].unknown1 = emu->equip[r][k].unknown1; eq2->Equip[k].Unknown1 = emu->Equip[r][k].Unknown1;
eq2->equip[k].elitematerial = emu->equip[r][k].elitematerial; eq2->Equip[k].EliteMaterial = emu->Equip[r][k].EliteMaterial;
eq2->equip[k].color.color = emu->equip[r][k].color.color; eq2->Equip[k].Color.Color = emu->Equip[r][k].Color.Color;
} }
eq2->primary = emu->primary[r]; eq2->Primary = emu->Primary[r];
eq2->secondary = emu->secondary[r]; eq2->Secondary = emu->Secondary[r];
eq2->tutorial = emu->tutorial[r]; // was u15 eq2->Tutorial = emu->Tutorial[r]; // was u15
eq2->u15 = 0xff; eq2->Unknown15 = 0xFF;
eq2->deity = emu->deity[r]; eq2->Deity = emu->Deity[r];
eq2->zone = emu->zone[r]; eq2->Zone = emu->Zone[r];
eq2->u19 = 0xFF; eq2->Unknown19 = 0xFF;
eq2->race = emu->race[r]; eq2->Race = emu->Race[r];
eq2->gohome = emu->gohome[r]; eq2->GoHome = emu->GoHome[r];
eq2->class_ = emu->class_[r]; eq2->Class_ = emu->Class_[r];
eq2->eyecolor1 = emu->eyecolor1[r]; eq2->EyeColor1 = emu->EyeColor1[r];
eq2->beardcolor = emu->beardcolor[r]; eq2->BeardColor = emu->BeardColor[r];
eq2->eyecolor2 = emu->eyecolor2[r]; eq2->EyeColor2 = emu->EyeColor2[r];
eq2->drakkin_heritage = emu->drakkin_heritage[r]; eq2->DrakkinHeritage = emu->DrakkinHeritage[r];
eq2->drakkin_tattoo = emu->drakkin_tattoo[r]; eq2->DrakkinTattoo = emu->DrakkinTattoo[r];
eq2->drakkin_details = emu->drakkin_details[r]; eq2->DrakkinDetails = emu->DrakkinDetails[r];
} }
bufptr += sizeof(structs::CharacterSelectEntry_Struct); bufptr += sizeof(structs::CharacterSelectEntry_Struct);
} }
@ -2375,7 +2375,7 @@ namespace SoD
OUT(material); OUT(material);
OUT(unknown06); OUT(unknown06);
OUT(elite_material); OUT(elite_material);
OUT(color.color); OUT(color.Color);
OUT(wear_slot_id); OUT(wear_slot_id);
FINISH_ENCODE(); FINISH_ENCODE();
@ -2743,7 +2743,7 @@ namespace SoD
for (k = 0; k < 9; ++k) 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, 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); VARSTRUCT_ENCODE_TYPE(uint32, Buffer, 0);
} }
@ -2768,9 +2768,9 @@ namespace SoD
structs::EquipStruct *Equipment = (structs::EquipStruct *)Buffer; structs::EquipStruct *Equipment = (structs::EquipStruct *)Buffer;
for (k = 0; k < 9; k++) { for (k = 0; k < 9; k++) {
Equipment[k].material = emu->equipment[k].material; Equipment[k].Material = emu->equipment[k].Material;
Equipment[k].unknown1 = emu->equipment[k].unknown1; Equipment[k].Unknown1 = emu->equipment[k].Unknown1;
Equipment[k].elitematerial = emu->equipment[k].elitematerial; Equipment[k].EliteMaterial = emu->equipment[k].EliteMaterial;
} }
Buffer += (sizeof(structs::EquipStruct) * 9); Buffer += (sizeof(structs::EquipStruct) * 9);
@ -3485,7 +3485,7 @@ namespace SoD
IN(material); IN(material);
IN(unknown06); IN(unknown06);
IN(elite_material); IN(elite_material);
IN(color.color); IN(color.Color);
IN(wear_slot_id); IN(wear_slot_id);
emu->hero_forge_model = 0; emu->hero_forge_model = 0;
emu->unknown18 = 0; emu->unknown18 = 0;

View File

@ -103,54 +103,53 @@ struct AdventureInfo {
*/ */
struct Color_Struct struct Color_Struct
{ {
union union {
{ struct {
struct uint8 Blue;
{ uint8 Green;
uint8 blue; uint8 Red;
uint8 green; uint8 UseTint; // if there's a tint this is FF
uint8 red; } RGB;
uint8 use_tint; // if there's a tint this is FF uint32 Color;
} rgb;
uint32 color;
}; };
}; };
struct CharSelectEquip { struct CharSelectEquip
//totally guessed; {
uint32 material; uint32 Material;
uint32 unknown1; uint32 Unknown1;
uint32 elitematerial; uint32 EliteMaterial;
Color_Struct color; Color_Struct Color;
}; };
struct CharacterSelectEntry_Struct { struct CharacterSelectEntry_Struct
/*0000*/ uint8 level; // {
/*0000*/ uint8 hairstyle; // /*0000*/ uint8 Level; //
/*0002*/ uint8 gender; // /*0000*/ uint8 HairStyle; //
/*0003*/ char name[1]; //variable length, edi+0 /*0002*/ uint8 Gender; //
/*0000*/ uint8 beard; // /*0003*/ char Name[1]; // variable length, edi+0
/*0001*/ uint8 haircolor; // /*0000*/ uint8 Beard; //
/*0000*/ uint8 face; // /*0001*/ uint8 HairColor; //
/*0000*/ CharSelectEquip equip[9]; /*0000*/ uint8 Face; //
/*0000*/ uint32 primary; // /*0000*/ CharSelectEquip Equip[9];
/*0000*/ uint32 secondary; // /*0000*/ uint32 Primary; //
/*0000*/ uint8 u15; // 0xff /*0000*/ uint32 Secondary; //
/*0000*/ uint32 deity; // /*0000*/ uint8 Unknown15; // 0xff
/*0000*/ uint16 zone; // /*0000*/ uint32 Deity; //
/*0000*/ uint16 instance; /*0000*/ uint16 Zone; //
/*0000*/ uint8 gohome; // /*0000*/ uint16 Instance;
/*0000*/ uint8 u19; // 0xff /*0000*/ uint8 GoHome; //
/*0000*/ uint32 race; // /*0000*/ uint8 Unknown19; // 0xff
/*0000*/ uint8 tutorial; // /*0000*/ uint32 Race; //
/*0000*/ uint8 class_; // /*0000*/ uint8 Tutorial; //
/*0000*/ uint8 eyecolor1; // /*0000*/ uint8 Class_; //
/*0000*/ uint8 beardcolor; // /*0000*/ uint8 EyeColor1; //
/*0000*/ uint8 eyecolor2; // /*0000*/ uint8 BeardColor; //
/*0000*/ uint32 drakkin_heritage; // Drakkin Heritage /*0000*/ uint8 EyeColor2; //
/*0000*/ uint32 drakkin_tattoo; // Drakkin Tattoo /*0000*/ uint32 DrakkinHeritage; // Drakkin Heritage
/*0000*/ uint32 drakkin_details; // Drakkin Details (Facial Spikes) /*0000*/ uint32 DrakkinTattoo; // Drakkin Tattoo
/*0000*/ uint8 unknown; // New field to SoD /*0000*/ uint32 DrakkinDetails; // Drakkin Details (Facial Spikes)
/*0000*/ uint8 Unknown; // New field to SoD
}; };
@ -158,20 +157,22 @@ struct CharacterSelectEntry_Struct {
** Character Selection Struct ** Character Selection Struct
** **
*/ */
struct CharacterSelect_Struct { struct CharacterSelect_Struct
/*0000*/ uint32 char_count; //number of chars in this packet {
/*0004*/ uint32 total_chars; //total number of chars allowed? /*0000*/ uint32 CharCount; //number of chars in this packet
/*0008*/ CharacterSelectEntry_Struct entries[0]; /*0004*/ uint32 TotalChars; //total number of chars allowed?
/*0008*/ CharacterSelectEntry_Struct Entries[0];
}; };
/* /*
* Visible equiptment. * Visible equiptment.
* Size: 12 Octets * Size: 12 Octets
*/ */
struct EquipStruct { struct EquipStruct
/*00*/ uint32 material; {
/*04*/ uint32 unknown1; /*00*/ uint32 Material;
/*08*/ uint32 elitematerial; /*04*/ uint32 Unknown1;
/*08*/ uint32 EliteMaterial;
/*12*/ /*12*/
}; };

View File

@ -1200,13 +1200,13 @@ namespace SoF
OUT(beard); OUT(beard);
// OUT(unknown00178[10]); // OUT(unknown00178[10]);
for (r = 0; r < 9; r++) { for (r = 0; r < 9; r++) {
eq->equipment[r].material = emu->item_material[r]; eq->equipment[r].Material = emu->item_material[r];
eq->equipment[r].unknown1 = 0; eq->equipment[r].Unknown1 = 0;
eq->equipment[r].elitematerial = 0; eq->equipment[r].EliteMaterial = 0;
//eq->colors[r].color = emu->colors[r].color; //eq->colors[r].color = emu->colors[r].color;
} }
for (r = 0; r < 7; r++) { for (r = 0; r < 7; r++) {
OUT(item_tint[r].color); OUT(item_tint[r].Color);
} }
// OUT(unknown00224[48]); // OUT(unknown00224[48]);
//NOTE: new client supports 300 AAs, our internal rep/PP //NOTE: new client supports 300 AAs, our internal rep/PP
@ -1579,11 +1579,11 @@ namespace SoF
int char_count; int char_count;
int namelen = 0; int namelen = 0;
for (char_count = 0; char_count < 10; char_count++) { for (char_count = 0; char_count < 10; char_count++) {
if (emu->name[char_count][0] == '\0') if (emu->Name[char_count][0] == '\0')
break; break;
if (strcmp(emu->name[char_count], "<none>") == 0) if (strcmp(emu->Name[char_count], "<none>") == 0)
break; break;
namelen += strlen(emu->name[char_count]); namelen += strlen(emu->Name[char_count]);
} }
int total_length = sizeof(structs::CharacterSelect_Struct) int total_length = sizeof(structs::CharacterSelect_Struct)
@ -1595,49 +1595,49 @@ namespace SoF
//unsigned char *eq_buffer = new unsigned char[total_length]; //unsigned char *eq_buffer = new unsigned char[total_length];
//structs::CharacterSelect_Struct *eq_head = (structs::CharacterSelect_Struct *) eq_buffer; //structs::CharacterSelect_Struct *eq_head = (structs::CharacterSelect_Struct *) eq_buffer;
eq->char_count = char_count; eq->CharCount = char_count;
eq->total_chars = 10; eq->TotalChars = 10;
unsigned char *bufptr = (unsigned char *)eq->entries; unsigned char *bufptr = (unsigned char *)eq->Entries;
int r; int r;
for (r = 0; r < char_count; r++) { for (r = 0; r < char_count; r++) {
{ //pre-name section... { //pre-name section...
structs::CharacterSelectEntry_Struct *eq2 = (structs::CharacterSelectEntry_Struct *) bufptr; structs::CharacterSelectEntry_Struct *eq2 = (structs::CharacterSelectEntry_Struct *) bufptr;
eq2->level = emu->level[r]; eq2->Level = emu->Level[r];
eq2->hairstyle = emu->hairstyle[r]; eq2->HairStyle = emu->HairStyle[r];
eq2->gender = emu->gender[r]; eq2->Gender = emu->Gender[r];
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. //adjust for name.
bufptr += strlen(emu->name[r]); bufptr += strlen(emu->Name[r]);
{ //post-name section... { //post-name section...
structs::CharacterSelectEntry_Struct *eq2 = (structs::CharacterSelectEntry_Struct *) bufptr; structs::CharacterSelectEntry_Struct *eq2 = (structs::CharacterSelectEntry_Struct *) bufptr;
eq2->beard = emu->beard[r]; eq2->Beard = emu->Beard[r];
eq2->haircolor = emu->haircolor[r]; eq2->HairColor = emu->HairColor[r];
eq2->face = emu->face[r]; eq2->Face = emu->Face[r];
int k; int k;
for (k = 0; k < _MaterialCount; k++) { for (k = 0; k < _MaterialCount; k++) {
eq2->equip[k].material = emu->equip[r][k].material; eq2->Equip[k].Material = emu->Equip[r][k].Material;
eq2->equip[k].unknown1 = emu->equip[r][k].unknown1; eq2->Equip[k].Unknown1 = emu->Equip[r][k].Unknown1;
eq2->equip[k].elitematerial = emu->equip[r][k].elitematerial; eq2->Equip[k].EliteMaterial = emu->Equip[r][k].EliteMaterial;
eq2->equip[k].color.color = emu->equip[r][k].color.color; eq2->Equip[k].Color.Color = emu->Equip[r][k].Color.Color;
} }
eq2->primary = emu->primary[r]; eq2->Primary = emu->Primary[r];
eq2->secondary = emu->secondary[r]; eq2->Secondary = emu->Secondary[r];
eq2->tutorial = emu->tutorial[r]; // was u15 eq2->Tutorial = emu->Tutorial[r]; // was u15
eq2->u15 = 0xff; eq2->Unknown15 = 0xff;
eq2->deity = emu->deity[r]; eq2->Deity = emu->Deity[r];
eq2->zone = emu->zone[r]; eq2->Zone = emu->Zone[r];
eq2->u19 = 0xFF; eq2->Unknown19 = 0xFF;
eq2->race = emu->race[r]; eq2->Race = emu->Race[r];
eq2->gohome = emu->gohome[r]; eq2->GoHome = emu->GoHome[r];
eq2->class_ = emu->class_[r]; eq2->Class_ = emu->Class_[r];
eq2->eyecolor1 = emu->eyecolor1[r]; eq2->EyeColor1 = emu->EyeColor1[r];
eq2->beardcolor = emu->beardcolor[r]; eq2->BeardColor = emu->BeardColor[r];
eq2->eyecolor2 = emu->eyecolor2[r]; eq2->EyeColor2 = emu->EyeColor2[r];
eq2->drakkin_heritage = emu->drakkin_heritage[r]; eq2->DrakkinHeritage = emu->DrakkinHeritage[r];
eq2->drakkin_tattoo = emu->drakkin_tattoo[r]; eq2->DrakkinTattoo = emu->DrakkinTattoo[r];
eq2->drakkin_details = emu->drakkin_details[r]; eq2->DrakkinDetails = emu->DrakkinDetails[r];
} }
bufptr += sizeof(structs::CharacterSelectEntry_Struct); bufptr += sizeof(structs::CharacterSelectEntry_Struct);
} }
@ -1961,7 +1961,7 @@ namespace SoF
OUT(material); OUT(material);
OUT(unknown06); OUT(unknown06);
OUT(elite_material); OUT(elite_material);
OUT(color.color); OUT(color.Color);
OUT(wear_slot_id); OUT(wear_slot_id);
FINISH_ENCODE(); FINISH_ENCODE();
@ -2045,10 +2045,10 @@ namespace SoF
eq->drakkin_heritage = emu->drakkin_heritage; eq->drakkin_heritage = emu->drakkin_heritage;
eq->gender = emu->gender; eq->gender = emu->gender;
for (k = 0; k < 9; k++) { for (k = 0; k < 9; k++) {
eq->equipment[k].material = emu->equipment[k].material; eq->equipment[k].Material = emu->equipment[k].Material;
eq->equipment[k].unknown1 = emu->equipment[k].unknown1; eq->equipment[k].Unknown1 = emu->equipment[k].Unknown1;
eq->equipment[k].elitematerial = emu->equipment[k].elitematerial; eq->equipment[k].EliteMaterial = emu->equipment[k].EliteMaterial;
eq->colors[k].color = emu->colors[k].color; eq->colors[k].Color = emu->colors[k].Color;
} }
eq->StandState = emu->StandState; eq->StandState = emu->StandState;
eq->guildID = emu->guildID; eq->guildID = emu->guildID;
@ -2110,7 +2110,7 @@ namespace SoF
eq->petOwnerId = emu->petOwnerId; eq->petOwnerId = emu->petOwnerId;
eq->pvp = 0; // 0 = non-pvp colored name, 1 = red pvp name eq->pvp = 0; // 0 = non-pvp colored name, 1 = red pvp name
for (k = 0; k < 9; k++) { 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->anon = emu->anon;
eq->face = emu->face; eq->face = emu->face;
@ -2809,7 +2809,7 @@ namespace SoF
IN(material); IN(material);
IN(unknown06); IN(unknown06);
IN(elite_material); IN(elite_material);
IN(color.color); IN(color.Color);
IN(wear_slot_id); IN(wear_slot_id);
emu->hero_forge_model = 0; emu->hero_forge_model = 0;
emu->unknown18 = 0; emu->unknown18 = 0;

View File

@ -103,72 +103,74 @@ struct AdventureInfo {
*/ */
struct Color_Struct struct Color_Struct
{ {
union union {
{ struct {
struct uint8 Blue;
{ uint8 Green;
uint8 blue; uint8 Red;
uint8 green; uint8 UseTint; // if there's a tint this is FF
uint8 red; } RGB;
uint8 use_tint; // if there's a tint this is FF uint32 Color;
} rgb;
uint32 color;
}; };
}; };
struct CharSelectEquip { struct CharSelectEquip
uint32 material; {
uint32 unknown1; uint32 Material;
uint32 elitematerial; uint32 Unknown1;
Color_Struct color; uint32 EliteMaterial;
Color_Struct Color;
}; };
struct CharacterSelectEntry_Struct { struct CharacterSelectEntry_Struct
/*0000*/ uint8 level; // {
/*0000*/ uint8 hairstyle; // /*0000*/ uint8 Level; //
/*0002*/ uint8 gender; // /*0000*/ uint8 HairStyle; //
/*0003*/ char name[1]; //variable length, edi+0 /*0002*/ uint8 Gender; //
/*0000*/ uint8 beard; // /*0003*/ char Name[1]; // variable length, edi+0
/*0001*/ uint8 haircolor; // /*0000*/ uint8 Beard; //
/*0000*/ uint8 face; // /*0001*/ uint8 HairColor; //
/*0000*/ CharSelectEquip equip[9]; /*0000*/ uint8 Face; //
/*0000*/ uint32 primary; // /*0000*/ CharSelectEquip Equip[9];
/*0000*/ uint32 secondary; // /*0000*/ uint32 Primary; //
/*0000*/ uint8 u15; // 0xff /*0000*/ uint32 Secondary; //
/*0000*/ uint32 deity; // /*0000*/ uint8 Unknown15; // 0xff
/*0000*/ uint16 zone; // /*0000*/ uint32 Deity; //
/*0000*/ uint16 instance; /*0000*/ uint16 Zone; //
/*0000*/ uint8 gohome; // /*0000*/ uint16 Instance;
/*0000*/ uint8 u19; // 0xff /*0000*/ uint8 GoHome; //
/*0000*/ uint32 race; // /*0000*/ uint8 Unknown19; // 0xff
/*0000*/ uint8 tutorial; // /*0000*/ uint32 Race; //
/*0000*/ uint8 class_; // /*0000*/ uint8 Tutorial; //
/*0000*/ uint8 eyecolor1; // /*0000*/ uint8 Class_; //
/*0000*/ uint8 beardcolor; // /*0000*/ uint8 EyeColor1; //
/*0000*/ uint8 eyecolor2; // /*0000*/ uint8 BeardColor; //
/*0000*/ uint32 drakkin_heritage; // Drakkin Heritage /*0000*/ uint8 EyeColor2; //
/*0000*/ uint32 drakkin_tattoo; // Drakkin Tattoo /*0000*/ uint32 DrakkinHeritage; // Drakkin Heritage
/*0000*/ uint32 drakkin_details; // Drakkin Details (Facial Spikes) /*0000*/ uint32 DrakkinTattoo; // Drakkin Tattoo
/*0000*/ uint32 DrakkinDetails; // Drakkin Details (Facial Spikes)
}; };
/* /*
** Character Selection Struct ** Character Selection Struct
** **
*/ */
struct CharacterSelect_Struct { struct CharacterSelect_Struct
/*0000*/ uint32 char_count; //number of chars in this packet {
/*0004*/ uint32 total_chars; //total number of chars allowed? /*0000*/ uint32 CharCount; //number of chars in this packet
/*0008*/ CharacterSelectEntry_Struct entries[0]; /*0004*/ uint32 TotalChars; //total number of chars allowed?
/*0008*/ CharacterSelectEntry_Struct Entries[0];
}; };
/* /*
* Visible equiptment. * Visible equiptment.
* Size: 12 Octets * Size: 12 Octets
*/ */
struct EquipStruct { struct EquipStruct
/*00*/ uint32 material; {
/*04*/ uint32 unknown1; /*00*/ uint32 Material;
/*08*/ uint32 elitematerial; /*04*/ uint32 Unknown1;
/*08*/ uint32 EliteMaterial;
/*12*/ /*12*/
}; };

View File

@ -865,7 +865,7 @@ namespace Titanium
// OUT(unknown00178[10]); // OUT(unknown00178[10]);
for (r = 0; r < 9; r++) { for (r = 0; r < 9; r++) {
OUT(item_material[r]); OUT(item_material[r]);
OUT(item_tint[r].color); OUT(item_tint[r].Color);
} }
// OUT(unknown00224[48]); // OUT(unknown00224[48]);
for (r = 0; r < structs::MAX_PP_AA_ARRAY; r++) { for (r = 0; r < structs::MAX_PP_AA_ARRAY; r++) {
@ -1160,34 +1160,34 @@ namespace Titanium
int r; int r;
for (r = 0; r < 10; r++) { for (r = 0; r < 10; r++) {
OUT(zone[r]); OUT(Zone[r]);
OUT(eyecolor1[r]); OUT(EyeColor1[r]);
OUT(eyecolor2[r]); OUT(EyeColor2[r]);
OUT(hairstyle[r]); OUT(HairStyle[r]);
OUT(primary[r]); OUT(Primary[r]);
if (emu->race[r] > 473) if (emu->Race[r] > 473)
eq->race[r] = 1; eq->Race[r] = 1;
else else
eq->race[r] = emu->race[r]; eq->Race[r] = emu->Race[r];
OUT(class_[r]); OUT(Class_[r]);
OUT_str(name[r]); OUT_str(Name[r]);
OUT(gender[r]); OUT(Gender[r]);
OUT(level[r]); OUT(Level[r]);
OUT(secondary[r]); OUT(Secondary[r]);
OUT(face[r]); OUT(Face[r]);
OUT(beard[r]); OUT(Beard[r]);
int k; int k;
for (k = 0; k < 9; k++) { for (k = 0; k < 9; k++) {
eq->equip[r][k] = emu->equip[r][k].material; eq->Equip[r][k] = emu->Equip[r][k].Material;
eq->cs_colors[r][k].color = emu->equip[r][k].color.color; eq->CS_Colors[r][k].Color = emu->Equip[r][k].Color.Color;
} }
OUT(haircolor[r]); OUT(HairColor[r]);
OUT(gohome[r]); OUT(GoHome[r]);
OUT(tutorial[r]); OUT(Tutorial[r]);
OUT(deity[r]); OUT(Deity[r]);
OUT(beardcolor[r]); OUT(BeardColor[r]);
eq->unknown820[r] = 0xFF; eq->Unknown820[r] = 0xFF;
eq->unknown902[r] = 0xFF; eq->Unknown902[r] = 0xFF;
} }
FINISH_ENCODE(); FINISH_ENCODE();
@ -1405,7 +1405,7 @@ namespace Titanium
OUT(spawn_id); OUT(spawn_id);
OUT(material); OUT(material);
OUT(color.color); OUT(color.Color);
OUT(wear_slot_id); OUT(wear_slot_id);
FINISH_ENCODE(); FINISH_ENCODE();
@ -1497,8 +1497,8 @@ namespace Titanium
eq->guildrank = emu->guildrank; eq->guildrank = emu->guildrank;
// eq->unknown0194[3] = emu->unknown0194[3]; // eq->unknown0194[3] = emu->unknown0194[3];
for (k = 0; k < 9; k++) { for (k = 0; k < 9; k++) {
eq->equipment[k] = emu->equipment[k].material; eq->equipment[k] = emu->equipment[k].Material;
eq->colors[k].color = emu->colors[k].color; eq->colors[k].Color = emu->colors[k].Color;
} }
for (k = 0; k < 8; k++) { for (k = 0; k < 8; k++) {
eq->set_to_0xFF[k] = 0xFF; eq->set_to_0xFF[k] = 0xFF;
@ -1974,7 +1974,7 @@ namespace Titanium
IN(spawn_id); IN(spawn_id);
IN(material); IN(material);
IN(color.color); IN(color.Color);
IN(wear_slot_id); IN(wear_slot_id);
emu->unknown06 = 0; emu->unknown06 = 0;
emu->elite_material = 0; emu->elite_material = 0;

View File

@ -99,16 +99,14 @@ struct AdventureInfo {
*/ */
struct Color_Struct struct Color_Struct
{ {
union union {
{ struct {
struct uint8 Blue;
{ uint8 Green;
uint8 blue; uint8 Red;
uint8 green; uint8 UseTint; // if there's a tint this is FF
uint8 red; } RGB;
uint8 use_tint; // if there's a tint this is FF uint32 Color;
} rgb;
uint32 color;
}; };
}; };
@ -117,31 +115,32 @@ struct Color_Struct
** Length: 1704 Bytes ** Length: 1704 Bytes
** **
*/ */
struct CharacterSelect_Struct { struct CharacterSelect_Struct
/*0000*/ uint32 race[10]; // Characters Race {
/*0040*/ Color_Struct cs_colors[10][9]; // Characters Equipment Colors /*0000*/ uint32 Race[10]; // Characters Race
/*0400*/ uint8 beardcolor[10]; // Characters beard Color /*0040*/ Color_Struct CS_Colors[10][9]; // Characters Equipment Colors
/*0410*/ uint8 hairstyle[10]; // Characters hair style /*0400*/ uint8 BeardColor[10]; // Characters beard Color
/*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) /*0410*/ uint8 HairStyle[10]; // Characters hair style
/*0780*/ uint32 secondary[10]; // Characters secondary IDFile number /*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)
/*0820*/ uint8 unknown820[10]; // 10x ff /*0780*/ uint32 Secondary[10]; // Characters secondary IDFile number
/*0830*/ uint8 unknown830[2]; // 2x 00 /*0820*/ uint8 Unknown820[10]; // 10x ff
/*0832*/ uint32 deity[10]; // Characters Deity /*0830*/ uint8 Unknown830[2]; // 2x 00
/*0872*/ uint8 gohome[10]; // 1=Go Home available, 0=not /*0832*/ uint32 Deity[10]; // Characters Deity
/*0882*/ uint8 tutorial[10]; // 1=Tutorial available, 0=not /*0872*/ uint8 GoHome[10]; // 1=Go Home available, 0=not
/*0892*/ uint8 beard[10]; // Characters Beard Type /*0882*/ uint8 Tutorial[10]; // 1=Tutorial available, 0=not
/*0902*/ uint8 unknown902[10]; // 10x ff /*0892*/ uint8 Beard[10]; // Characters Beard Type
/*0912*/ uint32 primary[10]; // Characters primary IDFile number /*0902*/ uint8 Unknown902[10]; // 10x ff
/*0952*/ uint8 haircolor[10]; // Characters Hair Color /*0912*/ uint32 Primary[10]; // Characters primary IDFile number
/*0962*/ uint8 unknown0962[2]; // 2x 00 /*0952*/ uint8 HairColor[10]; // Characters Hair Color
/*0964*/ uint32 zone[10]; // Characters Current Zone /*0962*/ uint8 Unknown0962[2]; // 2x 00
/*1004*/ uint8 class_[10]; // Characters Classes /*0964*/ uint32 Zone[10]; // Characters Current Zone
/*1014*/ uint8 face[10]; // Characters Face Type /*1004*/ uint8 Class_[10]; // Characters Classes
/*1024*/ char name[10][64]; // Characters Names /*1014*/ uint8 Face[10]; // Characters Face Type
/*1664*/ uint8 gender[10]; // Characters Gender /*1024*/ char Name[10][64]; // Characters Names
/*1674*/ uint8 eyecolor1[10]; // Characters Eye Color /*1664*/ uint8 Gender[10]; // Characters Gender
/*1684*/ uint8 eyecolor2[10]; // Characters Eye 2 Color /*1674*/ uint8 EyeColor1[10]; // Characters Eye Color
/*1694*/ uint8 level[10]; // Characters Levels /*1684*/ uint8 EyeColor2[10]; // Characters Eye 2 Color
/*1694*/ uint8 Level[10]; // Characters Levels
/*1704*/ /*1704*/
}; };

View File

@ -1791,13 +1791,13 @@ namespace UF
OUT(beard); OUT(beard);
// OUT(unknown00178[10]); // OUT(unknown00178[10]);
for (r = 0; r < 9; r++) { for (r = 0; r < 9; r++) {
eq->equipment[r].material = emu->item_material[r]; eq->equipment[r].Material = emu->item_material[r];
eq->equipment[r].unknown1 = 0; eq->equipment[r].Unknown1 = 0;
eq->equipment[r].elitematerial = 0; eq->equipment[r].EliteMaterial = 0;
//eq->colors[r].color = emu->colors[r].color; //eq->colors[r].color = emu->colors[r].color;
} }
for (r = 0; r < 7; r++) { for (r = 0; r < 7; r++) {
OUT(item_tint[r].color); OUT(item_tint[r].Color);
} }
// OUT(unknown00224[48]); // OUT(unknown00224[48]);
//NOTE: new client supports 300 AAs, our internal rep/PP //NOTE: new client supports 300 AAs, our internal rep/PP
@ -2203,11 +2203,11 @@ namespace UF
int char_count; int char_count;
int namelen = 0; int namelen = 0;
for (char_count = 0; char_count < 10; char_count++) { for (char_count = 0; char_count < 10; char_count++) {
if (emu->name[char_count][0] == '\0') if (emu->Name[char_count][0] == '\0')
break; break;
if (strcmp(emu->name[char_count], "<none>") == 0) if (strcmp(emu->Name[char_count], "<none>") == 0)
break; break;
namelen += strlen(emu->name[char_count]); namelen += strlen(emu->Name[char_count]);
} }
int total_length = sizeof(structs::CharacterSelect_Struct) int total_length = sizeof(structs::CharacterSelect_Struct)
@ -2219,49 +2219,49 @@ namespace UF
//unsigned char *eq_buffer = new unsigned char[total_length]; //unsigned char *eq_buffer = new unsigned char[total_length];
//structs::CharacterSelect_Struct *eq_head = (structs::CharacterSelect_Struct *) eq_buffer; //structs::CharacterSelect_Struct *eq_head = (structs::CharacterSelect_Struct *) eq_buffer;
eq->char_count = char_count; eq->CharCount = char_count;
eq->total_chars = 10; eq->TotalChars = 10;
unsigned char *bufptr = (unsigned char *)eq->entries; unsigned char *bufptr = (unsigned char *)eq->Entries;
int r; int r;
for (r = 0; r < char_count; r++) { for (r = 0; r < char_count; r++) {
{ //pre-name section... { //pre-name section...
structs::CharacterSelectEntry_Struct *eq2 = (structs::CharacterSelectEntry_Struct *) bufptr; structs::CharacterSelectEntry_Struct *eq2 = (structs::CharacterSelectEntry_Struct *) bufptr;
eq2->level = emu->level[r]; eq2->Level = emu->Level[r];
eq2->hairstyle = emu->hairstyle[r]; eq2->HairStyle = emu->HairStyle[r];
eq2->gender = emu->gender[r]; eq2->Gender = emu->Gender[r];
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. //adjust for name.
bufptr += strlen(emu->name[r]); bufptr += strlen(emu->Name[r]);
{ //post-name section... { //post-name section...
structs::CharacterSelectEntry_Struct *eq2 = (structs::CharacterSelectEntry_Struct *) bufptr; structs::CharacterSelectEntry_Struct *eq2 = (structs::CharacterSelectEntry_Struct *) bufptr;
eq2->beard = emu->beard[r]; eq2->Beard = emu->Beard[r];
eq2->haircolor = emu->haircolor[r]; eq2->HairColor = emu->HairColor[r];
eq2->face = emu->face[r]; eq2->Face = emu->Face[r];
int k; int k;
for (k = 0; k < _MaterialCount; k++) { for (k = 0; k < _MaterialCount; k++) {
eq2->equip[k].material = emu->equip[r][k].material; eq2->Equip[k].Material = emu->Equip[r][k].Material;
eq2->equip[k].unknown1 = emu->equip[r][k].unknown1; eq2->Equip[k].Unknown1 = emu->Equip[r][k].Unknown1;
eq2->equip[k].elitematerial = emu->equip[r][k].elitematerial; eq2->Equip[k].EliteMaterial = emu->Equip[r][k].EliteMaterial;
eq2->equip[k].color.color = emu->equip[r][k].color.color; eq2->Equip[k].Color.Color = emu->Equip[r][k].Color.Color;
} }
eq2->primary = emu->primary[r]; eq2->Primary = emu->Primary[r];
eq2->secondary = emu->secondary[r]; eq2->Secondary = emu->Secondary[r];
eq2->tutorial = emu->tutorial[r]; // was u15 eq2->Tutorial = emu->Tutorial[r]; // was u15
eq2->u15 = 0xff; eq2->Unknown15 = 0xFF;
eq2->deity = emu->deity[r]; eq2->Deity = emu->Deity[r];
eq2->zone = emu->zone[r]; eq2->Zone = emu->Zone[r];
eq2->u19 = 0xFF; eq2->Unknown19 = 0xFF;
eq2->race = emu->race[r]; eq2->Race = emu->Race[r];
eq2->gohome = emu->gohome[r]; eq2->GoHome = emu->GoHome[r];
eq2->class_ = emu->class_[r]; eq2->Class_ = emu->Class_[r];
eq2->eyecolor1 = emu->eyecolor1[r]; eq2->EyeColor1 = emu->EyeColor1[r];
eq2->beardcolor = emu->beardcolor[r]; eq2->BeardColor = emu->BeardColor[r];
eq2->eyecolor2 = emu->eyecolor2[r]; eq2->EyeColor2 = emu->EyeColor2[r];
eq2->drakkin_heritage = emu->drakkin_heritage[r]; eq2->DrakkinHeritage = emu->DrakkinHeritage[r];
eq2->drakkin_tattoo = emu->drakkin_tattoo[r]; eq2->DrakkinTattoo = emu->DrakkinTattoo[r];
eq2->drakkin_details = emu->drakkin_details[r]; eq2->DrakkinDetails = emu->DrakkinDetails[r];
} }
bufptr += sizeof(structs::CharacterSelectEntry_Struct); bufptr += sizeof(structs::CharacterSelectEntry_Struct);
@ -2641,7 +2641,7 @@ namespace UF
OUT(material); OUT(material);
OUT(unknown06); OUT(unknown06);
OUT(elite_material); OUT(elite_material);
OUT(color.color); OUT(color.Color);
OUT(wear_slot_id); OUT(wear_slot_id);
FINISH_ENCODE(); FINISH_ENCODE();
@ -3003,7 +3003,7 @@ namespace UF
for (k = 0; k < 9; ++k) 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, 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); VARSTRUCT_ENCODE_TYPE(uint32, Buffer, 0);
} }
@ -3027,9 +3027,9 @@ namespace UF
structs::EquipStruct *Equipment = (structs::EquipStruct *)Buffer; structs::EquipStruct *Equipment = (structs::EquipStruct *)Buffer;
for (k = 0; k < 9; k++) { for (k = 0; k < 9; k++) {
Equipment[k].material = emu->equipment[k].material; Equipment[k].Material = emu->equipment[k].Material;
Equipment[k].unknown1 = emu->equipment[k].unknown1; Equipment[k].Unknown1 = emu->equipment[k].Unknown1;
Equipment[k].elitematerial = emu->equipment[k].elitematerial; Equipment[k].EliteMaterial = emu->equipment[k].EliteMaterial;
} }
Buffer += (sizeof(structs::EquipStruct) * 9); Buffer += (sizeof(structs::EquipStruct) * 9);
@ -3729,7 +3729,7 @@ namespace UF
IN(material); IN(material);
IN(unknown06); IN(unknown06);
IN(elite_material); IN(elite_material);
IN(color.color); IN(color.Color);
IN(wear_slot_id); IN(wear_slot_id);
emu->hero_forge_model = 0; emu->hero_forge_model = 0;
emu->unknown18 = 0; emu->unknown18 = 0;

View File

@ -103,53 +103,53 @@ struct AdventureInfo {
*/ */
struct Color_Struct struct Color_Struct
{ {
union union {
{ struct {
struct uint8 blue;
{ uint8 Green;
uint8 blue; uint8 Red;
uint8 green; uint8 UseTint; // if there's a tint this is FF
uint8 red; } RGB;
uint8 use_tint; // if there's a tint this is FF uint32 Color;
} rgb;
uint32 color;
}; };
}; };
struct CharSelectEquip { struct CharSelectEquip
uint32 material; {
uint32 unknown1; uint32 Material;
uint32 elitematerial; uint32 Unknown1;
Color_Struct color; uint32 EliteMaterial;
Color_Struct Color;
}; };
struct CharacterSelectEntry_Struct { struct CharacterSelectEntry_Struct
/*0000*/ uint8 level; // {
/*0000*/ uint8 hairstyle; // /*0000*/ uint8 Level; //
/*0002*/ uint8 gender; // /*0000*/ uint8 HairStyle; //
/*0003*/ char name[1]; //variable length, edi+0 /*0002*/ uint8 Gender; //
/*0000*/ uint8 beard; // /*0003*/ char Name[1]; // variable length, edi+0
/*0001*/ uint8 haircolor; // /*0000*/ uint8 Beard; //
/*0000*/ uint8 face; // /*0001*/ uint8 HairColor; //
/*0000*/ CharSelectEquip equip[9]; /*0000*/ uint8 Face; //
/*0000*/ uint32 primary; // /*0000*/ CharSelectEquip Equip[9];
/*0000*/ uint32 secondary; // /*0000*/ uint32 Primary; //
/*0000*/ uint8 u15; // 0xff /*0000*/ uint32 Secondary; //
/*0000*/ uint32 deity; // /*0000*/ uint8 Unknown15; // 0xff
/*0000*/ uint16 zone; // /*0000*/ uint32 Deity; //
/*0000*/ uint16 instance; /*0000*/ uint16 Zone; //
/*0000*/ uint8 gohome; // /*0000*/ uint16 Instance;
/*0000*/ uint8 u19; // 0xff /*0000*/ uint8 GoHome; //
/*0000*/ uint32 race; // /*0000*/ uint8 Unknown19; // 0xff
/*0000*/ uint8 tutorial; // /*0000*/ uint32 Race; //
/*0000*/ uint8 class_; // /*0000*/ uint8 Tutorial; //
/*0000*/ uint8 eyecolor1; // /*0000*/ uint8 Class_; //
/*0000*/ uint8 beardcolor; // /*0000*/ uint8 EyeColor1; //
/*0000*/ uint8 eyecolor2; // /*0000*/ uint8 BeardColor; //
/*0000*/ uint32 drakkin_heritage; // Drakkin Heritage /*0000*/ uint8 EyeColor2; //
/*0000*/ uint32 drakkin_tattoo; // Drakkin Tattoo /*0000*/ uint32 DrakkinHeritage; // Drakkin Heritage
/*0000*/ uint32 drakkin_details; // Drakkin Details (Facial Spikes) /*0000*/ uint32 DrakkinTattoo; // Drakkin Tattoo
/*0000*/ uint8 unknown; // New field to Underfoot /*0000*/ uint32 DrakkinDetails; // Drakkin Details (Facial Spikes)
/*0000*/ uint8 Unknown; // New field to Underfoot
}; };
@ -157,20 +157,22 @@ struct CharacterSelectEntry_Struct {
** Character Selection Struct ** Character Selection Struct
** **
*/ */
struct CharacterSelect_Struct { struct CharacterSelect_Struct
/*0000*/ uint32 char_count; //number of chars in this packet {
/*0004*/ uint32 total_chars; //total number of chars allowed? /*0000*/ uint32 CharCount; //number of chars in this packet
/*0008*/ CharacterSelectEntry_Struct entries[0]; /*0004*/ uint32 TotalChars; //total number of chars allowed?
/*0008*/ CharacterSelectEntry_Struct Entries[0];
}; };
/* /*
* Visible equiptment. * Visible equiptment.
* Size: 12 Octets * Size: 12 Octets
*/ */
struct EquipStruct { struct EquipStruct
/*00*/ uint32 material; {
/*04*/ uint32 unknown1; /*00*/ uint32 Material;
/*08*/ uint32 elitematerial; /*04*/ uint32 Unknown1;
/*08*/ uint32 EliteMaterial;
/*12*/ /*12*/
}; };

View File

@ -724,9 +724,9 @@ bool Client::HandleEnterWorldPacket(const EQApplicationPacket *app) {
for(int x = 0; x < 10; ++x) 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; home_enabled = true;
break; break;
@ -754,9 +754,9 @@ bool Client::HandleEnterWorldPacket(const EQApplicationPacket *app) {
for(int x = 0; x < 10; ++x) 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; tutorial_enabled = true;
break; break;

View File

@ -41,11 +41,11 @@ void WorldDatabase::GetCharSelectInfo(uint32 account_id, CharacterSelect_Struct*
/* Initialize Variables */ /* Initialize Variables */
for (int i=0; i<10; i++) { for (int i=0; i<10; i++) {
strcpy(cs->name[i], "<none>"); strcpy(cs->Name[i], "<none>");
cs->zone[i] = 0; cs->Zone[i] = 0;
cs->level[i] = 0; cs->Level[i] = 0;
cs->tutorial[i] = 0; cs->Tutorial[i] = 0;
cs->gohome[i] = 0; cs->GoHome[i] = 0;
} }
/* Get Character Info */ /* Get Character Info */
@ -80,32 +80,32 @@ void WorldDatabase::GetCharSelectInfo(uint32 account_id, CharacterSelect_Struct*
memset(&pp, 0, sizeof(PlayerProfile_Struct)); memset(&pp, 0, sizeof(PlayerProfile_Struct));
uint32 character_id = atoi(row[0]); 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]); uint8 lvl = atoi(row[5]);
cs->level[char_num] = lvl; cs->Level[char_num] = lvl;
cs->class_[char_num] = atoi(row[4]); cs->Class_[char_num] = atoi(row[4]);
cs->race[char_num] = atoi(row[3]); cs->Race[char_num] = atoi(row[3]);
cs->gender[char_num] = atoi(row[2]); cs->Gender[char_num] = atoi(row[2]);
cs->deity[char_num] = atoi(row[6]); cs->Deity[char_num] = atoi(row[6]);
cs->zone[char_num] = atoi(row[19]); cs->Zone[char_num] = atoi(row[19]);
cs->face[char_num] = atoi(row[15]); cs->Face[char_num] = atoi(row[15]);
cs->haircolor[char_num] = atoi(row[9]); cs->HairColor[char_num] = atoi(row[9]);
cs->beardcolor[char_num] = atoi(row[10]); cs->BeardColor[char_num] = atoi(row[10]);
cs->eyecolor2[char_num] = atoi(row[12]); cs->EyeColor2[char_num] = atoi(row[12]);
cs->eyecolor1[char_num] = atoi(row[11]); cs->EyeColor1[char_num] = atoi(row[11]);
cs->hairstyle[char_num] = atoi(row[13]); cs->HairStyle[char_num] = atoi(row[13]);
cs->beard[char_num] = atoi(row[14]); cs->Beard[char_num] = atoi(row[14]);
cs->drakkin_heritage[char_num] = atoi(row[16]); cs->DrakkinHeritage[char_num] = atoi(row[16]);
cs->drakkin_tattoo[char_num] = atoi(row[17]); cs->DrakkinTattoo[char_num] = atoi(row[17]);
cs->drakkin_details[char_num] = atoi(row[18]); cs->DrakkinDetails[char_num] = atoi(row[18]);
if (RuleB(World, EnableTutorialButton) && (lvl <= RuleI(World, MaxLevelForTutorial))) if (RuleB(World, EnableTutorialButton) && (lvl <= RuleI(World, MaxLevelForTutorial)))
cs->tutorial[char_num] = 1; cs->Tutorial[char_num] = 1;
if (RuleB(World, EnableReturnHomeButton)) { if (RuleB(World, EnableReturnHomeButton)) {
int now = time(nullptr); int now = time(nullptr);
if ((now - atoi(row[7])) >= RuleI(World, MinOfflineTimeToReturnHome)) 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 */ /* 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){ 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", 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); auto results_bind = database.QueryDatabase(cquery);
for (auto row_d = results_bind.begin(); row_d != results_bind.end(); ++row_d) { for (auto row_d = results_bind.begin(); row_d != results_bind.end(); ++row_d) {
/* If a bind_id is specified, make them start there */ /* 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) for (auto row_b = results_b.begin(); row_b != results_b.end(); ++row_b)
{ {
slot = atoi(row_b[0]); slot = atoi(row_b[0]);
pp.item_tint[slot].rgb.red = atoi(row_b[1]); 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.Green = atoi(row_b[2]);
pp.item_tint[slot].rgb.blue = atoi(row_b[3]); 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.UseTint = atoi(row_b[4]);
} }
/* Load Inventory */ /* Load Inventory */
// If we ensure that the material data is updated appropriately, we can do away with inventory loads // If we ensure that the material data is updated appropriately, we can do away with inventory loads
inv = new Inventory; 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 Item_Struct* item = nullptr;
const ItemInst* inst = nullptr; const ItemInst* inst = nullptr;
@ -194,31 +194,31 @@ void WorldDatabase::GetCharSelectInfo(uint32 account_id, CharacterSelect_Struct*
if (inst->GetOrnamentationIDFile() != 0) if (inst->GetOrnamentationIDFile() != 0)
{ {
idfile = inst->GetOrnamentationIDFile(); idfile = inst->GetOrnamentationIDFile();
cs->equip[char_num][matslot].material = idfile; cs->Equip[char_num][matslot].Material = idfile;
} }
else else
{ {
if (strlen(item->IDFile) > 2) if (strlen(item->IDFile) > 2)
{ {
idfile = atoi(&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) if (matslot == MaterialPrimary)
{ {
cs->primary[char_num] = idfile; cs->Primary[char_num] = idfile;
} }
else else
{ {
cs->secondary[char_num] = idfile; cs->Secondary[char_num] = idfile;
} }
} }
else else
{ {
uint32 color = 0; 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 else
{ {
@ -226,16 +226,16 @@ void WorldDatabase::GetCharSelectInfo(uint32 account_id, CharacterSelect_Struct*
} }
// Armor Materials/Models // Armor Materials/Models
cs->equip[char_num][matslot].material = item->Material; cs->Equip[char_num][matslot].Material = item->Material;
cs->equip[char_num][matslot].elitematerial = item->EliteMaterial; cs->Equip[char_num][matslot].EliteMaterial = item->EliteMaterial;
cs->equip[char_num][matslot].heroforgemodel = inst->GetOrnamentHeroModel(matslot); cs->Equip[char_num][matslot].HeroForgeModel = inst->GetOrnamentHeroModel(matslot);
cs->equip[char_num][matslot].color.color = color; cs->Equip[char_num][matslot].Color.Color = color;
} }
} }
} }
else 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); safe_delete(inv);

View File

@ -4395,24 +4395,24 @@ void Bot::FillSpawnStruct(NewSpawn_Struct* ns, Mob* ForWho) {
item = inst->GetItem(); item = inst->GetItem();
if (item != 0) if (item != 0)
{ {
ns->spawn.equipment[i].material = item->Material; ns->spawn.equipment[i].Material = item->Material;
ns->spawn.equipment[i].elitematerial = item->EliteMaterial; ns->spawn.equipment[i].EliteMaterial = item->EliteMaterial;
ns->spawn.equipment[i].heroforgemodel = item->HerosForgeModel; ns->spawn.equipment[i].HeroForgeModel = item->HerosForgeModel;
if (armor_tint[i]) if (armor_tint[i])
{ {
ns->spawn.colors[i].color = armor_tint[i]; ns->spawn.colors[i].Color = armor_tint[i];
} }
else else
{ {
ns->spawn.colors[i].color = item->Color; ns->spawn.colors[i].Color = item->Color;
} }
} }
else else
{ {
if (armor_tint[i]) 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) 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) 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->spawn_id = GetID();
wc->material = material; wc->material = material;
wc->color.color = color; wc->color.Color = color;
wc->wear_slot_id = material_slot; wc->wear_slot_id = material_slot;
entity_list.QueueClients(this, outapp); entity_list.QueueClients(this, outapp);

View File

@ -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) { void Client::SetTint(int16 in_slot, uint32 color) {
Color_Struct new_color; Color_Struct new_color;
new_color.color = color; new_color.Color = color;
SetTint(in_slot, new_color); SetTint(in_slot, new_color);
database.SaveCharacterMaterialColor(this->CharacterID(), in_slot, 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); uint8 matslot = Inventory::CalcMaterialFromSlot(in_slot);
if (matslot != _MaterialInvalid) if (matslot != _MaterialInvalid)
{ {
m_pp.item_tint[matslot].color = color.color; m_pp.item_tint[matslot].Color = color.Color;
database.SaveCharacterMaterialColor(this->CharacterID(), in_slot, color.color); database.SaveCharacterMaterialColor(this->CharacterID(), in_slot, color.Color);
} }
} }

View File

@ -1306,9 +1306,9 @@ void Client::Handle_Connect_OP_ZoneEntry(const EQApplicationPacket *app)
/* Set item material tint */ /* Set item material tint */
for (int i = EmuConstants::MATERIAL_BEGIN; i <= EmuConstants::MATERIAL_END; i++) 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;
} }
} }

View File

@ -7020,7 +7020,7 @@ void Client::Undye() {
database.SaveInventory(CharacterID(), inst, slot2); database.SaveInventory(CharacterID(), inst, slot2);
} }
m_pp.item_tint[cur_slot].color = 0; m_pp.item_tint[cur_slot].Color = 0;
SendWearChange(cur_slot); SendWearChange(cur_slot);
} }

View File

@ -113,15 +113,15 @@ Corpse* Corpse::LoadCharacterCorpseEntity(uint32 in_dbid, uint32 in_charid, std:
pc->Lock(); pc->Lock();
/* Load Item Tints */ /* Load Item Tints */
pc->item_tint[0].color = pcs->item_tint[0].color; pc->item_tint[0].Color = pcs->item_tint[0].Color;
pc->item_tint[1].color = pcs->item_tint[1].color; pc->item_tint[1].Color = pcs->item_tint[1].Color;
pc->item_tint[2].color = pcs->item_tint[2].color; pc->item_tint[2].Color = pcs->item_tint[2].Color;
pc->item_tint[3].color = pcs->item_tint[3].color; pc->item_tint[3].Color = pcs->item_tint[3].Color;
pc->item_tint[4].color = pcs->item_tint[4].color; pc->item_tint[4].Color = pcs->item_tint[4].Color;
pc->item_tint[5].color = pcs->item_tint[5].color; pc->item_tint[5].Color = pcs->item_tint[5].Color;
pc->item_tint[6].color = pcs->item_tint[6].color; pc->item_tint[6].Color = pcs->item_tint[6].Color;
pc->item_tint[7].color = pcs->item_tint[7].color; pc->item_tint[7].Color = pcs->item_tint[7].Color;
pc->item_tint[8].color = pcs->item_tint[8].color; pc->item_tint[8].Color = pcs->item_tint[8].Color;
/* Load Physical Appearance */ /* Load Physical Appearance */
pc->haircolor = pcs->haircolor; pc->haircolor = pcs->haircolor;
@ -1413,8 +1413,8 @@ uint32 Corpse::GetEquipmentColor(uint8 material_slot) const {
item = database.GetItem(GetEquipment(material_slot)); item = database.GetItem(GetEquipment(material_slot));
if(item != NO_ITEM) { if(item != NO_ITEM) {
return item_tint[material_slot].rgb.use_tint ? return item_tint[material_slot].RGB.UseTint ?
item_tint[material_slot].color : item_tint[material_slot].Color :
item->Color; item->Color;
} }

View File

@ -1984,9 +1984,9 @@ void Client::QSSwapItemAuditor(MoveItem_Struct* move_in, bool postaction_call) {
void Client::DyeArmor(DyeStruct* dye){ void Client::DyeArmor(DyeStruct* dye){
int16 slot=0; int16 slot=0;
for (int i = EmuConstants::MATERIAL_BEGIN; i <= EmuConstants::MATERIAL_TINT_END; i++) { 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 || 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.Red != dye->dye[i].RGB.Red ||
m_pp.item_tint[i].rgb.green != dye->dye[i].rgb.green m_pp.item_tint[i].RGB.Green != dye->dye[i].RGB.Green
) { ) {
slot = m_inv.HasItem(32557, 1, invWherePersonal); slot = m_inv.HasItem(32557, 1, invWherePersonal);
if (slot != INVALID_INDEX){ if (slot != INVALID_INDEX){
@ -1994,18 +1994,18 @@ void Client::DyeArmor(DyeStruct* dye){
uint8 slot2=SlotConvert(i); uint8 slot2=SlotConvert(i);
ItemInst* inst = this->m_inv.GetItem(slot2); ItemInst* inst = this->m_inv.GetItem(slot2);
if(inst){ 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); inst->SetColor(armor_color);
database.SaveCharacterMaterialColor(this->CharacterID(), i, armor_color); database.SaveCharacterMaterialColor(this->CharacterID(), i, armor_color);
database.SaveInventory(CharacterID(),inst,slot2); database.SaveInventory(CharacterID(),inst,slot2);
if(dye->dye[i].rgb.use_tint) if(dye->dye[i].RGB.UseTint)
m_pp.item_tint[i].rgb.use_tint = 0xFF; m_pp.item_tint[i].RGB.UseTint = 0xFF;
else 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.Blue=dye->dye[i].RGB.Blue;
m_pp.item_tint[i].rgb.red=dye->dye[i].rgb.red; 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.Green=dye->dye[i].RGB.Green;
SendWearChange(i); SendWearChange(i);
} }
else{ else{
@ -2420,7 +2420,7 @@ uint32 Client::GetEquipmentColor(uint8 material_slot) const
const Item_Struct *item = database.GetItem(GetEquipment(material_slot)); const Item_Struct *item = database.GetItem(GetEquipment(material_slot));
if(item != nullptr) 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; return 0;
} }

View File

@ -961,10 +961,10 @@ void Mob::FillSpawnStruct(NewSpawn_Struct* ns, Mob* ForWho)
// Only Player Races Wear Armor // Only Player Races Wear Armor
if (Mob::IsPlayerRace(race) || i > 6) if (Mob::IsPlayerRace(race) || i > 6)
{ {
ns->spawn.equipment[i].material = GetEquipmentMaterial(i); ns->spawn.equipment[i].Material = GetEquipmentMaterial(i);
ns->spawn.equipment[i].elitematerial = IsEliteMaterialItem(i); ns->spawn.equipment[i].EliteMaterial = IsEliteMaterialItem(i);
ns->spawn.equipment[i].heroforgemodel = GetHerosForgeModel(i); ns->spawn.equipment[i].HeroForgeModel = GetHerosForgeModel(i);
ns->spawn.colors[i].color = GetEquipmentColor(i); ns->spawn.colors[i].Color = GetEquipmentColor(i);
} }
} }
@ -2562,7 +2562,7 @@ void Mob::SendWearChange(uint8 material_slot)
wc->material = GetEquipmentMaterial(material_slot); wc->material = GetEquipmentMaterial(material_slot);
wc->elite_material = IsEliteMaterialItem(material_slot); wc->elite_material = IsEliteMaterialItem(material_slot);
wc->hero_forge_model = GetHerosForgeModel(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; wc->wear_slot_id = material_slot;
entity_list.QueueClients(this, outapp); 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->spawn_id = this->GetID();
wc->material = texture; wc->material = texture;
if (this->IsClient()) if (this->IsClient())
wc->color.color = GetEquipmentColor(slot); wc->color.Color = GetEquipmentColor(slot);
else else
wc->color.color = this->GetArmorTint(slot); wc->color.Color = this->GetArmorTint(slot);
wc->wear_slot_id = slot; wc->wear_slot_id = slot;
wc->unknown06 = unknown06; 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->spawn_id = this->GetID();
wc->material = GetEquipmentMaterial(material_slot); wc->material = GetEquipmentMaterial(material_slot);
wc->hero_forge_model = GetHerosForgeModel(material_slot); wc->hero_forge_model = GetHerosForgeModel(material_slot);
wc->color.color = color; wc->color.Color = color;
wc->wear_slot_id = material_slot; wc->wear_slot_id = material_slot;
entity_list.QueueClients(this, outapp); 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->spawn_id = this->GetID();
wc->material = texture; wc->material = texture;
wc->hero_forge_model = hero_forge_model; wc->hero_forge_model = hero_forge_model;
wc->color.color = color; wc->color.Color = color;
wc->wear_slot_id = material_slot; wc->wear_slot_id = material_slot;
entity_list.QueueClients(this, outapp); entity_list.QueueClients(this, outapp);

View File

@ -1167,10 +1167,10 @@ bool ZoneDatabase::LoadCharacterMaterialColor(uint32 character_id, PlayerProfile
for (auto row = results.begin(); row != results.end(); ++row) { for (auto row = results.begin(); row != results.end(); ++row) {
r = 0; r = 0;
i = atoi(row[r]); /* Slot */ r++; i = atoi(row[r]); /* Slot */ r++;
pp->item_tint[i].rgb.blue = atoi(row[r]); 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.Green = atoi(row[r]); r++;
pp->item_tint[i].rgb.red = 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.UseTint = atoi(row[r]);
} }
return true; 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->plat, dbpc->haircolor, dbpc->beardcolor, dbpc->eyecolor1,
dbpc->eyecolor2, dbpc->hairstyle, dbpc->face, dbpc->beard, dbpc->eyecolor2, dbpc->hairstyle, dbpc->face, dbpc->beard,
dbpc->drakkin_heritage, dbpc->drakkin_tattoo, dbpc->drakkin_details, 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[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[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[6].Color, dbpc->item_tint[7].Color, dbpc->item_tint[8].Color,
db_id); db_id);
auto results = QueryDatabase(query); auto results = QueryDatabase(query);
@ -3639,15 +3639,15 @@ uint32 ZoneDatabase::SaveCharacterCorpse(uint32 charid, const char* charname, ui
dbpc->drakkin_heritage, dbpc->drakkin_heritage,
dbpc->drakkin_tattoo, dbpc->drakkin_tattoo,
dbpc->drakkin_details, dbpc->drakkin_details,
dbpc->item_tint[0].color, dbpc->item_tint[0].Color,
dbpc->item_tint[1].color, dbpc->item_tint[1].Color,
dbpc->item_tint[2].color, dbpc->item_tint[2].Color,
dbpc->item_tint[3].color, dbpc->item_tint[3].Color,
dbpc->item_tint[4].color, dbpc->item_tint[4].Color,
dbpc->item_tint[5].color, dbpc->item_tint[5].Color,
dbpc->item_tint[6].color, dbpc->item_tint[6].Color,
dbpc->item_tint[7].color, dbpc->item_tint[7].Color,
dbpc->item_tint[8].color dbpc->item_tint[8].Color
); );
auto results = QueryDatabase(query); auto results = QueryDatabase(query);
uint32 last_insert_id = results.LastInsertedID(); 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_heritage = atoul(row[i++]); // drakkin_heritage,
pcs->drakkin_tattoo = atoul(row[i++]); // drakkin_tattoo, pcs->drakkin_tattoo = atoul(row[i++]); // drakkin_tattoo,
pcs->drakkin_details = atoul(row[i++]); // drakkin_details, pcs->drakkin_details = atoul(row[i++]); // drakkin_details,
pcs->item_tint[0].color = atoul(row[i++]); // wc_1, pcs->item_tint[0].Color = atoul(row[i++]); // wc_1,
pcs->item_tint[1].color = atoul(row[i++]); // wc_2, pcs->item_tint[1].Color = atoul(row[i++]); // wc_2,
pcs->item_tint[2].color = atoul(row[i++]); // wc_3, pcs->item_tint[2].Color = atoul(row[i++]); // wc_3,
pcs->item_tint[3].color = atoul(row[i++]); // wc_4, pcs->item_tint[3].Color = atoul(row[i++]); // wc_4,
pcs->item_tint[4].color = atoul(row[i++]); // wc_5, pcs->item_tint[4].Color = atoul(row[i++]); // wc_5,
pcs->item_tint[5].color = atoul(row[i++]); // wc_6, pcs->item_tint[5].Color = atoul(row[i++]); // wc_6,
pcs->item_tint[6].color = atoul(row[i++]); // wc_7, pcs->item_tint[6].Color = atoul(row[i++]); // wc_7,
pcs->item_tint[7].color = atoul(row[i++]); // wc_8, pcs->item_tint[7].Color = atoul(row[i++]); // wc_8,
pcs->item_tint[8].color = atoul(row[i++]); // wc_9 pcs->item_tint[8].Color = atoul(row[i++]); // wc_9
} }
query = StringFormat( query = StringFormat(
"SELECT \n" "SELECT \n"