summaryrefslogtreecommitdiff
path: root/src/map/battle.c
diff options
context:
space:
mode:
authorpanikon <panikon@zoho.com>2014-07-08 16:28:46 -0300
committerpanikon <panikon@zoho.com>2014-07-08 16:28:46 -0300
commitd1d99a96485a164f850e09c2fff6d0c30657ea9e (patch)
tree58265553753580a2cfde36c919b8d37262d485f3 /src/map/battle.c
parent36712df4cf1f7fbc1a78eb4a7afee1630fa4c4be (diff)
downloadhercules-d1d99a96485a164f850e09c2fff6d0c30657ea9e.tar.gz
hercules-d1d99a96485a164f850e09c2fff6d0c30657ea9e.tar.bz2
hercules-d1d99a96485a164f850e09c2fff6d0c30657ea9e.tar.xz
hercules-d1d99a96485a164f850e09c2fff6d0c30657ea9e.zip
Removed redundant data from guardian_data, saving up to 40 bytes per guardian (10240 bytes total)
Diffstat (limited to 'src/map/battle.c')
-rw-r--r--src/map/battle.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/map/battle.c b/src/map/battle.c
index 6d1a98b54..e40d44549 100644
--- a/src/map/battle.c
+++ b/src/map/battle.c
@@ -6149,7 +6149,8 @@ int battle_check_target( struct block_list *src, struct block_list *target,int f
{
struct mob_data *md = BL_CAST(BL_MOB, t_bl);
- if( !((map->agit_flag || map->agit2_flag) && map->list[m].flag.gvg_castle) && md->guardian_data && md->guardian_data->guild_id )
+ if( !((map->agit_flag || map->agit2_flag) && map->list[m].flag.gvg_castle)
+ && md->guardian_data && (md->guardian_data->g || md->guardian_data->castle->guild_id) )
return 0; // Disable guardians/emperiums owned by Guilds on non-woe times.
break;
}
@@ -6209,7 +6210,8 @@ int battle_check_target( struct block_list *src, struct block_list *target,int f
case BL_MOB:
{
struct mob_data *md = BL_CAST(BL_MOB, s_bl);
- if( !((map->agit_flag || map->agit2_flag) && map->list[m].flag.gvg_castle) && md->guardian_data && md->guardian_data->guild_id )
+ if( !((map->agit_flag || map->agit2_flag) && map->list[m].flag.gvg_castle)
+ && md->guardian_data && (md->guardian_data->g || md->guardian_data->castle->guild_id) )
return 0; // Disable guardians/emperium owned by Guilds on non-woe times.
if( !md->special_state.ai )