diff options
Diffstat (limited to 'src/map')
-rw-r--r-- | src/map/battle.c | 6 | ||||
-rw-r--r-- | src/map/battle.h | 3 | ||||
-rw-r--r-- | src/map/clif.c | 13 | ||||
-rw-r--r-- | src/map/pc.c | 2 | ||||
-rw-r--r-- | src/map/skill.c | 4 |
5 files changed, 15 insertions, 13 deletions
diff --git a/src/map/battle.c b/src/map/battle.c index 0fed7c26f..e7e7e9a48 100644 --- a/src/map/battle.c +++ b/src/map/battle.c @@ -3604,8 +3604,7 @@ static const struct battle_data_short { { "making_arrow_name_input", &battle_config.making_arrow_name_input }, { "holywater_name_input", &battle_config.holywater_name_input }, { "cdp_name_input", &battle_config.cdp_name_input }, - { "display_delay_skill_fail", &battle_config.display_delay_skill_fail }, - { "display_snatcher_skill_fail", &battle_config.display_snatcher_skill_fail }, + { "display_skill_fail", &battle_config.display_skill_fail }, { "chat_warpportal", &battle_config.chat_warpportal }, { "mob_warp", &battle_config.mob_warp }, { "dead_branch_active", &battle_config.dead_branch_active }, @@ -4020,8 +4019,7 @@ void battle_set_defaults() { battle_config.making_arrow_name_input = 1; battle_config.holywater_name_input = 1; battle_config.cdp_name_input = 1; - battle_config.display_delay_skill_fail = 1; - battle_config.display_snatcher_skill_fail = 1; + battle_config.display_skill_fail = 0; battle_config.chat_warpportal = 0; battle_config.mob_warp = 0; battle_config.dead_branch_active = 0; diff --git a/src/map/battle.h b/src/map/battle.h index 91ca7962f..9e7836644 100644 --- a/src/map/battle.h +++ b/src/map/battle.h @@ -261,8 +261,7 @@ extern struct Battle_Config { unsigned short making_arrow_name_input;
unsigned short holywater_name_input;
unsigned short cdp_name_input;
- unsigned short display_delay_skill_fail;
- unsigned short display_snatcher_skill_fail;
+ unsigned short display_skill_fail;
unsigned short chat_warpportal;
unsigned short mob_warp;
unsigned short dead_branch_active;
diff --git a/src/map/clif.c b/src/map/clif.c index 9bf290300..7ada8fceb 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -4489,11 +4489,16 @@ int clif_skill_fail(struct map_session_data *sd,int skill_id,int type,int btype) fd=sd->fd;
- // reset all variables [celest]
- // Should be handled now by the unit_* code.
- sd->skillitem = sd->skillitemlv = -1;
+ if(battle_config.display_skill_fail&1)
+ return 0; //Disable all skill failed messages
if(type==0x4 && !sd->state.showdelay)
+ return 0; //Disable delay failed messages
+
+ if(skill_id == RG_SNATCHER && battle_config.display_skill_fail&4)
+ return 0;
+
+ if(skill_id == TF_POISON && battle_config.display_skill_fail&8)
return 0;
WFIFOHEAD(fd,packet_len_table[0x110]);
@@ -4505,7 +4510,7 @@ int clif_skill_fail(struct map_session_data *sd,int skill_id,int type,int btype) WFIFOB(fd,9) = type;
WFIFOSET(fd,packet_len_table[0x110]);
- return 0;
+ return 1;
}
/*==========================================
diff --git a/src/map/pc.c b/src/map/pc.c index eaa157075..dc9134fa8 100644 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -618,7 +618,7 @@ int pc_authok(struct map_session_data *sd, int login_id2, time_t connect_until_t if (battle_config.disp_zeny) sd->state.showzeny = 1; - if (battle_config.display_delay_skill_fail) + if (!battle_config.display_skill_fail&2) sd->state.showdelay = 1; // Request all registries. diff --git a/src/map/skill.c b/src/map/skill.c index 929d4eb90..530d0ee99 100644 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -1057,8 +1057,8 @@ int skill_additional_effect (struct block_list* src, struct block_list *bl, int (skill*15 + 55) + pc_checkskill(sd,TF_STEAL)*10 > rand()%1000) { if(pc_steal_item(sd,bl)) clif_skill_nodamage(src,bl,TF_STEAL,skill,1); - else if (battle_config.display_snatcher_skill_fail) - clif_skill_fail(sd,skillid,0,0); + else + clif_skill_fail(sd,RG_SNATCHER,0,0); } // Chance to trigger Taekwon kicks [Dralnu] if(sd->sc.count && sd->sc.data[SC_COMBO].timer == -1) { |