Use static JSON key as NPC ID for NPCs and mobs

This commit is contained in:
gsemaj
2021-04-29 13:34:53 -04:00
committed by Gent Semaj
parent 4eeb93ad51
commit 4bcf3af90f
2 changed files with 33 additions and 29 deletions

View File

@@ -3,6 +3,11 @@
#include "NPCManager.hpp"
// these are added to the NPC's static key to avoid collisions
const int NPC_ID_OFFSET = 0;
const int MOB_ID_OFFSET = 10000;
const int MOB_GROUP_ID_OFFSET = 20000;
// typedef for JSON object because I don't want to type nlohmann::json every time
typedef nlohmann::json json;