Core/GameObjects: Implement support for HandleGameObjectUse from vehicle or mount
This commit is contained in:
1 parent
83c98d6dff
commit
ed378ad63c
2 files changed
+23
-8
No files matched your search
@@ -271,12 +271,15 @@ void WorldSession::HandleGameObjectUseOpcode(WorldPacket& recvData)
|
||||
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Recvd CMSG_GAMEOBJ_USE Message [guid=%u]", GUID_LOPART(guid));
|
||||
|
||||
// ignore for remote control state
|
||||
if (_player->m_mover != _player)
|
||||
return;
|
||||
|
||||
if (GameObject* obj = GetPlayer()->GetMap()->GetGameObject(guid))
|
||||
{
|
||||
// ignore for remote control state
|
||||
if (_player->m_mover != _player)
|
||||
if (!_player->IsOnVehicle(_player->m_mover) || !_player->IsMounted() && !obj->GetGOInfo()->IsUsableMounted())
|
||||
return;
|
||||
|
||||
obj->Use(_player);
|
||||
}
|
||||
}
|
||||
|
||||
void WorldSession::HandleGameobjectReportUse(WorldPacket& recvPacket)
|
||||
|
||||
Reference in new issue
Block a user