Core/Protocol: Remove useless ResetInstances call inside WorldSession::HandleResetInstancesOpcode.

This commit is contained in:
kaelima
2012-02-10 12:52:30 +01:00
parent a7fc2586e7
commit 5684f39d58
2 changed files with 7 additions and 15 deletions
+1 -1
View File
@@ -433,7 +433,7 @@ void Vehicle::RemovePassenger(Unit* unit)
void Vehicle::RelocatePassengers(float x, float y, float z, float ang)
{
ASSERT(_me->IsInWorld());
ASSERT(_me->GetMap());
// not sure that absolute position calculation is correct, it must depend on vehicle orientation and pitch angle
for (SeatMap::const_iterator itr = Seats.begin(); itr != Seats.end(); ++itr)
+6 -14
View File
@@ -1470,20 +1470,14 @@ void WorldSession::HandleTimeSyncResp(WorldPacket & recv_data)
void WorldSession::HandleResetInstancesOpcode(WorldPacket & /*recv_data*/)
{
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: CMSG_RESET_INSTANCES");
Group* group = _player->GetGroup();
if (group)
if (Group* group = _player->GetGroup())
{
if (group->IsLeader(_player->GetGUID()))
{
group->ResetInstances(INSTANCE_RESET_ALL, false, _player);
group->ResetInstances(INSTANCE_RESET_ALL, true, _player);
}
}
else
{
_player->ResetInstances(INSTANCE_RESET_ALL, false);
_player->ResetInstances(INSTANCE_RESET_ALL, true);
}
}
void WorldSession::HandleSetDungeonDifficultyOpcode(WorldPacket & recv_data)
@@ -1503,7 +1497,7 @@ void WorldSession::HandleSetDungeonDifficultyOpcode(WorldPacket & recv_data)
return;
// cannot reset while in an instance
Map* map = _player->GetMap();
Map* map = _player->FindMap();
if (map && map->IsDungeon())
{
sLog->outError("WorldSession::HandleSetDungeonDifficultyOpcode: player (Name: %s, GUID: %u) tried to reset the instance while player is inside!", _player->GetName(), _player->GetGUIDLow());
@@ -1524,8 +1518,7 @@ void WorldSession::HandleSetDungeonDifficultyOpcode(WorldPacket & recv_data)
if (!pGroupGuy->IsInMap(pGroupGuy))
return;
map = pGroupGuy->GetMap();
if (map && map->IsNonRaidDungeon())
if (pGroupGuy->GetMap()->IsNonRaidDungeon())
{
sLog->outError("WorldSession::HandleSetDungeonDifficultyOpcode: player %d tried to reset the instance while group member (Name: %s, GUID: %u) is inside!", _player->GetGUIDLow(), pGroupGuy->GetName(), pGroupGuy->GetGUIDLow());
return;
@@ -1558,7 +1551,7 @@ void WorldSession::HandleSetRaidDifficultyOpcode(WorldPacket & recv_data)
}
// cannot reset while in an instance
Map* map = _player->GetMap();
Map* map = _player->FindMap();
if (map && map->IsDungeon())
{
sLog->outError("WorldSession::HandleSetRaidDifficultyOpcode: player %d tried to reset the instance while inside!", _player->GetGUIDLow());
@@ -1582,8 +1575,7 @@ void WorldSession::HandleSetRaidDifficultyOpcode(WorldPacket & recv_data)
if (!pGroupGuy->IsInMap(pGroupGuy))
return;
map = pGroupGuy->GetMap();
if (map && map->IsRaid())
if (pGroupGuy->GetMap()->IsRaid())
{
sLog->outError("WorldSession::HandleSetRaidDifficultyOpcode: player %d tried to reset the instance while inside!", _player->GetGUIDLow());
return;