summaryrefslogtreecommitdiff
path: root/src/map/clif.c
diff options
context:
space:
mode:
authorHaru <haru@dotalux.com>2013-12-04 20:11:10 +0100
committerHaru <haru@dotalux.com>2013-12-04 21:00:48 +0100
commit43462caf9441a041755806a889cb6d5104dcf438 (patch)
treecf1e86d12b4c788238a7c3290a50cea76642f21c /src/map/clif.c
parent48fdd76b45f6c37cc02a5f981d3591c951ddfb94 (diff)
downloadhercules-43462caf9441a041755806a889cb6d5104dcf438.tar.gz
hercules-43462caf9441a041755806a889cb6d5104dcf438.tar.bz2
hercules-43462caf9441a041755806a889cb6d5104dcf438.tar.xz
hercules-43462caf9441a041755806a889cb6d5104dcf438.zip
Follow-up to 6e9c385b8fa2fbca97ca23e35f0b8e5dabd13526
- Case-sensitive AegisName and Sprite ID lookups are now optional, controlled by the case_sensitive_aegisnames battle config flag (you can set it to "no" to restore the case insensitive behavior.) - Special thanks to Ind. Signed-off-by: Haru <haru@dotalux.com>
Diffstat (limited to 'src/map/clif.c')
-rw-r--r--src/map/clif.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/src/map/clif.c b/src/map/clif.c
index 1fcbb77bc..d8a3274a0 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -13524,7 +13524,12 @@ void clif_parse_GM_Monster_Item(int fd, struct map_session_data *sd)
if ( (count=itemdb->search_name_array(item_array, 10, item_monster_name, 1)) > 0 ){
for(i = 0; i < count; i++){
- if( item_array[i] && strcmp(item_array[i]->name, item_monster_name) == 0 )// It only accepts aegis name
+ if( !item_array[i] )
+ continue;
+ // It only accepts aegis name
+ if( battle_config.case_sensitive_aegisnames && strcmp(item_array[i]->name, item_monster_name) == 0 )
+ break;
+ if( !battle_config.case_sensitive_aegisnames && strcasecmp(item_array[i]->name, item_monster_name) == 0 )
break;
}
@@ -13546,7 +13551,12 @@ void clif_parse_GM_Monster_Item(int fd, struct map_session_data *sd)
if( (count=mob->db_searchname_array(mob_array, 10, item_monster_name, 1)) > 0){
for(i = 0; i < count; i++){
- if( mob_array[i] && strcmp(mob_array[i]->sprite, item_monster_name) == 0 ) // It only accepts sprite name
+ if( !mob_array[i] )
+ continue;
+ // It only accepts sprite name
+ if( battle_config.case_sensitive_aegisnames && strcmp(mob_array[i]->sprite, item_monster_name) == 0 )
+ break;
+ if( !battle_config.case_sensitive_aegisnames && strcasecmp(mob_array[i]->sprite, item_monster_name) == 0 )
break;
}