mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-20 09:17:36 +01:00
Core/SmartScripts: added new action SMART_ACTION_COMBAT_STOP
* this avoid using hacks like evade, faction change or rooting. I wonder how SAI could be without this
(cherry picked from commit d68df33c76)
This commit is contained in:
@@ -765,6 +765,15 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
|
||||
player->GroupEventHappens(e.action.quest.quest, GetBaseObject());
|
||||
break;
|
||||
}
|
||||
case SMART_ACTION_COMBAT_STOP:
|
||||
{
|
||||
if (!me)
|
||||
break;
|
||||
|
||||
me->CombatStop(true);
|
||||
TC_LOG_DEBUG("scripts.ai", "SmartScript::ProcessAction:: SMART_ACTION_COMBAT_STOP: %s CombatStop", me->GetGUID().ToString().c_str());
|
||||
break;
|
||||
}
|
||||
case SMART_ACTION_REMOVEAURASFROMSPELL:
|
||||
{
|
||||
ObjectList* targets = GetTargets(e, unit);
|
||||
|
||||
@@ -1135,6 +1135,7 @@ bool SmartAIMgr::IsEventValid(SmartScriptHolder& e)
|
||||
case SMART_ACTION_STORE_TARGET_LIST:
|
||||
case SMART_ACTION_EVADE:
|
||||
case SMART_ACTION_FLEE_FOR_ASSIST:
|
||||
case SMART_ACTION_COMBAT_STOP:
|
||||
case SMART_ACTION_DIE:
|
||||
case SMART_ACTION_SET_IN_COMBAT_WITH_ZONE:
|
||||
case SMART_ACTION_SET_ACTIVE:
|
||||
|
||||
@@ -452,7 +452,7 @@ enum SMART_ACTION
|
||||
SMART_ACTION_EVADE = 24, // No Params
|
||||
SMART_ACTION_FLEE_FOR_ASSIST = 25, // With Emote
|
||||
SMART_ACTION_CALL_GROUPEVENTHAPPENS = 26, // QuestID
|
||||
// none = 27,
|
||||
SMART_ACTION_COMBAT_STOP = 27, //
|
||||
SMART_ACTION_REMOVEAURASFROMSPELL = 28, // Spellid (0 removes all auras), charges (0 removes aura)
|
||||
SMART_ACTION_FOLLOW = 29, // Distance (0 = default), Angle (0 = default), EndCreatureEntry, credit, creditType (0monsterkill, 1event)
|
||||
SMART_ACTION_RANDOM_PHASE = 30, // PhaseId1, PhaseId2, PhaseId3...
|
||||
|
||||
Reference in New Issue
Block a user