diff options
author | celest <celest@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2004-11-16 21:57:15 +0000 |
---|---|---|
committer | celest <celest@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2004-11-16 21:57:15 +0000 |
commit | 491a29e76c56358d0d33f583389a92f296980ab8 (patch) | |
tree | 458e79eb84650ada2f11d3b139ce3e92d81057d3 /src/map/battle.c | |
parent | 84567e0e4af0c4913547f1945d76bccf345b5316 (diff) | |
download | hercules-491a29e76c56358d0d33f583389a92f296980ab8.tar.gz hercules-491a29e76c56358d0d33f583389a92f296980ab8.tar.bz2 hercules-491a29e76c56358d0d33f583389a92f296980ab8.tar.xz hercules-491a29e76c56358d0d33f583389a92f296980ab8.zip |
Added pk_min_level and modified cloaking checks a liiittle bit
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/athena@226 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/battle.c')
-rw-r--r-- | src/map/battle.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/map/battle.c b/src/map/battle.c index 27efdd9e8..23bdca930 100644 --- a/src/map/battle.c +++ b/src/map/battle.c @@ -4810,7 +4810,10 @@ int battle_check_target( struct block_list *src, struct block_list *target,int f if(map[ss->m].flag.pvp || pc_iskiller((struct map_session_data *)ss, (struct map_session_data*)target)) { // [MouseJstr] if(su && su->group->target_flag==BCT_NOENEMY) return 1; - else if(battle_config.pk_mode && (((struct map_session_data*)ss)->status.class==0 || ((struct map_session_data*)target)->status.class==0)) + else if (battle_config.pk_mode && + (((struct map_session_data*)ss)->status.class==0 || ((struct map_session_data*)target)->status.class==0 || + ((struct map_session_data*)ss)->status.base_level < battle_config.pk_min_level || + ((struct map_session_data*)target)->status.base_level < battle_config.pk_min_level)) return 1; // prevent novice engagement in pk_mode [Valaris] else if(map[ss->m].flag.pvp_noparty && s_p > 0 && t_p > 0 && s_p == t_p) return 1; @@ -5110,6 +5113,7 @@ static const struct { { "muting_players", &battle_config.muting_players}, // added by [Apple] { "zeny_from_mobs", &battle_config.zeny_from_mobs}, // [Valaris] { "mobs_level_up", &battle_config.mobs_level_up}, // [Valaris] + { "pk_min_level", &battle_config.pk_min_level}, // [celest] //SQL-only options start #ifndef TXT_ONLY { "mail_system", &battle_config.mail_system }, // added by [Valaris] @@ -5331,6 +5335,7 @@ void battle_set_defaults() { battle_config.max_cloth_color = 4; battle_config.zeny_from_mobs = 0; battle_config.mobs_level_up = 0; + battle_config.pk_min_level = 55; battle_config.castrate_dex_scale = 150; |