summaryrefslogtreecommitdiff
path: root/src/char_sql/char.c
diff options
context:
space:
mode:
authorultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-07-01 10:19:43 +0000
committerultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-07-01 10:19:43 +0000
commit85f4d70c7d6f06bbce93360cb05308de2901a683 (patch)
treea399cb6da72f091864c9a9ded6c33f8f8e4dd46c /src/char_sql/char.c
parent601e50bee37d39f293b63ea0f1e0a5572cb67cdb (diff)
downloadhercules-85f4d70c7d6f06bbce93360cb05308de2901a683.tar.gz
hercules-85f4d70c7d6f06bbce93360cb05308de2901a683.tar.bz2
hercules-85f4d70c7d6f06bbce93360cb05308de2901a683.tar.xz
hercules-85f4d70c7d6f06bbce93360cb05308de2901a683.zip
* TXT->SQL converter fixup
- Added missing char_id insert which totally messed up the conversion - Fixed login converter ignoring many columns (although it had the data) - Pointed out that Login-stored account variable conversion is MISSING! - Pointed out that Status, Homunculus and Mapreg conversion is MISSING! - Blocked the config functions from exiting server when file not found - Finally added VS8 project files for this thing git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10835 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/char_sql/char.c')
-rw-r--r--src/char_sql/char.c11
1 files changed, 7 insertions, 4 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));