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;
|
_run = run;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SetDisableGravity(bool disable = true)
|
|
||||||
{
|
|
||||||
me.SetDisableGravity(disable);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void SetEvadeDisabled(bool disable)
|
public void SetEvadeDisabled(bool disable)
|
||||||
{
|
{
|
||||||
_evadeDisabled = disable;
|
_evadeDisabled = disable;
|
||||||
|
|||||||
@@ -1228,10 +1228,9 @@ namespace Game.AI
|
|||||||
}
|
}
|
||||||
case SmartActions.SetDisableGravity:
|
case SmartActions.SetDisableGravity:
|
||||||
{
|
{
|
||||||
if (!IsSmart())
|
foreach (WorldObject target in targets)
|
||||||
break;
|
if (IsCreature(target))
|
||||||
|
target.ToCreature().SetFloating(e.Action.setDisableGravity.disable != 0);
|
||||||
((SmartAI)_me.GetAI()).SetDisableGravity(e.Action.setDisableGravity.disable != 0);
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case SmartActions.SetRun:
|
case SmartActions.SetRun:
|
||||||
@@ -1980,7 +1979,7 @@ namespace Game.AI
|
|||||||
{
|
{
|
||||||
foreach (var target in targets)
|
foreach (var target in targets)
|
||||||
if (IsCreature(target))
|
if (IsCreature(target))
|
||||||
target.ToCreature().SetControlled(e.Action.setRoot.root != 0, UnitState.Root);
|
target.ToCreature().SetSessile(e.Action.setRoot.root != 0);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case SmartActions.SummonCreatureGroup:
|
case SmartActions.SummonCreatureGroup:
|
||||||
|
|||||||
Reference in New Issue
Block a user