From f92652ee92ac107204b89196cedd5e63ca2b34e7 Mon Sep 17 00:00:00 2001 From: blackhole89 Date: Fri, 10 Mar 2006 16:54:18 +0000 Subject: [PATCH] GS_MAGICALBULLET implementation: declaring variables after case: without defining a block of {}, using something weird called atn_rand(something) instead of just rand. Fixed. git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@5563 54d463be-8e91-2dee-dedb-b68131a5f0ec --- src/map/battle.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/map/battle.c b/src/map/battle.c index 1a6179886b..7c92f15171 100644 --- a/src/map/battle.c +++ b/src/map/battle.c @@ -1924,12 +1924,14 @@ static struct Damage battle_calc_weapon_attack( ATK_ADD(10*pc_checkskill(sd, TK_RUN)); break; case GS_MAGICALBULLET: + { int matk1=status_get_matk1(src),matk2=status_get_matk2(src); if(matk1>matk2) - ATK_ADD(matk2+atn_rand()%(matk1-matk2+1)); - else - ATK_ADD(matk2); + { + ATK_ADD(matk2+rand()%(matk1-matk2+1)); + } else ATK_ADD(matk2); break; + } } } //Here comes a second pass for skills that stack to the previously defined % damage. [Skotlex]