diff options
author | Haruna <haru@dotalux.com> | 2015-01-01 18:06:10 +0100 |
---|---|---|
committer | Haruna <haru@dotalux.com> | 2015-01-01 18:06:10 +0100 |
commit | ff607f15ec14783aed8c0cf2749ac8cbe6d0e7db (patch) | |
tree | e121e6c1e25ff47a26090437c937b022d2bfebc6 /src/map/battle.c | |
parent | dc6b470e4aaf252cb4f960b8b5585e51da821893 (diff) | |
parent | f70d54001cd1b975db6f4668a6d54dbae7a8ac92 (diff) | |
download | hercules-ff607f15ec14783aed8c0cf2749ac8cbe6d0e7db.tar.gz hercules-ff607f15ec14783aed8c0cf2749ac8cbe6d0e7db.tar.bz2 hercules-ff607f15ec14783aed8c0cf2749ac8cbe6d0e7db.tar.xz hercules-ff607f15ec14783aed8c0cf2749ac8cbe6d0e7db.zip |
Merge pull request #425 from 4144/fixes
Different fixes after automatic checks
Diffstat (limited to 'src/map/battle.c')
-rw-r--r-- | src/map/battle.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/map/battle.c b/src/map/battle.c index ddad2c705..86134db52 100644 --- a/src/map/battle.c +++ b/src/map/battle.c @@ -348,7 +348,7 @@ int64 battle_attr_fix(struct block_list *src, struct block_list *target, int64 d struct skill_unit_group *sg; struct block_list *sgsrc; - if( !su || !su->alive + if(!su->alive || (sg = su->group) == NULL || sg->val3 == -1 || (sgsrc = map->id2bl(sg->src_id)) == NULL || status->isdead(sgsrc) ) @@ -2594,6 +2594,8 @@ int64 battle_calc_damage(struct block_list *src,struct block_list *bl,struct Dam nullpo_ret(bl); + // need check src for null pointer? + if( !damage ) return 0; if( battle_config.ksprotection && mob->ksprotected(src, bl) ) |