Question about Player

EQ2Emulator Development forum.

Moderator: Team Members

Post Reply
User avatar
alfa
Team Member
Posts: 550
Joined: Fri Jul 27, 2007 6:24 pm
Location: France
Contact:

Question about Player

Post by alfa » Sun Oct 14, 2012 6:53 pm

In code I see (Player.cpp)

Code: Select all

		packet->setDataByName("heat", info_struct->heat);
		packet->setDataByName("cold", info_struct->cold);
		packet->setDataByName("magic", info_struct->magic);
		packet->setDataByName("mental", info_struct->mental);
		packet->setDataByName("divine", info_struct->divine);
		packet->setDataByName("disease", info_struct->disease);
		packet->setDataByName("poison", info_struct->poison);
		packet->setDataByName("heat_base", info_struct->heat_base);
		packet->setDataByName("cold_base", info_struct->cold_base);
		packet->setDataByName("magic_base", info_struct->magic_base);
		packet->setDataByName("mental_base", info_struct->mental_base);
		packet->setDataByName("divine_base", info_struct->divine_base);
		packet->setDataByName("disease_base", info_struct->disease_base);
		packet->setDataByName("poison_base", info_struct->poison_base);
But EQ2 take in count only (Since SF if I'm not wrong) Elemental (heat, cold), Noxious (mental, divine), Arcane (disease, poison), they keep them in players struct anyway ?
Fight with me... Or die, like the rest.
J.A. say: "I think Xinux tried to tell me this, but I ignore most things he suggests."

Jabantiz
Lead Developer
Posts: 2912
Joined: Wed Jul 25, 2007 2:52 pm
Location: California

Re: Question about Player

Post by Jabantiz » Sun Oct 14, 2012 7:00 pm

Those are left in so we can support older clients, the current code should look like this

Code: Select all

      if (version <= 996){
			packet->setDataByName("heat", info_struct->heat);
			packet->setDataByName("cold", info_struct->cold);
			packet->setDataByName("magic", info_struct->magic);
			packet->setDataByName("mental", info_struct->mental);
			packet->setDataByName("divine", info_struct->divine);
			packet->setDataByName("disease", info_struct->disease);
			packet->setDataByName("poison", info_struct->poison);
			packet->setDataByName("heat_base", info_struct->heat_base);
			packet->setDataByName("cold_base", info_struct->cold_base);
			packet->setDataByName("magic_base", info_struct->magic_base);
			packet->setDataByName("mental_base", info_struct->mental_base);
			packet->setDataByName("divine_base", info_struct->divine_base);
			packet->setDataByName("disease_base", info_struct->disease_base);
			packet->setDataByName("poison_base", info_struct->poison_base);
		}
		else{
			packet->setDataByName("elemental", info_struct->heat);
			packet->setDataByName("noxious", info_struct->poison);
			packet->setDataByName("arcane", info_struct->magic);
		}
SF is version 1008 and DoV is 1096 so both will use the code in the else wich is elemental, noxious, and arcane.

User avatar
alfa
Team Member
Posts: 550
Joined: Fri Jul 27, 2007 6:24 pm
Location: France
Contact:

Re: Question about Player

Post by alfa » Mon Oct 15, 2012 3:25 am

Thats what I was thinking but there is no if in current code Jab.
Player.cpp line 297
Fight with me... Or die, like the rest.
J.A. say: "I think Xinux tried to tell me this, but I ignore most things he suggests."

User avatar
John Adams
Retired
Posts: 9684
Joined: Thu Jul 26, 2007 6:27 am
EQ2Emu Server: EQ2Emulator Test Center
Characters: John
Location: Arizona
Contact:

Re: Question about Player

Post by John Adams » Mon Oct 15, 2012 9:58 am

alfa is correct. That if never made it to SVN apparently. Not in my dev code either.

User avatar
alfa
Team Member
Posts: 550
Joined: Fri Jul 27, 2007 6:24 pm
Location: France
Contact:

Re: Question about Player

Post by alfa » Mon Oct 15, 2012 12:51 pm

Line 552 --> 572 it's add but not in PlayerInfo::serialize2
Fight with me... Or die, like the rest.
J.A. say: "I think Xinux tried to tell me this, but I ignore most things he suggests."

Jabantiz
Lead Developer
Posts: 2912
Joined: Wed Jul 25, 2007 2:52 pm
Location: California

Re: Question about Player

Post by Jabantiz » Mon Oct 15, 2012 2:59 pm

My player.cpp is the same as the one on svn, the code was from PlayerInfo::serialize(int16 version), serialize2 and serialize3 are never called only serialize matters. I am not sure why 2 and 3 are in the code, may be back ups from long ago but they do nothing, serialize is what you want to look at as far as char sheet is concerned.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest