summaryrefslogtreecommitdiff
path: root/src/char_sql/int_party.c
diff options
context:
space:
mode:
authorwizputer <wizputer@54d463be-8e91-2dee-dedb-b68131a5f0ec>2004-11-29 03:10:26 +0000
committerwizputer <wizputer@54d463be-8e91-2dee-dedb-b68131a5f0ec>2004-11-29 03:10:26 +0000
commit6bf052b6b27325a808d16e3801d3bad8e271688c (patch)
treecdf4cf5cd84bac23f97f199835124ebbda687e13 /src/char_sql/int_party.c
parent47a18a4c48be7213bd162c8544a20310ecc99aee (diff)
downloadhercules-6bf052b6b27325a808d16e3801d3bad8e271688c.tar.gz
hercules-6bf052b6b27325a808d16e3801d3bad8e271688c.tar.bz2
hercules-6bf052b6b27325a808d16e3801d3bad8e271688c.tar.xz
hercules-6bf052b6b27325a808d16e3801d3bad8e271688c.zip
Fixed online system for char not sending players left "online" to login when restarting
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/branches/stable@408 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/char_sql/int_party.c')
-rw-r--r--src/char_sql/int_party.c15
1 files changed, 5 insertions, 10 deletions
diff --git a/src/char_sql/int_party.c b/src/char_sql/int_party.c
index 84de078c9..b5950d3a1 100644
--- a/src/char_sql/int_party.c
+++ b/src/char_sql/int_party.c
@@ -96,8 +96,8 @@ int inter_party_tosql(int party_id,struct party *p)
for (i=0;i<MAX_PARTY;i++){
if (p->member[i].account_id>0){
- sprintf(tmp_sql,"UPDATE `%s` SET `party_id`='%d', `online`='%d' WHERE `account_id`='%d' AND `name`='%s'",
- char_db, party_id, p->member[i].online, p->member[i].account_id,jstrescapecpy(t_member,p->member[i].name));
+ sprintf(tmp_sql,"UPDATE `%s` SET `party_id`='%d' WHERE `account_id`='%d' AND `name`='%s'",
+ char_db, party_id, p->member[i].account_id,jstrescapecpy(t_member,p->member[i].name));
//printf("%s",tmp_sql);
if(mysql_query(&mysql_handle, tmp_sql) ) {
printf("DB server Error (update `char`)- %s\n", mysql_error(&mysql_handle) );
@@ -127,7 +127,7 @@ int inter_party_tosql(int party_id,struct party *p)
return 0;
}
- sprintf(tmp_sql,"UPDATE `%s` SET `party_id`='%d', `online`='1' WHERE `account_id`='%d' AND `name`='%s'",
+ sprintf(tmp_sql,"UPDATE `%s` SET `party_id`='%d' WHERE `account_id`='%d' AND `name`='%s'",
char_db, party_id,leader_id, jstrescapecpy(t_member,p->member[i].name));
if(mysql_query(&mysql_handle, tmp_sql) ) {
printf("DB server Error (inset/update `party`)- %s\n", mysql_error(&mysql_handle) );
@@ -207,11 +207,6 @@ int inter_party_sql_init(){
printf("interserver party memory initialize.... (%d byte)\n",sizeof(struct party));
party_pt = calloc(sizeof(struct party), 1);
- sprintf(tmp_sql,"UPDATE `%s` SET `online`='0'", char_db);
- if(mysql_query(&mysql_handle, tmp_sql) ) {
- printf("DB server Error (update `char`)- %s\n", mysql_error(&mysql_handle) );
- }
-
sprintf (tmp_sql , "SELECT count(*) FROM `%s`",party_db);
if(mysql_query(&mysql_handle, tmp_sql) ) {
printf("DB server Error - %s\n", mysql_error(&mysql_handle) );
@@ -603,7 +598,7 @@ int mapif_parse_PartyLeave(int fd,int party_id,int account_id)
// Update char information, does the name need encoding?
- sprintf(tmp_sql,"UPDATE `%s` SET `party_id`='0', `online`='1' WHERE `party_id`='%d' AND `name`='%s'",
+ sprintf(tmp_sql,"UPDATE `%s` SET `party_id`='0' WHERE `party_id`='%d' AND `name`='%s'",
char_db, party_id, jstrescapecpy(t_member,p->member[i].name));
if(mysql_query(&mysql_handle, tmp_sql) ) {
printf("DB server Error (update `char`)- %s\n", mysql_error(&mysql_handle) );
@@ -617,7 +612,7 @@ int mapif_parse_PartyLeave(int fd,int party_id,int account_id)
if(p->member[j].account_id>0&&j!=i){
mapif_party_leaved(party_id,p->member[j].account_id,p->member[j].name);
// Update char information, does the name need encoding?
- sprintf(tmp_sql,"UPDATE `%s` SET `party_id`='0', `online`='1' WHERE `party_id`='%d' AND `name`='%s'",
+ sprintf(tmp_sql,"UPDATE `%s` SET `party_id`='0' WHERE `party_id`='%d' AND `name`='%s'",
char_db, party_id, jstrescapecpy(t_member,p->member[i].name));
if(mysql_query(&mysql_handle, tmp_sql) ) {
printf("DB server Error (update `char`)- %s\n", mysql_error(&mysql_handle) );