mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-15 18:10:26 +00:00
fix(Core/Pet): Implement sound playback when dismissing warlock's pet. (#23240)
This commit is contained in:
@@ -50,6 +50,7 @@
|
||||
#include "PassiveAI.h"
|
||||
#include "Pet.h"
|
||||
#include "PetAI.h"
|
||||
#include "PetPackets.h"
|
||||
#include "Player.h"
|
||||
#include "ReputationMgr.h"
|
||||
#include "ScriptMgr.h"
|
||||
@@ -16672,7 +16673,7 @@ Player* Unit::GetSpellModOwner() const
|
||||
}
|
||||
|
||||
///----------Pet responses methods-----------------
|
||||
void Unit::SendPetActionFeedback(uint8 msg)
|
||||
void Unit::SendPetActionFeedback(uint8 msg) const
|
||||
{
|
||||
Unit* owner = GetOwner();
|
||||
if (!owner || !owner->IsPlayer())
|
||||
@@ -16683,19 +16684,18 @@ void Unit::SendPetActionFeedback(uint8 msg)
|
||||
owner->ToPlayer()->GetSession()->SendPacket(&data);
|
||||
}
|
||||
|
||||
void Unit::SendPetTalk(uint32 pettalk)
|
||||
void Unit::SendPetActionSound(PetAction action) const
|
||||
{
|
||||
Unit* owner = GetOwner();
|
||||
if (!owner || !owner->IsPlayer())
|
||||
return;
|
||||
|
||||
WorldPacket data(SMSG_PET_ACTION_SOUND, 8 + 4);
|
||||
data << GetGUID();
|
||||
data << uint32(pettalk);
|
||||
owner->ToPlayer()->GetSession()->SendPacket(&data);
|
||||
SendMessageToSet(WorldPackets::Pet::PetActionSound(GetGUID(), static_cast<int32>(action)).Write(), false);
|
||||
}
|
||||
|
||||
void Unit::SendPetAIReaction(ObjectGuid guid)
|
||||
void Unit::SendPetDismissSound() const
|
||||
{
|
||||
if (CreatureDisplayInfoEntry const* displayInfo = sCreatureDisplayInfoStore.LookupEntry(GetNativeDisplayId()))
|
||||
SendMessageToSet(WorldPackets::Pet::PetDismissSound(static_cast<int32>(displayInfo->ModelId), GetPosition()).Write(), false);
|
||||
}
|
||||
|
||||
void Unit::SendPetAIReaction(ObjectGuid guid) const
|
||||
{
|
||||
Unit* owner = GetOwner();
|
||||
if (!owner || !owner->IsPlayer())
|
||||
|
||||
Reference in New Issue
Block a user