Core/SAI: implement SMART_ACTION_ATTACK_STOP
Port From (https://github.com/TrinityCore/TrinityCore/commit/38be5e361e072edec6cfec584db9182ea3ad4450)
This commit is contained in:
@@ -300,7 +300,7 @@ namespace Framework.Constants
|
||||
MountToEntryOrModel = 43, // CreatureTemplate Entry(Param1) Or Modelid (Param2) (Or 0 For Both To Dismount)
|
||||
SetIngamePhaseId = 44, // Id
|
||||
SetData = 45, // Field, Data (Only Creature Todo)
|
||||
//46 Unused
|
||||
AttackStop = 46,
|
||||
SetVisibility = 47, // On/Off
|
||||
SetActive = 48, // No Params
|
||||
AttackStart = 49, //
|
||||
|
||||
@@ -1529,6 +1529,7 @@ namespace Game.AI
|
||||
case SmartActions.CallForHelp:
|
||||
case SmartActions.SetData:
|
||||
case SmartActions.SetVisibility:
|
||||
case SmartActions.AttackStop:
|
||||
case SmartActions.WpPause:
|
||||
case SmartActions.SetDisableGravity:
|
||||
case SmartActions.SetCanFly:
|
||||
|
||||
@@ -1117,6 +1117,16 @@ namespace Game.AI
|
||||
}
|
||||
break;
|
||||
}
|
||||
case SmartActions.AttackStop:
|
||||
{
|
||||
foreach (var target in targets)
|
||||
{
|
||||
var unitTarget = target.ToUnit();
|
||||
if (unitTarget != null)
|
||||
unitTarget.AttackStop();
|
||||
}
|
||||
break;
|
||||
}
|
||||
case SmartActions.MoveOffset:
|
||||
{
|
||||
foreach (var target in targets)
|
||||
|
||||
Reference in New Issue
Block a user