diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/map/battle.c | 7 | ||||
-rw-r--r-- | src/map/battle.h | 1 | ||||
-rw-r--r-- | src/map/skill.c | 44 |
3 files changed, 26 insertions, 26 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; diff --git a/src/map/battle.h b/src/map/battle.h index 97fa369a4..5499256d8 100644 --- a/src/map/battle.h +++ b/src/map/battle.h @@ -333,6 +333,7 @@ extern struct Battle_Config { int zeny_from_mobs; // [Valaris] int mobs_level_up; // [Valaris] + int pk_min_level; // [celest] #ifndef TXT_ONLY /* SQL-only options */ int mail_system; // [Valaris] diff --git a/src/map/skill.c b/src/map/skill.c index a656423fd..e858d49df 100644 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -2828,22 +2828,22 @@ int skill_castend_nodamage_id( struct block_list *src, struct block_list *bl,int } break; case SA_ABRACADABRA: - //require 1 yellow gemstone even with mistress card or Into the Abyss - if (pc_search_inventory(sd, 715) <= 0 ) { - clif_skill_fail(sd,sd->skillid,0,0); + //require 1 yellow gemstone even with mistress card or Into the Abyss + if (pc_search_inventory(sd, 715) <= 0 ) { + clif_skill_fail(sd,sd->skillid,0,0); + break; + } + pc_delitem(sd, pc_search_inventory(sd, 715), 1, 0); + // + do{ + abra_skillid=skill_abra_dataset(skilllv); + }while(abra_skillid == 0); + abra_skilllv=skill_get_max(abra_skillid)>pc_checkskill(sd,SA_ABRACADABRA)?pc_checkskill(sd,SA_ABRACADABRA):skill_get_max(abra_skillid); + clif_skill_nodamage(src,bl,skillid,skilllv,1); + sd->skillitem=abra_skillid; + sd->skillitemlv=abra_skilllv; + clif_item_skill(sd,abra_skillid,abra_skilllv,"アブラカダブラ"); break; - } - pc_delitem(sd, pc_search_inventory(sd, 715), 1, 0); - // - do{ - abra_skillid=skill_abra_dataset(skilllv); - }while(abra_skillid == 0); - abra_skilllv=skill_get_max(abra_skillid)>pc_checkskill(sd,SA_ABRACADABRA)?pc_checkskill(sd,SA_ABRACADABRA):skill_get_max(abra_skillid); - clif_skill_nodamage(src,bl,skillid,skilllv,1); - sd->skillitem=abra_skillid; - sd->skillitemlv=abra_skilllv; - clif_item_skill(sd,abra_skillid,abra_skilllv,"アブラカダブラ"); - break; case SA_COMA: clif_skill_nodamage(src,bl,skillid,skilllv,1); if( bl->type==BL_PC && ((struct map_session_data *)bl)->special_state.no_magic_damage ) @@ -4240,11 +4240,6 @@ int skill_castend_nodamage_id( struct block_list *src, struct block_list *bl,int } break; - - - - - case RG_CLEANER: //AppleGirl clif_skill_nodamage(src,bl,skillid,skilllv,1); { @@ -9245,17 +9240,16 @@ int skill_status_change_clear(struct block_list *bl, int type) /* クロ?キング?査(周りに移動不可能地?があるか) */ int skill_check_cloaking(struct block_list *bl) { - struct map_session_data *sd=NULL; static int dx[]={-1, 0, 1,-1, 1,-1, 0, 1}; static int dy[]={-1,-1,-1, 0, 0, 1, 1, 1}; int end=1,i; nullpo_retr(0, bl); - sd=(struct map_session_data *)bl; //missing sd [Found by Celest, commited by Aria] + //missing sd [Found by Celest, commited by Aria] + struct map_session_data *sd=(struct map_session_data *)bl; - if(pc_checkskill(sd,AS_CLOAKING)>2) - return 0; - if(bl->type == BL_PC && battle_config.pc_cloak_check_type&1) + if(bl->type == BL_PC && + (battle_config.pc_cloak_check_type&1 || pc_checkskill(sd,AS_CLOAKING)>2)) return 0; if(bl->type == BL_MOB && battle_config.monster_cloak_check_type&1) return 0; |