summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authormalufett <malufett.eat.my.binaries@gmail.com>2014-02-10 18:11:32 +0800
committermalufett <malufett.eat.my.binaries@gmail.com>2014-02-10 18:11:32 +0800
commit9b5bb9aa894d63d1d9f2cafa91f90bc4922bf414 (patch)
treecba4c88a80d75d6609a328e6aec8726b6fa3d8b2 /src
parent4c735df7d013901c5fc79984bd2206d2109f53d8 (diff)
downloadhercules-9b5bb9aa894d63d1d9f2cafa91f90bc4922bf414.tar.gz
hercules-9b5bb9aa894d63d1d9f2cafa91f90bc4922bf414.tar.bz2
hercules-9b5bb9aa894d63d1d9f2cafa91f90bc4922bf414.tar.xz
hercules-9b5bb9aa894d63d1d9f2cafa91f90bc4922bf414.zip
Fixed Bug#7988
-http://hercules.ws/board/tracker/issue-7988-royal-guard-exceed-break-causes-map-server-crash/ Signed-off-by: malufett <malufett.eat.my.binaries@gmail.com>
Diffstat (limited to 'src')
-rw-r--r--src/map/battle.c8
-rw-r--r--src/map/pc.c3
-rw-r--r--src/map/skill.c2
-rw-r--r--src/map/status.c12
4 files changed, 13 insertions, 12 deletions
diff --git a/src/map/battle.c b/src/map/battle.c
index c57ff950e..e56e3d12d 100644
--- a/src/map/battle.c
+++ b/src/map/battle.c
@@ -4576,6 +4576,10 @@ struct Damage battle_calc_weapon_attack(struct block_list *src,struct block_list
ATK_ADD( 30 * tsc->data[SC_DARKCROW]->val1 );
}
+ if ( sc && !skill_id && sc->data[SC_EXEEDBREAK] ) {
+ ATK_ADDRATE(sc->data[SC_EXEEDBREAK]->val1);
+ status_change_end(src, SC_EXEEDBREAK, INVALID_TIMER);
+ }
#ifdef RENEWAL
if( sd && skill_id == NJ_KUNAI ){
flag.tdef = 1;
@@ -5599,10 +5603,6 @@ enum damage_lv battle_weapon_attack(struct block_list* src, struct block_list* t
wd = battle->calc_attack(BF_WEAPON, src, target, 0, 0, flag);
if( sc && sc->count ) {
- if (sc->data[SC_EXEEDBREAK]) {
- ATK_RATER(sc->data[SC_EXEEDBREAK]->val1);
- status_change_end(src, SC_EXEEDBREAK, INVALID_TIMER);
- }
if( sc->data[SC_SPELLFIST] ) {
if( --(sc->data[SC_SPELLFIST]->val1) >= 0 ){
struct Damage ad = battle->calc_attack(BF_MAGIC,src,target,sc->data[SC_SPELLFIST]->val3,sc->data[SC_SPELLFIST]->val4,flag|BF_SHORT);
diff --git a/src/map/pc.c b/src/map/pc.c
index 14e7d4661..e29ef343f 100644
--- a/src/map/pc.c
+++ b/src/map/pc.c
@@ -5206,7 +5206,8 @@ int pc_checkallowskill(struct map_session_data *sd)
SC_LKCONCENTRATION,
SC_EDP,
#endif
- SC_FEARBREEZE
+ SC_FEARBREEZE,
+ SC_EXEEDBREAK,
};
const enum sc_type scs_list[] = {
SC_AUTOGUARD,
diff --git a/src/map/skill.c b/src/map/skill.c
index b0c6d7a38..a66ead4ae 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -15067,7 +15067,7 @@ int skill_maelstrom_suction(struct block_list *bl, va_list ap) {
*------------------------------------------*/
int skill_enchant_elemental_end (struct block_list *bl, int type) {
struct status_change *sc;
- const enum sc_type scs[] = { SC_ENCHANTPOISON, SC_ASPERSIO, SC_PROPERTYFIRE, SC_PROPERTYWATER, SC_PROPERTYWIND, SC_PROPERTYGROUND, SC_PROPERTYDARK, SC_PROPERTYTELEKINESIS, SC_ENCHANTARMS, SC_EXEEDBREAK };
+ const enum sc_type scs[] = { SC_ENCHANTPOISON, SC_ASPERSIO, SC_PROPERTYFIRE, SC_PROPERTYWATER, SC_PROPERTYWIND, SC_PROPERTYGROUND, SC_PROPERTYDARK, SC_PROPERTYTELEKINESIS, SC_ENCHANTARMS };
int i;
nullpo_ret(bl);
nullpo_ret(sc = status->get_sc(bl));
diff --git a/src/map/status.c b/src/map/status.c
index e204e9d92..df79cee74 100644
--- a/src/map/status.c
+++ b/src/map/status.c
@@ -8435,12 +8435,12 @@ int status_change_start(struct block_list* bl,enum sc_type type,int rate,int val
tick = -1; //endless duration in the client
break;
case SC_EXEEDBREAK:
- val1 *= 150; // 150 * skill_lv
- if( sd && sd->inventory_data[sd->equip_index[EQI_HAND_R]] ) { // Chars.
- val1 += (sd->inventory_data[sd->equip_index[EQI_HAND_R]]->weight/10 * sd->inventory_data[sd->equip_index[EQI_HAND_R]]->wlv * status->get_lv(bl) / 100);
- val1 += 15 * (sd ? sd->status.job_level:50) + 100;
- } else // Mobs
- val1 += (400 * status->get_lv(bl) / 100) + (15 * (status->get_lv(bl) / 2)); // About 1138% at mob_lvl 99. Is an aproximation to a standard weapon. [pakpil]
+ if( sd ){
+ short index = sd->equip_index[EQI_HAND_R];
+ val1 = 15 * (sd->status.job_level + val1 * 10);
+ if( index >= 0 && sd->inventory_data[index] && sd->inventory_data[index]->type == IT_WEAPON )
+ val1 += (sd->inventory_data[index]->weight / 10 * sd->inventory_data[index]->wlv) * status->get_lv(bl) / 100;
+ }
break;
case SC_PRESTIGE: // Based on suggested formula in iRO Wiki and some test, still need more test. [pakpil]
val2 = ((st->int_ + st->luk) / 6) + 5; // Chance to evade magic damage.