Page 1 of 1

Question about Player

Posted: Sun Oct 14, 2012 6:53 pm
by alfa
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 ?

Re: Question about Player

Posted: Sun Oct 14, 2012 7:00 pm
by Jabantiz
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.

Re: Question about Player

Posted: Mon Oct 15, 2012 3:25 am
by alfa
Thats what I was thinking but there is no if in current code Jab.
Player.cpp line 297

Re: Question about Player

Posted: Mon Oct 15, 2012 9:58 am
by John Adams
alfa is correct. That if never made it to SVN apparently. Not in my dev code either.

Re: Question about Player

Posted: Mon Oct 15, 2012 12:51 pm
by alfa
Line 552 --> 572 it's add but not in PlayerInfo::serialize2

Re: Question about Player

Posted: Mon Oct 15, 2012 2:59 pm
by Jabantiz
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.