Fixed when devoter is killed by the redirected damage, devotee takes the whole damage. (follow up to r14406)
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@14410 54d463be-8e91-2dee-dedb-b68131a5f0ec
This commit is contained in:
parent
6e837a5214
commit
c57a1afa9d
@ -3,6 +3,8 @@ Date Added
|
|||||||
AS OF SVN REV. 5091, WE ARE NOW USING TRUNK. ALL UNTESTED BUGFIXES/FEATURES GO INTO TRUNK.
|
AS OF SVN REV. 5091, WE ARE NOW USING TRUNK. ALL UNTESTED BUGFIXES/FEATURES GO INTO TRUNK.
|
||||||
IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK.
|
IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK.
|
||||||
|
|
||||||
|
2010/09/20
|
||||||
|
* Fixed when devoter is killed by the redirected damage, devotee takes the whole damage. (follow up to r14406)[Inkfish]
|
||||||
2010/09/18
|
2010/09/18
|
||||||
* Rev. 14409 Added bard/dancer songs and duets to the nodispell list. (bugreport:4411) [L0ne_w0lf]
|
* Rev. 14409 Added bard/dancer songs and duets to the nodispell list. (bugreport:4411) [L0ne_w0lf]
|
||||||
* Applied Ai4rei's patch for the skill WE_CALLPARTNER (bugreport:4437)
|
* Applied Ai4rei's patch for the skill WE_CALLPARTNER (bugreport:4437)
|
||||||
|
@ -163,13 +163,11 @@ int battle_delay_damage_sub(int tid, unsigned int tick, int id, intptr data)
|
|||||||
(target->type != BL_PC || ((TBL_PC*)target)->invincible_timer == -1) &&
|
(target->type != BL_PC || ((TBL_PC*)target)->invincible_timer == -1) &&
|
||||||
check_distance_bl(dat->src, target, dat->distance)) //Check to see if you haven't teleported. [Skotlex]
|
check_distance_bl(dat->src, target, dat->distance)) //Check to see if you haven't teleported. [Skotlex]
|
||||||
{
|
{
|
||||||
struct status_change *sc = status_get_sc(target);
|
|
||||||
map_freeblock_lock();
|
map_freeblock_lock();
|
||||||
if( !sc || !sc->data[SC_DEVOTION] )
|
status_fix_damage(dat->src, target, dat->damage, dat->delay);
|
||||||
status_fix_damage(dat->src, target, dat->damage, dat->delay);
|
|
||||||
if( dat->attack_type && !status_isdead(target) )
|
if( dat->attack_type && !status_isdead(target) )
|
||||||
skill_additional_effect(dat->src,target,dat->skill_id,dat->skill_lv,dat->attack_type,dat->dmg_lv,tick);
|
skill_additional_effect(dat->src,target,dat->skill_id,dat->skill_lv,dat->attack_type,dat->dmg_lv,tick);
|
||||||
if( dat->damage > 0 && dat->attack_type )
|
if( dat->dmg_lv > ATK_BLOCK && dat->attack_type )
|
||||||
skill_counter_additional_effect(dat->src,target,dat->skill_id,dat->skill_lv,dat->attack_type,tick);
|
skill_counter_additional_effect(dat->src,target,dat->skill_id,dat->skill_lv,dat->attack_type,tick);
|
||||||
map_freeblock_unlock();
|
map_freeblock_unlock();
|
||||||
}
|
}
|
||||||
@ -180,17 +178,20 @@ int battle_delay_damage_sub(int tid, unsigned int tick, int id, intptr data)
|
|||||||
int battle_delay_damage (unsigned int tick, int amotion, struct block_list *src, struct block_list *target, int attack_type, int skill_id, int skill_lv, int damage, enum damage_lv dmg_lv, int ddelay)
|
int battle_delay_damage (unsigned int tick, int amotion, struct block_list *src, struct block_list *target, int attack_type, int skill_id, int skill_lv, int damage, enum damage_lv dmg_lv, int ddelay)
|
||||||
{
|
{
|
||||||
struct delay_damage *dat;
|
struct delay_damage *dat;
|
||||||
|
struct status_change *sc;
|
||||||
nullpo_retr(0, src);
|
nullpo_retr(0, src);
|
||||||
nullpo_retr(0, target);
|
nullpo_retr(0, target);
|
||||||
|
|
||||||
|
sc = status_get_sc(target);
|
||||||
|
if( sc && sc->data[SC_DEVOTION] && damage > 0 )
|
||||||
|
damage = 0;
|
||||||
|
|
||||||
if (!battle_config.delay_battle_damage) {
|
if (!battle_config.delay_battle_damage) {
|
||||||
struct status_change *sc = status_get_sc(target);
|
|
||||||
map_freeblock_lock();
|
map_freeblock_lock();
|
||||||
if( !sc || !sc->data[SC_DEVOTION] )
|
status_fix_damage(src, target, damage, ddelay); // We have to seperate here between reflect damage and others [icescope]
|
||||||
status_fix_damage(src, target, damage, ddelay); // We have to seperate here between reflect damage and others [icescope]
|
|
||||||
if( attack_type && !status_isdead(target) )
|
if( attack_type && !status_isdead(target) )
|
||||||
skill_additional_effect(src, target, skill_id, skill_lv, attack_type, dmg_lv, gettick());
|
skill_additional_effect(src, target, skill_id, skill_lv, attack_type, dmg_lv, gettick());
|
||||||
if( damage > 0 && attack_type )
|
if( dmg_lv > ATK_BLOCK && attack_type )
|
||||||
skill_counter_additional_effect(src, target, skill_id, skill_lv, attack_type, gettick());
|
skill_counter_additional_effect(src, target, skill_id, skill_lv, attack_type, gettick());
|
||||||
map_freeblock_unlock();
|
map_freeblock_unlock();
|
||||||
return 0;
|
return 0;
|
||||||
@ -3176,6 +3177,15 @@ enum damage_lv battle_weapon_attack(struct block_list* src, struct block_list* t
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
wd.dmotion = clif_damage(src, target, tick, wd.amotion, wd.dmotion, wd.damage, wd.div_ , wd.type, wd.damage2);
|
||||||
|
|
||||||
|
if (sd && sd->splash_range > 0 && damage > 0)
|
||||||
|
skill_castend_damage_id(src, target, 0, 1, tick, 0);
|
||||||
|
|
||||||
|
map_freeblock_lock();
|
||||||
|
|
||||||
|
battle_delay_damage(tick, wd.amotion, src, target, wd.flag, 0, 0, damage, wd.dmg_lv, wd.dmotion);
|
||||||
|
|
||||||
if( tsc && tsc->data[SC_DEVOTION] )
|
if( tsc && tsc->data[SC_DEVOTION] )
|
||||||
{
|
{
|
||||||
struct status_change_entry *sce = tsc->data[SC_DEVOTION];
|
struct status_change_entry *sce = tsc->data[SC_DEVOTION];
|
||||||
@ -3193,15 +3203,6 @@ enum damage_lv battle_weapon_attack(struct block_list* src, struct block_list* t
|
|||||||
status_change_end(target, SC_DEVOTION, -1);
|
status_change_end(target, SC_DEVOTION, -1);
|
||||||
}
|
}
|
||||||
|
|
||||||
wd.dmotion = clif_damage(src, target, tick, wd.amotion, wd.dmotion, wd.damage, wd.div_ , wd.type, wd.damage2);
|
|
||||||
|
|
||||||
if (sd && sd->splash_range > 0 && damage > 0)
|
|
||||||
skill_castend_damage_id(src, target, 0, 1, tick, 0);
|
|
||||||
|
|
||||||
map_freeblock_lock();
|
|
||||||
|
|
||||||
battle_delay_damage(tick, wd.amotion, src, target, wd.flag, 0, 0, damage, wd.dmg_lv, wd.dmotion);
|
|
||||||
|
|
||||||
if (sc && sc->data[SC_AUTOSPELL] && rand()%100 < sc->data[SC_AUTOSPELL]->val4) {
|
if (sc && sc->data[SC_AUTOSPELL] && rand()%100 < sc->data[SC_AUTOSPELL]->val4) {
|
||||||
int sp = 0;
|
int sp = 0;
|
||||||
int skillid = sc->data[SC_AUTOSPELL]->val2;
|
int skillid = sc->data[SC_AUTOSPELL]->val2;
|
||||||
|
@ -1715,23 +1715,6 @@ int skill_attack (int attack_type, struct block_list* src, struct block_list *ds
|
|||||||
&& skillid != WS_CARTTERMINATION )
|
&& skillid != WS_CARTTERMINATION )
|
||||||
rdamage = battle_calc_return_damage(bl, damage, dmg.flag);
|
rdamage = battle_calc_return_damage(bl, damage, dmg.flag);
|
||||||
|
|
||||||
if( sc && sc->data[SC_DEVOTION] && skillid != PA_PRESSURE )
|
|
||||||
{
|
|
||||||
struct status_change_entry *sce = sc->data[SC_DEVOTION];
|
|
||||||
struct block_list *d_bl = map_id2bl(sce->val1);
|
|
||||||
|
|
||||||
if( d_bl && (
|
|
||||||
(d_bl->type == BL_MER && ((TBL_MER*)d_bl)->master && ((TBL_MER*)d_bl)->master->bl.id == bl->id) ||
|
|
||||||
(d_bl->type == BL_PC && ((TBL_PC*)d_bl)->devotion[sce->val2] == bl->id)
|
|
||||||
) && check_distance_bl(bl, d_bl, sce->val3) )
|
|
||||||
{
|
|
||||||
clif_damage(d_bl, d_bl, gettick(), 0, 0, damage, 0, 0, 0);
|
|
||||||
status_fix_damage(NULL, d_bl, damage, 0);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
status_change_end(bl, SC_DEVOTION, -1);
|
|
||||||
}
|
|
||||||
|
|
||||||
//Skill hit type
|
//Skill hit type
|
||||||
type=(skillid==0)?5:skill_get_hit(skillid);
|
type=(skillid==0)?5:skill_get_hit(skillid);
|
||||||
|
|
||||||
@ -1945,6 +1928,23 @@ int skill_attack (int attack_type, struct block_list* src, struct block_list *ds
|
|||||||
if (dmg.amotion)
|
if (dmg.amotion)
|
||||||
battle_delay_damage(tick, dmg.amotion,src,bl,dmg.flag,skillid,skilllv,damage,dmg.dmg_lv,dmg.dmotion);
|
battle_delay_damage(tick, dmg.amotion,src,bl,dmg.flag,skillid,skilllv,damage,dmg.dmg_lv,dmg.dmotion);
|
||||||
|
|
||||||
|
if( sc && sc->data[SC_DEVOTION] && skillid != PA_PRESSURE )
|
||||||
|
{
|
||||||
|
struct status_change_entry *sce = sc->data[SC_DEVOTION];
|
||||||
|
struct block_list *d_bl = map_id2bl(sce->val1);
|
||||||
|
|
||||||
|
if( d_bl && (
|
||||||
|
(d_bl->type == BL_MER && ((TBL_MER*)d_bl)->master && ((TBL_MER*)d_bl)->master->bl.id == bl->id) ||
|
||||||
|
(d_bl->type == BL_PC && ((TBL_PC*)d_bl)->devotion[sce->val2] == bl->id)
|
||||||
|
) && check_distance_bl(bl, d_bl, sce->val3) )
|
||||||
|
{
|
||||||
|
clif_damage(d_bl, d_bl, gettick(), 0, 0, damage, 0, 0, 0);
|
||||||
|
status_fix_damage(NULL, d_bl, damage, 0);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
status_change_end(bl, SC_DEVOTION, -1);
|
||||||
|
}
|
||||||
|
|
||||||
if(skillid == RG_INTIMIDATE && damage > 0 && !(tstatus->mode&MD_BOSS)) {
|
if(skillid == RG_INTIMIDATE && damage > 0 && !(tstatus->mode&MD_BOSS)) {
|
||||||
int rate = 50 + skilllv * 5;
|
int rate = 50 + skilllv * 5;
|
||||||
rate = rate + (status_get_lv(src) - status_get_lv(bl));
|
rate = rate + (status_get_lv(src) - status_get_lv(bl));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user