Update GameObject.cs
add implicit long conversion to GameObjectID
@@ -14,6 +14,16 @@ public struct GameObjectID
{
[FieldOffset(0x0)] public uint ObjectID;
[FieldOffset(0x4)] public byte Type;
+
+ public static unsafe implicit operator long(GameObjectID id) {
+ var objid = stackalloc GameObjectID[] {id};
+ return *(long*)objid;
+ }
+
+ public static unsafe implicit operator GameObjectID(long id) {
+ var objid = stackalloc long[] {id};
+ return *(GameObjectID*)objid;
+ }
}
// Client::Game::Object::GameObject
