All direct damages such as reflected damage or Tarot Card damage should not be redirected. (follow up to r14400)
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@14406 54d463be-8e91-2dee-dedb-b68131a5f0ec
This commit is contained in:
parent
c29c148adc
commit
40608976b6
@ -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/12
|
||||||
|
* All direct damages such as reflected damage or Tarot Card damage should not be redirected. (follow up to r14400)[Inkfish]
|
||||||
2010/09/08
|
2010/09/08
|
||||||
* All mobs whose display sprites are those of a job id will now appropriately be identified to the client as players, not mobs. [Paradox924X]
|
* All mobs whose display sprites are those of a job id will now appropriately be identified to the client as players, not mobs. [Paradox924X]
|
||||||
* Updated License from GNU GPLv2 to GNU GPLv3. [Paradox924X]
|
* Updated License from GNU GPLv2 to GNU GPLv3. [Paradox924X]
|
||||||
|
@ -163,14 +163,10 @@ 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(dat->skill_id != CR_REFLECTSHIELD)
|
if( !sc || !sc->data[SC_DEVOTION] )
|
||||||
status_fix_damage(dat->src, target, dat->damage, dat->delay); // We have to seperate here between reflect damage and others [icescope]
|
status_fix_damage(dat->src, target, dat->damage, dat->delay);
|
||||||
else
|
|
||||||
{
|
|
||||||
status_damage(dat->src, map_id2bl(dat->target), dat->damage, 0, dat->delay, 16);
|
|
||||||
dat->skill_id = 0;
|
|
||||||
}
|
|
||||||
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->damage > 0 && dat->attack_type )
|
||||||
@ -188,14 +184,10 @@ int battle_delay_damage (unsigned int tick, int amotion, struct block_list *src,
|
|||||||
nullpo_retr(0, target);
|
nullpo_retr(0, target);
|
||||||
|
|
||||||
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(skill_id != CR_REFLECTSHIELD)
|
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]
|
||||||
else
|
|
||||||
{
|
|
||||||
status_damage(src, target, damage, 0, ddelay, 16);
|
|
||||||
skill_id = 0;
|
|
||||||
}
|
|
||||||
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( damage > 0 && attack_type )
|
||||||
@ -476,6 +468,8 @@ int battle_calc_damage(struct block_list *src,struct block_list *bl,struct Damag
|
|||||||
damage -= damage * 6 * (1+per) / 100;
|
damage -= damage * 6 * (1+per) / 100;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// FIXME:
|
||||||
|
// So Reject Sword calculates the redirected damage before calculating WoE/BG reduction? This is weird. [Inkfish]
|
||||||
if((sce=sc->data[SC_REJECTSWORD]) && flag&BF_WEAPON &&
|
if((sce=sc->data[SC_REJECTSWORD]) && flag&BF_WEAPON &&
|
||||||
// Fixed the condition check [Aalye]
|
// Fixed the condition check [Aalye]
|
||||||
(src->type!=BL_PC || (
|
(src->type!=BL_PC || (
|
||||||
@ -3182,6 +3176,23 @@ enum damage_lv battle_weapon_attack(struct block_list* src, struct block_list* t
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if( tsc && tsc->data[SC_DEVOTION] )
|
||||||
|
{
|
||||||
|
struct status_change_entry *sce = tsc->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 == target->id) ||
|
||||||
|
(d_bl->type == BL_PC && ((TBL_PC*)d_bl)->devotion[sce->val2] == target->id)
|
||||||
|
) && check_distance_bl(target, 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(target, SC_DEVOTION, -1);
|
||||||
|
}
|
||||||
|
|
||||||
wd.dmotion = clif_damage(src, target, tick, wd.amotion, wd.dmotion, wd.damage, wd.div_ , wd.type, wd.damage2);
|
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)
|
if (sd && sd->splash_range > 0 && damage > 0)
|
||||||
@ -3228,7 +3239,7 @@ enum damage_lv battle_weapon_attack(struct block_list* src, struct block_list* t
|
|||||||
if (rdamage > 0) { //By sending attack type "none" skill_additional_effect won't be invoked. [Skotlex]
|
if (rdamage > 0) { //By sending attack type "none" skill_additional_effect won't be invoked. [Skotlex]
|
||||||
if(tsd && src != target)
|
if(tsd && src != target)
|
||||||
battle_drain(tsd, src, rdamage, rdamage, sstatus->race, is_boss(src));
|
battle_drain(tsd, src, rdamage, rdamage, sstatus->race, is_boss(src));
|
||||||
battle_delay_damage(tick, wd.amotion, target, src, 0, CR_REFLECTSHIELD, 0, rdamage, ATK_DEF, rdelay); // the skill id is needed we use CR_REFLECTSHIELD as default [icescope]
|
battle_delay_damage(tick, wd.amotion, target, src, 0, 0, 0, rdamage, ATK_DEF, rdelay);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (tsc) {
|
if (tsc) {
|
||||||
|
@ -1715,6 +1715,23 @@ 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);
|
||||||
|
|
||||||
@ -1902,7 +1919,8 @@ int skill_attack (int attack_type, struct block_list* src, struct block_list *ds
|
|||||||
|
|
||||||
if( !dmg.amotion )
|
if( !dmg.amotion )
|
||||||
{ //Instant damage
|
{ //Instant damage
|
||||||
status_fix_damage(src,bl,damage,dmg.dmotion); //Deal damage before knockback to allow stuff like firewall+storm gust combo.
|
if( !sc || !sc->data[SC_DEVOTION] )
|
||||||
|
status_fix_damage(src,bl,damage,dmg.dmotion); //Deal damage before knockback to allow stuff like firewall+storm gust combo.
|
||||||
if( !status_isdead(bl) )
|
if( !status_isdead(bl) )
|
||||||
skill_additional_effect(src,bl,skillid,skilllv,dmg.flag,dmg.dmg_lv,tick);
|
skill_additional_effect(src,bl,skillid,skilllv,dmg.flag,dmg.dmg_lv,tick);
|
||||||
if( damage > 0 ) //Counter status effects [Skotlex]
|
if( damage > 0 ) //Counter status effects [Skotlex]
|
||||||
@ -1948,7 +1966,7 @@ int skill_attack (int attack_type, struct block_list* src, struct block_list *ds
|
|||||||
if( rdamage > 0 )
|
if( rdamage > 0 )
|
||||||
{
|
{
|
||||||
if( dmg.amotion )
|
if( dmg.amotion )
|
||||||
battle_delay_damage(tick, dmg.amotion,bl,src,0,CR_REFLECTSHIELD,0,rdamage,ATK_DEF,0); // also here the reflect shield, but for skills [icescope]
|
battle_delay_damage(tick, dmg.amotion,bl,src,0,0,0,rdamage,ATK_DEF,0);
|
||||||
else
|
else
|
||||||
status_fix_damage(bl,src,rdamage,0);
|
status_fix_damage(bl,src,rdamage,0);
|
||||||
clif_damage(src,src,tick, dmg.amotion,0,rdamage,dmg.div_>1?dmg.div_:1,4,0);
|
clif_damage(src,src,tick, dmg.amotion,0,rdamage,dmg.div_>1?dmg.div_:1,4,0);
|
||||||
|
@ -640,7 +640,6 @@ int status_charge(struct block_list* bl, int hp, int sp)
|
|||||||
//If flag&2, fail if target does not has enough to substract.
|
//If flag&2, fail if target does not has enough to substract.
|
||||||
//If flag&4, if killed, mob must not give exp/loot.
|
//If flag&4, if killed, mob must not give exp/loot.
|
||||||
//If flag&8, sp loss on dead target.
|
//If flag&8, sp loss on dead target.
|
||||||
//If flag&16, reflect damage is done, which can't be absorbed by Devotion. [icescope]
|
|
||||||
int status_damage(struct block_list *src,struct block_list *target,int hp, int sp, int walkdelay, int flag)
|
int status_damage(struct block_list *src,struct block_list *target,int hp, int sp, int walkdelay, int flag)
|
||||||
{
|
{
|
||||||
struct status_data *status;
|
struct status_data *status;
|
||||||
@ -681,25 +680,9 @@ int status_damage(struct block_list *src,struct block_list *target,int hp, int s
|
|||||||
if( battle_config.invincible_nodamage && src && sc && sc->data[SC_INVINCIBLE] && !sc->data[SC_INVINCIBLEOFF] )
|
if( battle_config.invincible_nodamage && src && sc && sc->data[SC_INVINCIBLE] && !sc->data[SC_INVINCIBLEOFF] )
|
||||||
hp = 1;
|
hp = 1;
|
||||||
|
|
||||||
if( hp && !(flag&(1|8|16)) ) {
|
if( hp && !(flag&(1|8)) ) {
|
||||||
if( sc ) {
|
if( sc ) {
|
||||||
struct status_change_entry *sce;
|
struct status_change_entry *sce;
|
||||||
if( (sce = sc->data[SC_DEVOTION]) && src && battle_getcurrentskill(src) != PA_PRESSURE )
|
|
||||||
{ // Devotion prevents any of the other ailments from ending.
|
|
||||||
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 == target->id) ||
|
|
||||||
(d_bl->type == BL_PC && ((TBL_PC*)d_bl)->devotion[sce->val2] == target->id)
|
|
||||||
) && check_distance_bl(target, d_bl, sce->val3) )
|
|
||||||
{
|
|
||||||
clif_damage(d_bl, d_bl, gettick(), 0, 0, hp, 0, 0, 0);
|
|
||||||
status_fix_damage(NULL, d_bl, hp, 0);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
status_change_end(target, SC_DEVOTION, -1);
|
|
||||||
}
|
|
||||||
if (sc->data[SC_STONE] && sc->opt1 == OPT1_STONE)
|
if (sc->data[SC_STONE] && sc->opt1 == OPT1_STONE)
|
||||||
status_change_end(target,SC_STONE,-1);
|
status_change_end(target,SC_STONE,-1);
|
||||||
status_change_end(target,SC_FREEZE,-1);
|
status_change_end(target,SC_FREEZE,-1);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user