Files
DarkflameServer/dZoneManager/Level.h
Aaron Kimbrell f6914940c1 feat(world): an edit mode world constructs none of the zone's objects
With -editmode 1 the world loads the zone file, terrain scene map, navmesh and
level revisions, but makes no level objects, carver blockers, spawners, spawner
networks, triggers, vanity objects or live event objects. The zone control
object stays with the zone's own template, as the client makes the same one
itself (LevelManager::LoadZoneControlObject, 0x01082660); its server script
does nothing and a race track's does not take the player into a race. Such a
world lets in only accounts at editor_gm_level.

Plumbing only: no command starts an edit mode instance yet (docs/EditMode.md).

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-10 17:34:13 -06:00

32 lines
898 B
C++

#pragma once
#include "dZMCommon.h"
#include <map>
#include <iostream>
#include "Zone.h"
#include "LevelFile.h"
class Level {
public:
using ChunkTypeID = LevelFile::ChunkTypeID;
using FileInfoChunk = LevelFile::FileInfoChunk;
struct Header : LevelFile::ChunkHeader {
LWOSCENEID lwoSceneID;
};
public:
// sceneID: the scene id of the zone scene the file is (EntityInfo::scene of its objects)
Level(Zone* parentZone, const std::string& filepath, int32_t sceneID = -1);
static void MakeSpawner(const SceneObject& obj, int32_t sceneID = -1);
// Makes the objects and spawners of a level file. In edit mode (dZoneManager::GetEditMode) none: only the player
// start marker's place is taken
static void LoadSceneObjects(const std::vector<SceneObject>& objects, int32_t sceneID = -1);
std::map<uint32_t, Header> m_ChunkHeaders;
private:
Zone* m_ParentZone;
int32_t m_SceneID = -1;
};