Core/Datastores: use generated member names for MapEntry fields
* load all dbc fields of MapEntry
This commit is contained in:
1 parent
36bd27e347
commit
1e4cc2293a
25 files changed
+120
-111
No files matched your search
@@ -80,9 +80,9 @@ Map* MapManager::CreateBaseMap(uint32 id)
|
||||
if (!map)
|
||||
{
|
||||
MapEntry const* entry = sMapStore.AssertEntry(id);
|
||||
if (entry->rootPhaseMap != -1)
|
||||
if (entry->ParentMapID != -1)
|
||||
{
|
||||
CreateBaseMap(entry->rootPhaseMap);
|
||||
CreateBaseMap(entry->ParentMapID);
|
||||
|
||||
// must have been created by parent map
|
||||
map = FindBaseMap(id);
|
||||
@@ -101,17 +101,17 @@ Map* MapManager::CreateBaseMap_i(MapEntry const* mapEntry)
|
||||
{
|
||||
Map* map;
|
||||
if (mapEntry->Instanceable())
|
||||
map = new MapInstanced(mapEntry->MapID, i_gridCleanUpDelay);
|
||||
map = new MapInstanced(mapEntry->ID, i_gridCleanUpDelay);
|
||||
else
|
||||
{
|
||||
map = new Map(mapEntry->MapID, i_gridCleanUpDelay, 0, REGULAR_DIFFICULTY);
|
||||
map = new Map(mapEntry->ID, i_gridCleanUpDelay, 0, REGULAR_DIFFICULTY);
|
||||
map->LoadRespawnTimes();
|
||||
map->LoadCorpseData();
|
||||
}
|
||||
|
||||
i_maps[mapEntry->MapID] = map;
|
||||
i_maps[mapEntry->ID] = map;
|
||||
|
||||
for (uint32 childMapId : _parentMapData[mapEntry->MapID])
|
||||
for (uint32 childMapId : _parentMapData[mapEntry->ID])
|
||||
map->AddChildTerrainMap(CreateBaseMap_i(sMapStore.AssertEntry(childMapId)));
|
||||
|
||||
return map;
|
||||
@@ -163,7 +163,7 @@ Map::EnterState MapManager::PlayerCannotEnter(uint32 mapid, Player* player, bool
|
||||
Difficulty targetDifficulty, requestedDifficulty;
|
||||
targetDifficulty = requestedDifficulty = player->GetDifficulty(entry->IsRaid());
|
||||
// Get the highest available difficulty if current setting is higher than the instance allows
|
||||
MapDifficulty const* mapDiff = GetDownscaledMapDifficultyData(entry->MapID, targetDifficulty);
|
||||
MapDifficulty const* mapDiff = GetDownscaledMapDifficultyData(entry->ID, targetDifficulty);
|
||||
if (!mapDiff)
|
||||
return Map::CANNOT_ENTER_DIFFICULTY_UNAVAILABLE;
|
||||
|
||||
@@ -171,7 +171,7 @@ Map::EnterState MapManager::PlayerCannotEnter(uint32 mapid, Player* player, bool
|
||||
if (player->IsGameMaster())
|
||||
return Map::CAN_ENTER;
|
||||
|
||||
char const* mapName = entry->name;
|
||||
char const* mapName = entry->Name;
|
||||
|
||||
Group* group = player->GetGroup();
|
||||
if (entry->IsRaid()) // can only enter in a raid group
|
||||
|
||||
Reference in new issue
Block a user