From 84e8f1872f0f00d6f82d6fe85974bb1f37247c53 Mon Sep 17 00:00:00 2001 From: shennetsind Date: Thu, 14 Mar 2013 20:15:07 -0300 Subject: Fixed Pin Code Feature Now cross-platform, and stable ( after fixing I tested it a couple dozen times ). Special Thanks to Yommy for providing me with his packet list, without it I would have never figured what was wrong with it. Special Thanks to Jeroen who reported a inconsistency on the feature when used on windows. Signed-off-by: shennetsind --- src/char/char.h | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'src/char/char.h') diff --git a/src/char/char.h b/src/char/char.h index d75dc21f9..934c26f45 100644 --- a/src/char/char.h +++ b/src/char/char.h @@ -6,6 +6,7 @@ #include "../config/core.h" #include "../common/core.h" // CORE_ST_LAST +#include "../common/db.h" enum E_CHARSERVER_ST { CHARSERVER_ST_RUNNING = CORE_ST_LAST, @@ -26,13 +27,25 @@ struct char_session_data { uint32 version; uint8 clienttype; char pincode[4+1]; - uint16 pincode_seed; + uint32 pincode_seed; uint16 pincode_try; uint32 pincode_change; + bool pincode_pass; char new_name[NAME_LENGTH]; char birthdate[10+1]; // YYYY-MM-DD }; +struct online_char_data { + int account_id; + int char_id; + int fd; + int waiting_disconnect; + short server; // -2: unknown server, -1: not connected, 0+: id of server + bool pincode_passed; +}; + +DBMap* online_char_db; // int account_id -> struct online_char_data* + #define MAX_MAP_SERVERS 30 #define DEFAULT_AUTOSAVE_INTERVAL 300*1000 -- cgit v1.2.3-60-g2f50