aboutsummaryrefslogtreecommitdiff
path: root/src/game/MiscHandler.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/game/MiscHandler.cpp')
-rw-r--r--src/game/MiscHandler.cpp36
1 files changed, 2 insertions, 34 deletions
diff --git a/src/game/MiscHandler.cpp b/src/game/MiscHandler.cpp
index b3b847c9e97..bdaa3c2f91c 100644
--- a/src/game/MiscHandler.cpp
+++ b/src/game/MiscHandler.cpp
@@ -1486,27 +1486,11 @@ void WorldSession::HandleSetDungeonDifficultyOpcode( WorldPacket & recv_data )
if(_player->getLevel() < LEVELREQUIREMENT_HEROIC)
return;
- Group *pGroup = _player->GetGroup();
- if(pGroup)
+
+ if(Group *pGroup = _player->GetGroup())
{
if(pGroup->IsLeader(_player->GetGUID()))
{
- for(GroupReference *itr = pGroup->GetFirstMember(); itr != NULL; itr = itr->next())
- {
- Player* pGroupGuy = itr->getSource();
- if(!pGroupGuy)
- continue;
-
- if(!pGroupGuy->IsInMap(pGroupGuy))
- return;
-
- map = pGroupGuy->GetMap();
- if(map && map->IsRaidOrHeroicDungeon())
- {
- sLog.outError("WorldSession::HandleSetDungeonDifficultyOpcode: player %d tried to reset the instance while inside!", _player->GetGUIDLow());
- return;
- }
- }
// the difficulty is set even if the instances can't be reset
//_player->SendDungeonDifficulty(true);
pGroup->ResetInstances(INSTANCE_RESET_CHANGE_DIFFICULTY, false, _player);
@@ -1552,22 +1536,6 @@ void WorldSession::HandleSetRaidDifficultyOpcode( WorldPacket & recv_data )
{
if(pGroup->IsLeader(_player->GetGUID()))
{
- for(GroupReference *itr = pGroup->GetFirstMember(); itr != NULL; itr = itr->next())
- {
- Player* pGroupGuy = itr->getSource();
- if(!pGroupGuy)
- continue;
-
- if(!pGroupGuy->IsInMap(pGroupGuy))
- return;
-
- map = pGroupGuy->GetMap();
- if(map && map->IsRaidOrHeroicDungeon())
- {
- sLog.outError("WorldSession::HandleSetDungeonDifficultyOpcode: player %d tried to reset the instance while inside!", _player->GetGUIDLow());
- return;
- }
- }
// the difficulty is set even if the instances can't be reset
//_player->SendDungeonDifficulty(true);
pGroup->ResetInstances(INSTANCE_RESET_CHANGE_DIFFICULTY, true, _player);