Core/SAI: Add 2nd parameter to SMART_ACTION_CALL_FOR_HELP to say "%s calls for help!" if enabled

Similar to SMART_ACTION_FLEE_FOR_ASSIST "%s attempts to run away in fear!"
This commit is contained in:
Nay
2013-01-10 15:09:12 +00:00
parent c9650de789
commit 8274e42e3d
4 changed files with 12 additions and 2 deletions

View File

@@ -1000,6 +1000,11 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
if (me)
{
me->CallForHelp((float)e.action.callHelp.range);
if (e.action.callHelp.withEmote)
{
TrinityStringTextBuilder builder(me, CHAT_MSG_MONSTER_EMOTE, LANG_CALL_FOR_HELP, LANG_UNIVERSAL, 0);
sCreatureTextMgr->SendChatPacket(me, builder, CHAT_MSG_MONSTER_EMOTE);
}
sLog->outDebug(LOG_FILTER_DATABASE_AI, "SmartScript::ProcessAction: SMART_ACTION_CALL_FOR_HELP: Creature %u", me->GetGUIDLow());
}
break;