summaryrefslogtreecommitdiff
path: root/src/map/status.c
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-05-29 16:01:02 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-05-29 16:01:02 +0000
commit6277250d56cf88f1ec22ac20816d887089ebda45 (patch)
treeb7416ccbbfbf054ed23687ce37073b5555db34f3 /src/map/status.c
parent874e073947a9f3ef07f1d93338c0875a086afb85 (diff)
downloadhercules-6277250d56cf88f1ec22ac20816d887089ebda45.tar.gz
hercules-6277250d56cf88f1ec22ac20816d887089ebda45.tar.bz2
hercules-6277250d56cf88f1ec22ac20816d887089ebda45.tar.xz
hercules-6277250d56cf88f1ec22ac20816d887089ebda45.zip
- Added a division by zero check in mob_dead to prevent the (impossible) case where a mob dies with received damage of zero.
- Fixed compilation errors with SC_FLING... git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6821 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/status.c')
-rw-r--r--src/map/status.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/map/status.c b/src/map/status.c
index be465d848..ab391e092 100644
--- a/src/map/status.c
+++ b/src/map/status.c
@@ -344,7 +344,7 @@ void initChangeTables(void) {
set_sc(GS_ADJUSTMENT, SC_ADJUSTMENT, SI_ADJUSTMENT, SCB_HIT|SCB_FLEE);
set_sc(GS_INCREASING, SC_INCREASING, SI_ACCURACY, SCB_AGI|SCB_DEX|SCB_HIT);
set_sc(GS_GATLINGFEVER, SC_GATLINGFEVER, SI_GATLINGFEVER, SCB_FLEE|SCB_SPEED|SCB_ASPD);
- set_sc(GS_FLING, SC_FLING, SI_NONE, SCB_DEF|SCB_DEF2);
+ set_sc(GS_FLING, SC_FLING, SI_BLANK, SCB_DEF|SCB_DEF2);
//Uncomment and update when you plan on implementing.
// set_sc(NJ_TATAMIGAESHI, SC_TATAMIGAESHI, SI_BLANK);
@@ -2889,8 +2889,8 @@ static unsigned char status_calc_def(struct block_list *bl, struct status_change
def -= def * sc->data[SC_PROVOKE].val4/100;
if(sc->data[SC_STRIPSHIELD].timer!=-1)
def -= def * sc->data[SC_STRIPSHIELD].val2/100;
- if (sd->data[SC_FLING].timer!=-1)
- def -= def * (sd->data[SC_FLING].val2)/100;
+ if (sc->data[SC_FLING].timer!=-1)
+ def -= def * (sc->data[SC_FLING].val2)/100;
return cap_value(def,0,UCHAR_MAX);
}
@@ -2921,8 +2921,8 @@ static unsigned short status_calc_def2(struct block_list *bl, struct status_chan
else if(sc->data[SC_JOINTBEAT].val2==4)
def2 -= def2 * 25/100;
}
- if (sd->data[SC_FLING].timer!=-1)
- def2 -= def2 * (sd->data[SC_FLING].val3)/100;
+ if(sc->data[SC_FLING].timer!=-1)
+ def2 -= def2 * (sc->data[SC_FLING].val3)/100;
return cap_value(def2,0,USHRT_MAX);
}