diff options
author | rud0lp20 <rud0lp20@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2012-07-12 16:39:58 +0000 |
---|---|---|
committer | rud0lp20 <rud0lp20@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2012-07-12 16:39:58 +0000 |
commit | 812a49d677a9e208fc12d66d315a62a05f79d51b (patch) | |
tree | d0f0ec79d2fb0b75547fe57d433c291fa6bb60d1 | |
parent | c2da0a3c7938b6461c3293b31d0e2f0db723f8d3 (diff) | |
download | hercules-812a49d677a9e208fc12d66d315a62a05f79d51b.tar.gz hercules-812a49d677a9e208fc12d66d315a62a05f79d51b.tar.bz2 hercules-812a49d677a9e208fc12d66d315a62a05f79d51b.tar.xz hercules-812a49d677a9e208fc12d66d315a62a05f79d51b.zip |
Fixed bugreport:6215 where using SR_CRESCENTELBOW can cause map server crashing when hit by 1HKO.
Fixed bugreport:6201 traps should now activate its splash damage properly.
Follow up r16399 where Leech End ignoring Phen card's effect.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16416 54d463be-8e91-2dee-dedb-b68131a5f0ec
-rw-r--r-- | src/map/battle.c | 5 | ||||
-rw-r--r-- | src/map/skill.c | 5 | ||||
-rw-r--r-- | src/map/status.c | 2 |
3 files changed, 6 insertions, 6 deletions
diff --git a/src/map/battle.c b/src/map/battle.c index 0857de951..f65be5e55 100644 --- a/src/map/battle.c +++ b/src/map/battle.c @@ -4223,10 +4223,11 @@ int battle_calc_return_damage(struct block_list* bl, struct block_list *src, int int ratio = (status_get_hp(src) / 100) * sc->data[SC_CRESCENTELBOW]->val1 * status_get_lv(bl) / 125; if (ratio > 5000) ratio = 5000; // Maximum of 5000% ATK rdamage = rdamage * ratio / 100 + (*dmg) * (10 + sc->data[SC_CRESCENTELBOW]->val1 * 20 / 10) / 10; - clif_damage(src, bl, gettick(), status_get_amotion(src)+1000, 0, status_damage(src, bl, rdamage/10, 0, 0, 1), 1, 0, 0); skill_blown(bl, src, skill_get_blewcount(SR_CRESCENTELBOW_AUTOSPELL, sc->data[SC_CRESCENTELBOW]->val1), unit_getdir(src), 0); - clif_skill_damage(bl, src, gettick(), status_get_amotion(src), 0, status_damage(src, bl, rdamage, 0, 0, 1), + clif_skill_damage(bl, src, gettick(), status_get_amotion(src), 0, rdamage, 1, SR_CRESCENTELBOW_AUTOSPELL, sc->data[SC_CRESCENTELBOW]->val1, 6); // This is how official does + clif_damage(src, bl, gettick(), status_get_amotion(src)+1000, 0, rdamage/10, 1, 0, 0); + status_damage(src, bl, status_damage(bl, src, rdamage, 0, 0, 1)/10, 0, 0, 1); status_change_end(bl, SC_CRESCENTELBOW, INVALID_TIMER); return 0; // Just put here to minimize redundancy }else if (flag & BF_SHORT) {//Bounces back part of the damage. diff --git a/src/map/skill.c b/src/map/skill.c index c2c4f23de..916f36d7c 100644 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -10926,7 +10926,7 @@ int skill_unit_onplace_timer (struct skill_unit *src, struct block_list *bl, uns } else sec = 3000; //Couldn't trap it? map_foreachinrange(skill_trap_splash, &src->bl, skill_get_splash(sg->skill_id, sg->skill_lv), sg->bl_flag, &src->bl, tick); - src->range = -1; + sg->unit_id = UNT_USED_TRAPS; //Changed ID so it does not invoke a for each in area again. } break; @@ -10956,8 +10956,8 @@ int skill_unit_onplace_timer (struct skill_unit *src, struct block_list *bl, uns map_foreachinrange(skill_trap_splash,&src->bl, skill_get_splash(sg->skill_id, sg->skill_lv), sg->bl_flag, &src->bl,tick); if (sg->unit_id != UNT_FIREPILLAR_ACTIVE) clif_changetraplook(&src->bl, sg->unit_id==UNT_LANDMINE?UNT_FIREPILLAR_ACTIVE:UNT_USED_TRAPS); - src->range = -1; //Disable range so it does not invoke a for each in area again. sg->limit=DIFF_TICK(tick,sg->tick)+1500 + (sg->unit_id== UNT_CLUSTERBOMB?1000:0);// Cluster Bomb has 1s to disappear once activated. + sg->unit_id = UNT_USED_TRAPS; //Changed ID so it does not invoke a for each in area again. break; case UNT_TALKIEBOX: @@ -13846,7 +13846,6 @@ int skill_detonator(struct block_list *bl, va_list ap) clif_changetraplook(bl,unit_id == UNT_FIRINGTRAP ? UNT_DUMMYSKILL : UNT_USED_TRAPS); unit->group->unit_id = UNT_USED_TRAPS; - unit->range = -1; unit->group->limit = DIFF_TICK(gettick(),unit->group->tick) + (unit_id == UNT_TALKIEBOX ? 5000 : (unit_id == UNT_CLUSTERBOMB ? 2500 : 1500) ); break; } diff --git a/src/map/status.c b/src/map/status.c index 1a591e8e5..cb8acd3e1 100644 --- a/src/map/status.c +++ b/src/map/status.c @@ -9708,7 +9708,7 @@ int status_change_timer(int tid, unsigned int tick, int id, intptr_t data) if( --(sce->val4) >= 0 ) { int damage = status->max_hp/100; // {Target VIT x (New Poison Research Skill Level - 3)} + (Target HP/100) damage += status->vit * (sce->val1 - 3); - unit_skillcastcancel(bl,0); + unit_skillcastcancel(bl,2); map_freeblock_lock(); status_damage(bl, bl, damage, 0, clif_damage(bl,bl,tick,status_get_amotion(bl),status_get_dmotion(bl)+500,damage,1,0,0), 1); if( sc->data[type] ) { |