summaryrefslogtreecommitdiff
path: root/src/char/char.h
diff options
context:
space:
mode:
authorshennetsind <ind@henn.et>2013-03-14 20:15:07 -0300
committershennetsind <ind@henn.et>2013-03-14 20:15:07 -0300
commit84e8f1872f0f00d6f82d6fe85974bb1f37247c53 (patch)
tree758980ea103f740ea98f2527a48869737f5f4f30 /src/char/char.h
parent54b5ec95ca29216dcdac7e913f8a0c959a6c14a4 (diff)
downloadhercules-84e8f1872f0f00d6f82d6fe85974bb1f37247c53.tar.gz
hercules-84e8f1872f0f00d6f82d6fe85974bb1f37247c53.tar.bz2
hercules-84e8f1872f0f00d6f82d6fe85974bb1f37247c53.tar.xz
hercules-84e8f1872f0f00d6f82d6fe85974bb1f37247c53.zip
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 <ind@henn.et>
Diffstat (limited to 'src/char/char.h')
-rw-r--r--src/char/char.h15
1 files changed, 14 insertions, 1 deletions
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