mirror of
https://github.com/mangosfour/server.git
synced 2025-12-26 07:37:02 +00:00
[11117] Allow for non-instancable maps have InstanceData and instance scripts.
* New table added for non-instanced maps (except BG/arena):
- `mangos`.`world_template` (script mapping to non instanced data)
- `characters`.`world` (saved script data string storage)
* InstancedData created for any map types including BGs/arenas, that allow have scripts
state for any maps, but BG/arena instance data not saved.
Note: Possible structures will renamed later for clarify apply to any type maps,
but avoid for now for simplify changes and hard affect to script library sources.
This commit is contained in:
parent
332c4174d2
commit
f73868a703
23 changed files with 244 additions and 101 deletions
|
|
@ -115,6 +115,9 @@ Map* MapManager::CreateMap(uint32 id, const WorldObject* obj)
|
|||
m = new Map(id, i_gridCleanUpDelay, 0, REGULAR_DIFFICULTY);
|
||||
//add map into container
|
||||
i_maps[MapID(id)] = m;
|
||||
|
||||
// non-instanceable maps always expected have saved state
|
||||
m->CreateInstanceData(true);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -419,6 +422,7 @@ InstanceMap* MapManager::CreateInstanceMap(uint32 id, uint32 InstanceId, Difficu
|
|||
InstanceMap *map = new InstanceMap(id, i_gridCleanUpDelay, InstanceId, difficulty);
|
||||
MANGOS_ASSERT(map->IsDungeon());
|
||||
|
||||
// Dungeons can have saved instance data
|
||||
bool load_data = save != NULL;
|
||||
map->CreateInstanceData(load_data);
|
||||
|
||||
|
|
@ -441,6 +445,9 @@ BattleGroundMap* MapManager::CreateBattleGroundMap(uint32 id, uint32 InstanceId,
|
|||
//add map into map container
|
||||
i_maps[MapID(id, InstanceId)] = map;
|
||||
|
||||
// BGs/Arenas not have saved instance data
|
||||
map->CreateInstanceData(false);
|
||||
|
||||
return map;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue