summaryrefslogtreecommitdiff
path: root/src/map/npc.c
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-12-25 23:37:23 +0300
committerAndrei Karas <akaras@inbox.ru>2014-12-31 23:07:45 +0300
commit0cb157c95e3c3af13af1f1f4294bf38c414fc7ab (patch)
treec68b70c8d0e81bc826e1c2c4684d0852335e1f3c /src/map/npc.c
parentf0d5be2db32afc7b4382276ffa3c60a1354bea8e (diff)
downloadhercules-0cb157c95e3c3af13af1f1f4294bf38c414fc7ab.tar.gz
hercules-0cb157c95e3c3af13af1f1f4294bf38c414fc7ab.tar.bz2
hercules-0cb157c95e3c3af13af1f1f4294bf38c414fc7ab.tar.xz
hercules-0cb157c95e3c3af13af1f1f4294bf38c414fc7ab.zip
Remove useless checks.
Diffstat (limited to 'src/map/npc.c')
-rw-r--r--src/map/npc.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/map/npc.c b/src/map/npc.c
index 2da99c0bd..43cb4f993 100644
--- a/src/map/npc.c
+++ b/src/map/npc.c
@@ -3143,7 +3143,7 @@ const char* npc_parse_duplicate(char* w1, char* w2, char* w3, char* w4, const ch
nd->u.scr.timerid = INVALID_TIMER;
- if( type == SCRIPT && options&NPO_ONINIT ) {
+ if (options&NPO_ONINIT) {
// From npc_parse_script
char evname[EVENT_NAME_LENGTH];
struct event_data *ev;
@@ -3509,13 +3509,13 @@ const char* npc_parse_mob(char* w1, char* w2, char* w3, char* w4, const char* st
return strchr(start,'\n');// skip and continue
}
- if( (mobspawn.state.size < 0 || mobspawn.state.size > 2) && size != -1 ) {
+ if (mobspawn.state.size > 2 && size != -1) {
ShowError("npc_parse_mob: Invalid size number %d for mob ID %d in file '%s', line '%d'.\n", mobspawn.state.size, class_, filepath, strline(buffer, start - buffer));
if (retval) *retval = EXIT_FAILURE;
return strchr(start, '\n');
}
- if( (mobspawn.state.ai < 0 || mobspawn.state.ai > 4) && ai != -1 ) {
+ if (mobspawn.state.ai > 4 && ai != -1) {
ShowError("npc_parse_mob: Invalid ai %d for mob ID %d in file '%s', line '%d'.\n", mobspawn.state.ai, class_, filepath, strline(buffer, start - buffer));
if (retval) *retval = EXIT_FAILURE;
return strchr(start, '\n');