Core/Protocol: Remove useless ResetInstances call inside WorldSession::HandleResetInstancesOpcode.
This commit is contained in:
@@ -433,7 +433,7 @@ void Vehicle::RemovePassenger(Unit* unit)
|
|||||||
|
|
||||||
void Vehicle::RelocatePassengers(float x, float y, float z, float ang)
|
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
|
// 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)
|
for (SeatMap::const_iterator itr = Seats.begin(); itr != Seats.end(); ++itr)
|
||||||
|
|||||||
@@ -1470,20 +1470,14 @@ void WorldSession::HandleTimeSyncResp(WorldPacket & recv_data)
|
|||||||
void WorldSession::HandleResetInstancesOpcode(WorldPacket & /*recv_data*/)
|
void WorldSession::HandleResetInstancesOpcode(WorldPacket & /*recv_data*/)
|
||||||
{
|
{
|
||||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: CMSG_RESET_INSTANCES");
|
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()))
|
if (group->IsLeader(_player->GetGUID()))
|
||||||
{
|
|
||||||
group->ResetInstances(INSTANCE_RESET_ALL, false, _player);
|
group->ResetInstances(INSTANCE_RESET_ALL, false, _player);
|
||||||
group->ResetInstances(INSTANCE_RESET_ALL, true, _player);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
|
||||||
_player->ResetInstances(INSTANCE_RESET_ALL, false);
|
_player->ResetInstances(INSTANCE_RESET_ALL, false);
|
||||||
_player->ResetInstances(INSTANCE_RESET_ALL, true);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void WorldSession::HandleSetDungeonDifficultyOpcode(WorldPacket & recv_data)
|
void WorldSession::HandleSetDungeonDifficultyOpcode(WorldPacket & recv_data)
|
||||||
@@ -1503,7 +1497,7 @@ void WorldSession::HandleSetDungeonDifficultyOpcode(WorldPacket & recv_data)
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
// cannot reset while in an instance
|
// cannot reset while in an instance
|
||||||
Map* map = _player->GetMap();
|
Map* map = _player->FindMap();
|
||||||
if (map && map->IsDungeon())
|
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());
|
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))
|
if (!pGroupGuy->IsInMap(pGroupGuy))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
map = pGroupGuy->GetMap();
|
if (pGroupGuy->GetMap()->IsNonRaidDungeon())
|
||||||
if (map && map->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());
|
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;
|
return;
|
||||||
@@ -1558,7 +1551,7 @@ void WorldSession::HandleSetRaidDifficultyOpcode(WorldPacket & recv_data)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// cannot reset while in an instance
|
// cannot reset while in an instance
|
||||||
Map* map = _player->GetMap();
|
Map* map = _player->FindMap();
|
||||||
if (map && map->IsDungeon())
|
if (map && map->IsDungeon())
|
||||||
{
|
{
|
||||||
sLog->outError("WorldSession::HandleSetRaidDifficultyOpcode: player %d tried to reset the instance while inside!", _player->GetGUIDLow());
|
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))
|
if (!pGroupGuy->IsInMap(pGroupGuy))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
map = pGroupGuy->GetMap();
|
if (pGroupGuy->GetMap()->IsRaid())
|
||||||
if (map && map->IsRaid())
|
|
||||||
{
|
{
|
||||||
sLog->outError("WorldSession::HandleSetRaidDifficultyOpcode: player %d tried to reset the instance while inside!", _player->GetGUIDLow());
|
sLog->outError("WorldSession::HandleSetRaidDifficultyOpcode: player %d tried to reset the instance while inside!", _player->GetGUIDLow());
|
||||||
return;
|
return;
|
||||||
|
|||||||
Reference in New Issue
Block a user