Thread: Beards?
View Single Post
  #7  
Old 04-19-2011, 03:41 AM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default

Here are the 3 main files related to structs and Titanium:

http://code.google.com/p/projecteqem...s/Titanium.cpp

Here is what you would look at there:
Code:
DECODE(OP_CharacterCreate) {
        DECODE_LENGTH_EXACT(structs::CharCreate_Struct);
        SETUP_DIRECT_DECODE(CharCreate_Struct, structs::CharCreate_Struct);
        IN(class_);
        IN(beardcolor);
        IN(beard);
        IN(haircolor);
        IN(gender);
        IN(race);
        IN(start_zone);
        IN(hairstyle);
        IN(deity);
        IN(STR);
        IN(STA);
        IN(AGI);
        IN(DEX);
        IN(WIS);
        IN(INT);
        IN(CHA);
        IN(face);
        IN(eyecolor1);
        IN(eyecolor2);
        FINISH_DIRECT_DECODE();
}

http://code.google.com/p/projecteqem...nium_structs.h

Here is the struct Titanium uses (this should be the only thing you would need to modify):
Code:
/*
** Character Creation struct
** Length: 140 Bytes
** OpCode: 0x0113
*/
struct CharCreate_Struct
{
/*0000*/	int32	class_;
/*0004*/	int32	haircolor;	// Might be hairstyle
/*0008*/	int32	beardcolor;	// Might be beard
/*0012*/	int32	beard;		// Might be beardcolor
/*0016*/	int32	gender;
/*0020*/	int32	race;
/*0024*/	int32	start_zone;
	// 0 = odus
	// 1 = qeynos
	// 2 = halas
	// 3 = rivervale
	// 4 = freeport
	// 5 = neriak
	// 6 = gukta/grobb
	// 7 = ogguk
	// 8 = kaladim
	// 9 = gfay
	// 10 = felwithe
	// 11 = akanon
	// 12 = cabalis
	// 13 = shar vahl
/*0028*/	int32	hairstyle;	// Might be haircolor
/*0032*/	int32	deity;
/*0036*/	int32	STR;
/*0040*/	int32	STA;
/*0044*/	int32	AGI;
/*0048*/	int32	DEX;
/*0052*/	int32	WIS;
/*0056*/	int32	INT;
/*0060*/	int32	CHA;
/*0064*/	int32	face;		// Could be unknown0076
/*0068*/	int32	eyecolor1;	//its possiable we could have these switched
/*0073*/	int32	eyecolor2;	//since setting one sets the other we really can't check
/*0076*/	int32	unknown0076;	// Could be face
/*0080*/
};
http://code.google.com/p/projecteqem...cket_structs.h

Here is the main struct for the emu that Titanium uses to decode to:

Code:
/*
** Character Creation struct
** Length: 140 Bytes
** OpCode: 0x0113
*/
struct CharCreate_Struct
{
/*0000*/	int32	class_;
/*0004*/	int32	haircolor;	// Might be hairstyle
/*0008*/	int32	beardcolor;	// Might be beard
/*0012*/	int32	beard;		// Might be beardcolor
/*0016*/	int32	gender;
/*0020*/	int32	race;
/*0024*/	int32	start_zone;
	// 0 = odus
	// 1 = qeynos
	// 2 = halas
	// 3 = rivervale
	// 4 = freeport
	// 5 = neriak
	// 6 = gukta/grobb
	// 7 = ogguk
	// 8 = kaladim
	// 9 = gfay
	// 10 = felwithe
	// 11 = akanon
	// 12 = cabalis
	// 13 = shar vahl
/*0028*/	int32	hairstyle;	// Might be haircolor
/*0032*/	int32	deity;
/*0036*/	int32	STR;
/*0040*/	int32	STA;
/*0044*/	int32	AGI;
/*0048*/	int32	DEX;
/*0052*/	int32	WIS;
/*0056*/	int32	INT;
/*0060*/	int32	CHA;
/*0064*/	int32	face;		// Could be unknown0076
/*0068*/	int32	eyecolor1;	//its possiable we could have these switched
/*0073*/	int32	eyecolor2;	//since setting one sets the other we really can't check
/*0076*/	int32	drakkin_heritage;	// added for SoF
/*0080*/	int32	drakkin_tattoo;		// added for SoF
/*0084*/	int32	drakkin_details;	// added for SoF
/*0088*/
};
As you can see, there are some comments about hair and beard and colors related to them that might be in the wrong spots. It probably wouldn't be too hard to test each out and correct it. Since all clients have to decode this, you would only need to adjust the Titanium struct, not the eq_structs.h file.If you do get the corrections made, feel free to share them so they can be corrected on the SVN. We always welcome new programmers to help out around here
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!
Reply With Quote