View Single Post
  #5  
Old 08-04-2008, 01:01 PM
kraeger
Fire Beetle
 
Join Date: Mar 2008
Location: Halas, Everfrost
Posts: 9
Default

I improved the fix (If no bug is found, this will be the final version). It now looks better (in the code) and it fixes more visual problems. There was a missing hairstyle, but there was also a missing face, eyecolor, haircolor, beard and beardcolor.

Here is the new fix, please use this one instead of the one in the first post:
(I tested it for 10-20 minutes and it seems to works well, but please write in the thread if you still see any visual problems).

***New code is in blue***

In worlddb.cpp, on (or near) line 85:

New code:
Code:
cs->hair[char_num]				= pp->hairstyle;
cs->beard[char_num]				= pp->beard;

if (pp->face == 99)       {cs->face[char_num] = 0;}
if (pp->eyecolor1 == 99)  {cs->eyecolor1[char_num] = 0;}
if (pp->eyecolor2 == 99)  {cs->eyecolor2[char_num] = 0;}
if (pp->hairstyle == 99)  {cs->hair[char_num] = 0;}
if (pp->haircolor == 99)  {cs->haircolor[char_num] = 0;}
if (pp->beard == 99)      {cs->beard[char_num] = 0;}
if (pp->beardcolor == 99) {cs->beardcolor[char_num] = 0;}
				
// Character's equipped items
// @merth: Haven't done bracer01/bracer02 yet.
In client_packet.cpp, on (or near) line 4390:

New code:
Code:
	
        m_pp.beard		= fc->beard;

	if (fc->face == 0)       {m_pp.face = 99;}
	if (fc->eyecolor1 == 0)  {m_pp.eyecolor1 = 99;}
	if (fc->eyecolor2 == 0)  {m_pp.eyecolor2 = 99;}
	if (fc->hairstyle == 0)  {m_pp.hairstyle = 99;}
	if (fc->haircolor == 0)  {m_pp.haircolor = 99;}
	if (fc->beard == 0)      {m_pp.beard = 99;}
	if (fc->beardcolor == 0) {m_pp.beardcolor = 99;}

	
	Save();
	Message_StringID(13,FACE_ACCEPTED);
In Titanium.cpp, on (or near) line 511:

New code:
Code:
	
               eq->spawnId = emu->spawnId;
//		eq->unknown0344[4] = emu->unknown0344[4];
		eq->lfg = emu->lfg;

		if (emu->face == 99)	      {eq->face = 0;}
		if (emu->eyecolor1 == 99)  {eq->eyecolor1 = 0;}
		if (emu->eyecolor2 == 99)  {eq->eyecolor2 = 0;}
		if (emu->hairstyle == 99)  {eq->hairstyle = 0;}
		if (emu->haircolor == 99)  {eq->haircolor = 0;}
		if (emu->beard == 99)      {eq->beard = 0;}
		if (emu->beardcolor == 99) {eq->beardcolor = 0;}
      }
In client.cpp, on (or near) line 951:

New code:
Code:
 
       pp.beard		 	= cc->beard;
	pp.beardcolor	= cc->beardcolor;

	if (cc->face == 0)       {pp.face = 99;}
	if (cc->eyecolor1 == 0)  {pp.eyecolor1 = 99;}
	if (cc->eyecolor2 == 0)  {pp.eyecolor2 = 99;}
	if (cc->hairstyle == 0)  {pp.hairstyle = 99;}
	if (cc->haircolor == 0)  {pp.haircolor = 99;}
	if (cc->beard == 0)      {pp.beard = 99;}
	if (cc->beardcolor == 0) {pp.beardcolor = 99;}

	pp.birthday		= bday;
	pp.lastlogin	= bday;
Reply With Quote