Core/Instances: Made the max amount of instances player can enter within hour configurable and fixed typo in instance packing/cleaning query
This commit is contained in:
@@ -132,8 +132,6 @@ struct SpellCooldown
|
||||
};
|
||||
|
||||
typedef std::map<uint32, SpellCooldown> SpellCooldowns;
|
||||
|
||||
#define MAX_INSTANCES_PER_HOUR 5
|
||||
typedef UNORDERED_MAP<uint32 /*instanceId*/, time_t/*releaseTime*/> InstanceTimeMap;
|
||||
|
||||
enum TrainerSpellState
|
||||
@@ -2312,7 +2310,7 @@ class Player : public Unit, public GridObject<Player>
|
||||
bool CheckInstanceLoginValid();
|
||||
bool CheckInstanceCount(uint32 instanceId) const
|
||||
{
|
||||
if (_instanceResetTimes.size() < MAX_INSTANCES_PER_HOUR)
|
||||
if (_instanceResetTimes.size() < sWorld->getIntConfig(CONFIG_MAX_INSTANCES_PER_HOUR))
|
||||
return true;
|
||||
return _instanceResetTimes.find(instanceId) != _instanceResetTimes.end();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user