From 2925dfcfc45b836cd6608192c17c8227f6f8fffa Mon Sep 17 00:00:00 2001 From: n0n4m3 Date: Sat, 19 Dec 2009 17:43:47 +0100 Subject: Add own function to send AI_Reaction packet. by NoFantasy --HG-- branch : trunk --- src/game/Creature.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src/game/Creature.cpp') diff --git a/src/game/Creature.cpp b/src/game/Creature.cpp index 9dcfce82601..c31906d110f 100644 --- a/src/game/Creature.cpp +++ b/src/game/Creature.cpp @@ -2094,6 +2094,18 @@ Unit* Creature::SelectNearestTarget(float dist) const return target; } +void Creature::SendAIReaction(AiReaction reactionType) +{ + WorldPacket data(SMSG_AI_REACTION, 12); + + data << uint64(GetGUID()); + data << uint32(reactionType); + + ((WorldObject*)this)->SendMessageToSet(&data, true); + + sLog.outDebug("WORLD: Sent SMSG_AI_REACTION, type %u.", reactionType); +} + void Creature::CallAssistance() { if( !m_AlreadyCallAssistance && getVictim() && !isPet() && !isCharmed()) -- cgit v1.2.3