Core/SmartScript: Added ACTION_GO_SET_GO_STATE
This commit is contained in:
@@ -1220,6 +1220,7 @@ namespace Game.AI
|
||||
case SmartActions.JumpToPos:
|
||||
case SmartActions.SendGossipMenu:
|
||||
case SmartActions.GoSetLootState:
|
||||
case SmartActions.GoSetGoState:
|
||||
case SmartActions.SendTargetToTarget:
|
||||
case SmartActions.SetHomePos:
|
||||
case SmartActions.SetHealthRegen:
|
||||
@@ -2162,6 +2163,9 @@ namespace Game.AI
|
||||
[FieldOffset(4)]
|
||||
public GoFlag goFlag;
|
||||
|
||||
[FieldOffset(4)]
|
||||
public GoState goState;
|
||||
|
||||
[FieldOffset(4)]
|
||||
public CreatureGroup creatureGroup;
|
||||
|
||||
@@ -2593,6 +2597,10 @@ namespace Game.AI
|
||||
{
|
||||
public uint flag;
|
||||
}
|
||||
public struct GoState
|
||||
{
|
||||
public uint state;
|
||||
}
|
||||
public struct CreatureGroup
|
||||
{
|
||||
public uint group;
|
||||
|
||||
@@ -2027,6 +2027,18 @@ namespace Game.AI
|
||||
obj.ToGameObject().SetLootState((LootState)e.Action.setGoLootState.state);
|
||||
break;
|
||||
}
|
||||
case SmartActions.GoSetGoState:
|
||||
{
|
||||
List<WorldObject> targets = GetTargets(e, unit);
|
||||
|
||||
if (targets.Empty())
|
||||
break;
|
||||
|
||||
foreach (var obj in targets)
|
||||
if (IsGameObject(obj))
|
||||
obj.ToGameObject().SetGoState((GameObjectState)e.Action.goState.state);
|
||||
break;
|
||||
}
|
||||
case SmartActions.SendTargetToTarget:
|
||||
{
|
||||
List<WorldObject> targets = GetTargets(e, unit);
|
||||
|
||||
Reference in New Issue
Block a user