The gates are game objects.
GOs have 3 states (That I know of) which can be grabbed out of the GAMEOBJECT_BYTES_1 descriptor.
Code:
private byte[] Bytes1 { get { return BitConverter.GetBytes(GetStorageField<uint>(GameObjectFields.GAMEOBJECT_BYTES_1)); } }
public WoWGameObjectState State { get { return (WoWGameObjectState) Bytes1[0]; } }
And the states are as follows;
Code:
public enum WoWGameObjectState
{
/// <summary>
/// Show in world as used and not reset. (Closed door open)
/// </summary>
Active = 0,
/// <summary>
/// Show in world as read. (Closed door close)
/// </summary>
Ready = 1,
/// <summary>
/// Show in world as used in alt way and not reset (closed door open by cannon fire)
/// </summary>
ActiveAlternative = 2
}
I may be wrong (I honestly haven't tested it), but that *should* work.
Also the GO flags;
Code:
[Flags]
public enum GameObjectFlags // :ushort
{
/// <summary>
/// 0x1
/// Disables interaction while animated
/// </summary>
InUse = 0x01,
/// <summary>
/// 0x2
/// Requires a key, spell, event, etc to be opened.
/// Makes "Locked" appear in tooltip
/// </summary>
Locked = 0x02,
/// <summary>
/// 0x4
/// Objects that require a condition to be met before they are usable
/// </summary>
ConditionalInteraction = 0x04,
/// <summary>
/// 0x8
/// any kind of transport? Object can transport (elevator, boat, car)
/// </summary>
Transport = 0x08,
GOFlag_0x10 = 0x10,
/// <summary>
/// 0x20
/// These objects never de-spawn, but typically just change state in response to an event
/// Ex: doors
/// </summary>
DoesNotDespawn = 0x20,
/// <summary>
/// 0x40
/// Typically, summoned objects. Triggered by spell or other events
/// </summary>
Triggered = 0x40,
GOFlag_0x80 = 0x80,
GOFlag_0x100 = 0x100,
GOFlag_0x200 = 0x200,
GOFlag_0x400 = 0x400,
GOFlag_0x800 = 0x800,
GOFlag_0x1000 = 0x1000,
GOFlag_0x2000 = 0x2000,
GOFlag_0x4000 = 0x4000,
GOFlag_0x8000 = 0x8000,
Flag_0x10000 = 0x10000,
Flag_0x20000 = 0x20000,
Flag_0x40000 = 0x40000,
}
May be of some use, may not. Either way; I haven't honestly looked into it.