Core/Instances: Implemented hourly instance limit: players are limited to entering 5 instances per hour (account wide limit)
This commit is contained in:
@@ -190,6 +190,10 @@ bool LoginQueryHolder::Initialize()
|
||||
stmt->setUInt32(0, lowGuid);
|
||||
res &= SetPreparedQuery(PLAYER_LOGIN_QUERY_LOADQUESTSTATUSREW, stmt);
|
||||
|
||||
stmt = CharacterDatabase.GetPreparedStatement(CHAR_LOAD_ACCOUNT_INSTANCELOCKTIMES);
|
||||
stmt->setUInt32(0, m_accountId);
|
||||
res &= SetPreparedQuery(PLAYER_LOGIN_QUERY_LOADINSTANCELOCKTIMES, stmt);
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
|
||||
@@ -151,11 +151,11 @@ void WorldSession::HandleMoveWorldportAckOpcode()
|
||||
if (mInstance)
|
||||
{
|
||||
Difficulty diff = GetPlayer()->GetDifficulty(mEntry->IsRaid());
|
||||
if (MapDifficulty const* mapDiff = GetMapDifficultyData(mEntry->MapID,diff))
|
||||
if (MapDifficulty const* mapDiff = GetMapDifficultyData(mEntry->MapID, diff))
|
||||
{
|
||||
if (mapDiff->resetTime)
|
||||
{
|
||||
if (time_t timeReset = sInstanceSaveMgr->GetResetTimeFor(mEntry->MapID,diff))
|
||||
if (time_t timeReset = sInstanceSaveMgr->GetResetTimeFor(mEntry->MapID, diff))
|
||||
{
|
||||
uint32 timeleft = uint32(timeReset - time(NULL));
|
||||
GetPlayer()->SendInstanceResetWarning(mEntry->MapID, diff, timeleft);
|
||||
|
||||
Reference in New Issue
Block a user