Index: MiscHandler.cpp===================================================================
--- MiscHandler.cpp (revision 573)
+++ MiscHandler.cpp (working copy)
@@ -1484,14 +1484,36 @@
if(_player->getLevel() < LEVELREQUIREMENT_HEROIC)
return;
- if(Group *pGroup = _player->GetGroup())
+ Group *pGroup = _player->GetGroup(); //防止无限刷副本BUG Fiver
+ if(pGroup)
{
if(pGroup->IsLeader(_player->GetGUID()))
{
- // the difficulty is set even if the instances can't be reset
- //_player->SendDungeonDifficulty(true);
- pGroup->ResetInstances(INSTANCE_RESET_CHANGE_DIFFICULTY, false, _player);
- pGroup->SetDungeonDifficulty(Difficulty(mode));
+ for(GroupReference *itr = pGroup->GetFirstMember(); itr != NULL; itr = itr->next())
+ { //防止无限刷副本BUG Fiver
+ Player* pGroupGuy = itr->getSource();
+ if(!pGroupGuy)
+ continue;
+
+ if(!pGroupGuy->IsInMap(pGroupGuy))
+ break;
+
+ map = pGroupGuy->GetMap();
+ if(map && map->IsRaidOrHeroicDungeon() )
+ {
+ sLog.outError("MgCore Prevent Hack Instance 1:: player %d tried to reset the instance while inside!", _player->GetGUIDLow());
+ //KickPlayer();
+ break;
+ }
+ else if (!map->IsRaidOrHeroicDungeon())
+ {
+ // the difficulty is set even if the instances can't be reset
+ //_player->SendDungeonDifficulty(true);
+ pGroup->ResetInstances(INSTANCE_RESET_CHANGE_DIFFICULTY, false, _player);
+ pGroup->SetDungeonDifficulty(Difficulty(mode));
+ break;
+ }
+ }//防止无限刷副本BUG Fiver
}
}
else
@@ -1528,14 +1550,36 @@
if(_player->getLevel() < LEVELREQUIREMENT_HEROIC)
return;
- if(Group *pGroup = _player->GetGroup())
+ Group *pGroup = _player->GetGroup();
+ if(pGroup) //防止无限刷副本BUG Fiver
{
if(pGroup->IsLeader(_player->GetGUID()))
{
- // the difficulty is set even if the instances can't be reset
- //_player->SendDungeonDifficulty(true);
- pGroup->ResetInstances(INSTANCE_RESET_CHANGE_DIFFICULTY, true, _player);
- pGroup->SetRaidDifficulty(Difficulty(mode));
+ for(GroupReference *itr = pGroup->GetFirstMember(); itr != NULL; itr = itr->next())
+ { //防止无限刷副本BUG Fiver
+ Player* pGroupGuy = itr->getSource();
+ if(!pGroupGuy)
+ continue;
+
+ if(!pGroupGuy->IsInMap(pGroupGuy))
+ break;
+
+ map = pGroupGuy->GetMap();
+ if( map && map->IsRaidOrHeroicDungeon() )
+ {
+ sLog.outError("MgCore Prevent Hack Instance 2:: player %d tried to reset the instance while inside!", _player->GetGUIDLow());
+ //KickPlayer();
+ break;
+ }
+ else if (!map->IsRaidOrHeroicDungeon())
+ {
+ // the difficulty is set even if the instances can't be reset
+ //_player->SendDungeonDifficulty(true);
+ pGroup->ResetInstances(INSTANCE_RESET_CHANGE_DIFFICULTY, true, _player);
+ pGroup->SetRaidDifficulty(Difficulty(mode));
+ break;
+ }
+ }//防止无限刷副本BUG Fiver
}
}
else
|