summaryrefslogtreecommitdiff
path: root/src/map/battle.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/map/battle.c')
-rw-r--r--src/map/battle.c7
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]
}
}