* Mapregsql will now fully depend on mmysql_handle.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@5421 54d463be-8e91-2dee-dedb-b68131a5f0ec
This commit is contained in:
parent
16a1b9d809
commit
acb95c4f12
@ -5,6 +5,7 @@ IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK. EV
|
|||||||
GOES INTO TRUNK AND WILL BE MERGED INTO STABLE BY VALARIS AND WIZPUTER. -- VALARIS
|
GOES INTO TRUNK AND WILL BE MERGED INTO STABLE BY VALARIS AND WIZPUTER. -- VALARIS
|
||||||
|
|
||||||
2006/03/01
|
2006/03/01
|
||||||
|
* Mapregsql will now fully depend on mmysql_handle. [Lance]
|
||||||
* Optimized strcharinfo to use switch. [Lance]
|
* Optimized strcharinfo to use switch. [Lance]
|
||||||
* Some cleanup of the mob skill reading. Added error reporting for unknown
|
* Some cleanup of the mob skill reading. Added error reporting for unknown
|
||||||
states/conditions, error reporting now specifies the file and line number.
|
states/conditions, error reporting now specifies the file and line number.
|
||||||
|
@ -10522,13 +10522,13 @@ static int script_load_mapreg(void)
|
|||||||
int perfomance = gettick_nocache();
|
int perfomance = gettick_nocache();
|
||||||
sprintf(tmp_sql,"SELECT * FROM `%s`",mapregsql_db);
|
sprintf(tmp_sql,"SELECT * FROM `%s`",mapregsql_db);
|
||||||
ShowInfo("Querying script_load_mapreg ...\n");
|
ShowInfo("Querying script_load_mapreg ...\n");
|
||||||
if(mysql_query(&mapregsql_handle, tmp_sql) ) {
|
if(mysql_query(&mmysql_handle, tmp_sql) ) {
|
||||||
ShowSQL("DB error - %s\n",mysql_error(&mapregsql_handle));
|
ShowSQL("DB error - %s\n",mysql_error(&mmysql_handle));
|
||||||
ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
|
ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
ShowInfo("Success! Returning results ...\n");
|
ShowInfo("Success! Returning results ...\n");
|
||||||
mapregsql_res = mysql_store_result(&mapregsql_handle);
|
mapregsql_res = mysql_store_result(&mmysql_handle);
|
||||||
if (mapregsql_res) {
|
if (mapregsql_res) {
|
||||||
while ((mapregsql_row = mysql_fetch_row(mapregsql_res))) {
|
while ((mapregsql_row = mysql_fetch_row(mapregsql_res))) {
|
||||||
char buf1[33], *p = NULL;
|
char buf1[33], *p = NULL;
|
||||||
@ -10578,8 +10578,8 @@ static int script_save_mapreg_intsub(DBKey key,void *data,va_list ap)
|
|||||||
char *name=str_buf+str_data[num].str;
|
char *name=str_buf+str_data[num].str;
|
||||||
if ( name[1] != '@') {
|
if ( name[1] != '@') {
|
||||||
sprintf(tmp_sql,"UPDATE `%s` SET `%s`='%d' WHERE `%s`='%s' AND `%s`='%d'",mapregsql_db,mapregsql_db_value,(int)data,mapregsql_db_varname,name,mapregsql_db_index,i);
|
sprintf(tmp_sql,"UPDATE `%s` SET `%s`='%d' WHERE `%s`='%s' AND `%s`='%d'",mapregsql_db,mapregsql_db_value,(int)data,mapregsql_db_varname,name,mapregsql_db_index,i);
|
||||||
if(mysql_query(&mapregsql_handle, tmp_sql) ) {
|
if(mysql_query(&mmyregsql_handle, tmp_sql) ) {
|
||||||
ShowSQL("DB error - %s\n",mysql_error(&mapregsql_handle));
|
ShowSQL("DB error - %s\n",mysql_error(&mmyregsql_handle));
|
||||||
ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
|
ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -10605,8 +10605,8 @@ static int script_save_mapreg_strsub(DBKey key,void *data,va_list ap)
|
|||||||
char *name=str_buf+str_data[num].str;
|
char *name=str_buf+str_data[num].str;
|
||||||
if ( name[1] != '@') {
|
if ( name[1] != '@') {
|
||||||
sprintf(tmp_sql,"UPDATE `%s` SET `%s`='%s' WHERE `%s`='%s' AND `%s`='%d'",mapregsql_db,mapregsql_db_value,jstrescapecpy(tmp_str2,(char *)data),mapregsql_db_varname,name,mapregsql_db_index,i);
|
sprintf(tmp_sql,"UPDATE `%s` SET `%s`='%s' WHERE `%s`='%s' AND `%s`='%d'",mapregsql_db,mapregsql_db_value,jstrescapecpy(tmp_str2,(char *)data),mapregsql_db_varname,name,mapregsql_db_index,i);
|
||||||
if(mysql_query(&mapregsql_handle, tmp_sql) ) {
|
if(mysql_query(&mmyregsql_handle, tmp_sql) ) {
|
||||||
ShowSQL("DB error - %s\n",mysql_error(&mapregsql_handle));
|
ShowSQL("DB error - %s\n",mysql_error(&mmyregsql_handle));
|
||||||
ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
|
ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user