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.c33
1 files changed, 27 insertions, 6 deletions
diff --git a/src/map/battle.c b/src/map/battle.c
index bb20b94ff..fdea849fb 100644
--- a/src/map/battle.c
+++ b/src/map/battle.c
@@ -6814,14 +6814,23 @@ int battle_check_target( struct block_list *src, struct block_list *target,int f
if( flag&(BCT_PARTY|BCT_ENEMY) ) {
int s_party = status->get_party_id(s_bl);
int s_guild = status->get_guild_id(s_bl);
+ int t_guild = status->get_guild_id(t_bl);
- if( s_party && s_party == status->get_party_id(t_bl)
- && !(map->list[m].flag.pvp && map->list[m].flag.pvp_noparty)
- && !(map_flag_gvg(m) && map->list[m].flag.gvg_noparty && !( s_guild && s_guild == status->get_guild_id(t_bl) ))
- && (!map->list[m].flag.battleground || sbg_id == tbg_id) )
- state |= BCT_PARTY;
- else
+ if (s_party != 0 && s_party == status->get_party_id(t_bl)) {
+ if (map_flag_gvg(m) && map->list[m].flag.gvg_noparty) {
+ if (s_guild != 0 && t_guild != 0 && (s_guild == t_guild || guild->isallied(s_guild, t_guild)))
+ state |= BCT_PARTY;
+ else
+ state |= flag&BCT_ENEMY ? BCT_ENEMY : BCT_PARTY;
+ } else if (!(map->list[m].flag.pvp && map->list[m].flag.pvp_noparty)
+ && (!map->list[m].flag.battleground || sbg_id == tbg_id)) {
+ state |= BCT_PARTY;
+ } else {
+ state |= BCT_ENEMY;
+ }
+ } else {
state |= BCT_ENEMY;
+ }
}
if( flag&(BCT_GUILD|BCT_ENEMY) ) {
int s_guild = status->get_guild_id(s_bl);
@@ -7167,6 +7176,7 @@ static const struct battle_data {
{ "castrate_dex_scale", &battle_config.castrate_dex_scale, 150, 1, INT_MAX, },
{ "vcast_stat_scale", &battle_config.vcast_stat_scale, 530, 1, INT_MAX, },
{ "area_size", &battle_config.area_size, 14, 0, INT_MAX, },
+ { "chat_area_size", &battle_config.chat_area_size, 9, 0, INT_MAX, },
{ "zeny_from_mobs", &battle_config.zeny_from_mobs, 0, 0, 1, },
{ "mobs_level_up", &battle_config.mobs_level_up, 0, 0, 1, },
{ "mobs_level_up_exp_rate", &battle_config.mobs_level_up_exp_rate, 1, 1, INT_MAX, },
@@ -7319,7 +7329,11 @@ static const struct battle_data {
{ "save_body_style", &battle_config.save_body_style, 0, 0, 1, },
{ "player_warp_keep_direction", &battle_config.player_warp_keep_direction, 0, 0, 1, },
{ "atcommand_levelup_events", &battle_config.atcommand_levelup_events, 0, 0, 1, },
+ { "bow_unequip_arrow", &battle_config.bow_unequip_arrow, 1, 0, 1, },
{ "max_summoner_parameter", &battle_config.max_summoner_parameter, 120, 10, 10000, },
+ { "mvp_exp_reward_message", &battle_config.mvp_exp_reward_message, 0, 0, 1, },
+ { "monster_eye_range_bonus", &battle_config.mob_eye_range_bonus, 0, 0, 10, },
+ { "prevent_logout_trigger", &battle_config.prevent_logout_trigger, 0xE, 0, 0xF, }
};
#ifndef STATS_OPT_OUT
/**
@@ -7598,6 +7612,13 @@ void battle_adjust_conf(void) {
}
#endif
+#if PACKETVER < 20131223
+ if (battle_config.mvp_exp_reward_message) {
+ ShowWarning("conf/map/battle/client.conf MVP EXP reward message is enabled but it requires PACKETVER 2013-12-23 or newer, disabling...\n");
+ battle_config.mvp_exp_reward_message = 0;
+ }
+#endif
+
#ifndef CELL_NOSTACK
if (battle_config.custom_cell_stack_limit != 1)
ShowWarning("Battle setting 'custom_cell_stack_limit' takes no effect as this server was compiled without Cell Stack Limit support.\n");