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://svn.code.sf.net/p/rathena/svn/trunk@16416 54d463be-8e91-2dee-dedb-b68131a5f0ec
This commit is contained in:
parent
0f697714ac
commit
f72783b5a9
@ -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.
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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] ) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user