diff options
Diffstat (limited to 'src/game/CreatureEventAI.cpp')
-rw-r--r-- | src/game/CreatureEventAI.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/game/CreatureEventAI.cpp b/src/game/CreatureEventAI.cpp index bbb1dde36e7..47c8e9e6ad8 100644 --- a/src/game/CreatureEventAI.cpp +++ b/src/game/CreatureEventAI.cpp @@ -32,6 +32,7 @@ #include "InstanceData.h" #include "SpellMgr.h" #include "CreatureAIImpl.h" +#include "ConditionMgr.h" bool CreatureEventAIHolder::UpdateRepeatTimer(Creature* creature, uint32 repeatMin, uint32 repeatMax) { @@ -1330,8 +1331,12 @@ void CreatureEventAI::ReceiveEmote(Player* pPlayer, uint32 text_emote) if ((*itr).Event.receive_emote.emoteId != text_emote) return; - PlayerCondition pcon((*itr).Event.receive_emote.condition,(*itr).Event.receive_emote.conditionValue1,(*itr).Event.receive_emote.conditionValue2); - if (pcon.Meets(pPlayer)) + Condition* cond = new Condition(); + cond->mConditionType = ConditionType((*itr).Event.receive_emote.condition); + cond->mConditionValue1 = (*itr).Event.receive_emote.conditionValue1; + cond->mConditionValue2 = (*itr).Event.receive_emote.conditionValue2; + + if (cond->Meets(pPlayer)) { sLog.outDebug("CreatureEventAI: ReceiveEmote CreatureEventAI: Condition ok, processing"); ProcessEvent(*itr, pPlayer); |