mirror of
https://github.com/OpenFusionProject/OpenFusion.git
synced 2024-11-22 21:40:05 +00:00
Add ID gaps for missing NPCs in Academy
This commit is contained in:
parent
52e3c3bcd7
commit
954cfabde5
@ -46,8 +46,10 @@ void TableData::init() {
|
|||||||
int instanceID = npc.find("mapNum") == npc.end() ? INSTANCE_OVERWORLD : (int)npc["mapNum"];
|
int instanceID = npc.find("mapNum") == npc.end() ? INSTANCE_OVERWORLD : (int)npc["mapNum"];
|
||||||
#ifdef ACADEMY
|
#ifdef ACADEMY
|
||||||
// do not spawn NPCs in the future
|
// do not spawn NPCs in the future
|
||||||
if (npc["x"] > 512000 && npc["y"] < 256000)
|
if (npc["x"] > 512000 && npc["y"] < 256000) {
|
||||||
|
nextId++;
|
||||||
continue;
|
continue;
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
BaseNPC *tmp = new BaseNPC(npc["x"], npc["y"], npc["z"], npc["angle"], instanceID, npc["id"], nextId);
|
BaseNPC *tmp = new BaseNPC(npc["x"], npc["y"], npc["z"], npc["angle"], instanceID, npc["id"], nextId);
|
||||||
|
|
||||||
@ -269,8 +271,10 @@ void TableData::init() {
|
|||||||
|
|
||||||
#ifdef ACADEMY
|
#ifdef ACADEMY
|
||||||
// do not spawn NPCs in the future
|
// do not spawn NPCs in the future
|
||||||
if (npc["iX"] > 512000 && npc["iY"] < 256000)
|
if (npc["iX"] > 512000 && npc["iY"] < 256000) {
|
||||||
|
nextId++;
|
||||||
continue;
|
continue;
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
Mob *tmp = new Mob(npc["iX"], npc["iY"], npc["iZ"], npc["iAngle"], instanceID, npc["iNPCType"], td, nextId);
|
Mob *tmp = new Mob(npc["iX"], npc["iY"], npc["iZ"], npc["iAngle"], instanceID, npc["iNPCType"], td, nextId);
|
||||||
@ -288,11 +292,15 @@ void TableData::init() {
|
|||||||
auto leader = _group.value();
|
auto leader = _group.value();
|
||||||
auto td = NPCManager::NPCData[(int)leader["iNPCType"]];
|
auto td = NPCManager::NPCData[(int)leader["iNPCType"]];
|
||||||
uint64_t instanceID = leader.find("iMapNum") == leader.end() ? INSTANCE_OVERWORLD : (int)leader["iMapNum"];
|
uint64_t instanceID = leader.find("iMapNum") == leader.end() ? INSTANCE_OVERWORLD : (int)leader["iMapNum"];
|
||||||
|
auto followers = leader["aFollowers"];
|
||||||
|
|
||||||
#ifdef ACADEMY
|
#ifdef ACADEMY
|
||||||
// do not spawn NPCs in the future
|
// do not spawn NPCs in the future
|
||||||
if (leader["iX"] > 512000 && leader["iY"] < 256000)
|
if (leader["iX"] > 512000 && leader["iY"] < 256000) {
|
||||||
|
nextId++;
|
||||||
|
nextId += followers.size();
|
||||||
continue;
|
continue;
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
Mob* tmp = new Mob(leader["iX"], leader["iY"], leader["iZ"], leader["iAngle"], instanceID, leader["iNPCType"], td, nextId);
|
Mob* tmp = new Mob(leader["iX"], leader["iY"], leader["iZ"], leader["iAngle"], instanceID, leader["iNPCType"], td, nextId);
|
||||||
@ -305,7 +313,6 @@ void TableData::init() {
|
|||||||
|
|
||||||
nextId++;
|
nextId++;
|
||||||
|
|
||||||
auto followers = leader["aFollowers"];
|
|
||||||
if (followers.size() < 5) {
|
if (followers.size() < 5) {
|
||||||
int followerCount = 0;
|
int followerCount = 0;
|
||||||
for (nlohmann::json::iterator _fol = followers.begin(); _fol != followers.end(); _fol++) {
|
for (nlohmann::json::iterator _fol = followers.begin(); _fol != followers.end(); _fol++) {
|
||||||
|
Loading…
Reference in New Issue
Block a user