Created from r1904
When conquest points were moved to their own table (char_points,) triggers.sql wasn't updated accordingly. As a result, creating a character that used a previous character's ID would drive the creation process insane, and lead to that whole Error 3301 nonsense until the server got it all sorted out.
At least on my first test, characters are now able to log in on the first try.
triggers.sql patch
-
- Developer
- Posts: 539
- Joined: Sun Jul 22, 2012 12:17 am
triggers.sql patch
- Attachments
-
- triggers.sql.patch
- (448 Bytes) Downloaded 227 times
Test Server: Hanekawa | Fantasy World: Naito
An occasionally updated list of what works
Bugs reports go here. | Project chat here.
Things I've found, but don't plan to work on.
An occasionally updated list of what works
Bugs reports go here. | Project chat here.
Things I've found, but don't plan to work on.
Re: triggers.sql patch
I think the charid increments? It should never try to re-use a number, afaik...
-- Whasf
-
- Developer
- Posts: 539
- Joined: Sun Jul 22, 2012 12:17 am
Re: triggers.sql patch
I kept deleting and recreating two characters, and it just kept going back to 21835 and 21836. There was a lot of server restarting in there, but after deleting a character the server was definitely recycling old IDs.
Edit:
Was looking for if connect_server determined the initial level cap, although I can think of a way to get around that. Found the culprit to ID re-use instead.Find highest charid, new character's charid is max + 1.
Also, connect_server does not. char_jobs defaults to 50.
Edit:
Was looking for if connect_server determined the initial level cap, although I can think of a way to get around that. Found the culprit to ID re-use instead.
Code: Select all
const int8* fmtQuery = "SELECT max(charid) FROM chars";
if( Sql_Query(SqlHandle,fmtQuery) == SQL_ERROR )
{
return -1;
}
uint32 CharID = 0;
if( Sql_NumRows(SqlHandle) != 0 )
{
Sql_NextRow(SqlHandle);
CharID = (uint32)Sql_GetUIntData(SqlHandle,0) + 1;
}
CharID = (CharID < 21828 ? 21828 : CharID);
Also, connect_server does not. char_jobs defaults to 50.
Test Server: Hanekawa | Fantasy World: Naito
An occasionally updated list of what works
Bugs reports go here. | Project chat here.
Things I've found, but don't plan to work on.
An occasionally updated list of what works
Bugs reports go here. | Project chat here.
Things I've found, but don't plan to work on.