- Base attack for non players is now calculated as str + [str/10]^2 (it does not has +dex/5+luk/5 which players do have)

- Fixed the char-sql server trying to read the gms off a "gm_db" config setting stead of "login_db"


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@8981 54d463be-8e91-2dee-dedb-b68131a5f0ec
This commit is contained in:
skotlex
2006-10-13 18:50:55 +00:00
parent af7c7912a6
commit a2be20df3d
3 changed files with 25 additions and 14 deletions

View File

@@ -4,6 +4,10 @@ AS OF SVN REV. 5091, WE ARE NOW USING TRUNK. ALL UNTESTED BUGFIXES/FEATURES GO
IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK.
2006/10/13
* Base attack for non players is now calculated as str + [str/10]^2 (it
does not has +dex/5+luk/5 which players do have) [Skotlex]
* Fixed the char-sql server trying to read the gms off a "gm_db" config
setting stead of "login_db" [Skotlex]
* Corrected Throw Arrow/Musical Strike's damage formula [Skotlex]
* Altered Trick Dead. It doesn't prevents skills from being casted on you
now, but damage-based skills will do no damage. [Skotlex]

View File

@@ -56,7 +56,6 @@ char guild_skill_db[256] = "guild_skill";
char guild_storage_db[256] = "guild_storage";
char party_db[256] = "party";
char pet_db[256] = "pet";
char gm_db[256] = "gm_accounts";
char friend_db[256] = "friends";
#ifdef TXT_SQL_CONVERT
int save_log = 0; //Have the logs be off by default when converting
@@ -65,6 +64,7 @@ int save_log = 1;
int db_use_sqldbs;
int connection_ping_interval = 0;
char login_db[256] = "login";
char login_db_account_id[32] = "account_id";
char login_db_level[32] = "level";
@@ -377,7 +377,7 @@ void read_gm_account(void) {
aFree(gm_account);
GM_num = 0;
sprintf(tmp_sql, "SELECT `%s`,`%s` FROM `%s` WHERE `%s`>='%d'",login_db_account_id,login_db_level,gm_db,login_db_level,lowest_gm_level);
sprintf(tmp_sql, "SELECT `%s`,`%s` FROM `%s` WHERE `%s`>='%d'",login_db_account_id,login_db_level,login_db,login_db_level,lowest_gm_level);
if (mysql_query(&lmysql_handle, tmp_sql)) {
ShowSQL("DB error - %s\n",mysql_error(&lmysql_handle));
ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
@@ -3932,8 +3932,17 @@ void sql_config_read(const char *cfgName){ /* Kalaspuff, to get login_db */
char_gm_read = true;
else
char_gm_read = false;
} else if(strcmpi(w1, "gm_db") == 0) {
strcpy(gm_db, w2);
//custom columns for login database
}else if(strcmpi(w1,"login_db")==0){
strcpy(login_db, w2);
}else if(strcmpi(w1,"login_db_level")==0){
strcpy(login_db_level,w2);
}else if(strcmpi(w1,"login_db_account_id")==0){
strcpy(login_db_account_id,w2);
}else if(strcmpi(w1,"lowest_gm_level")==0){
lowest_gm_level = atoi(w2);
ShowStatus("set lowest_gm_level : %s\n",w2);
//support the import command, just like any other config
#endif
}else if(strcmpi(w1,"scdata_db")==0){
strcpy(scdata_db,w2);
@@ -3988,15 +3997,7 @@ void sql_config_read(const char *cfgName){ /* Kalaspuff, to get login_db */
strcpy(item_db2_db,w2);
} else if(strcmpi(w1,"connection_ping_interval")==0) {
connection_ping_interval = config_switch(w2);
//custom columns for login database
}else if(strcmpi(w1,"login_db_level")==0){
strcpy(login_db_level,w2);
}else if(strcmpi(w1,"login_db_account_id")==0){
strcpy(login_db_account_id,w2);
}else if(strcmpi(w1,"lowest_gm_level")==0){
lowest_gm_level = atoi(w2);
ShowStatus("set lowest_gm_level : %s\n",w2);
//support the import command, just like any other config
#endif
}else if(strcmpi(w1,"import")==0){
sql_config_read(w2);

View File

@@ -1188,8 +1188,14 @@ static int status_base_atk(struct block_list *bl, struct status_data *status)
str = status->str;
dex = status->dex;
}
//Normally only players have base-atk, but homunc have a different batk
// equation, hinting that perhaps non-players should use this for batk.
// [Skotlex]
dstr = str/10;
return str + dstr*dstr + dex/5 + status->luk/5;
str += dstr*dstr;
if (bl->type == BL_PC)
str+= dex/5 + status->luk/5;
return str;
}
#define status_base_matk_max(status) (status->int_+(status->int_/5)*(status->int_/5))