summaryrefslogtreecommitdiff
path: root/src/map/status.c
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-07-31 18:38:51 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-07-31 18:38:51 +0000
commit5af84391c50d5625c870d567e298b0628ba2a4ef (patch)
tree31be66ff396bfa41163836d3d4b5cf43dde58f5d /src/map/status.c
parentb3ff9c7c452aebec22005b2a3aa1e1d4e25ecf38 (diff)
downloadhercules-5af84391c50d5625c870d567e298b0628ba2a4ef.tar.gz
hercules-5af84391c50d5625c870d567e298b0628ba2a4ef.tar.bz2
hercules-5af84391c50d5625c870d567e298b0628ba2a4ef.tar.xz
hercules-5af84391c50d5625c870d567e298b0628ba2a4ef.zip
- Corrected a status_get_race call which should be status_get_race2 in misc attacks.
- Moved the Devotion code to the top of the SC list in status_damage, meaning that now stuff like being asleep or confused won't end if you are hit, but the damage is absorbed by devotion. - Some cleanups in battle.c (replaced usage of status_get_* for status->*) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@8009 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/status.c')
-rw-r--r--src/map/status.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/map/status.c b/src/map/status.c
index 9f43c73ad..1a3ca25ec 100644
--- a/src/map/status.c
+++ b/src/map/status.c
@@ -573,6 +573,17 @@ int status_damage(struct block_list *src,struct block_list *target,int hp, int s
if (hp && !(flag&1)) {
if (sc) {
+ if (sc->data[SC_DEVOTION].val1 && src && battle_getcurrentskill(src) != PA_PRESSURE)
+ { //Devotion prevents any of the other ailments from ending.
+ struct map_session_data *sd2 = map_id2sd(sc->data[SC_DEVOTION].val1);
+ if (sd2 && sd2->devotion[sc->data[SC_DEVOTION].val2] == target->id)
+ {
+ clif_damage(&sd2->bl, &sd2->bl, gettick(), 0, 0, hp, 0, 0, 0);
+ status_fix_damage(NULL, &sd2->bl, hp, 0);
+ return 0;
+ }
+ status_change_end(target, SC_DEVOTION, -1);
+ }
if (sc->data[SC_FREEZE].timer != -1)
status_change_end(target,SC_FREEZE,-1);
if (sc->data[SC_STONE].timer!=-1 && sc->opt1 == OPT1_STONE)
@@ -607,17 +618,6 @@ int status_damage(struct block_list *src,struct block_list *target,int hp, int s
status_change_end(target, SC_GRAVITATION, -1);
}
}
- if (sc->data[SC_DEVOTION].val1 && src && battle_getcurrentskill(src) != PA_PRESSURE)
- {
- struct map_session_data *sd2 = map_id2sd(sc->data[SC_DEVOTION].val1);
- if (sd2 && sd2->devotion[sc->data[SC_DEVOTION].val2] == target->id)
- {
- clif_damage(&sd2->bl, &sd2->bl, gettick(), 0, 0, hp, 0, 0, 0);
- status_fix_damage(NULL, &sd2->bl, hp, 0);
- return 0;
- }
- status_change_end(target, SC_DEVOTION, -1);
- }
if(sc->data[SC_DANCING].timer != -1 && hp > (signed int)status->max_hp>>2)
skill_stop_dancing(target);
}