summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-10-04 21:05:44 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-10-04 21:05:44 +0000
commitebd3a5ed1bbbaa904df3a4938c5d98c27f5eb52a (patch)
treeb323cfb2c10beb20b3eaf279a761a267bd645a55
parentfd11074c8a088a78f90f2738c2a0d9b354aa5370 (diff)
downloadhercules-ebd3a5ed1bbbaa904df3a4938c5d98c27f5eb52a.tar.gz
hercules-ebd3a5ed1bbbaa904df3a4938c5d98c27f5eb52a.tar.bz2
hercules-ebd3a5ed1bbbaa904df3a4938c5d98c27f5eb52a.tar.xz
hercules-ebd3a5ed1bbbaa904df3a4938c5d98c27f5eb52a.zip
- Bowling bash now always hits twice regardless of situation.
- Added an underflow check to prevent sending to the client negative mdef2 value (for Frenzy'ed characters) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@8934 54d463be-8e91-2dee-dedb-b68131a5f0ec
-rw-r--r--Changelog-Trunk.txt3
-rw-r--r--src/map/battle.c3
-rw-r--r--src/map/clif.c11
-rw-r--r--src/map/skill.c14
4 files changed, 19 insertions, 12 deletions
diff --git a/Changelog-Trunk.txt b/Changelog-Trunk.txt
index 8839a4417..5a654a3b8 100644
--- a/Changelog-Trunk.txt
+++ b/Changelog-Trunk.txt
@@ -4,6 +4,9 @@ AS OF SVN REV. 5091, WE ARE NOW USING TRUNK. ALL UNTESTED BUGFIXES/FEATURES GO
IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK.
2006/10/04
+ * Bowling bash now always hits twice regardless of situation. [Skotlex]
+ * Added an underflow check to prevent sending to the client negative mdef2
+ value (for Frenzy'ed characters) [Skotlex]
* Modified pc_jobchange so that it automatically removes
peco/falcon/cart/homun if the new job you are changing to does not possess
the required skill for them. [Skotlex]
diff --git a/src/map/battle.c b/src/map/battle.c
index b884a0f85..9336adb6c 100644
--- a/src/map/battle.c
+++ b/src/map/battle.c
@@ -1328,8 +1328,7 @@ static struct Damage battle_calc_weapon_attack(
break;
}
case KN_BOWLINGBASH:
- //When mflag, this is a no-splash attack, damage gets a bonus of 100% at lv 10.
- skillratio+= (wflag?50:40)*skill_lv;
+ skillratio+= 40*skill_lv;
break;
case KN_AUTOCOUNTER:
case LK_SPIRALPIERCE:
diff --git a/src/map/clif.c b/src/map/clif.c
index 4cc22f5cb..3164fe950 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -2708,7 +2708,11 @@ int clif_updatestatus(struct map_session_data *sd,int type)
WFIFOL(fd,4)=sd->battle_status.def2;
break;
case SP_MDEF2:
- WFIFOL(fd,4)=sd->battle_status.mdef2 - (sd->battle_status.vit>>1);
+ //negative check (in case you have something like Berserk active)
+ len = sd->battle_status.mdef2 - (sd->battle_status.vit>>1);
+ if (len < 0) len = 0;
+ WFIFOL(fd,4)= len;
+ len = 8;
break;
case SP_CRITICAL:
WFIFOL(fd,4)=sd->battle_status.cri/10;
@@ -3033,7 +3037,10 @@ int clif_initialstatus(struct map_session_data *sd)
WBUFW(buf,24) = sd->battle_status.def; // def
WBUFW(buf,26) = sd->battle_status.def2;
WBUFW(buf,28) = sd->battle_status.mdef; // mdef
- WBUFW(buf,30) = sd->battle_status.mdef2 - (sd->battle_status.vit>>1);
+ fd = sd->battle_status.mdef2 - (sd->battle_status.vit>>1);
+ if (fd < 0) fd = 0; //Negative check for Frenzy'ed characters.
+ WBUFW(buf,30) = fd;
+ fd = sd->fd;
WBUFW(buf,32) = sd->battle_status.hit;
WBUFW(buf,34) = sd->battle_status.flee;
WBUFW(buf,36) = sd->battle_status.flee2/10;
diff --git a/src/map/skill.c b/src/map/skill.c
index 1f67a3dd6..3ec9274d6 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -2936,7 +2936,7 @@ int skill_castend_damage_id (struct block_list* src, struct block_list *bl, int
if(flag&1){
if(bl->id==skill_area_temp[1])
break;
- //Splash damage is always two hits for 500%
+ //two hits for 500%
skill_attack(BF_WEAPON,src,src,bl,skillid,skilllv,tick,SD_ANIMATION);
skill_attack(BF_WEAPON,src,src,bl,skillid,skilllv,tick,SD_ANIMATION);
} else {
@@ -2953,18 +2953,16 @@ int skill_castend_damage_id (struct block_list* src, struct block_list *bl, int
if(skill_area_temp[0]>1) break;
}
clif_blown(bl); //Update target pos.
- if (i==c) { //No targets found. Single attack for 600%
- skill_attack(BF_WEAPON,src,src,bl,skillid,skilllv,tick,1);
- } else {
+ if (i!=c) { //Splash
skill_area_temp[1]=bl->id;
map_foreachinrange(skill_area_sub,bl,
skill_get_splash(skillid, skilllv),BL_CHAR,
src,skillid,skilllv,tick, flag|BCT_ENEMY|1,
skill_castend_damage_id);
- //Weirdo dual-hit property, two attacks for 500%
- skill_attack(BF_WEAPON,src,src,bl,skillid,skilllv,tick,0);
- skill_attack(BF_WEAPON,src,src,bl,skillid,skilllv,tick,0);
- }
+ }
+ //Weirdo dual-hit property, two attacks for 500%
+ skill_attack(BF_WEAPON,src,src,bl,skillid,skilllv,tick,0);
+ skill_attack(BF_WEAPON,src,src,bl,skillid,skilllv,tick,0);
}
break;