diff options
Diffstat (limited to 'src/map/npc.c')
-rw-r--r-- | src/map/npc.c | 6 |
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'); |