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:
Shauren
2011-01-24 16:12:02 +01:00
parent 820f87f365
commit 867bc197ef
5 changed files with 13 additions and 4 deletions
+1 -3
View File
@@ -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();
}