Implemented EQEmu::TintProfile

This commit is contained in:
Uleat 2016-06-01 04:58:52 -04:00
parent 767dfaef70
commit ae3c98c692
28 changed files with 296 additions and 423 deletions

View File

@ -1,5 +1,8 @@
EQEMu Changelog (Started on Sept 24, 2003 15:50)
-------------------------------------------------------
== 06/01/2016 ==
Uleat: Implemented EQEmu::TintProfile
== 05/31/2016 ==
Uleat: Converted enumeration MaterialSlots to EQEmu::textures::TextureSlot

View File

@ -126,19 +126,6 @@ struct LDoNTrapTemplate
// All clients translate the character select information to some degree
struct Color_Struct
{
union {
struct {
uint8 Blue;
uint8 Green;
uint8 Red;
uint8 UseTint; // if there's a tint this is FF
} RGB;
uint32 Color;
};
};
struct EquipStruct
{
uint32 Material;
@ -155,7 +142,7 @@ struct CharSelectEquip
uint32 EliteMaterial;
uint32 HeroForgeModel;
uint32 Material2;
Color_Struct Color;
EQEmu::Tint_Struct Color;
};
// RoF2-based hybrid struct
@ -326,22 +313,7 @@ union
/*0340*/ uint32 spawnId; // Spawn Id
/*0344*/ uint8 unknown0344[3];
/*0347*/ uint8 IsMercenary;
/*0348*/ union
{
struct
{
/*0348*/ Color_Struct color_helmet; // Color of helmet item
/*0352*/ Color_Struct color_chest; // Color of chest item
/*0356*/ Color_Struct color_arms; // Color of arms item
/*0360*/ Color_Struct color_bracers; // Color of bracers item
/*0364*/ Color_Struct color_hands; // Color of hands item
/*0368*/ Color_Struct color_legs; // Color of legs item
/*0372*/ Color_Struct color_feet; // Color of feet item
/*0376*/ Color_Struct color_primary; // Color of primary item
/*0380*/ Color_Struct color_secondary; // Color of secondary item
} equipment_colors;
/*0348*/ Color_Struct colors[EQEmu::textures::TextureCount]; // Array elements correspond to struct equipment_colors above
};
/*0348*/ EQEmu::TintProfile equipment_tint;
/*0384*/ uint8 lfg; // 0=off, 1=lfg on
/*0385*/
@ -992,7 +964,7 @@ struct PlayerProfile_Struct
/*0306*/ uint8 unknown0306[6]; // @bp Spacer/Flag?
/*0312*/ uint32 item_material[EQEmu::textures::TextureCount]; // Item texture/material of worn/held items
/*0348*/ uint8 unknown0348[44];
/*0392*/ Color_Struct item_tint[EQEmu::textures::TextureCount];
/*0392*/ EQEmu::TintProfile item_tint;
/*0428*/ AA_Array aa_array[MAX_PP_AA_ARRAY];
/*2348*/ float unknown2384; //seen ~128, ~47
/*2352*/ char servername[32]; // length probably not right
@ -1227,7 +1199,7 @@ struct WearChange_Struct{
/*010*/ uint32 elite_material; // 1 for Drakkin Elite Material
/*014*/ uint32 hero_forge_model; // New to VoA
/*018*/ uint32 unknown18; // New to RoF
/*022*/ Color_Struct color;
/*022*/ EQEmu::Tint_Struct color;
/*026*/ uint8 wear_slot_id;
/*027*/
};
@ -3416,27 +3388,6 @@ struct PetitionBug_Struct{
char text[1028];
};
struct DyeStruct
{
union
{
struct
{
struct Color_Struct head;
struct Color_Struct chest;
struct Color_Struct arms;
struct Color_Struct wrists;
struct Color_Struct hands;
struct Color_Struct legs;
struct Color_Struct feet;
struct Color_Struct primary; // you can't actually dye this
struct Color_Struct secondary; // or this
}
dyes;
struct Color_Struct dye[EQEmu::textures::TextureCount];
};
};
struct ApproveZone_Struct {
char name[64];
uint32 zoneid;

View File

@ -2103,7 +2103,7 @@ namespace RoF
for (int r = 0; r < 7; r++)
{
outapp->WriteUInt32(emu->item_tint[r].Color);
outapp->WriteUInt32(emu->item_tint.Slot[r].Color);
}
// Write zeroes for extra two tint values
outapp->WriteUInt32(0);
@ -2113,7 +2113,7 @@ namespace RoF
for (int r = 0; r < 7; r++)
{
outapp->WriteUInt32(emu->item_tint[r].Color);
outapp->WriteUInt32(emu->item_tint.Slot[r].Color);
}
// Write zeroes for extra two tint values
outapp->WriteUInt32(0);
@ -4086,7 +4086,7 @@ namespace RoF
for (k = 0; k < 9; ++k)
{
{
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, emu->colors[k].Color);
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, emu->equipment_tint.Slot[k].Color);
}
}

View File

@ -2187,7 +2187,7 @@ namespace RoF2
for (int r = 0; r < 7; r++)
{
outapp->WriteUInt32(emu->item_tint[r].Color);
outapp->WriteUInt32(emu->item_tint.Slot[r].Color);
}
// Write zeroes for extra two tint values
outapp->WriteUInt32(0);
@ -2197,7 +2197,7 @@ namespace RoF2
for (int r = 0; r < 7; r++)
{
outapp->WriteUInt32(emu->item_tint[r].Color);
outapp->WriteUInt32(emu->item_tint.Slot[r].Color);
}
// Write zeroes for extra two tint values
outapp->WriteUInt32(0);
@ -4309,7 +4309,7 @@ namespace RoF2
for (k = 0; k < 9; ++k)
{
{
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, emu->colors[k].Color);
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, emu->equipment_tint.Slot[k].Color);
}
}

View File

@ -163,7 +163,7 @@ struct AdventureInfo {
** Merth: Gave struct a name so gcc 2.96 would compile
**
*/
struct Color_Struct
struct Tint_Struct
{
union {
struct {
@ -171,11 +171,28 @@ struct Color_Struct
uint8 Green;
uint8 Red;
uint8 UseTint; // if there's a tint this is FF
} RGB;
};
uint32 Color;
};
};
struct TintProfile {
union {
struct {
Tint_Struct Head;
Tint_Struct Chest;
Tint_Struct Arms;
Tint_Struct Wrist;
Tint_Struct Hands;
Tint_Struct Legs;
Tint_Struct Feet;
Tint_Struct Primary;
Tint_Struct Secondary;
};
Tint_Struct Slot[EQEmu::textures::TextureCount];
};
};
struct CharSelectEquip
{
uint32 Material;
@ -183,7 +200,7 @@ struct CharSelectEquip
uint32 EliteMaterial;
uint32 HeroForgeModel;
uint32 Material2;
Color_Struct Color;
Tint_Struct Color;
};
struct CharacterSelectEntry_Struct
@ -447,22 +464,7 @@ struct Spawn_Struct
/*0000*/ uint32 unknown18;
/*0000*/ uint32 unknown19;
Spawn_Struct_Position Position;
/*0000*/ union
{
struct
{
/*0000*/ Color_Struct color_helmet; // Color of helmet item
/*0000*/ Color_Struct color_chest; // Color of chest item
/*0000*/ Color_Struct color_arms; // Color of arms item
/*0000*/ Color_Struct color_bracers; // Color of bracers item
/*0000*/ Color_Struct color_hands; // Color of hands item
/*0000*/ Color_Struct color_legs; // Color of legs item
/*0000*/ Color_Struct color_feet; // Color of feet item
/*0000*/ Color_Struct color_primary; // Color of primary item
/*0000*/ Color_Struct color_secondary; // Color of secondary item
} equipment_colors;
/*0000*/ Color_Struct colors[9]; // Array elements correspond to struct equipment_colors above
};
/*0000*/ TintProfile equipment_tint;
// skip these bytes if not a valid player race
/*0000*/ union
@ -1107,9 +1109,9 @@ union
/*00624*/ uint32 equip2_count; // Seen 9
/*00628*/ EquipStruct equipment2[EQEmu::textures::TextureCount]; // Appears to be Visible slots, but all 0s
/*00808*/ uint32 tint_count; // Seen 9
/*00812*/ Color_Struct item_tint[EQEmu::textures::TextureCount]; // RR GG BB 00
/*00812*/ TintProfile item_tint; // RR GG BB 00
/*00848*/ uint32 tint_count2; // Seen 9
/*00852*/ Color_Struct item_tint2[EQEmu::textures::TextureCount]; // RR GG BB 00
/*00852*/ TintProfile item_tint2; // RR GG BB 00
/*00888*/ uint8 haircolor; // Player hair color
/*00889*/ uint8 beardcolor; // Player beard color
/*00890*/ uint32 unknown_rof5; //
@ -1385,7 +1387,7 @@ struct WearChange_Struct{
/*010*/ uint32 elite_material; // 1 for Drakkin Elite Material
/*014*/ uint32 hero_forge_model; // New to VoA
/*018*/ uint32 unknown18; // New to RoF2
/*022*/ Color_Struct color;
/*022*/ Tint_Struct color;
/*026*/ uint8 wear_slot_id;
/*027*/
};
@ -3634,27 +3636,6 @@ struct PetitionBug_Struct{
char text[1028];
};
struct DyeStruct
{
union
{
struct
{
struct Color_Struct head;
struct Color_Struct chest;
struct Color_Struct arms;
struct Color_Struct wrists;
struct Color_Struct hands;
struct Color_Struct legs;
struct Color_Struct feet;
struct Color_Struct primary; // you can't actually dye this
struct Color_Struct secondary; // or this
}
dyes;
struct Color_Struct dye[9];
};
};
struct ApproveZone_Struct {
char name[64];
uint32 zoneid;

View File

@ -163,7 +163,7 @@ struct AdventureInfo {
** Merth: Gave struct a name so gcc 2.96 would compile
**
*/
struct Color_Struct
struct Tint_Struct
{
union {
struct {
@ -171,11 +171,28 @@ struct Color_Struct
uint8 Green;
uint8 Red;
uint8 UseTint; // if there's a tint this is FF
} RGB;
};
uint32 Color;
};
};
struct TintProfile {
union {
struct {
Tint_Struct Head;
Tint_Struct Chest;
Tint_Struct Arms;
Tint_Struct Wrist;
Tint_Struct Hands;
Tint_Struct Legs;
Tint_Struct Feet;
Tint_Struct Primary;
Tint_Struct Secondary;
};
Tint_Struct Slot[EQEmu::textures::TextureCount];
};
};
struct CharSelectEquip
{
uint32 Material;
@ -183,7 +200,7 @@ struct CharSelectEquip
uint32 EliteMaterial;
uint32 HeroForgeModel;
uint32 Material2;
Color_Struct Color;
Tint_Struct Color;
};
struct CharacterSelectEntry_Struct
@ -441,22 +458,7 @@ struct Spawn_Struct
/*0000*/ uint32 unknown18;
/*0000*/ uint32 unknown19;
Spawn_Struct_Position Position;
/*0000*/ union
{
struct
{
/*0000*/ Color_Struct color_helmet; // Color of helmet item
/*0000*/ Color_Struct color_chest; // Color of chest item
/*0000*/ Color_Struct color_arms; // Color of arms item
/*0000*/ Color_Struct color_bracers; // Color of bracers item
/*0000*/ Color_Struct color_hands; // Color of hands item
/*0000*/ Color_Struct color_legs; // Color of legs item
/*0000*/ Color_Struct color_feet; // Color of feet item
/*0000*/ Color_Struct color_primary; // Color of primary item
/*0000*/ Color_Struct color_secondary; // Color of secondary item
} equipment_colors;
/*0000*/ Color_Struct colors[9]; // Array elements correspond to struct equipment_colors above
};
/*0000*/ TintProfile equipment_tint;
// skip these bytes if not a valid player race
/*0000*/ union
@ -1090,9 +1092,9 @@ union
/*00624*/ uint32 equip2_count; // Seen 9
/*00628*/ EquipStruct equipment2[9]; // Appears to be Visible slots, but all 0s
/*00808*/ uint32 tint_count; // Seen 9
/*00812*/ Color_Struct item_tint[9]; // RR GG BB 00
/*00812*/ TintProfile item_tint; // RR GG BB 00
/*00848*/ uint32 tint_count2; // Seen 9
/*00852*/ Color_Struct item_tint2[9]; // RR GG BB 00
/*00852*/ TintProfile item_tint2; // RR GG BB 00
/*00888*/ uint8 haircolor; // Player hair color
/*00889*/ uint8 beardcolor; // Player beard color
/*00890*/ uint32 unknown_rof5; //
@ -1415,7 +1417,7 @@ struct WearChange_Struct{
/*010*/ uint32 elite_material; // 1 for Drakkin Elite Material
/*014*/ uint32 hero_forge_model; // New to VoA
/*018*/ uint32 unknown18; // New to RoF
/*022*/ Color_Struct color;
/*022*/ Tint_Struct color;
/*026*/ uint8 wear_slot_id;
/*027*/
};
@ -3634,27 +3636,6 @@ struct PetitionBug_Struct{
char text[1028];
};
struct DyeStruct
{
union
{
struct
{
struct Color_Struct head;
struct Color_Struct chest;
struct Color_Struct arms;
struct Color_Struct wrists;
struct Color_Struct hands;
struct Color_Struct legs;
struct Color_Struct feet;
struct Color_Struct primary; // you can't actually dye this
struct Color_Struct secondary; // or this
}
dyes;
struct Color_Struct dye[9];
};
};
struct ApproveZone_Struct {
char name[64];
uint32 zoneid;

View File

@ -1560,7 +1560,7 @@ namespace SoD
//eq->colors[r].color = emu->colors[r].color;
}
for (r = 0; r < 7; r++) {
OUT(item_tint[r].Color);
OUT(item_tint.Slot[r].Color);
}
// OUT(unknown00224[48]);
//NOTE: new client supports 300 AAs, our internal rep/PP
@ -2763,7 +2763,7 @@ namespace SoD
for (k = 0; k < 9; ++k)
{
{
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, emu->colors[k].Color);
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, emu->equipment_tint.Slot[k].Color);
}
}
}

View File

@ -122,7 +122,7 @@ struct AdventureInfo {
** Merth: Gave struct a name so gcc 2.96 would compile
**
*/
struct Color_Struct
struct Tint_Struct
{
union {
struct {
@ -130,17 +130,34 @@ struct Color_Struct
uint8 Green;
uint8 Red;
uint8 UseTint; // if there's a tint this is FF
} RGB;
};
uint32 Color;
};
};
struct TintProfile {
union {
struct {
Tint_Struct Head;
Tint_Struct Chest;
Tint_Struct Arms;
Tint_Struct Wrist;
Tint_Struct Hands;
Tint_Struct Legs;
Tint_Struct Feet;
Tint_Struct Primary;
Tint_Struct Secondary;
};
Tint_Struct Slot[EQEmu::textures::TextureCount];
};
};
struct CharSelectEquip
{
uint32 Material;
uint32 Unknown1;
uint32 EliteMaterial;
Color_Struct Color;
Tint_Struct Color;
};
struct CharacterSelectEntry_Struct
@ -314,22 +331,7 @@ struct Spawn_Struct
/*0000*/ uint32 unknown18;
/*0000*/ uint32 unknown19;
Spawn_Struct_Position Position;
/*0000*/ union
{
struct
{
/*0000*/ Color_Struct color_helmet; // Color of helmet item
/*0000*/ Color_Struct color_chest; // Color of chest item
/*0000*/ Color_Struct color_arms; // Color of arms item
/*0000*/ Color_Struct color_bracers; // Color of bracers item
/*0000*/ Color_Struct color_hands; // Color of hands item
/*0000*/ Color_Struct color_legs; // Color of legs item
/*0000*/ Color_Struct color_feet; // Color of feet item
/*0000*/ Color_Struct color_primary; // Color of primary item
/*0000*/ Color_Struct color_secondary; // Color of secondary item
} equipment_colors;
/*0000*/ Color_Struct colors[9]; // Array elements correspond to struct equipment_colors above
};
/*0000*/ TintProfile equipment_tint;
// skip these bytes if not a valid player race
/*0000*/ union
@ -920,7 +922,7 @@ struct PlayerProfile_Struct
/*00228*/ EquipStruct equipment[9]; //Live Shows [108] for this part
};
/*00340*/ uint8 unknown00224[156]; // Live Shows [160]
/*00496*/ Color_Struct item_tint[9]; // RR GG BB 00
/*00496*/ TintProfile item_tint; // RR GG BB 00
/*00532*/ AA_Array aa_array[MAX_PP_AA_ARRAY]; // [3600] AAs 12 bytes each
/*04132*/ uint32 points; // Unspent Practice points - RELOCATED???
/*04136*/ uint32 mana; // Current mana
@ -1177,7 +1179,7 @@ struct WearChange_Struct{
/*002*/ uint32 material;
/*006*/ uint32 unknown06;
/*010*/ uint32 elite_material; // 1 for Drakkin Elite Material
/*014*/ Color_Struct color;
/*014*/ Tint_Struct color;
/*018*/ uint8 wear_slot_id;
/*019*/
};
@ -3091,27 +3093,6 @@ struct PetitionBug_Struct{
char text[1028];
};
struct DyeStruct
{
union
{
struct
{
struct Color_Struct head;
struct Color_Struct chest;
struct Color_Struct arms;
struct Color_Struct wrists;
struct Color_Struct hands;
struct Color_Struct legs;
struct Color_Struct feet;
struct Color_Struct primary; // you can't actually dye this
struct Color_Struct secondary; // or this
}
dyes;
struct Color_Struct dye[9];
};
};
struct ApproveZone_Struct {
char name[64];
uint32 zoneid;

View File

@ -1216,7 +1216,7 @@ namespace SoF
//eq->colors[r].color = emu->colors[r].color;
}
for (r = 0; r < 7; r++) {
OUT(item_tint[r].Color);
OUT(item_tint.Slot[r].Color);
}
// OUT(unknown00224[48]);
//NOTE: new client supports 300 AAs, our internal rep/PP
@ -2084,7 +2084,7 @@ namespace SoF
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_tint.Slot[k].Color = emu->equipment_tint.Slot[k].Color;
}
eq->StandState = emu->StandState;
eq->guildID = emu->guildID;
@ -2147,7 +2147,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->equipment_tint.Slot[k].Color = emu->equipment_tint.Slot[k].Color;
}
eq->anon = emu->anon;
eq->face = emu->face;

View File

@ -122,7 +122,7 @@ struct AdventureInfo {
** Merth: Gave struct a name so gcc 2.96 would compile
**
*/
struct Color_Struct
struct Tint_Struct
{
union {
struct {
@ -130,17 +130,34 @@ struct Color_Struct
uint8 Green;
uint8 Red;
uint8 UseTint; // if there's a tint this is FF
} RGB;
};
uint32 Color;
};
};
struct TintProfile {
union {
struct {
Tint_Struct Head;
Tint_Struct Chest;
Tint_Struct Arms;
Tint_Struct Wrist;
Tint_Struct Hands;
Tint_Struct Legs;
Tint_Struct Feet;
Tint_Struct Primary;
Tint_Struct Secondary;
};
Tint_Struct Slot[EQEmu::textures::TextureCount];
};
};
struct CharSelectEquip
{
uint32 Material;
uint32 Unknown1;
uint32 EliteMaterial;
Color_Struct Color;
Tint_Struct Color;
};
struct CharacterSelectEntry_Struct
@ -314,22 +331,7 @@ union
/*0775*/ char name[64]; // Player's Name
/*0839*/ uint32 petOwnerId; // If this is a pet, the spawn id of owner
/*0843*/ uint8 pvp; // 0 = normal name color, 2 = PVP name color
/*0844*/ union
{
struct
{
/*0844*/ Color_Struct color_helmet; // Color of helmet item
/*0848*/ Color_Struct color_chest; // Color of chest item
/*0852*/ Color_Struct color_arms; // Color of arms item
/*0856*/ Color_Struct color_bracers; // Color of bracers item
/*0860*/ Color_Struct color_hands; // Color of hands item
/*0864*/ Color_Struct color_legs; // Color of legs item
/*0868*/ Color_Struct color_feet; // Color of feet item
/*0872*/ Color_Struct color_primary; // Color of primary item
/*0876*/ Color_Struct color_secondary; // Color of secondary item
} equipment_colors;
/*0844*/ Color_Struct colors[9]; // Array elements correspond to struct equipment_colors above
};
/*0844*/ TintProfile equipment_tint;
/*0880*/ uint8 anon; // 0=normal, 1=anon, 2=roleplay
/*0881*/ uint8 face;
/*0882*/ uint8 drakkin_details; // Face Details (Spikes) on Drakkin 0 - 7
@ -899,7 +901,7 @@ struct PlayerProfile_Struct //23576 Octets
/*00228*/ EquipStruct equipment[9]; //Live Shows [108] for this part
};
/*00336*/ uint8 unknown00224[156]; // Live Shows [160]
/*00496*/ Color_Struct item_tint[9]; // RR GG BB 00
/*00496*/ TintProfile item_tint; // RR GG BB 00
/*00544*/ AA_Array aa_array[MAX_PP_AA_ARRAY]; // [3600] AAs 12 bytes each
/*04132*/ uint32 points; // Unspent Practice points - RELOCATED???
/*04136*/ uint32 mana; // Current mana
@ -1155,7 +1157,7 @@ struct WearChange_Struct{
/*002*/ uint32 material;
/*006*/ uint32 unknown06;
/*010*/ uint32 elite_material; // 1 for Drakkin Elite Material
/*014*/ Color_Struct color;
/*014*/ Tint_Struct color;
/*018*/ uint8 wear_slot_id;
/*019*/
};
@ -2954,27 +2956,6 @@ struct PetitionBug_Struct{
char text[1028];
};
struct DyeStruct
{
union
{
struct
{
struct Color_Struct head;
struct Color_Struct chest;
struct Color_Struct arms;
struct Color_Struct wrists;
struct Color_Struct hands;
struct Color_Struct legs;
struct Color_Struct feet;
struct Color_Struct primary; // you can't actually dye this
struct Color_Struct secondary; // or this
}
dyes;
struct Color_Struct dye[9];
};
};
struct ApproveZone_Struct {
char name[64];
uint32 zoneid;

View File

@ -905,7 +905,7 @@ namespace Titanium
// OUT(unknown00178[10]);
for (r = 0; r < 9; r++) {
OUT(item_material[r]);
OUT(item_tint[r].Color);
OUT(item_tint.Slot[r].Color);
}
// OUT(unknown00224[48]);
for (r = 0; r < structs::MAX_PP_AA_ARRAY; r++) {
@ -1224,7 +1224,7 @@ namespace Titanium
eq->Race[char_index] = 1;
for (int index = 0; index < EQEmu::textures::TextureCount; ++index) {
eq->CS_Colors[char_index][index].Color = emu_cse->Equip[index].Color.Color;
eq->CS_Colors[char_index].Slot[index].Color = emu_cse->Equip[index].Color.Color;
}
eq->BeardColor[char_index] = emu_cse->BeardColor;
@ -1261,7 +1261,7 @@ namespace Titanium
eq->Race[char_index] = 0;
for (int index = 0; index < EQEmu::textures::TextureCount; ++index) {
eq->CS_Colors[char_index][index].Color = 0;
eq->CS_Colors[char_index].Slot[index].Color = 0;
}
eq->BeardColor[char_index] = 0;
@ -1601,7 +1601,7 @@ namespace Titanium
// 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_tint.Slot[k].Color = emu->equipment_tint.Slot[k].Color;
}
for (k = 0; k < 8; k++) {
eq->set_to_0xFF[k] = 0xFF;

View File

@ -118,7 +118,7 @@ struct AdventureInfo {
** Merth: Gave struct a name so gcc 2.96 would compile
**
*/
struct Color_Struct
struct Tint_Struct
{
union {
struct {
@ -126,11 +126,28 @@ struct Color_Struct
uint8 Green;
uint8 Red;
uint8 UseTint; // if there's a tint this is FF
} RGB;
};
uint32 Color;
};
};
struct TintProfile {
union {
struct {
Tint_Struct Head;
Tint_Struct Chest;
Tint_Struct Arms;
Tint_Struct Wrist;
Tint_Struct Hands;
Tint_Struct Legs;
Tint_Struct Feet;
Tint_Struct Primary;
Tint_Struct Secondary;
};
Tint_Struct Slot[EQEmu::textures::TextureCount];
};
};
/*
** Character Selection Struct
** Length: 1704 Bytes
@ -139,7 +156,7 @@ struct Color_Struct
struct CharacterSelect_Struct
{
/*0000*/ uint32 Race[10]; // Characters Race
/*0040*/ Color_Struct CS_Colors[10][9]; // Characters Equipment Colors
/*0040*/ TintProfile CS_Colors[10]; // Characters Equipment Colors - packet requires length for 10 characters..but, client is limited to 8
/*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)
@ -284,22 +301,7 @@ union
};
/*0340*/ uint32 spawnId; // Spawn Id
/*0344*/ uint8 unknown0344[4];
/*0348*/ union
{
struct
{
/*0348*/ Color_Struct color_helmet; // Color of helmet item
/*0352*/ Color_Struct color_chest; // Color of chest item
/*0356*/ Color_Struct color_arms; // Color of arms item
/*0360*/ Color_Struct color_bracers; // Color of bracers item
/*0364*/ Color_Struct color_hands; // Color of hands item
/*0368*/ Color_Struct color_legs; // Color of legs item
/*0372*/ Color_Struct color_feet; // Color of feet item
/*0376*/ Color_Struct color_primary; // Color of primary item
/*0380*/ Color_Struct color_secondary; // Color of secondary item
} equipment_colors;
/*0348*/ Color_Struct colors[9]; // Array elements correspond to struct equipment_colors above
};
/*0348*/ TintProfile equipment_tint;
/*0384*/ uint8 lfg; // 0=off, 1=lfg on
/*0385*/
@ -812,7 +814,7 @@ struct PlayerProfile_Struct
/*00178*/ uint8 unknown00178[10];
/*00188*/ uint32 item_material[9]; // Item texture/material of worn items
/*00224*/ uint8 unknown00224[44];
/*00268*/ Color_Struct item_tint[9]; // RR GG BB 00
/*00268*/ TintProfile item_tint; // RR GG BB 00
/*00304*/ AA_Array aa_array[MAX_PP_AA_ARRAY]; // AAs
/*02224*/ uint32 points; // Unspent Practice points
/*02228*/ uint32 mana; // Current mana
@ -1035,7 +1037,7 @@ struct SpecialMesg_Struct
struct WearChange_Struct{
/*000*/ uint16 spawn_id;
/*002*/ uint16 material;
/*004*/ Color_Struct color;
/*004*/ Tint_Struct color;
/*009*/ uint8 wear_slot_id;
};
@ -2591,27 +2593,6 @@ struct PetitionBug_Struct{
char text[1028];
};
struct DyeStruct
{
union
{
struct
{
struct Color_Struct head;
struct Color_Struct chest;
struct Color_Struct arms;
struct Color_Struct wrists;
struct Color_Struct hands;
struct Color_Struct legs;
struct Color_Struct feet;
struct Color_Struct primary; // you can't actually dye this
struct Color_Struct secondary; // or this
}
dyes;
struct Color_Struct dye[9];
};
};
struct ApproveZone_Struct {
char name[64];
uint32 zoneid;

View File

@ -1813,7 +1813,7 @@ namespace UF
//eq->colors[r].color = emu->colors[r].color;
}
for (r = 0; r < 7; r++) {
OUT(item_tint[r].Color);
OUT(item_tint.Slot[r].Color);
}
// OUT(unknown00224[48]);
//NOTE: new client supports 300 AAs, our internal rep/PP
@ -3060,7 +3060,7 @@ namespace UF
for (k = 0; k < 9; ++k)
{
{
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, emu->colors[k].Color);
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, emu->equipment_tint.Slot[k].Color);
}
}
}

View File

@ -122,25 +122,42 @@ struct AdventureInfo {
** Merth: Gave struct a name so gcc 2.96 would compile
**
*/
struct Color_Struct
struct Tint_Struct
{
union {
struct {
uint8 blue;
uint8 Blue;
uint8 Green;
uint8 Red;
uint8 UseTint; // if there's a tint this is FF
} RGB;
};
uint32 Color;
};
};
struct TintProfile {
union {
struct {
Tint_Struct Head;
Tint_Struct Chest;
Tint_Struct Arms;
Tint_Struct Wrist;
Tint_Struct Hands;
Tint_Struct Legs;
Tint_Struct Feet;
Tint_Struct Primary;
Tint_Struct Secondary;
};
Tint_Struct Slot[EQEmu::textures::TextureCount];
};
};
struct CharSelectEquip
{
uint32 Material;
uint32 Unknown1;
uint32 EliteMaterial;
Color_Struct Color;
Tint_Struct Color;
};
struct CharacterSelectEntry_Struct
@ -314,22 +331,7 @@ struct Spawn_Struct
/*0000*/ uint32 unknown18;
/*0000*/ uint32 unknown19;
Spawn_Struct_Position Position;
/*0000*/ union
{
struct
{
/*0000*/ Color_Struct color_helmet; // Color of helmet item
/*0000*/ Color_Struct color_chest; // Color of chest item
/*0000*/ Color_Struct color_arms; // Color of arms item
/*0000*/ Color_Struct color_bracers; // Color of bracers item
/*0000*/ Color_Struct color_hands; // Color of hands item
/*0000*/ Color_Struct color_legs; // Color of legs item
/*0000*/ Color_Struct color_feet; // Color of feet item
/*0000*/ Color_Struct color_primary; // Color of primary item
/*0000*/ Color_Struct color_secondary; // Color of secondary item
} equipment_colors;
/*0000*/ Color_Struct colors[9]; // Array elements correspond to struct equipment_colors above
};
/*0000*/ TintProfile equipment_tint;
// skip these bytes if not a valid player race
/*0000*/ union
@ -969,7 +971,7 @@ struct PlayerProfile_Struct
/*00236*/ EquipStruct equipment[9]; //Underfoot Shows [108] for this part
};
/*00344*/ uint8 unknown00344[168]; // Underfoot Shows [160]
/*00512*/ Color_Struct item_tint[9]; // RR GG BB 00
/*00512*/ TintProfile item_tint; // RR GG BB 00
/*00548*/ AA_Array aa_array[MAX_PP_AA_ARRAY]; // [3600] AAs 12 bytes each
/*04148*/ uint32 points; // Unspent Practice points - RELOCATED???
/*04152*/ uint32 mana; // Current mana
@ -1232,7 +1234,7 @@ struct WearChange_Struct{
/*002*/ uint32 material;
/*006*/ uint32 unknown06;
/*010*/ uint32 elite_material; // 1 for Drakkin Elite Material
/*014*/ Color_Struct color;
/*014*/ Tint_Struct color;
/*018*/ uint8 wear_slot_id;
/*019*/
};
@ -3162,27 +3164,6 @@ struct PetitionBug_Struct{
char text[1028];
};
struct DyeStruct
{
union
{
struct
{
struct Color_Struct head;
struct Color_Struct chest;
struct Color_Struct arms;
struct Color_Struct wrists;
struct Color_Struct hands;
struct Color_Struct legs;
struct Color_Struct feet;
struct Color_Struct primary; // you can't actually dye this
struct Color_Struct secondary; // or this
}
dyes;
struct Color_Struct dye[9];
};
};
struct ApproveZone_Struct {
char name[64];
uint32 zoneid;

View File

@ -83,27 +83,12 @@
// }
//}
struct EQEmu::TextureProfile
{
union {
struct {
uint32 Head;
uint32 Chest;
uint32 Arms;
uint32 Wrist;
uint32 Hands;
uint32 Legs;
uint32 Feet;
uint32 Primary;
uint32 Secondary;
};
uint32 Texture[textures::TextureCount];
};
TextureProfile();
};
EQEmu::TextureProfile::TextureProfile()
{
memset(&Texture, 0, (sizeof(uint32) * textures::TextureCount));
}
EQEmu::TintProfile::TintProfile()
{
memset(&Slot, 0, (sizeof(uint32) * textures::TextureCount));
}

View File

@ -54,7 +54,57 @@ namespace EQEmu
} /*textures*/
struct TextureProfile;
struct TextureProfile {
union {
struct {
uint32 Head;
uint32 Chest;
uint32 Arms;
uint32 Wrist;
uint32 Hands;
uint32 Legs;
uint32 Feet;
uint32 Primary;
uint32 Secondary;
};
uint32 Texture[textures::TextureCount];
};
TextureProfile();
};
struct Tint_Struct {
union {
struct {
uint8 Blue;
uint8 Green;
uint8 Red;
uint8 UseTint; // if there's a tint this is FF
};
uint32 Color;
};
//Tint_Struct();
};
struct TintProfile {
union {
struct {
Tint_Struct Head;
Tint_Struct Chest;
Tint_Struct Arms;
Tint_Struct Wrist;
Tint_Struct Hands;
Tint_Struct Legs;
Tint_Struct Feet;
Tint_Struct Primary;
Tint_Struct Secondary;
};
Tint_Struct Slot[textures::TextureCount];
};
TintProfile();
};
} /*EQEmu*/

View File

@ -235,10 +235,10 @@ void WorldDatabase::GetCharSelectInfo(uint32 accountID, EQApplicationPacket **ou
auto results_b = database.QueryDatabase(cquery); uint8 slot = 0;
for (auto row_b = results_b.begin(); row_b != results_b.end(); ++row_b) {
slot = atoi(row_b[0]);
pp.item_tint[slot].RGB.Red = atoi(row_b[1]);
pp.item_tint[slot].RGB.Green = atoi(row_b[2]);
pp.item_tint[slot].RGB.Blue = atoi(row_b[3]);
pp.item_tint[slot].RGB.UseTint = atoi(row_b[4]);
pp.item_tint.Slot[slot].Red = atoi(row_b[1]);
pp.item_tint.Slot[slot].Green = atoi(row_b[2]);
pp.item_tint.Slot[slot].Blue = atoi(row_b[3]);
pp.item_tint.Slot[slot].UseTint = atoi(row_b[4]);
}
/* Character Material Data End */
@ -279,8 +279,8 @@ void WorldDatabase::GetCharSelectInfo(uint32 accountID, EQApplicationPacket **ou
}
else {
uint32 color = 0;
if (pp.item_tint[matslot].RGB.UseTint) {
color = pp.item_tint[matslot].Color;
if (pp.item_tint.Slot[matslot].UseTint) {
color = pp.item_tint.Slot[matslot].Color;
}
else {
color = inst->GetColor();

View File

@ -2965,12 +2965,12 @@ void Bot::FillSpawnStruct(NewSpawn_Struct* ns, Mob* ForWho) {
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.equipment_tint.Slot[i].Color = armor_tint[i];
else
ns->spawn.colors[i].Color = item->Color;
ns->spawn.equipment_tint.Slot[i].Color = item->Color;
} else {
if (armor_tint[i])
ns->spawn.colors[i].Color = armor_tint[i];
ns->spawn.equipment_tint.Slot[i].Color = armor_tint[i];
}
}
}
@ -2982,7 +2982,7 @@ void Bot::FillSpawnStruct(NewSpawn_Struct* ns, Mob* ForWho) {
if(strlen(item->IDFile) > 2)
ns->spawn.equipment[EQEmu::textures::TexturePrimary].Material = atoi(&item->IDFile[2]);
ns->spawn.colors[EQEmu::textures::TexturePrimary].Color = GetEquipmentColor(EQEmu::textures::TexturePrimary);
ns->spawn.equipment_tint.Primary.Color = GetEquipmentColor(EQEmu::textures::TexturePrimary);
}
}
@ -2993,7 +2993,7 @@ void Bot::FillSpawnStruct(NewSpawn_Struct* ns, Mob* ForWho) {
if(strlen(item->IDFile) > 2)
ns->spawn.equipment[EQEmu::textures::TextureSecondary].Material = atoi(&item->IDFile[2]);
ns->spawn.colors[EQEmu::textures::TextureSecondary].Color = GetEquipmentColor(EQEmu::textures::TextureSecondary);
ns->spawn.equipment_tint.Secondary.Color = GetEquipmentColor(EQEmu::textures::TextureSecondary);
}
}
}

View File

@ -3062,19 +3062,19 @@ 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;
EQEmu::Tint_Struct new_color;
new_color.Color = color;
SetTint(in_slot, new_color);
database.SaveCharacterMaterialColor(this->CharacterID(), in_slot, color);
}
// Still need to reconcile bracer01 versus bracer02
void Client::SetTint(int16 in_slot, Color_Struct& color) {
void Client::SetTint(int16 in_slot, EQEmu::Tint_Struct& color) {
uint8 matslot = Inventory::CalcMaterialFromSlot(in_slot);
if (matslot != EQEmu::textures::TextureInvalid)
{
m_pp.item_tint[matslot].Color = color.Color;
m_pp.item_tint.Slot[matslot].Color = color.Color;
database.SaveCharacterMaterialColor(this->CharacterID(), in_slot, color.Color);
}

View File

@ -253,7 +253,7 @@ public:
void SendBuyerPacket(Client* Buyer);
GetItems_Struct* GetTraderItems();
void SendBazaarWelcome();
void DyeArmor(DyeStruct* dye);
void DyeArmor(EQEmu::TintProfile* dye);
uint8 SlotConvert(uint8 slot,bool bracer=false);
void Message_StringID(uint32 type, uint32 string_id, uint32 distance = 0);
void Message_StringID(uint32 type, uint32 string_id, const char* message,const char* message2=0,const char* message3=0,const char* message4=0,const char* message5=0,const char* message6=0,const char* message7=0,const char* message8=0,const char* message9=0, uint32 distance = 0);
@ -802,7 +802,7 @@ public:
uint32 NukeItem(uint32 itemnum, uint8 where_to_check =
(invWhereWorn | invWherePersonal | invWhereBank | invWhereSharedBank | invWhereTrading | invWhereCursor));
void SetTint(int16 slot_id, uint32 color);
void SetTint(int16 slot_id, Color_Struct& color);
void SetTint(int16 slot_id, EQEmu::Tint_Struct& color);
void SetMaterial(int16 slot_id, uint32 item_id);
void Undye();
int32 GetItemIDAt(int16 slot_id);

View File

@ -1315,9 +1315,9 @@ void Client::Handle_Connect_OP_ZoneEntry(const EQApplicationPacket *app)
/* Set item material tint */
for (int i = EQEmu::textures::TextureBegin; i <= EQEmu::textures::LastTexture; i++)
{
if (m_pp.item_tint[i].RGB.UseTint == 1 || m_pp.item_tint[i].RGB.UseTint == 255)
if (m_pp.item_tint.Slot[i].UseTint == 1 || m_pp.item_tint.Slot[i].UseTint == 255)
{
m_pp.item_tint[i].RGB.UseTint = 0xFF;
m_pp.item_tint.Slot[i].UseTint = 0xFF;
}
}
@ -5379,10 +5379,10 @@ void Client::Handle_OP_DumpName(const EQApplicationPacket *app)
void Client::Handle_OP_Dye(const EQApplicationPacket *app)
{
if (app->size != sizeof(DyeStruct))
printf("Wrong size of DyeStruct, Got: %i, Expected: %zu\n", app->size, sizeof(DyeStruct));
if (app->size != sizeof(EQEmu::TintProfile))
printf("Wrong size of DyeStruct, Got: %i, Expected: %zu\n", app->size, sizeof(EQEmu::TintProfile));
else{
DyeStruct* dye = (DyeStruct*)app->pBuffer;
EQEmu::TintProfile* dye = (EQEmu::TintProfile*)app->pBuffer;
DyeArmor(dye);
}
return;

View File

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

View File

@ -116,15 +116,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.Head.Color = pcs->item_tint.Head.Color;
pc->item_tint.Chest.Color = pcs->item_tint.Chest.Color;
pc->item_tint.Arms.Color = pcs->item_tint.Arms.Color;
pc->item_tint.Wrist.Color = pcs->item_tint.Wrist.Color;
pc->item_tint.Hands.Color = pcs->item_tint.Hands.Color;
pc->item_tint.Legs.Color = pcs->item_tint.Legs.Color;
pc->item_tint.Feet.Color = pcs->item_tint.Feet.Color;
pc->item_tint.Primary.Color = pcs->item_tint.Primary.Color;
pc->item_tint.Secondary.Color = pcs->item_tint.Secondary.Color;
/* Load Physical Appearance */
pc->haircolor = pcs->haircolor;
@ -162,7 +162,7 @@ Corpse::Corpse(NPC* in_npc, ItemList* in_itemlist, uint32 in_npctypeid, const NP
{
corpse_graveyard_timer.Disable();
memset(item_tint, 0, sizeof(item_tint));
//memset(item_tint, 0, sizeof(item_tint));
is_corpse_changed = false;
is_player_corpse = false;
@ -277,7 +277,7 @@ Corpse::Corpse(Client* client, int32 in_rezexp) : Mob (
corpse_graveyard_timer.Disable();
}
memset(item_tint, 0, sizeof(item_tint));
//memset(item_tint, 0, sizeof(item_tint));
for (i = 0; i < MAX_LOOTERS; i++){
allowed_looters[i] = 0;
@ -321,7 +321,7 @@ Corpse::Corpse(Client* client, int32 in_rezexp) : Mob (
}
// get their tints
memcpy(item_tint, &client->GetPP().item_tint, sizeof(item_tint));
memcpy(&item_tint.Slot, &client->GetPP().item_tint, sizeof(item_tint));
// TODO soulbound items need not be added to corpse, but they need
// to go into the regular slots on the player, out of bags
@ -502,7 +502,7 @@ in_helmtexture,
if (!zone->HasGraveyard() || wasAtGraveyard)
corpse_graveyard_timer.Disable();
memset(item_tint, 0, sizeof(item_tint));
//memset(item_tint, 0, sizeof(item_tint));
is_corpse_changed = false;
is_player_corpse = true;
@ -591,7 +591,7 @@ bool Corpse::Save() {
dbpc->helmtexture = this->helmtexture;
dbpc->exp = rez_experience;
memcpy(dbpc->item_tint, item_tint, sizeof(dbpc->item_tint));
memcpy(&dbpc->item_tint.Slot, &item_tint.Slot, sizeof(dbpc->item_tint));
dbpc->haircolor = haircolor;
dbpc->beardcolor = beardcolor;
dbpc->eyecolor2 = eyecolor1;
@ -1420,9 +1420,7 @@ uint32 Corpse::GetEquipmentColor(uint8 material_slot) const {
item = database.GetItem(GetEquipment(material_slot));
if(item != NO_ITEM) {
return item_tint[material_slot].RGB.UseTint ?
item_tint[material_slot].Color :
item->Color;
return (item_tint.Slot[material_slot].UseTint ? item_tint.Slot[material_slot].Color : item->Color);
}
return 0;

View File

@ -154,7 +154,7 @@ private:
Timer corpse_delay_timer;
Timer corpse_graveyard_timer;
Timer loot_cooldown_timer; /* Delay between loot actions on the corpse entity */
Color_Struct item_tint[9];
EQEmu::TintProfile item_tint;
};

View File

@ -2019,28 +2019,28 @@ void Client::QSSwapItemAuditor(MoveItem_Struct* move_in, bool postaction_call) {
safe_delete(qspack);
}
void Client::DyeArmor(DyeStruct* dye){
void Client::DyeArmor(EQEmu::TintProfile* dye){
int16 slot=0;
for (int i = EQEmu::textures::TextureBegin; i <= EQEmu::textures::LastTintableTexture; i++) {
if ((m_pp.item_tint[i].Color & 0x00FFFFFF) != (dye->dye[i].Color & 0x00FFFFFF)) {
if ((m_pp.item_tint.Slot[i].Color & 0x00FFFFFF) != (dye->Slot[i].Color & 0x00FFFFFF)) {
slot = m_inv.HasItem(32557, 1, invWherePersonal);
if (slot != INVALID_INDEX){
DeleteItemInInventory(slot,1,true);
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->Slot[i].Red << 16) | ((uint32)dye->Slot[i].Green << 8) | ((uint32)dye->Slot[i].Blue);
inst->SetColor(armor_color);
database.SaveCharacterMaterialColor(this->CharacterID(), i, armor_color);
database.SaveInventory(CharacterID(),inst,slot2);
if(dye->dye[i].RGB.UseTint)
m_pp.item_tint[i].RGB.UseTint = 0xFF;
if(dye->Slot[i].UseTint)
m_pp.item_tint.Slot[i].UseTint = 0xFF;
else
m_pp.item_tint[i].RGB.UseTint=0x00;
m_pp.item_tint.Slot[i].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.Slot[i].Blue=dye->Slot[i].Blue;
m_pp.item_tint.Slot[i].Red=dye->Slot[i].Red;
m_pp.item_tint.Slot[i].Green=dye->Slot[i].Green;
SendWearChange(i);
}
else{
@ -2636,7 +2636,7 @@ uint32 Client::GetEquipmentColor(uint8 material_slot) const
const EQEmu::ItemBase *item = database.GetItem(GetEquipment(material_slot));
if(item != nullptr)
return ((m_pp.item_tint[material_slot].RGB.UseTint) ? m_pp.item_tint[material_slot].Color : item->Color);
return ((m_pp.item_tint.Slot[material_slot].UseTint) ? m_pp.item_tint.Slot[material_slot].Color : item->Color);
return 0;
}

View File

@ -1162,7 +1162,7 @@ void Mob::FillSpawnStruct(NewSpawn_Struct* ns, Mob* ForWho)
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_tint.Slot[i].Color = GetEquipmentColor(i);
}
}

View File

@ -1170,10 +1170,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.UseTint = atoi(row[r]);
pp->item_tint.Slot[i].Blue = atoi(row[r]); r++;
pp->item_tint.Slot[i].Green = atoi(row[r]); r++;
pp->item_tint.Slot[i].Red = atoi(row[r]); r++;
pp->item_tint.Slot[i].UseTint = atoi(row[r]);
}
return true;
}
@ -3627,9 +3627,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.Head.Color, dbpc->item_tint.Chest.Color, dbpc->item_tint.Arms.Color,
dbpc->item_tint.Wrist.Color, dbpc->item_tint.Hands.Color, dbpc->item_tint.Legs.Color,
dbpc->item_tint.Feet.Color, dbpc->item_tint.Primary.Color, dbpc->item_tint.Secondary.Color,
db_id);
auto results = QueryDatabase(query);
@ -3720,15 +3720,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.Head.Color,
dbpc->item_tint.Chest.Color,
dbpc->item_tint.Arms.Color,
dbpc->item_tint.Wrist.Color,
dbpc->item_tint.Hands.Color,
dbpc->item_tint.Legs.Color,
dbpc->item_tint.Feet.Color,
dbpc->item_tint.Primary.Color,
dbpc->item_tint.Secondary.Color
);
auto results = QueryDatabase(query);
uint32 last_insert_id = results.LastInsertedID();
@ -3900,15 +3900,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.Head.Color = atoul(row[i++]); // wc_1,
pcs->item_tint.Chest.Color = atoul(row[i++]); // wc_2,
pcs->item_tint.Arms.Color = atoul(row[i++]); // wc_3,
pcs->item_tint.Wrist.Color = atoul(row[i++]); // wc_4,
pcs->item_tint.Hands.Color = atoul(row[i++]); // wc_5,
pcs->item_tint.Legs.Color = atoul(row[i++]); // wc_6,
pcs->item_tint.Feet.Color = atoul(row[i++]); // wc_7,
pcs->item_tint.Primary.Color = atoul(row[i++]); // wc_8,
pcs->item_tint.Secondary.Color = atoul(row[i++]); // wc_9
}
query = StringFormat(
"SELECT \n"

View File

@ -169,7 +169,7 @@ struct PlayerCorpse_Struct {
uint32 silver;
uint32 gold;
uint32 plat;
Color_Struct item_tint[9];
EQEmu::TintProfile item_tint;
uint8 haircolor;
uint8 beardcolor;
uint8 eyecolor1;