summaryrefslogtreecommitdiff
path: root/src/map/status.c
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/map/status.c
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/map/status.c')
-rw-r--r--src/map/status.c12
1 files changed, 6 insertions, 6 deletions
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.