summaryrefslogtreecommitdiff
path: root/src/map/battle.c
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-04-13 15:56:22 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-04-13 15:56:22 +0000
commit73ad36cce173502c226edc839ef06c3fe9f90853 (patch)
treec92e383c11e7d5efcca16226b01afa640216ae69 /src/map/battle.c
parent74ae20b906cbdf6b0c17afa6d9911e5c3e58f161 (diff)
downloadhercules-73ad36cce173502c226edc839ef06c3fe9f90853.tar.gz
hercules-73ad36cce173502c226edc839ef06c3fe9f90853.tar.bz2
hercules-73ad36cce173502c226edc839ef06c3fe9f90853.tar.xz
hercules-73ad36cce173502c226edc839ef06c3fe9f90853.zip
- Fixed crash when looking for SC_MIRACLE in battle_calc_weapon_attack
- Some more standard C code cleanups. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6038 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/battle.c')
-rw-r--r--src/map/battle.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/map/battle.c b/src/map/battle.c
index 6986826f0..7301cac5c 100644
--- a/src/map/battle.c
+++ b/src/map/battle.c
@@ -1966,7 +1966,7 @@ static struct Damage battle_calc_weapon_attack(
{ //SG Anger bonus - ATK_ADDRATE [Komurka]
static int type[] = { SG_SUN_ANGER, SG_MOON_ANGER, SG_STAR_ANGER };
short t_class = status_get_class(target);
- if (sc->data && sc->data[SC_MIRACLE].timer!=-1 && (skill = pc_checkskill(sd,type[2])))
+ if (sc && sc->data[SC_MIRACLE].timer!=-1 && (skill = pc_checkskill(sd,type[2])))
{
skillratio = (sd->status.base_level + status_get_str(src) + status_get_dex(src)+ status_get_luk(src))/(skill<4?12-3*skill:1);
ATK_ADDRATE(skillratio);