Restructure tdata

This commit is contained in:
Gent S
2020-11-23 18:45:28 -05:00
parent 0f1d9cdf1c
commit 8a0d0e0e4c
2 changed files with 3 additions and 1 deletions

View File

@@ -37,6 +37,7 @@ void TableData::init() {
// read file into json
inFile >> npcData;
npcData = npcData["NPCs"];
for (nlohmann::json::iterator _npc = npcData.begin(); _npc != npcData.end(); _npc++) {
auto npc = _npc.value();
int instanceID = npc.find("mapNum") == npc.end() ? INSTANCE_OVERWORLD : (int)npc["mapNum"];
@@ -201,6 +202,7 @@ void TableData::init() {
// read file into json
inFile >> npcData;
npcData = npcData["mobs"];
int leaderMob = -1;
int leaderMobFollowers = 0;