diff options
-rw-r--r-- | conf-tmpl/Changelog.txt | 7 | ||||
-rw-r--r-- | conf-tmpl/battle/skill.conf | 11 | ||||
-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 |
7 files changed, 27 insertions, 19 deletions
diff --git a/conf-tmpl/Changelog.txt b/conf-tmpl/Changelog.txt index 9ef85b1ae..c00c57702 100644 --- a/conf-tmpl/Changelog.txt +++ b/conf-tmpl/Changelog.txt @@ -1,5 +1,10 @@ Date Added
-
+2006/08/08
+ * Removed config settings display_delay_skill_fail and
+ display_snatcher_skill_fail, replaced them with display_skill_fail, which
+ can be used to determine whether you hide ALL skill-failed messages, those
+ from delay, those from Snatcher or those from Envenom (battle/skill.conf)
+ [Skotlex]
2006/08/07
* Added config force_random_spawn which overrides the spawn-files defined
coordinates to make all mobs always spawn randomly on the map. [Skotlex]
diff --git a/conf-tmpl/battle/skill.conf b/conf-tmpl/battle/skill.conf index ad401a43e..565afc7fc 100644 --- a/conf-tmpl/battle/skill.conf +++ b/conf-tmpl/battle/skill.conf @@ -145,11 +145,12 @@ monster_cloak_check_type: 0 // Can't place unlimited land skills at the same time (Note 4)
land_skill_limit: 1
-// If skill fails by delay, should it display or not. (Note 1)
-display_delay_skill_fail: no
-
-// Display Snatcher skill failures
-display_snatcher_skill_fail: yes
+//Determines which kind of skill-failed messages should be sent:
+// 1 - Disable all skill-failed messages.
+// 2 - Disable skill-failed messages due to can-act delays.
+// 4 - Disable failed message from Snatcher
+// 8 - Disable failed message from Envenom
+display_skill_fail: 0
// Can a player in chat room (in-game), be warped by a warp portal? (Note 1)
chat_warpportal: no
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) { |