Core/SAI: SMART_ACTION_FLEE: print flee emote if param1 is set

This commit is contained in:
Nay
2011-09-04 18:51:16 +01:00
parent fd5ab97774
commit 3ccfb5fefb
5 changed files with 12 additions and 1 deletions

View File

@@ -0,0 +1,3 @@
DELETE FROM `trinity_string` WHERE `entry`=5030;
INSERT INTO `trinity_string` (`entry`, `content_default`, `content_loc1`, `content_loc2`, `content_loc3`, `content_loc4`, `content_loc5`, `content_loc6`, `content_loc7`, `content_loc8`) VALUES
(5030, '%s attempts to run away in fear!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);

View File

@@ -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;
}

View File

@@ -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;

View File

@@ -943,6 +943,7 @@ enum TrinityStrings
LANG_GOINFO_LOOTID = 5028,
LANG_COMMAND_LOOKUP_MAX_RESULTS = 5029,
// Room for more Trinity strings 5030-9999
LANG_FLEE = 5030,
// Level requirement notifications
LANG_SAY_REQ = 6604,