Core/SmartScript: Added ACTION_GO_SET_GO_STATE
This commit is contained in:
@@ -322,7 +322,8 @@ namespace Framework.Constants
|
||||
RandomSound = 115, // SoundId1, SoundId2, SoundId3, SoundId4, SoundId5, onlySelf
|
||||
SetCorpseDelay = 116, // timer
|
||||
DisableEvade = 117, // 0/1 (1 = disabled, 0 = enabled)
|
||||
// 118 - 127 : 3.3.5 reserved
|
||||
GoSetGoState = 118,
|
||||
// 119 - 127 : 3.3.5 reserved
|
||||
PlayAnimkit = 128,
|
||||
ScenePlay = 129, // sceneId
|
||||
SceneCancel = 130, // sceneId
|
||||
|
||||
@@ -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