Fixed achievement handling in OnPCStatCalcEvent
Fixes #2314 Thanks to @CairoLee
This commit is contained in:
parent
ee1242908b
commit
70c14fa567
@ -4,6 +4,7 @@
|
||||
#include "../common/db.h"
|
||||
#include "../common/malloc.h"
|
||||
#include "../common/mmo.h"
|
||||
#include "../common/showmsg.h"
|
||||
#include "../common/socket.h"
|
||||
#include "../common/sql.h"
|
||||
#include "../common/strlib.h"
|
||||
@ -78,6 +79,9 @@ struct achievement *mapif_achievements_fromsql(uint32 char_id, int *count)
|
||||
|
||||
SqlStmt_Free(stmt);
|
||||
StringBuf_Clear(&buf);
|
||||
|
||||
ShowInfo("achievement load complete from DB - id: %d (total: %d)\n", char_id, *count);
|
||||
|
||||
return achievelog;
|
||||
}
|
||||
|
||||
|
@ -2112,6 +2112,8 @@ void intif_parse_achievements(int fd)
|
||||
if (sd->achievement_data.achievements) {
|
||||
aFree(sd->achievement_data.achievements);
|
||||
sd->achievement_data.achievements = NULL;
|
||||
sd->achievement_data.incompleteCount = 0;
|
||||
sd->achievement_data.count = 0;
|
||||
}
|
||||
} else {
|
||||
struct achievement *received = (struct achievement *)RFIFOP(fd, 8);
|
||||
|
Loading…
x
Reference in New Issue
Block a user