Core/Packets: converted SMSG_PET_ACTION_FEEDBACK to packet class and added spellId argument to Unit::SendPetActionFeedback
This commit is contained in:
1 parent
ec97df6528
commit
92c9661804
4 files changed
+36
-5
No files matched your search
@@ -59,6 +59,7 @@
|
||||
#include "OutdoorPvP.h"
|
||||
#include "PassiveAI.h"
|
||||
#include "Pet.h"
|
||||
#include "PetPackets.h"
|
||||
#include "PetAI.h"
|
||||
#include "PhasingHandler.h"
|
||||
#include "Player.h"
|
||||
@@ -10196,15 +10197,16 @@ void Unit::TriggerAurasProcOnEvent(ProcEventInfo& eventInfo, AuraApplicationProc
|
||||
}
|
||||
|
||||
///----------Pet responses methods-----------------
|
||||
void Unit::SendPetActionFeedback(uint8 msg)
|
||||
void Unit::SendPetActionFeedback(uint8 response, uint32 spellId /*=0*/)
|
||||
{
|
||||
Unit* owner = GetOwner();
|
||||
if (!owner || owner->GetTypeId() != TYPEID_PLAYER)
|
||||
return;
|
||||
|
||||
WorldPacket data(SMSG_PET_ACTION_FEEDBACK, 1);
|
||||
data << uint8(msg);
|
||||
owner->ToPlayer()->SendDirectMessage(&data);
|
||||
WorldPackets::Pet::PetActionFeedback actionFeedback;
|
||||
actionFeedback.Response = response;
|
||||
actionFeedback.SpellID = spellId;
|
||||
owner->ToPlayer()->SendDirectMessage(actionFeedback.Write());
|
||||
}
|
||||
|
||||
void Unit::SendPetTalk(uint32 pettalk)
|
||||
|
||||
Reference in new issue
Block a user