mirror of
https://github.com/mangosfour/server.git
synced 2025-12-25 13:37:02 +00:00
Many, many cmangos Cata commits applied
The following commits were either applied or found not to be applicable:
This commit is contained in:
parent
32a26f44c7
commit
a800f3b1ad
100 changed files with 2385 additions and 1305 deletions
|
|
@ -280,7 +280,6 @@ void WorldSession::HandleLogoutRequestOpcode(WorldPacket & /*recv_data*/)
|
|||
|
||||
// Can not logout if...
|
||||
if (GetPlayer()->IsInCombat() || //...is in combat
|
||||
GetPlayer()->duel || //...is in Duel
|
||||
//...is jumping ...is falling
|
||||
GetPlayer()->m_movementInfo.HasMovementFlag(MovementFlags(MOVEFLAG_FALLING | MOVEFLAG_FALLINGFAR)))
|
||||
{
|
||||
|
|
@ -1082,12 +1081,16 @@ void WorldSession::HandleInspectOpcode(WorldPacket& recv_data)
|
|||
recv_data >> guid;
|
||||
DEBUG_LOG("Inspected guid is %s", guid.GetString().c_str());
|
||||
|
||||
_player->SetSelectionGuid(guid);
|
||||
|
||||
Player* plr = sObjectMgr.GetPlayer(guid);
|
||||
if (!plr) // wrong player
|
||||
return;
|
||||
|
||||
if (!_player->IsWithinDistInMap(plr, INSPECT_DISTANCE, false))
|
||||
return;
|
||||
|
||||
if (_player->IsHostileTo(plr))
|
||||
return;
|
||||
|
||||
WorldPacket data(SMSG_INSPECT_RESULTS, 50);
|
||||
data << plr->GetObjectGuid();
|
||||
|
||||
|
|
@ -1119,13 +1122,18 @@ void WorldSession::HandleInspectHonorStatsOpcode(WorldPacket& recv_data)
|
|||
recv_data.ReadGuidBytes<4, 7, 0, 5, 1, 6, 2, 3>(guid);
|
||||
|
||||
Player* player = sObjectMgr.GetPlayer(guid);
|
||||
|
||||
if (!player)
|
||||
{
|
||||
sLog.outError("InspectHonorStats: WTF, player not found...");
|
||||
return;
|
||||
}
|
||||
|
||||
if (!_player->IsWithinDistInMap(player, INSPECT_DISTANCE, false))
|
||||
return;
|
||||
|
||||
if (_player->IsHostileTo(player))
|
||||
return;
|
||||
|
||||
WorldPacket data(SMSG_INSPECT_HONOR_STATS, 18);
|
||||
data.WriteGuidMask<4, 3, 6, 2, 5, 0, 7, 1>(player->GetObjectGuid());
|
||||
data << uint8(0); // rank
|
||||
|
|
@ -1520,8 +1528,17 @@ void WorldSession::HandleQueryInspectAchievementsOpcode(WorldPacket& recv_data)
|
|||
|
||||
recv_data >> guid.ReadAsPacked();
|
||||
|
||||
if (Player* player = sObjectMgr.GetPlayer(guid))
|
||||
player->GetAchievementMgr().SendRespondInspectAchievements(_player);
|
||||
Player* player = sObjectMgr.GetPlayer(guid);
|
||||
if (!player)
|
||||
return;
|
||||
|
||||
if (!_player->IsWithinDistInMap(player, INSPECT_DISTANCE, false))
|
||||
return;
|
||||
|
||||
if (_player->IsHostileTo(player))
|
||||
return;
|
||||
|
||||
player->GetAchievementMgr().SendRespondInspectAchievements(_player);
|
||||
}
|
||||
|
||||
void WorldSession::HandleUITimeRequestOpcode(WorldPacket& /*recv_data*/)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue