Core/SAI: Allow update of disable gravity/root applied via static flags (using related action type)
Port From (https://github.com/TrinityCore/TrinityCore/commit/2cf2535cd637b5b8966f7990f6826bdac94d77ce)
This commit is contained in:
@@ -770,11 +770,6 @@ namespace Game.AI
|
||||
_run = run;
|
||||
}
|
||||
|
||||
public void SetDisableGravity(bool disable = true)
|
||||
{
|
||||
me.SetDisableGravity(disable);
|
||||
}
|
||||
|
||||
public void SetEvadeDisabled(bool disable)
|
||||
{
|
||||
_evadeDisabled = disable;
|
||||
|
||||
@@ -1228,10 +1228,9 @@ namespace Game.AI
|
||||
}
|
||||
case SmartActions.SetDisableGravity:
|
||||
{
|
||||
if (!IsSmart())
|
||||
break;
|
||||
|
||||
((SmartAI)_me.GetAI()).SetDisableGravity(e.Action.setDisableGravity.disable != 0);
|
||||
foreach (WorldObject target in targets)
|
||||
if (IsCreature(target))
|
||||
target.ToCreature().SetFloating(e.Action.setDisableGravity.disable != 0);
|
||||
break;
|
||||
}
|
||||
case SmartActions.SetRun:
|
||||
@@ -1980,7 +1979,7 @@ namespace Game.AI
|
||||
{
|
||||
foreach (var target in targets)
|
||||
if (IsCreature(target))
|
||||
target.ToCreature().SetControlled(e.Action.setRoot.root != 0, UnitState.Root);
|
||||
target.ToCreature().SetSessile(e.Action.setRoot.root != 0);
|
||||
break;
|
||||
}
|
||||
case SmartActions.SummonCreatureGroup:
|
||||
|
||||
Reference in New Issue
Block a user