aboutsummaryrefslogtreecommitdiff
path: root/src/game/CreatureEventAI.cpp
diff options
context:
space:
mode:
authorRat <none@none>2010-06-04 23:24:48 +0200
committerRat <none@none>2010-06-04 23:24:48 +0200
commit1426c2970f42a2d065198806f750bf5dd28d580b (patch)
treee3247fb0f1770ab214e412e0f2d6edc5b91ec8f4 /src/game/CreatureEventAI.cpp
parent5ca00bc14d38c5ad49f0ab4500af52e645133826 (diff)
HIGHLY EXPERIMENTAL - USE AT YOUR OWN RISK
implemented Condition System all systems should work like before after applying the sql converter you won't be able to apply any Updatepacks (<=up30) so do updates before this this revesion is not threated as stable! --HG-- branch : trunk
Diffstat (limited to 'src/game/CreatureEventAI.cpp')
-rw-r--r--src/game/CreatureEventAI.cpp9
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);