summaryrefslogtreecommitdiff
path: root/src/map/battle.c
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-09-12 16:17:57 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-09-12 16:17:57 +0000
commit18b8ec2594cd4a8748d8c69a82f61c8637ef400e (patch)
treea2a6dc8206c57bc0e47cd46378ffca7a4524d598 /src/map/battle.c
parentbe57ed26ac11ed0bb696acb031df527e3edf3130 (diff)
downloadhercules-18b8ec2594cd4a8748d8c69a82f61c8637ef400e.tar.gz
hercules-18b8ec2594cd4a8748d8c69a82f61c8637ef400e.tar.bz2
hercules-18b8ec2594cd4a8748d8c69a82f61c8637ef400e.tar.xz
hercules-18b8ec2594cd4a8748d8c69a82f61c8637ef400e.zip
- Updated battle_switch to use strncmpi instead of strcmpi, it makes it so using "yessir" will match "yes", this is actually needed because if you set a config setting to "yes " (notice the trailing space), then the map config engine fails to read it right, and will set the config setting to 0 (no).
- Added function pc_resethate to more easily handle Angel trigger - Made feel_var and hate_var static variables to pc.c to simplify things and avoid errors due to redundancy. - Updated the show_mob_info setting to add another space to the separating pipes, so that each field is separated by " | " instead of " |". git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@8721 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/battle.c')
-rw-r--r--src/map/battle.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/map/battle.c b/src/map/battle.c
index 749a71aa6..6ee40df35 100644
--- a/src/map/battle.c
+++ b/src/map/battle.c
@@ -3429,10 +3429,18 @@ int battle_check_range(struct block_list *src,struct block_list *bl,int range)
*------------------------------------------
*/
int battle_config_switch(const char *str) {
- if (strcmpi(str, "on") == 0 || strcmpi(str, "yes") == 0 || strcmpi(str, "oui") == 0 || strcmpi(str, "ja") == 0 || strcmpi(str, "si") == 0)
+ if(strncmpi(str, "on",2) == 0 ||
+ strncmpi(str, "yes",3) == 0 ||
+ strncmpi(str, "oui",3) == 0 ||
+ strncmpi(str, "ja",2) == 0 ||
+ strncmpi(str, "si",2) == 0)
return 1;
- if (strcmpi(str, "off") == 0 || strcmpi(str, "no") == 0 || strcmpi(str, "non") == 0 || strcmpi(str, "nein") == 0)
+ if(strncmpi(str, "off",3) == 0 ||
+ strncmpi(str, "no",2) == 0 ||
+ strncmpi(str, "non",3) == 0 ||
+ strncmpi(str, "nein",4) == 0)
return 0;
+
return atoi(str);
}