Skip to content

Commit

Permalink
Extended the numeric view ID deprecation to '-1' (FAKE_NPC)
Browse files Browse the repository at this point in the history
Signed-off-by: Haru <haru@dotalux.com>
  • Loading branch information
MishimaHaruna committed Dec 31, 2015
1 parent b4c99db commit 32a42ee
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/map/npc.c
Expand Up @@ -2569,8 +2569,7 @@ int npc_parseview(const char* w4, const char* start, const char* buffer, const c
} else {
// NPC has an ID specified for view id.
val = atoi(w4);
if (val != FAKE_NPC) // TODO: Add this to the constants table and replace -1 with FAKE_NPC in the scripts, then remove this check.
ShowWarning("npc_parseview: Use of numeric NPC view IDs is deprecated and may be removed in a future update. Please use NPC view constants instead. ID '%d' specified in file '%s', line '%d'.\n", val, filepath, strline(buffer, start-buffer));
ShowWarning("npc_parseview: Use of numeric NPC view IDs is deprecated and may be removed in a future update. Please use NPC view constants instead. ID '%d' specified in file '%s', line '%d'.\n", val, filepath, strline(buffer, start-buffer));
}

return val;
Expand Down

0 comments on commit 32a42ee

Please sign in to comment.