Page 1 of 1

Account Age bug - maybe?

Posted: Fri Feb 15, 2013 2:09 pm
by John Adams
I was poking around in loadCharacter() when I found this odd bit of code:

The SQL query builds this:

Code: Select all

DATEDIFF(curdate(), created_date) as accage
And the code uses it like this:

Code: Select all

		if (row[28])
			client->GetPlayer()->GetPlayerInfo()->SetAccountAge(atoi(row[28]));
Checkint out SetAccountAge, it's declared using an int8 (max 255??) in Player.h

Code: Select all

void SetAccountAge(int8 days);
Does this seem accurate? Or should we expect to never see accounts older than 255 days? Confused.

Re: Account Age bug - maybe?

Posted: Fri Feb 15, 2013 4:21 pm
by Zcoretri
On live I am over 3K in base account age 3.3k in overall account age, so I would think it should be a int16 at least.