From 0ce51345c593a04feb87d338fe74189cfb603223 Mon Sep 17 00:00:00 2001 From: skotlex Date: Wed, 28 Jun 2006 14:42:04 +0000 Subject: - Fixed a compile warning in the login txt/sql server. - Changed the mob drop rate adjust function to receive a signed int argument. Probably will fix those drops with 0% becoming 100% git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7371 54d463be-8e91-2dee-dedb-b68131a5f0ec --- src/login/login.c | 2 ++ src/login_sql/login.c | 4 ++-- src/map/mob.c | 4 ++-- 3 files changed, 6 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/login/login.c b/src/login/login.c index 197c40dda..a472b3216 100644 --- a/src/login/login.c +++ b/src/login/login.c @@ -175,6 +175,8 @@ int use_md5_passwds = 0; int console = 0; +int charif_sendallwos(int sfd, unsigned char *buf, unsigned int len); + //------------------------------ // Writing function of logs file //------------------------------ diff --git a/src/login_sql/login.c b/src/login_sql/login.c index 7bc4d124e..d26e0cd04 100644 --- a/src/login_sql/login.c +++ b/src/login_sql/login.c @@ -159,6 +159,8 @@ static void* create_online_user(DBKey key, va_list args) { return p; } +int charif_sendallwos(int sfd, unsigned char *buf, unsigned int len); + //----------------------------------------------------- // Online User Database [Wizputer] //----------------------------------------------------- @@ -237,8 +239,6 @@ void read_gm_account(void) { } } -int charif_sendallwos(int sfd, unsigned char *buf, unsigned int len); - //----------------------------------------------------- // Send GM accounts to all char-server //----------------------------------------------------- diff --git a/src/map/mob.c b/src/map/mob.c index 2b1673687..ab195ecac 100644 --- a/src/map/mob.c +++ b/src/map/mob.c @@ -3060,7 +3060,7 @@ static int mob_makedummymobdb(int class_) } //Adjusts the drop rate of item according to the criteria given. [Skotlex] -static unsigned int mob_drop_adjust(unsigned int rate, int rate_adjust, unsigned short rate_min, unsigned short rate_max) +static unsigned int mob_drop_adjust(int rate, int rate_adjust, unsigned short rate_min, unsigned short rate_max) { if (battle_config.logarithmic_drops && rate_adjust > 0) //Logarithmic drops equation by Ishizu-Chan //Equation: Droprate(x,y) = x * (5 - log(x)) ^ (ln(y) / ln(5)) @@ -3068,7 +3068,7 @@ static unsigned int mob_drop_adjust(unsigned int rate, int rate_adjust, unsigned rate = (int)(rate * pow((5.0 - log10(rate)), (log(rate_adjust/100.) / log(5.0))) + 0.5); else //Classical linear rate adjustment. rate = rate*rate_adjust/100; - return (rate>rate_max)?rate_max:((rate