mirror of
https://github.com/mangosfour/server.git
synced 2025-12-29 07:37:05 +00:00
[11129] Added WorldMap/WorldPersistentState subclass for non-instanceable maps.
This let have symmetric Map/MapPersistentState (sub)classes hierarchy.
This commit is contained in:
parent
98aff742c1
commit
6d26ec0e7f
6 changed files with 62 additions and 26 deletions
|
|
@ -46,6 +46,7 @@ class WorldPacket;
|
|||
class InstanceData;
|
||||
class Group;
|
||||
class MapPersistentState;
|
||||
class WorldPersistentState;
|
||||
class DungeonPersistentState;
|
||||
class BattleGroundPersistentState;
|
||||
struct ScriptInfo;
|
||||
|
|
@ -93,8 +94,10 @@ class MANGOS_DLL_SPEC Map : public GridRefManager<NGridType>
|
|||
friend class MapReference;
|
||||
friend class ObjectGridLoader;
|
||||
friend class ObjectWorldLoader;
|
||||
public:
|
||||
protected:
|
||||
Map(uint32 id, time_t, uint32 InstanceId, uint8 SpawnMode);
|
||||
|
||||
public:
|
||||
virtual ~Map();
|
||||
|
||||
// currently unused for normal maps
|
||||
|
|
@ -339,6 +342,18 @@ class MANGOS_DLL_SPEC Map : public GridRefManager<NGridType>
|
|||
void RemoveFromGrid(T*, NGridType *, Cell const&);
|
||||
};
|
||||
|
||||
class MANGOS_DLL_SPEC WorldMap : public Map
|
||||
{
|
||||
private:
|
||||
using Map::GetPersistentState; // hide in subclass for overwrite
|
||||
public:
|
||||
WorldMap(uint32 id, time_t expiry) : Map(id, expiry, 0, REGULAR_DIFFICULTY) {}
|
||||
~WorldMap() {}
|
||||
|
||||
// can't be NULL for loaded map
|
||||
WorldPersistentState* GetPersistanceState() const;
|
||||
};
|
||||
|
||||
class MANGOS_DLL_SPEC DungeonMap : public Map
|
||||
{
|
||||
private:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue