Implemented mob roaming.

Will likely need further tuning.
Mobs in vacant chunks are skipped.
This commit is contained in:
2020-09-22 20:33:10 +02:00
parent 94ab5b8b64
commit ac1fd1e5be
5 changed files with 75 additions and 3 deletions

View File

@@ -162,7 +162,7 @@ void TableData::init() {
for (nlohmann::json::iterator _npc = npcData.begin(); _npc != npcData.end(); _npc++) {
auto npc = _npc.value();
auto td = npcTableData[(int)npc["iNPCType"]];
Mob *tmp = new Mob(npc["iX"], npc["iY"], npc["iZ"], npc["iNPCType"], npc["iHP"], npc["iAngle"], td["m_iRegenTime"]);
Mob *tmp = new Mob(npc["iX"], npc["iY"], npc["iZ"], npc["iNPCType"], npc["iHP"], npc["iAngle"], td);
// Temporary fix, IDs will be pulled from json later
tmp->appearanceData.iNPC_ID = i;