diff options
author | shennetsind <shennetsind@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2012-07-26 02:37:58 +0000 |
---|---|---|
committer | shennetsind <shennetsind@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2012-07-26 02:37:58 +0000 |
commit | fd546694d8f26ab2760995512a06f4370a7f0b96 (patch) | |
tree | 0eebb5f5980c3213d41a6eef2f490f23b3ea135a /src/map/battle.c | |
parent | 6ebedc8ce5d97d55cf4fe395471c8fee7bd309a9 (diff) | |
download | hercules-fd546694d8f26ab2760995512a06f4370a7f0b96.tar.gz hercules-fd546694d8f26ab2760995512a06f4370a7f0b96.tar.bz2 hercules-fd546694d8f26ab2760995512a06f4370a7f0b96.tar.xz hercules-fd546694d8f26ab2760995512a06f4370a7f0b96.zip |
Follow up r16502 / bugreport:6115 added missing check on battle_calc_gvg_damage
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16503 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/battle.c')
-rw-r--r-- | src/map/battle.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/map/battle.c b/src/map/battle.c index 11efc70e0..6cc0ae044 100644 --- a/src/map/battle.c +++ b/src/map/battle.c @@ -916,10 +916,11 @@ int battle_calc_gvg_damage(struct block_list *src,struct block_list *bl,int dama } if(src->type != BL_MOB) { struct guild *g = guild_search(status_get_guild_id(src)); - if (!g) return 0; - if (class_ == MOBID_EMPERIUM && guild_checkskill(g,GD_APPROVAL) <= 0) + + if (class_ == MOBID_EMPERIUM && (!g || guild_checkskill(g,GD_APPROVAL) <= 0 )) return 0; - if (battle_config.guild_max_castles && guild_checkcastles(g)>=battle_config.guild_max_castles) + + if (g && battle_config.guild_max_castles && guild_checkcastles(g)>=battle_config.guild_max_castles) return 0; // [MouseJstr] } } |