summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authormalufett <malufett.eat.my.binaries@gmail.com>2013-06-18 04:39:41 -0700
committermalufett <malufett.eat.my.binaries@gmail.com>2013-06-18 04:39:41 -0700
commited15563c944aae732494d9a243a0591d06e04ec1 (patch)
tree1278a4c5e7f923fb0c0be1efe51e739b1b677010 /src
parent2410110dece79b4598c12f1c953219f1d0d1904a (diff)
downloadhercules-ed15563c944aae732494d9a243a0591d06e04ec1.tar.gz
hercules-ed15563c944aae732494d9a243a0591d06e04ec1.tar.bz2
hercules-ed15563c944aae732494d9a243a0591d06e04ec1.tar.xz
hercules-ed15563c944aae732494d9a243a0591d06e04ec1.zip
Fixed Bug#7396
-map crash in using GN_BLOOD_SUCKER.
Diffstat (limited to 'src')
-rw-r--r--src/map/battle.c24
-rw-r--r--src/map/status.c4
2 files changed, 13 insertions, 15 deletions
diff --git a/src/map/battle.c b/src/map/battle.c
index 731c6f618..ace947aca 100644
--- a/src/map/battle.c
+++ b/src/map/battle.c
@@ -4345,15 +4345,11 @@ struct Damage battle_calc_weapon_attack(struct block_list *src,struct block_list
wd.damage = sstatus->max_hp* 9/100;
wd.damage2 = 0;
break;
-
-#ifdef RENEWAL
- case MO_EXTREMITYFIST: // [malufett]
- wd.damage = battle->calc_base_damage(src, target, skill_id, skill_lv, nk, n_ele, s_ele, s_ele_, EQI_HAND_R, (sc && sc->data[SC_MAXIMIZEPOWER]?1:0)|8, wd.flag);
- // first value is still not confirm.
- wd.damage = status_get_sp(src) + 10 * status_get_sp(src) * wd.damage / 100 + 8 * wd.damage;
- flag.tdef = 1;
- break;
case NJ_ISSEN: // [malufett]
+#ifndef RENEWAL
+ wd.damage = 40*sstatus->str +skill_lv*(sstatus->hp/10 + 35);
+ wd.damage2 = 0;
+#else
{
short totaldef = status_get_total_def(target);
i = 0;
@@ -4367,12 +4363,14 @@ struct Damage battle_calc_weapon_attack(struct block_list *src,struct block_list
ATK_RATE(50);
flag.idef = 1;
}
-#else
-
- wd.damage = 40*sstatus->str +skill_lv*(sstatus->hp/10 + 35);
- wd.damage2 = 0;
-#endif
break;
+ case MO_EXTREMITYFIST: // [malufett]
+ wd.damage = battle->calc_base_damage(src, target, skill_id, skill_lv, nk, n_ele, s_ele, s_ele_, EQI_HAND_R, (sc && sc->data[SC_MAXIMIZEPOWER]?1:0)|8, wd.flag);
+ // first value is still not confirm.
+ wd.damage = status_get_sp(src) + 10 * status_get_sp(src) * wd.damage / 100 + 8 * wd.damage;
+ flag.tdef = 1;
+#endif
+ break;
#ifndef RENEWAL
case LK_SPIRALPIERCE:
case ML_SPIRALPIERCE:
diff --git a/src/map/status.c b/src/map/status.c
index 992cc0855..55b79fff7 100644
--- a/src/map/status.c
+++ b/src/map/status.c
@@ -8329,10 +8329,10 @@ int status_change_start(struct block_list* bl,enum sc_type type,int rate,int val
break;
case SC_BLOOD_SUCKER:
{
- struct block_list *src = iMap->id2bl(sce->val2);
+ struct block_list *src = iMap->id2bl(val2);
val3 = 1;
if(src)
- val3 = 200 + 100 * sce->val1 + status_get_int(src);
+ val3 = 200 + 100 * val1 + status_get_int(src);
val4 = tick / 1000;
tick_time = 1000; // [GodLesZ] tick time
}