mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2026-11-20 18:55:28 +00:00
refactor(spawner): the spawner object's SpawnerComponent owns its spawner
The zone manager keeps an index of spawners by object ID; the spawner now belongs to the SpawnerComponent of its LOT 176 object and goes with it (the component tells the zone manager to stop indexing it). Spawning, timers and the update order are unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -40,6 +40,8 @@ public:
|
||||
LWOOBJID MakeSpawner(SpawnerInfo info);
|
||||
Spawner* GetSpawner(LWOOBJID id);
|
||||
void RemoveSpawner(LWOOBJID id);
|
||||
// Called by a SpawnerComponent going away: stops indexing its spawner
|
||||
void ForgetSpawner(LWOOBJID id, const Spawner* spawner);
|
||||
std::vector<Spawner*> GetSpawnersByName(const std::string& spawnerName);
|
||||
std::vector<Spawner*> GetSpawnersInGroup(const std::string& group);
|
||||
// Every spawner in the zone (live events pick walkable places from their nodes)
|
||||
|
||||
Reference in New Issue
Block a user