mirror of
https://github.com/mangosfour/server.git
synced 2025-12-16 13:37:00 +00:00
[8831] Helper function add and move for diffficulties.
* Use regular naming for 0 spwanmode/difficulty for clean consistence names (used at well known wiki) * Move difficulty related data access from InstancedMap to Map class.
This commit is contained in:
parent
fe1fae46ee
commit
398ca010ca
6 changed files with 33 additions and 30 deletions
|
|
@ -1127,6 +1127,23 @@ void Map::UnloadAll(bool pForce)
|
|||
}
|
||||
}
|
||||
|
||||
MapDifficulty const* Map::GetMapDifficulty() const
|
||||
{
|
||||
return GetMapDifficultyData(GetId(),GetDifficulty());
|
||||
}
|
||||
|
||||
uint32 Map::GetMaxPlayers() const
|
||||
{
|
||||
MapDifficulty const* mapDiff = GetMapDifficulty();
|
||||
return mapDiff ? mapDiff->maxPlayers : 0;
|
||||
}
|
||||
|
||||
uint32 Map::GetMaxResetDelay() const
|
||||
{
|
||||
MapDifficulty const* mapDiff = GetMapDifficulty();
|
||||
return mapDiff ? mapDiff->resetTime : 0;
|
||||
}
|
||||
|
||||
//*****************************
|
||||
// Grid function
|
||||
//*****************************
|
||||
|
|
@ -2618,24 +2635,6 @@ void InstanceMap::SetResetSchedule(bool on)
|
|||
}
|
||||
}
|
||||
|
||||
MapDifficulty const* InstanceMap::GetMapDifficulty() const
|
||||
{
|
||||
return GetMapDifficultyData(GetId(),GetDifficulty());
|
||||
}
|
||||
|
||||
uint32 InstanceMap::GetMaxPlayers() const
|
||||
{
|
||||
MapDifficulty const* mapDiff = GetMapDifficulty();
|
||||
return mapDiff ? mapDiff->maxPlayers : 0;
|
||||
}
|
||||
|
||||
uint32 InstanceMap::GetMaxResetDelay() const
|
||||
{
|
||||
MapDifficulty const* mapDiff = GetMapDifficulty();
|
||||
return mapDiff ? mapDiff->resetTime : 0;
|
||||
}
|
||||
|
||||
|
||||
/* ******* Battleground Instance Maps ******* */
|
||||
|
||||
BattleGroundMap::BattleGroundMap(uint32 id, time_t expiry, uint32 InstanceId, Map* _parent, uint8 spawnMode)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue