summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-04-26 21:33:07 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-04-26 21:33:07 +0000
commit4f14362f9130681ad98788a46ac02b747969505a (patch)
tree6fac0b58d109c5e266aa39a86ce59a46fd80f2b0 /src
parenta4386f464b6b5eb470bf9a9d147fc0ec6e68afaf (diff)
downloadhercules-4f14362f9130681ad98788a46ac02b747969505a.tar.gz
hercules-4f14362f9130681ad98788a46ac02b747969505a.tar.bz2
hercules-4f14362f9130681ad98788a46ac02b747969505a.tar.xz
hercules-4f14362f9130681ad98788a46ac02b747969505a.zip
- Modified mob_drop_adjust function to receive unsigned int as initial parameter, should give a bit more room before data overflows.
- Increased range check for Extremity to 2. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6297 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src')
-rw-r--r--src/map/mob.c8
-rw-r--r--src/map/skill.c2
2 files changed, 6 insertions, 4 deletions
diff --git a/src/map/mob.c b/src/map/mob.c
index 342ab5b43..ccbc5851b 100644
--- a/src/map/mob.c
+++ b/src/map/mob.c
@@ -3066,7 +3066,7 @@ static int mob_makedummymobdb(int class_)
}
//Adjusts the drop rate of item according to the criteria given. [Skotlex]
-static int mob_drop_adjust(int rate, int rate_adjust, int rate_min, int rate_max)
+static unsigned int mob_drop_adjust(unsigned 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))
@@ -3174,7 +3174,8 @@ static int mob_readdb(void)
mob_db_data[class_]->dmotion=atoi(str[29]);
for(i=0;i<10;i++){ // 8 -> 10 Lupus
- int rate = 0,rate_adjust,type,ratemin,ratemax;
+ int rate = 0,rate_adjust,type;
+ unsigned short ratemin,ratemax;
struct item_data *id;
mob_db_data[class_]->dropitem[i].nameid=atoi(str[30+i*2]);
if (!mob_db_data[class_]->dropitem[i].nameid) {
@@ -3800,7 +3801,8 @@ static int mob_read_sqldb(void)
mob_db_data[class_]->dmotion = TO_INT(29);
for (i = 0; i < 10; i++){ // 8 -> 10 Lupus
- int rate = 0, rate_adjust, type, ratemin, ratemax;
+ int rate = 0, rate_adjust, type;
+ unsigned short ratemin, ratemax;
struct item_data *id;
mob_db_data[class_]->dropitem[i].nameid=TO_INT(30+i*2);
if (!mob_db_data[class_]->dropitem[i].nameid) {
diff --git a/src/map/skill.c b/src/map/skill.c
index 8893d28da..baeb2d571 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -2644,7 +2644,7 @@ int skill_castend_damage_id (struct block_list* src, struct block_list *bl,int s
if (sc->data[SC_COMBO].timer != -1) //This is one is here to make combo end even if skill failed.
status_change_end(src,SC_COMBO,-1);
}
- if(!check_distance_bl(src, bl, 1)) { //Need to move to target.
+ if(!check_distance_bl(src, bl, 2)) { //Need to move to target.
struct unit_data *ud;
int dx,dy;