Project SkyFire Core
SkyFire 5.4.8 server core API documentation
Loading...
Searching...
No Matches
ObjectGridLoader.h
Go to the documentation of this file.
1/*
2* This file is part of Project SkyFire https://www.projectskyfire.org.
3* See LICENSE.md file for Copyright information
4*/
5
6#ifndef SKYFIRE_OBJECTGRIDLOADER_H
7#define SKYFIRE_OBJECTGRIDLOADER_H
8
9#include "Cell.h"
10#include "Define.h"
11#include "GridDefines.h"
12#include "GridLoader.h"
13#include "TypeList.h"
14
16
18{
19 friend class ObjectWorldLoader;
20
21public:
22 ObjectGridLoader(NGridType& grid, Map* map, const Cell& cell)
23 : i_cell(cell), i_grid(grid), i_map(map), i_gameObjects(0), i_creatures(0), i_corpses(0)
24 { }
25
26 void Visit(GameObjectMapType& m);
27 void Visit(CreatureMapType& m);
28 void Visit(CorpseMapType&) const { }
29 void Visit(DynamicObjectMapType&) const { }
30 void Visit(AreaTriggerMapType&) const { }
31
32 void LoadN(void);
33
34 template<class T> static void SetObjectCell(T* obj, CellCoord const& cellCoord);
35
36private:
43};
44
45//Stop the creatures before unloading the NGrid
47{
48public:
49 void Visit(CreatureMapType& m);
50 template<class T> void Visit(GridRefManager<T>&) { }
51};
52
53//Move the foreign creatures back to respawn positions before unloading the NGrid
55{
56public:
57 void Visit(CreatureMapType& m);
58 void Visit(GameObjectMapType& m);
59 template<class T> void Visit(GridRefManager<T>&) { }
60};
61
62//Clean up and remove from world
64{
65public:
66 template<class T> void Visit(GridRefManager<T>&);
67};
68
69//Delete objects before deleting NGrid
71{
72public:
73 template<class T> void Visit(GridRefManager<T>& m);
74};
75#endif
std::uint32_t uint32
Definition Define.h:77
GridRefManager< Corpse > CorpseMapType
Definition GridDefines.h:50
GridRefManager< DynamicObject > DynamicObjectMapType
Definition GridDefines.h:52
GridRefManager< Creature > CreatureMapType
Definition GridDefines.h:51
GridRefManager< AreaTrigger > AreaTriggerMapType
Definition GridDefines.h:55
CoordPair< TOTAL_NUMBER_OF_CELLS_PER_MAP > CellCoord
GridRefManager< GameObject > GameObjectMapType
Definition GridDefines.h:53
NGrid< MAX_NUMBER_OF_CELLS, Player, AllWorldObjectTypes, AllGridObjectTypes > NGridType
Definition GridDefines.h:69
Definition Map.h:238
void Visit(GridRefManager< T > &)
void Visit(GridRefManager< T > &)
void Visit(CreatureMapType &m)
static void SetObjectCell(T *obj, CellCoord const &cellCoord)
void Visit(GameObjectMapType &m)
void Visit(CorpseMapType &) const
friend class ObjectWorldLoader
ObjectGridLoader(NGridType &grid, Map *map, const Cell &cell)
void Visit(DynamicObjectMapType &) const
void Visit(AreaTriggerMapType &) const
void Visit(GridRefManager< T > &)
void Visit(CreatureMapType &m)
void Visit(GridRefManager< T > &m)
Definition Cell.h:37