summaryrefslogtreecommitdiff
path: root/src/char_sql
diff options
context:
space:
mode:
Diffstat (limited to 'src/char_sql')
-rw-r--r--src/char_sql/char.c11
-rw-r--r--src/char_sql/char.h2
2 files changed, 7 insertions, 6 deletions
diff --git a/src/char_sql/char.c b/src/char_sql/char.c
index 1bd9681b3..f9a431f73 100644
--- a/src/char_sql/char.c
+++ b/src/char_sql/char.c
@@ -32,6 +32,11 @@
#include <stdio.h>
#include <stdlib.h>
+// private declarations
+#define CHAR_CONF_NAME "conf/char_athena.conf"
+#define LAN_CONF_NAME "conf/subnet_athena.conf"
+#define SQL_CONF_NAME "conf/inter_athena.conf"
+
#ifndef TXT_SQL_CONVERT
static struct dbt *char_db_;
#endif
@@ -68,8 +73,6 @@ char login_db_level[32] = "level";
int lowest_gm_level = 1;
-char *SQL_CONF_NAME = "conf/inter_athena.conf";
-
struct mmo_map_server {
uint32 ip;
uint16 port;
@@ -509,8 +512,8 @@ int mmo_char_tosql(int char_id, struct mmo_charstatus *p){
{ //Insert the barebones to then update the rest.
char t_name[NAME_LENGTH*2];
jstrescapecpy(t_name, p->name);
- sprintf(tmp_sql, "REPLACE INTO `%s` (`account_id`, `char_num`, `name`) VALUES ('%d', '%d', '%s')",
- char_db, p->account_id, p->char_num, t_name);
+ sprintf(tmp_sql, "REPLACE INTO `%s` (`char_id`, `account_id`, `char_num`, `name`) VALUES ('%d', '%d', '%d', '%s')",
+ char_db, p->char_id, p->account_id, p->char_num, t_name);
if(mysql_query(&mysql_handle, tmp_sql))
{
ShowSQL("DB error - %s\n",mysql_error(&mysql_handle));
diff --git a/src/char_sql/char.h b/src/char_sql/char.h
index 54f0bbd9e..5af183033 100644
--- a/src/char_sql/char.h
+++ b/src/char_sql/char.h
@@ -22,8 +22,6 @@
#define START_CHAR_NUM 150000
#define MAX_MAP_SERVERS 30
-#define LAN_CONF_NAME "conf/subnet_athena.conf"
-
#define DEFAULT_AUTOSAVE_INTERVAL 300*1000
struct itemtmp {