diff options
author | L0ne_W0lf <L0ne_W0lf@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2010-09-06 19:15:17 +0000 |
---|---|---|
committer | L0ne_W0lf <L0ne_W0lf@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2010-09-06 19:15:17 +0000 |
commit | 2678cc840bb707ff33378ba0d0cbfd8a737b5743 (patch) | |
tree | 2516fdd31f588ba6557766f862b6373393acc862 /src/map | |
parent | 36ea9e9c13d9f29203ba8c85a7f751f2433f5950 (diff) | |
download | hercules-2678cc840bb707ff33378ba0d0cbfd8a737b5743.tar.gz hercules-2678cc840bb707ff33378ba0d0cbfd8a737b5743.tar.bz2 hercules-2678cc840bb707ff33378ba0d0cbfd8a737b5743.tar.xz hercules-2678cc840bb707ff33378ba0d0cbfd8a737b5743.zip |
* Implemented Icescope's fix for devotion, reflect damage is no longer absorbed by the devoter. (bugreport:3189)
* As a folow up to r14301, increased MAX_REG_NUM to 256, to prevent possible data loss.
* Touched up the endless tower script slightly.
- Added ends to several NPCs which would allow you to restart timers.
- Added some missing stopnpctimers to npcs. (bugreport:4418)
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14400 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map')
-rw-r--r-- | src/map/battle.c | 18 | ||||
-rw-r--r-- | src/map/skill.c | 2 | ||||
-rw-r--r-- | src/map/status.c | 3 |
3 files changed, 18 insertions, 5 deletions
diff --git a/src/map/battle.c b/src/map/battle.c index 064ac3a7c..66a64828c 100644 --- a/src/map/battle.c +++ b/src/map/battle.c @@ -164,7 +164,13 @@ int battle_delay_damage_sub(int tid, unsigned int tick, int id, intptr data) check_distance_bl(dat->src, target, dat->distance)) //Check to see if you haven't teleported. [Skotlex] { map_freeblock_lock(); - status_fix_damage(dat->src, target, dat->damage, dat->delay); + if(dat->skill_id != CR_REFLECTSHIELD) + status_fix_damage(dat->src, target, dat->damage, dat->delay); // We have to seperate here between reflect damage and others [icescope] + 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) ) 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 ) @@ -183,7 +189,13 @@ int battle_delay_damage (unsigned int tick, int amotion, struct block_list *src, if (!battle_config.delay_battle_damage) { map_freeblock_lock(); - status_fix_damage(src, target, damage, ddelay); + if(skill_id != CR_REFLECTSHIELD) + 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) ) skill_additional_effect(src, target, skill_id, skill_lv, attack_type, dmg_lv, gettick()); if( damage > 0 && attack_type ) @@ -3216,7 +3228,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(tsd && src != target) battle_drain(tsd, src, rdamage, rdamage, sstatus->race, is_boss(src)); - battle_delay_damage(tick, wd.amotion, target, src, 0, 0, 0, rdamage, ATK_DEF, rdelay); + 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] } if (tsc) { diff --git a/src/map/skill.c b/src/map/skill.c index 0212516a5..4e43ce6ba 100644 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -1948,7 +1948,7 @@ int skill_attack (int attack_type, struct block_list* src, struct block_list *ds if( rdamage > 0 ) { if( dmg.amotion ) - battle_delay_damage(tick, dmg.amotion,bl,src,0,0,0,rdamage,ATK_DEF,0); + 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] else status_fix_damage(bl,src,rdamage,0); clif_damage(src,src,tick, dmg.amotion,0,rdamage,dmg.div_>1?dmg.div_:1,4,0); diff --git a/src/map/status.c b/src/map/status.c index f65771045..1e40018a5 100644 --- a/src/map/status.c +++ b/src/map/status.c @@ -640,6 +640,7 @@ 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&4, if killed, mob must not give exp/loot. //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) { struct status_data *status; @@ -680,7 +681,7 @@ 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] ) hp = 1; - if( hp && !(flag&(1|8)) ) { + if( hp && !(flag&(1|8|16)) ) { if( sc ) { struct status_change_entry *sce; if( (sce = sc->data[SC_DEVOTION]) && src && battle_getcurrentskill(src) != PA_PRESSURE ) |