From 3ccfb5fefb1563442942948be40f7807ae9d57de Mon Sep 17 00:00:00 2001 From: Nay Date: Sun, 4 Sep 2011 18:51:16 +0100 Subject: Core/SAI: SMART_ACTION_FLEE: print flee emote if param1 is set --- src/server/game/AI/SmartScripts/SmartScript.cpp | 2 ++ src/server/game/AI/SmartScripts/SmartScriptMgr.h | 7 ++++++- 2 files changed, 8 insertions(+), 1 deletion(-) (limited to 'src/server/game/AI/SmartScripts') diff --git a/src/server/game/AI/SmartScripts/SmartScript.cpp b/src/server/game/AI/SmartScripts/SmartScript.cpp index 0de13280376..680c0815c6b 100644 --- a/src/server/game/AI/SmartScripts/SmartScript.cpp +++ b/src/server/game/AI/SmartScripts/SmartScript.cpp @@ -692,6 +692,8 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u return; me->DoFleeToGetAssistance(); + if (e.action.flee.withEmote) + sCreatureTextMgr->SendChatString(me, sObjectMgr->GetTrinityStringForDBCLocale(LANG_FLEE), CHAT_MSG_MONSTER_EMOTE); sLog->outDebug(LOG_FILTER_DATABASE_AI, "SmartScript::ProcessAction:: SMART_ACTION_FLEE_FOR_ASSIST: Creature %u DoFleeToGetAssistance", me->GetGUIDLow()); break; } diff --git a/src/server/game/AI/SmartScripts/SmartScriptMgr.h b/src/server/game/AI/SmartScripts/SmartScriptMgr.h index d6235b05667..de60737f3b6 100644 --- a/src/server/game/AI/SmartScripts/SmartScriptMgr.h +++ b/src/server/game/AI/SmartScripts/SmartScriptMgr.h @@ -383,7 +383,7 @@ enum SMART_ACTION SMART_ACTION_SET_EVENT_PHASE = 22, // Phase SMART_ACTION_INC_EVENT_PHASE = 23, // Value (may be negative to decrement phase, should not be 0) SMART_ACTION_EVADE = 24, // No Params - SMART_ACTION_FLEE_FOR_ASSIST = 25, // No Params + SMART_ACTION_FLEE_FOR_ASSIST = 25, // With Emote SMART_ACTION_CALL_GROUPEVENTHAPPENS = 26, // QuestID SMART_ACTION_CALL_CASTEDCREATUREORGO = 27, // CreatureId, SpellId SMART_ACTION_REMOVEAURASFROMSPELL = 28, // Spellid @@ -852,6 +852,11 @@ struct SmartAction uint32 speedz; } jump; + struct + { + uint32 withEmote; + } flee; + struct { uint32 param1; -- cgit v1.2.3