mirror of
https://github.com/liyunfan1223/azerothcore-wotlk.git
synced 2026-08-08 15:58:04 +00:00
fix(Core/Pets): Disable /petfollow command while using vehicle. (#8304)
Fixes #8156
This commit is contained in:
@@ -442,6 +442,12 @@ void WorldSession::HandlePetAction(WorldPacket& recvData)
|
|||||||
if (pet->GetTypeId() == TYPEID_PLAYER && flag != ACT_COMMAND && flag != ACT_REACTION)
|
if (pet->GetTypeId() == TYPEID_PLAYER && flag != ACT_COMMAND && flag != ACT_REACTION)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
// Do not follow itself vehicle
|
||||||
|
if (spellid == COMMAND_FOLLOW && _player->IsOnVehicle(pet))
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (GetPlayer()->m_Controlled.size() == 1)
|
if (GetPlayer()->m_Controlled.size() == 1)
|
||||||
HandlePetActionHelper(pet, guid1, spellid, flag, guid2);
|
HandlePetActionHelper(pet, guid1, spellid, flag, guid2);
|
||||||
else
|
else
|
||||||
|
|||||||
Reference in New Issue
Block a user