Fixed unknown map in character select (#3761)

Fixes #1145

Credits to @4144 for finding this!

Thanks to @RadianFord for reporting.
This commit is contained in:
Lemongrass3110
2018-12-20 17:56:13 +01:00
committed by GitHub
parent ec3b7077cb
commit 1c987de71d
3 changed files with 18 additions and 3 deletions

View File

@@ -899,7 +899,7 @@ int char_mmo_char_tobuf(uint8* buf, struct mmo_charstatus* p);
//=====================================================================================================
// Loads the basic character rooster for the given account. Returns total buffer used.
int char_mmo_chars_fromsql(struct char_session_data* sd, uint8* buf) {
int char_mmo_chars_fromsql(struct char_session_data* sd, uint8* buf, uint8* count ) {
SqlStmt* stmt;
struct mmo_charstatus p;
int j = 0, i;
@@ -992,6 +992,10 @@ int char_mmo_chars_fromsql(struct char_session_data* sd, uint8* buf) {
sd->char_moves[p.slot] = p.character_moves;
}
if( count != nullptr ){
*count = i;
}
memset(sd->new_name,0,sizeof(sd->new_name));
SqlStmt_Free(stmt);