Core/Instances: Fix dungeon and raid difficulty setting for characters under level 70. Prevents entering heroic modes of instances when access criteria are not met.
This commit is contained in:
@@ -1544,7 +1544,7 @@ void Group::SetDungeonDifficulty(Difficulty difficulty)
|
|||||||
for (GroupReference *itr = GetFirstMember(); itr != NULL; itr = itr->next())
|
for (GroupReference *itr = GetFirstMember(); itr != NULL; itr = itr->next())
|
||||||
{
|
{
|
||||||
Player* player = itr->getSource();
|
Player* player = itr->getSource();
|
||||||
if (!player->GetSession() || player->getLevel() < LEVELREQUIREMENT_HEROIC)
|
if (!player->GetSession())
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
player->SetDungeonDifficulty(difficulty);
|
player->SetDungeonDifficulty(difficulty);
|
||||||
@@ -1561,7 +1561,7 @@ void Group::SetRaidDifficulty(Difficulty difficulty)
|
|||||||
for (GroupReference *itr = GetFirstMember(); itr != NULL; itr = itr->next())
|
for (GroupReference *itr = GetFirstMember(); itr != NULL; itr = itr->next())
|
||||||
{
|
{
|
||||||
Player* player = itr->getSource();
|
Player* player = itr->getSource();
|
||||||
if (!player->GetSession() || player->getLevel() < LEVELREQUIREMENT_HEROIC)
|
if (!player->GetSession())
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
player->SetRaidDifficulty(difficulty);
|
player->SetRaidDifficulty(difficulty);
|
||||||
|
|||||||
@@ -1515,9 +1515,6 @@ void WorldSession::HandleSetDungeonDifficultyOpcode(WorldPacket & recv_data)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_player->getLevel() < LEVELREQUIREMENT_HEROIC)
|
|
||||||
return;
|
|
||||||
|
|
||||||
Group *pGroup = _player->GetGroup();
|
Group *pGroup = _player->GetGroup();
|
||||||
if (pGroup)
|
if (pGroup)
|
||||||
{
|
{
|
||||||
@@ -1576,9 +1573,6 @@ void WorldSession::HandleSetRaidDifficultyOpcode(WorldPacket & recv_data)
|
|||||||
if (Difficulty(mode) == _player->GetRaidDifficulty())
|
if (Difficulty(mode) == _player->GetRaidDifficulty())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (_player->getLevel() < LEVELREQUIREMENT_HEROIC)
|
|
||||||
return;
|
|
||||||
|
|
||||||
Group *pGroup = _player->GetGroup();
|
Group *pGroup = _player->GetGroup();
|
||||||
if (pGroup)
|
if (pGroup)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user