diff options
author | shennetsind <ind@henn.et> | 2014-03-15 19:05:23 -0300 |
---|---|---|
committer | shennetsind <ind@henn.et> | 2014-03-15 19:05:23 -0300 |
commit | 26bc0cf56b4867fab222a15de18ac43ff799b9e8 (patch) | |
tree | 09ae426633ff09dfb98c81748fae59ebde4d13cb /src/map/skill.c | |
parent | c30a02c23b736acdd6a4ba14d3dd458cd74e5422 (diff) | |
download | hercules-26bc0cf56b4867fab222a15de18ac43ff799b9e8.tar.gz hercules-26bc0cf56b4867fab222a15de18ac43ff799b9e8.tar.bz2 hercules-26bc0cf56b4867fab222a15de18ac43ff799b9e8.tar.xz hercules-26bc0cf56b4867fab222a15de18ac43ff799b9e8.zip |
Fixed Bug 8089
In the scenario where damage is reflected and kills the caste sc->data[SC__SHADOWFORM] would be null (caster no longer is under the condition) and thus the crash.
http://hercules.ws/board/tracker/issue-8089-map-crash/
Signed-off-by: shennetsind <ind@henn.et>
Diffstat (limited to 'src/map/skill.c')
-rw-r--r-- | src/map/skill.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/map/skill.c b/src/map/skill.c index 7f33c26a5..554528af2 100644 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -15327,7 +15327,9 @@ bool skill_check_shadowform(struct block_list *bl, int64 damage, int hit){ } status->damage(bl, src, damage, 0, clif->damage(src, src, 500, 500, damage, hit, (hit > 1 ? 8 : 0), 0), 0); - if( (--sc->data[SC__SHADOWFORM]->val3) <= 0 ) { + + /* because damage can cancel it */ + if( sc->data[SC__SHADOWFORM] && (--sc->data[SC__SHADOWFORM]->val3) <= 0 ) { status_change_end(bl, SC__SHADOWFORM, INVALID_TIMER); if( src->type == BL_PC ) ((TBL_PC*)src)->shadowform_id = 0; |