summaryrefslogtreecommitdiff
path: root/src/char_sql
diff options
context:
space:
mode:
authorsirius <sirius@54d463be-8e91-2dee-dedb-b68131a5f0ec>2005-02-15 16:38:33 +0000
committersirius <sirius@54d463be-8e91-2dee-dedb-b68131a5f0ec>2005-02-15 16:38:33 +0000
commit89b9949be05475aff1be28ef1e3a2a18add12cf2 (patch)
tree4cb7e4006a5fe8ce7ab2a8b86486e46065a73b12 /src/char_sql
parent1c61cb8c468dfe0c95c24f8f491e847c2ddcce78 (diff)
downloadhercules-89b9949be05475aff1be28ef1e3a2a18add12cf2.tar.gz
hercules-89b9949be05475aff1be28ef1e3a2a18add12cf2.tar.bz2
hercules-89b9949be05475aff1be28ef1e3a2a18add12cf2.tar.xz
hercules-89b9949be05475aff1be28ef1e3a2a18add12cf2.zip
modyfyed the charserver sql for the mapchange ^^ on splitted mapservers
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/branches/stable@1114 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/char_sql')
-rw-r--r--src/char_sql/char.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/char_sql/char.c b/src/char_sql/char.c
index 0521a21bc..2f1979eb6 100644
--- a/src/char_sql/char.c
+++ b/src/char_sql/char.c
@@ -2097,6 +2097,7 @@ int parse_frommap(int fd) {
WFIFOW(fd, 0) = 0x2b06;
memcpy(WFIFOP(fd,2), RFIFOP(fd,2), 42);
// printf("(map change) auth_fifo set %d - account_id:%08x login_id1:%08x\n", auth_fifo_pos, RFIFOL(fd, 2), RFIFOL(fd, 6));
+ printf("[MapChange] ");
auth_fifo[auth_fifo_pos].account_id = RFIFOL(fd, 2);
auth_fifo[auth_fifo_pos].login_id1 = RFIFOL(fd, 6);
auth_fifo[auth_fifo_pos].login_id2 = RFIFOL(fd,10);
@@ -2105,18 +2106,20 @@ int parse_frommap(int fd) {
auth_fifo[auth_fifo_pos].sex = RFIFOB(fd,44);
auth_fifo[auth_fifo_pos].ip = RFIFOL(fd,45);
- sprintf(tmp_sql, "SELECT `char_id` FROM `%s` WHERE `account_id` = '%d' AND `char_id`='%d'", char_db, RFIFOL(fd,2), RFIFOL(fd,14));
+ sprintf(tmp_sql, "SELECT `char_id`, `name` FROM `%s` WHERE `account_id` = '%d' AND `char_id`='%d'", char_db, RFIFOL(fd,2), RFIFOL(fd,14));
if (mysql_query(&mysql_handle, tmp_sql)) {
printf("DB server Error - %s\n", mysql_error(&mysql_handle));
}
sql_res = mysql_store_result(&mysql_handle);
if(sql_res){
i = atoi(sql_row[0]);
+ printf("aid: %d, cid: %d, name: %s", RFIFOL(fd,2), atoi(sql_row[0]), sql_row[1]);
mysql_free_result(sql_res);
auth_fifo[auth_fifo_pos].char_pos = auth_fifo[auth_fifo_pos].char_id;
auth_fifo_pos++;
WFIFOL(fd,6) = 0;
}else{
+ printf("Error, aborted\n");
return 0;
}
@@ -2126,7 +2129,7 @@ int parse_frommap(int fd) {
WFIFOSET(fd, 44);
RFIFOSKIP(fd, 49);
-
+ printf(" done.\n");
/*
if (( sql_row = mysql_fetch_row(sql_res))) {
i = atoi(sql_row[0]);