Core/Pets: add ghoul reactions to owner emotes. thx joshwhedon
This commit is contained in:
@@ -532,3 +532,21 @@ bool PetAI::CanAttack(Unit* target)
|
|||||||
// default, though we shouldn't ever get here
|
// default, though we shouldn't ever get here
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void PetAI::ReceiveEmote(Player* player, uint32 emote)
|
||||||
|
{
|
||||||
|
sLog->outError("recieved emote : %d", emote);
|
||||||
|
if (me->GetOwnerGUID() && me->GetOwnerGUID() == player->GetGUID())
|
||||||
|
switch (emote)
|
||||||
|
{
|
||||||
|
case TEXT_EMOTE_COWER:
|
||||||
|
if (me->isPet() && me->ToPet()->IsPetGhoul())
|
||||||
|
me->HandleEmoteCommand(EMOTE_ONESHOT_ROAR);
|
||||||
|
break;
|
||||||
|
case TEXT_EMOTE_ANGRY:
|
||||||
|
if (me->isPet() && me->ToPet()->IsPetGhoul())
|
||||||
|
me->HandleEmoteCommand(EMOTE_ONESHOT_COWER);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -42,6 +42,7 @@ class PetAI : public CreatureAI
|
|||||||
void MovementInform(uint32 moveType, uint32 data);
|
void MovementInform(uint32 moveType, uint32 data);
|
||||||
void OwnerDamagedBy(Unit* attacker);
|
void OwnerDamagedBy(Unit* attacker);
|
||||||
void OwnerAttacked(Unit* target);
|
void OwnerAttacked(Unit* target);
|
||||||
|
void ReceiveEmote(Player* player, uint32 textEmote);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
bool _isVisible(Unit*) const;
|
bool _isVisible(Unit*) const;
|
||||||
|
|||||||
Reference in New Issue
Block a user