diff --git a/api/AltV.Net.CApi.Generator/TypeRegistry.cs b/api/AltV.Net.CApi.Generator/TypeRegistry.cs index 97570fdd..50b7d7b8 100644 --- a/api/AltV.Net.CApi.Generator/TypeRegistry.cs +++ b/api/AltV.Net.CApi.Generator/TypeRegistry.cs @@ -217,6 +217,7 @@ public static class TypeRegistry { "ClrDiscordUser*", "nint" }, { "ClrConfigNodeData*", "nint" }, { "ClrAmmoFlags*", "nint" }, - { "ClrDecoration**", "nint" } + { "ClrDecoration**", "nint" }, + { "aabb_t&", "AABB*" }, }; } \ No newline at end of file diff --git a/api/AltV.Net.CApi/Data/AABB.cs b/api/AltV.Net.CApi/Data/AABB.cs new file mode 100644 index 00000000..67fd0267 --- /dev/null +++ b/api/AltV.Net.CApi/Data/AABB.cs @@ -0,0 +1,36 @@ +using System.Runtime.InteropServices; + +namespace AltV.Net.Data +{ + [StructLayout(LayoutKind.Sequential)] + public struct AABB : IEquatable + { + public static AABB Zero = new AABB(Position.Zero, Position.Zero); + + public Position Min; + public Position Max; + + public AABB(Position min, Position max) + { + Min = min; + Max = max; + } + + public override string ToString() + { + return $"AABB(min: {Min}, max: {Max})"; + } + + public override bool Equals(object obj) + { + return obj is AABB other && Equals(other); + } + + public bool Equals(AABB other) + { + return Min.Equals(other.Min) && Max.Equals(other.Max); + } + + public override int GetHashCode() => HashCode.Combine(Min.GetHashCode(), Max.GetHashCode()); + } +} \ No newline at end of file diff --git a/api/AltV.Net.CApi/Libraries/ClientLibrary.cs b/api/AltV.Net.CApi/Libraries/ClientLibrary.cs index 07c053ea..a01ac036 100644 --- a/api/AltV.Net.CApi/Libraries/ClientLibrary.cs +++ b/api/AltV.Net.CApi/Libraries/ClientLibrary.cs @@ -475,6 +475,36 @@ public unsafe interface IClientLibrary public delegate* unmanaged[Cdecl] HttpClient_Put { get; } public delegate* unmanaged[Cdecl] HttpClient_SetExtraHeader { get; } public delegate* unmanaged[Cdecl] HttpClient_Trace { get; } + public delegate* unmanaged[Cdecl] Interior_GetEntitiesExtents { get; } + public delegate* unmanaged[Cdecl] Interior_GetPortalCount { get; } + public delegate* unmanaged[Cdecl] Interior_GetPosition { get; } + public delegate* unmanaged[Cdecl] Interior_GetRoomCount { get; } + public delegate* unmanaged[Cdecl] Interior_GetRotation { get; } + public delegate* unmanaged[Cdecl] InteriorPortal_GetCornerCount { get; } + public delegate* unmanaged[Cdecl] InteriorPortal_GetCornerPosition { get; } + public delegate* unmanaged[Cdecl] InteriorPortal_GetEntityArcheType { get; } + public delegate* unmanaged[Cdecl] InteriorPortal_GetEntityCount { get; } + public delegate* unmanaged[Cdecl] InteriorPortal_GetEntityFlag { get; } + public delegate* unmanaged[Cdecl] InteriorPortal_GetEntityPosition { get; } + public delegate* unmanaged[Cdecl] InteriorPortal_GetEntityRotation { get; } + public delegate* unmanaged[Cdecl] InteriorPortal_GetFlag { get; } + public delegate* unmanaged[Cdecl] InteriorPortal_GetIndex { get; } + public delegate* unmanaged[Cdecl] InteriorPortal_GetRoomFrom { get; } + public delegate* unmanaged[Cdecl] InteriorPortal_GetRoomTo { get; } + public delegate* unmanaged[Cdecl] InteriorPortal_SetCornerPosition { get; } + public delegate* unmanaged[Cdecl] InteriorPortal_SetEntityFlag { get; } + public delegate* unmanaged[Cdecl] InteriorPortal_SetFlag { get; } + public delegate* unmanaged[Cdecl] InteriorPortal_SetRoomFrom { get; } + public delegate* unmanaged[Cdecl] InteriorPortal_SetRoomTo { get; } + public delegate* unmanaged[Cdecl] InteriorRoom_GetExtents { get; } + public delegate* unmanaged[Cdecl] InteriorRoom_GetFlag { get; } + public delegate* unmanaged[Cdecl] InteriorRoom_GetIndex { get; } + public delegate* unmanaged[Cdecl] InteriorRoom_GetName { get; } + public delegate* unmanaged[Cdecl] InteriorRoom_GetNameHash { get; } + public delegate* unmanaged[Cdecl] InteriorRoom_GetTimecycle { get; } + public delegate* unmanaged[Cdecl] InteriorRoom_SetExtents { get; } + public delegate* unmanaged[Cdecl] InteriorRoom_SetFlag { get; } + public delegate* unmanaged[Cdecl] InteriorRoom_SetTimecycle { get; } public delegate* unmanaged[Cdecl] LocalObject_ActivatePhysics { get; } public delegate* unmanaged[Cdecl] LocalObject_AttachToEntity { get; } public delegate* unmanaged[Cdecl] LocalObject_AttachToEntity_ScriptId { get; } @@ -908,7 +938,7 @@ public unsafe interface IClientLibrary public unsafe class ClientLibrary : IClientLibrary { - public readonly uint Methods = 1779; + public readonly uint Methods = 1809; public delegate* unmanaged[Cdecl] Audio_AddOutput { get; } public delegate* unmanaged[Cdecl] Audio_GetBaseObject { get; } public delegate* unmanaged[Cdecl] Audio_GetCurrentTime { get; } @@ -1373,6 +1403,36 @@ public unsafe class ClientLibrary : IClientLibrary public delegate* unmanaged[Cdecl] HttpClient_Put { get; } public delegate* unmanaged[Cdecl] HttpClient_SetExtraHeader { get; } public delegate* unmanaged[Cdecl] HttpClient_Trace { get; } + public delegate* unmanaged[Cdecl] Interior_GetEntitiesExtents { get; } + public delegate* unmanaged[Cdecl] Interior_GetPortalCount { get; } + public delegate* unmanaged[Cdecl] Interior_GetPosition { get; } + public delegate* unmanaged[Cdecl] Interior_GetRoomCount { get; } + public delegate* unmanaged[Cdecl] Interior_GetRotation { get; } + public delegate* unmanaged[Cdecl] InteriorPortal_GetCornerCount { get; } + public delegate* unmanaged[Cdecl] InteriorPortal_GetCornerPosition { get; } + public delegate* unmanaged[Cdecl] InteriorPortal_GetEntityArcheType { get; } + public delegate* unmanaged[Cdecl] InteriorPortal_GetEntityCount { get; } + public delegate* unmanaged[Cdecl] InteriorPortal_GetEntityFlag { get; } + public delegate* unmanaged[Cdecl] InteriorPortal_GetEntityPosition { get; } + public delegate* unmanaged[Cdecl] InteriorPortal_GetEntityRotation { get; } + public delegate* unmanaged[Cdecl] InteriorPortal_GetFlag { get; } + public delegate* unmanaged[Cdecl] InteriorPortal_GetIndex { get; } + public delegate* unmanaged[Cdecl] InteriorPortal_GetRoomFrom { get; } + public delegate* unmanaged[Cdecl] InteriorPortal_GetRoomTo { get; } + public delegate* unmanaged[Cdecl] InteriorPortal_SetCornerPosition { get; } + public delegate* unmanaged[Cdecl] InteriorPortal_SetEntityFlag { get; } + public delegate* unmanaged[Cdecl] InteriorPortal_SetFlag { get; } + public delegate* unmanaged[Cdecl] InteriorPortal_SetRoomFrom { get; } + public delegate* unmanaged[Cdecl] InteriorPortal_SetRoomTo { get; } + public delegate* unmanaged[Cdecl] InteriorRoom_GetExtents { get; } + public delegate* unmanaged[Cdecl] InteriorRoom_GetFlag { get; } + public delegate* unmanaged[Cdecl] InteriorRoom_GetIndex { get; } + public delegate* unmanaged[Cdecl] InteriorRoom_GetName { get; } + public delegate* unmanaged[Cdecl] InteriorRoom_GetNameHash { get; } + public delegate* unmanaged[Cdecl] InteriorRoom_GetTimecycle { get; } + public delegate* unmanaged[Cdecl] InteriorRoom_SetExtents { get; } + public delegate* unmanaged[Cdecl] InteriorRoom_SetFlag { get; } + public delegate* unmanaged[Cdecl] InteriorRoom_SetTimecycle { get; } public delegate* unmanaged[Cdecl] LocalObject_ActivatePhysics { get; } public delegate* unmanaged[Cdecl] LocalObject_AttachToEntity { get; } public delegate* unmanaged[Cdecl] LocalObject_AttachToEntity_ScriptId { get; } @@ -2730,6 +2790,66 @@ public unsafe class ClientLibrary : IClientLibrary private static void HttpClient_SetExtraHeaderFallback(nint _httpClient, nint _key, nint _value) => throw new Exceptions.OutdatedSdkException("HttpClient_SetExtraHeader", "HttpClient_SetExtraHeader SDK method is outdated. Please update your module nuget"); [UnmanagedFunctionPointer(CallingConvention.Cdecl)] private delegate void HttpClient_TraceDelegate(nint _httpClient, nint _url, nint _body, ClientEvents.HttpResponseModuleDelegate _callback); private static void HttpClient_TraceFallback(nint _httpClient, nint _url, nint _body, ClientEvents.HttpResponseModuleDelegate _callback) => throw new Exceptions.OutdatedSdkException("HttpClient_Trace", "HttpClient_Trace SDK method is outdated. Please update your module nuget"); + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] private delegate void Interior_GetEntitiesExtentsDelegate(uint _interiorId, AABB* _extents); + private static void Interior_GetEntitiesExtentsFallback(uint _interiorId, AABB* _extents) => throw new Exceptions.OutdatedSdkException("Interior_GetEntitiesExtents", "Interior_GetEntitiesExtents SDK method is outdated. Please update your module nuget"); + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] private delegate ushort Interior_GetPortalCountDelegate(uint _interiorId); + private static ushort Interior_GetPortalCountFallback(uint _interiorId) => throw new Exceptions.OutdatedSdkException("Interior_GetPortalCount", "Interior_GetPortalCount SDK method is outdated. Please update your module nuget"); + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] private delegate Vector3 Interior_GetPositionDelegate(uint _interiorId); + private static Vector3 Interior_GetPositionFallback(uint _interiorId) => throw new Exceptions.OutdatedSdkException("Interior_GetPosition", "Interior_GetPosition SDK method is outdated. Please update your module nuget"); + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] private delegate ushort Interior_GetRoomCountDelegate(uint _interiorId); + private static ushort Interior_GetRoomCountFallback(uint _interiorId) => throw new Exceptions.OutdatedSdkException("Interior_GetRoomCount", "Interior_GetRoomCount SDK method is outdated. Please update your module nuget"); + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] private delegate Rotation Interior_GetRotationDelegate(uint _interiorId); + private static Rotation Interior_GetRotationFallback(uint _interiorId) => throw new Exceptions.OutdatedSdkException("Interior_GetRotation", "Interior_GetRotation SDK method is outdated. Please update your module nuget"); + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] private delegate ushort InteriorPortal_GetCornerCountDelegate(uint _interiorId, uint _portalIndex); + private static ushort InteriorPortal_GetCornerCountFallback(uint _interiorId, uint _portalIndex) => throw new Exceptions.OutdatedSdkException("InteriorPortal_GetCornerCount", "InteriorPortal_GetCornerCount SDK method is outdated. Please update your module nuget"); + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] private delegate Vector3 InteriorPortal_GetCornerPositionDelegate(uint _interiorId, uint _portalIndex, uint _cornerIndex); + private static Vector3 InteriorPortal_GetCornerPositionFallback(uint _interiorId, uint _portalIndex, uint _cornerIndex) => throw new Exceptions.OutdatedSdkException("InteriorPortal_GetCornerPosition", "InteriorPortal_GetCornerPosition SDK method is outdated. Please update your module nuget"); + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] private delegate uint InteriorPortal_GetEntityArcheTypeDelegate(uint _interiorId, uint _portalIndex, uint _entityIndex); + private static uint InteriorPortal_GetEntityArcheTypeFallback(uint _interiorId, uint _portalIndex, uint _entityIndex) => throw new Exceptions.OutdatedSdkException("InteriorPortal_GetEntityArcheType", "InteriorPortal_GetEntityArcheType SDK method is outdated. Please update your module nuget"); + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] private delegate ushort InteriorPortal_GetEntityCountDelegate(uint _interiorId, uint _portalIndex); + private static ushort InteriorPortal_GetEntityCountFallback(uint _interiorId, uint _portalIndex) => throw new Exceptions.OutdatedSdkException("InteriorPortal_GetEntityCount", "InteriorPortal_GetEntityCount SDK method is outdated. Please update your module nuget"); + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] private delegate int InteriorPortal_GetEntityFlagDelegate(uint _interiorId, uint _portalIndex, uint _entityIndex); + private static int InteriorPortal_GetEntityFlagFallback(uint _interiorId, uint _portalIndex, uint _entityIndex) => throw new Exceptions.OutdatedSdkException("InteriorPortal_GetEntityFlag", "InteriorPortal_GetEntityFlag SDK method is outdated. Please update your module nuget"); + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] private delegate Vector3 InteriorPortal_GetEntityPositionDelegate(uint _interiorId, uint _portalIndex, uint _entityIndex); + private static Vector3 InteriorPortal_GetEntityPositionFallback(uint _interiorId, uint _portalIndex, uint _entityIndex) => throw new Exceptions.OutdatedSdkException("InteriorPortal_GetEntityPosition", "InteriorPortal_GetEntityPosition SDK method is outdated. Please update your module nuget"); + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] private delegate Rotation InteriorPortal_GetEntityRotationDelegate(uint _interiorId, uint _portalIndex, uint _entityIndex); + private static Rotation InteriorPortal_GetEntityRotationFallback(uint _interiorId, uint _portalIndex, uint _entityIndex) => throw new Exceptions.OutdatedSdkException("InteriorPortal_GetEntityRotation", "InteriorPortal_GetEntityRotation SDK method is outdated. Please update your module nuget"); + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] private delegate int InteriorPortal_GetFlagDelegate(uint _interiorId, uint _portalIndex); + private static int InteriorPortal_GetFlagFallback(uint _interiorId, uint _portalIndex) => throw new Exceptions.OutdatedSdkException("InteriorPortal_GetFlag", "InteriorPortal_GetFlag SDK method is outdated. Please update your module nuget"); + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] private delegate uint InteriorPortal_GetIndexDelegate(uint _interiorId, uint _portalIndex); + private static uint InteriorPortal_GetIndexFallback(uint _interiorId, uint _portalIndex) => throw new Exceptions.OutdatedSdkException("InteriorPortal_GetIndex", "InteriorPortal_GetIndex SDK method is outdated. Please update your module nuget"); + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] private delegate uint InteriorPortal_GetRoomFromDelegate(uint _interiorId, uint _portalIndex); + private static uint InteriorPortal_GetRoomFromFallback(uint _interiorId, uint _portalIndex) => throw new Exceptions.OutdatedSdkException("InteriorPortal_GetRoomFrom", "InteriorPortal_GetRoomFrom SDK method is outdated. Please update your module nuget"); + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] private delegate uint InteriorPortal_GetRoomToDelegate(uint _interiorId, uint _portalIndex); + private static uint InteriorPortal_GetRoomToFallback(uint _interiorId, uint _portalIndex) => throw new Exceptions.OutdatedSdkException("InteriorPortal_GetRoomTo", "InteriorPortal_GetRoomTo SDK method is outdated. Please update your module nuget"); + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] private delegate void InteriorPortal_SetCornerPositionDelegate(uint _interiorId, uint _portalIndex, uint _cornerIndex, Vector3 _position); + private static void InteriorPortal_SetCornerPositionFallback(uint _interiorId, uint _portalIndex, uint _cornerIndex, Vector3 _position) => throw new Exceptions.OutdatedSdkException("InteriorPortal_SetCornerPosition", "InteriorPortal_SetCornerPosition SDK method is outdated. Please update your module nuget"); + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] private delegate void InteriorPortal_SetEntityFlagDelegate(uint _interiorId, uint _portalIndex, uint _entityIndex, int _flag); + private static void InteriorPortal_SetEntityFlagFallback(uint _interiorId, uint _portalIndex, uint _entityIndex, int _flag) => throw new Exceptions.OutdatedSdkException("InteriorPortal_SetEntityFlag", "InteriorPortal_SetEntityFlag SDK method is outdated. Please update your module nuget"); + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] private delegate void InteriorPortal_SetFlagDelegate(uint _interiorId, uint _portalIndex, int _flag); + private static void InteriorPortal_SetFlagFallback(uint _interiorId, uint _portalIndex, int _flag) => throw new Exceptions.OutdatedSdkException("InteriorPortal_SetFlag", "InteriorPortal_SetFlag SDK method is outdated. Please update your module nuget"); + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] private delegate void InteriorPortal_SetRoomFromDelegate(uint _interiorId, uint _portalIndex, uint _roomFrom); + private static void InteriorPortal_SetRoomFromFallback(uint _interiorId, uint _portalIndex, uint _roomFrom) => throw new Exceptions.OutdatedSdkException("InteriorPortal_SetRoomFrom", "InteriorPortal_SetRoomFrom SDK method is outdated. Please update your module nuget"); + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] private delegate void InteriorPortal_SetRoomToDelegate(uint _interiorId, uint _portalIndex, uint _roomTo); + private static void InteriorPortal_SetRoomToFallback(uint _interiorId, uint _portalIndex, uint _roomTo) => throw new Exceptions.OutdatedSdkException("InteriorPortal_SetRoomTo", "InteriorPortal_SetRoomTo SDK method is outdated. Please update your module nuget"); + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] private delegate void InteriorRoom_GetExtentsDelegate(uint _interiorId, uint _roomValue, byte _isIndex, AABB* _extents); + private static void InteriorRoom_GetExtentsFallback(uint _interiorId, uint _roomValue, byte _isIndex, AABB* _extents) => throw new Exceptions.OutdatedSdkException("InteriorRoom_GetExtents", "InteriorRoom_GetExtents SDK method is outdated. Please update your module nuget"); + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] private delegate int InteriorRoom_GetFlagDelegate(uint _interiorId, uint _roomValue, byte _isIndex); + private static int InteriorRoom_GetFlagFallback(uint _interiorId, uint _roomValue, byte _isIndex) => throw new Exceptions.OutdatedSdkException("InteriorRoom_GetFlag", "InteriorRoom_GetFlag SDK method is outdated. Please update your module nuget"); + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] private delegate uint InteriorRoom_GetIndexDelegate(uint _interiorId, uint _roomValue, byte _isIndex); + private static uint InteriorRoom_GetIndexFallback(uint _interiorId, uint _roomValue, byte _isIndex) => throw new Exceptions.OutdatedSdkException("InteriorRoom_GetIndex", "InteriorRoom_GetIndex SDK method is outdated. Please update your module nuget"); + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] private delegate nint InteriorRoom_GetNameDelegate(uint _interiorId, uint _roomValue, byte _isIndex, int* _size); + private static nint InteriorRoom_GetNameFallback(uint _interiorId, uint _roomValue, byte _isIndex, int* _size) => throw new Exceptions.OutdatedSdkException("InteriorRoom_GetName", "InteriorRoom_GetName SDK method is outdated. Please update your module nuget"); + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] private delegate uint InteriorRoom_GetNameHashDelegate(uint _interiorId, uint _roomValue, byte _isIndex); + private static uint InteriorRoom_GetNameHashFallback(uint _interiorId, uint _roomValue, byte _isIndex) => throw new Exceptions.OutdatedSdkException("InteriorRoom_GetNameHash", "InteriorRoom_GetNameHash SDK method is outdated. Please update your module nuget"); + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] private delegate uint InteriorRoom_GetTimecycleDelegate(uint _interiorId, uint _roomValue, byte _isIndex); + private static uint InteriorRoom_GetTimecycleFallback(uint _interiorId, uint _roomValue, byte _isIndex) => throw new Exceptions.OutdatedSdkException("InteriorRoom_GetTimecycle", "InteriorRoom_GetTimecycle SDK method is outdated. Please update your module nuget"); + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] private delegate void InteriorRoom_SetExtentsDelegate(uint _interiorId, uint _roomValue, byte _isIndex, Vector3 _min, Vector3 _max); + private static void InteriorRoom_SetExtentsFallback(uint _interiorId, uint _roomValue, byte _isIndex, Vector3 _min, Vector3 _max) => throw new Exceptions.OutdatedSdkException("InteriorRoom_SetExtents", "InteriorRoom_SetExtents SDK method is outdated. Please update your module nuget"); + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] private delegate void InteriorRoom_SetFlagDelegate(uint _interiorId, uint _roomValue, byte _isIndex, int _flag); + private static void InteriorRoom_SetFlagFallback(uint _interiorId, uint _roomValue, byte _isIndex, int _flag) => throw new Exceptions.OutdatedSdkException("InteriorRoom_SetFlag", "InteriorRoom_SetFlag SDK method is outdated. Please update your module nuget"); + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] private delegate void InteriorRoom_SetTimecycleDelegate(uint _interiorId, uint _roomValue, byte _isIndex, uint _timecycle); + private static void InteriorRoom_SetTimecycleFallback(uint _interiorId, uint _roomValue, byte _isIndex, uint _timecycle) => throw new Exceptions.OutdatedSdkException("InteriorRoom_SetTimecycle", "InteriorRoom_SetTimecycle SDK method is outdated. Please update your module nuget"); [UnmanagedFunctionPointer(CallingConvention.Cdecl)] private delegate void LocalObject_ActivatePhysicsDelegate(nint _localObject); private static void LocalObject_ActivatePhysicsFallback(nint _localObject) => throw new Exceptions.OutdatedSdkException("LocalObject_ActivatePhysics", "LocalObject_ActivatePhysics SDK method is outdated. Please update your module nuget"); [UnmanagedFunctionPointer(CallingConvention.Cdecl)] private delegate void LocalObject_AttachToEntityDelegate(nint _localObject, nint _entity, short _boneIndex, Vector3 _pos, Rotation _rot, byte _useSoftPinning, byte _collision, byte _fixedRot); @@ -3597,7 +3717,7 @@ private IntPtr GetUnmanagedPtr(IDictionary funcTable, ulong ha public ClientLibrary(Dictionary funcTable) { if (!funcTable.TryGetValue(0, out var capiHash)) Outdated = true; - else if (capiHash == IntPtr.Zero || *(ulong*)capiHash != 11629663074568386340UL) Outdated = true; + else if (capiHash == IntPtr.Zero || *(ulong*)capiHash != 10075699596264467259UL) Outdated = true; Audio_AddOutput = (delegate* unmanaged[Cdecl]) GetUnmanagedPtr(funcTable, 9914412815391408844UL, Audio_AddOutputFallback); Audio_GetBaseObject = (delegate* unmanaged[Cdecl]) GetUnmanagedPtr(funcTable, 6330360502401226894UL, Audio_GetBaseObjectFallback); Audio_GetCurrentTime = (delegate* unmanaged[Cdecl]) GetUnmanagedPtr(funcTable, 2944324482134975819UL, Audio_GetCurrentTimeFallback); @@ -4062,6 +4182,36 @@ public ClientLibrary(Dictionary funcTable) HttpClient_Put = (delegate* unmanaged[Cdecl]) GetUnmanagedPtr(funcTable, 8280976854604120523UL, HttpClient_PutFallback); HttpClient_SetExtraHeader = (delegate* unmanaged[Cdecl]) GetUnmanagedPtr(funcTable, 4939806300942583161UL, HttpClient_SetExtraHeaderFallback); HttpClient_Trace = (delegate* unmanaged[Cdecl]) GetUnmanagedPtr(funcTable, 12260251650657662947UL, HttpClient_TraceFallback); + Interior_GetEntitiesExtents = (delegate* unmanaged[Cdecl]) GetUnmanagedPtr(funcTable, 15230725921455826742UL, Interior_GetEntitiesExtentsFallback); + Interior_GetPortalCount = (delegate* unmanaged[Cdecl]) GetUnmanagedPtr(funcTable, 9833874365185055719UL, Interior_GetPortalCountFallback); + Interior_GetPosition = (delegate* unmanaged[Cdecl]) GetUnmanagedPtr(funcTable, 10883468373939012235UL, Interior_GetPositionFallback); + Interior_GetRoomCount = (delegate* unmanaged[Cdecl]) GetUnmanagedPtr(funcTable, 15377866266281851140UL, Interior_GetRoomCountFallback); + Interior_GetRotation = (delegate* unmanaged[Cdecl]) GetUnmanagedPtr(funcTable, 8232363457953011397UL, Interior_GetRotationFallback); + InteriorPortal_GetCornerCount = (delegate* unmanaged[Cdecl]) GetUnmanagedPtr(funcTable, 2751756776126960023UL, InteriorPortal_GetCornerCountFallback); + InteriorPortal_GetCornerPosition = (delegate* unmanaged[Cdecl]) GetUnmanagedPtr(funcTable, 1814048572451154980UL, InteriorPortal_GetCornerPositionFallback); + InteriorPortal_GetEntityArcheType = (delegate* unmanaged[Cdecl]) GetUnmanagedPtr(funcTable, 13960987639501218250UL, InteriorPortal_GetEntityArcheTypeFallback); + InteriorPortal_GetEntityCount = (delegate* unmanaged[Cdecl]) GetUnmanagedPtr(funcTable, 13352719488432116273UL, InteriorPortal_GetEntityCountFallback); + InteriorPortal_GetEntityFlag = (delegate* unmanaged[Cdecl]) GetUnmanagedPtr(funcTable, 4913927801862478282UL, InteriorPortal_GetEntityFlagFallback); + InteriorPortal_GetEntityPosition = (delegate* unmanaged[Cdecl]) GetUnmanagedPtr(funcTable, 7285942813518470950UL, InteriorPortal_GetEntityPositionFallback); + InteriorPortal_GetEntityRotation = (delegate* unmanaged[Cdecl]) GetUnmanagedPtr(funcTable, 1117662078157381260UL, InteriorPortal_GetEntityRotationFallback); + InteriorPortal_GetFlag = (delegate* unmanaged[Cdecl]) GetUnmanagedPtr(funcTable, 9560528769032004812UL, InteriorPortal_GetFlagFallback); + InteriorPortal_GetIndex = (delegate* unmanaged[Cdecl]) GetUnmanagedPtr(funcTable, 13206342625351776081UL, InteriorPortal_GetIndexFallback); + InteriorPortal_GetRoomFrom = (delegate* unmanaged[Cdecl]) GetUnmanagedPtr(funcTable, 14268893542560810008UL, InteriorPortal_GetRoomFromFallback); + InteriorPortal_GetRoomTo = (delegate* unmanaged[Cdecl]) GetUnmanagedPtr(funcTable, 3255950788253963043UL, InteriorPortal_GetRoomToFallback); + InteriorPortal_SetCornerPosition = (delegate* unmanaged[Cdecl]) GetUnmanagedPtr(funcTable, 16182899257589323539UL, InteriorPortal_SetCornerPositionFallback); + InteriorPortal_SetEntityFlag = (delegate* unmanaged[Cdecl]) GetUnmanagedPtr(funcTable, 15288926594136993761UL, InteriorPortal_SetEntityFlagFallback); + InteriorPortal_SetFlag = (delegate* unmanaged[Cdecl]) GetUnmanagedPtr(funcTable, 9853055316547927459UL, InteriorPortal_SetFlagFallback); + InteriorPortal_SetRoomFrom = (delegate* unmanaged[Cdecl]) GetUnmanagedPtr(funcTable, 12340070947493379575UL, InteriorPortal_SetRoomFromFallback); + InteriorPortal_SetRoomTo = (delegate* unmanaged[Cdecl]) GetUnmanagedPtr(funcTable, 16837975631170049766UL, InteriorPortal_SetRoomToFallback); + InteriorRoom_GetExtents = (delegate* unmanaged[Cdecl]) GetUnmanagedPtr(funcTable, 8261388998032521861UL, InteriorRoom_GetExtentsFallback); + InteriorRoom_GetFlag = (delegate* unmanaged[Cdecl]) GetUnmanagedPtr(funcTable, 7856663484428066825UL, InteriorRoom_GetFlagFallback); + InteriorRoom_GetIndex = (delegate* unmanaged[Cdecl]) GetUnmanagedPtr(funcTable, 15158102510225914020UL, InteriorRoom_GetIndexFallback); + InteriorRoom_GetName = (delegate* unmanaged[Cdecl]) GetUnmanagedPtr(funcTable, 4739364089865431579UL, InteriorRoom_GetNameFallback); + InteriorRoom_GetNameHash = (delegate* unmanaged[Cdecl]) GetUnmanagedPtr(funcTable, 4358271132564072471UL, InteriorRoom_GetNameHashFallback); + InteriorRoom_GetTimecycle = (delegate* unmanaged[Cdecl]) GetUnmanagedPtr(funcTable, 7499702612373464399UL, InteriorRoom_GetTimecycleFallback); + InteriorRoom_SetExtents = (delegate* unmanaged[Cdecl]) GetUnmanagedPtr(funcTable, 12048596999299004349UL, InteriorRoom_SetExtentsFallback); + InteriorRoom_SetFlag = (delegate* unmanaged[Cdecl]) GetUnmanagedPtr(funcTable, 4102368831198906004UL, InteriorRoom_SetFlagFallback); + InteriorRoom_SetTimecycle = (delegate* unmanaged[Cdecl]) GetUnmanagedPtr(funcTable, 7739810354326755506UL, InteriorRoom_SetTimecycleFallback); LocalObject_ActivatePhysics = (delegate* unmanaged[Cdecl]) GetUnmanagedPtr(funcTable, 12723661681621738686UL, LocalObject_ActivatePhysicsFallback); LocalObject_AttachToEntity = (delegate* unmanaged[Cdecl]) GetUnmanagedPtr(funcTable, 12557963046901634258UL, LocalObject_AttachToEntityFallback); LocalObject_AttachToEntity_ScriptId = (delegate* unmanaged[Cdecl]) GetUnmanagedPtr(funcTable, 8482470825689546294UL, LocalObject_AttachToEntity_ScriptIdFallback); diff --git a/api/AltV.Net.CApi/Libraries/ServerLibrary.cs b/api/AltV.Net.CApi/Libraries/ServerLibrary.cs index 3c1ed824..d58cebb1 100644 --- a/api/AltV.Net.CApi/Libraries/ServerLibrary.cs +++ b/api/AltV.Net.CApi/Libraries/ServerLibrary.cs @@ -488,7 +488,7 @@ public unsafe interface IServerLibrary public unsafe class ServerLibrary : IServerLibrary { - public readonly uint Methods = 1779; + public readonly uint Methods = 1809; public delegate* unmanaged[Cdecl] BaseObject_DeleteSyncedMetaData { get; } public delegate* unmanaged[Cdecl] BaseObject_SetMultipleSyncedMetaData { get; } public delegate* unmanaged[Cdecl] BaseObject_SetSyncedMetaData { get; } @@ -1917,7 +1917,7 @@ private IntPtr GetUnmanagedPtr(IDictionary funcTable, ulong ha public ServerLibrary(Dictionary funcTable) { if (!funcTable.TryGetValue(0, out var capiHash)) Outdated = true; - else if (capiHash == IntPtr.Zero || *(ulong*)capiHash != 11629663074568386340UL) Outdated = true; + else if (capiHash == IntPtr.Zero || *(ulong*)capiHash != 10075699596264467259UL) Outdated = true; BaseObject_DeleteSyncedMetaData = (delegate* unmanaged[Cdecl]) GetUnmanagedPtr(funcTable, 8228424877092269355UL, BaseObject_DeleteSyncedMetaDataFallback); BaseObject_SetMultipleSyncedMetaData = (delegate* unmanaged[Cdecl]) GetUnmanagedPtr(funcTable, 1390762125822890831UL, BaseObject_SetMultipleSyncedMetaDataFallback); BaseObject_SetSyncedMetaData = (delegate* unmanaged[Cdecl]) GetUnmanagedPtr(funcTable, 8002999088966424231UL, BaseObject_SetSyncedMetaDataFallback); diff --git a/api/AltV.Net.CApi/Libraries/SharedLibrary.cs b/api/AltV.Net.CApi/Libraries/SharedLibrary.cs index 9789da39..40a28e93 100644 --- a/api/AltV.Net.CApi/Libraries/SharedLibrary.cs +++ b/api/AltV.Net.CApi/Libraries/SharedLibrary.cs @@ -426,7 +426,7 @@ public unsafe interface ISharedLibrary public unsafe class SharedLibrary : ISharedLibrary { - public readonly uint Methods = 1779; + public readonly uint Methods = 1809; public delegate* unmanaged[Cdecl] Audio_GetID { get; } public delegate* unmanaged[Cdecl] AudioAttachedOutput_GetID { get; } public delegate* unmanaged[Cdecl] AudioFilter_GetID { get; } @@ -1669,7 +1669,7 @@ private IntPtr GetUnmanagedPtr(IDictionary funcTable, ulong ha public SharedLibrary(Dictionary funcTable) { if (!funcTable.TryGetValue(0, out var capiHash)) Outdated = true; - else if (capiHash == IntPtr.Zero || *(ulong*)capiHash != 11629663074568386340UL) Outdated = true; + else if (capiHash == IntPtr.Zero || *(ulong*)capiHash != 10075699596264467259UL) Outdated = true; Audio_GetID = (delegate* unmanaged[Cdecl]) GetUnmanagedPtr(funcTable, 4464042055475980737UL, Audio_GetIDFallback); AudioAttachedOutput_GetID = (delegate* unmanaged[Cdecl]) GetUnmanagedPtr(funcTable, 17725794901805112189UL, AudioAttachedOutput_GetIDFallback); AudioFilter_GetID = (delegate* unmanaged[Cdecl]) GetUnmanagedPtr(funcTable, 8824535635529306325UL, AudioFilter_GetIDFallback); diff --git a/api/AltV.Net.Client/Alt.cs b/api/AltV.Net.Client/Alt.cs index 5ba920ad..ebcf2279 100644 --- a/api/AltV.Net.Client/Alt.cs +++ b/api/AltV.Net.Client/Alt.cs @@ -36,6 +36,8 @@ public static bool GetBaseObjectById(BaseObjectType type, uint id, [MaybeNullWhe public static LocalStorage LocalStorage => CoreImpl.LocalStorage; public static Voice Voice => CoreImpl.Voice; public static FocusData FocusData => CoreImpl.FocusData; + + public static Interior? GetInterior(uint interiorId) => CoreImpl.GetInterior(interiorId); public static HandlingData? GetHandlingByModelHash(uint modelHash) => CoreImpl.GetHandlingByModelHash(modelHash); public static WeaponData? GetWeaponDataByWeaponHash(uint weaponHash) => CoreImpl.GetWeaponDataByWeaponHash(weaponHash); diff --git a/api/AltV.Net.Client/Core.cs b/api/AltV.Net.Client/Core.cs index 71ef135a..8199e40d 100644 --- a/api/AltV.Net.Client/Core.cs +++ b/api/AltV.Net.Client/Core.cs @@ -261,6 +261,11 @@ public IntPtr CreateMarkerPtr(out uint id, MarkerType type, Position pos, Rgba c { return new HandlingData(this, modelHash); } + + public Interior GetInterior(uint interiorId) + { + return new Interior(this, interiorId); + } public AudioCategory GetAudioCategoryByName(string audioCategory) { diff --git a/api/AltV.Net.Client/Elements/Data/IInterior.cs b/api/AltV.Net.Client/Elements/Data/IInterior.cs new file mode 100644 index 00000000..41452501 --- /dev/null +++ b/api/AltV.Net.Client/Elements/Data/IInterior.cs @@ -0,0 +1,15 @@ +using AltV.Net.Data; + +namespace AltV.Net.Client.Elements.Data; + +public interface IInterior +{ + IInteriorRoom GetRoomByIndex(uint roomIndex); + IInteriorRoom GetRoomByHash(uint roomHash); + IInteriorPortal GetPortalByIndex(uint portalIndex); + ushort RoomCount { get; } + ushort PortalCount { get; } + Position Position { get; } + Rotation Rotation { get; } + AABB EntitiesExtents { get; } +} \ No newline at end of file diff --git a/api/AltV.Net.Client/Elements/Data/IInteriorPortal.cs b/api/AltV.Net.Client/Elements/Data/IInteriorPortal.cs new file mode 100644 index 00000000..b98d6f62 --- /dev/null +++ b/api/AltV.Net.Client/Elements/Data/IInteriorPortal.cs @@ -0,0 +1,22 @@ +using AltV.Net.Data; + +namespace AltV.Net.Client.Elements.Data; + +public interface IInteriorPortal +{ + uint Index { get; } + ushort CornerCount { get; } + Position GetCornerPosition(uint cornerIndex); + IInteriorRoom RoomFrom { get; set; } + IInteriorRoom RoomTo { get; set; } + int Flag { get; set; } + + ushort EntityCount { get; } + uint GetEntityArcheType(uint entityIndex); + int GetEntityFlag(uint entityIndex); + void SetEntityFlag(uint entityIndex, int flag); + Position GetEntityPosition(uint entityIndex); + Rotation GetEntityRotation(uint entityIndex); + + void SetCornerPosition(uint cornerIndex, Position position); +} \ No newline at end of file diff --git a/api/AltV.Net.Client/Elements/Data/IInteriorRoom.cs b/api/AltV.Net.Client/Elements/Data/IInteriorRoom.cs new file mode 100644 index 00000000..52764786 --- /dev/null +++ b/api/AltV.Net.Client/Elements/Data/IInteriorRoom.cs @@ -0,0 +1,13 @@ +using AltV.Net.Data; + +namespace AltV.Net.Client.Elements.Data; + +public interface IInteriorRoom +{ + uint Index { get; } + string Name { get; } + uint NameHash { get; } + int Flag { get; set; } + uint Timecycle { get; set; } + AABB Extents { get; set; } +} \ No newline at end of file diff --git a/api/AltV.Net.Client/Elements/Data/Interior.cs b/api/AltV.Net.Client/Elements/Data/Interior.cs new file mode 100644 index 00000000..ad90828d --- /dev/null +++ b/api/AltV.Net.Client/Elements/Data/Interior.cs @@ -0,0 +1,87 @@ +using AltV.Net.Data; + +namespace AltV.Net.Client.Elements.Data; + +public class Interior : IInterior +{ + private readonly ICore _core; + private readonly uint _interiorId; + + internal Interior(ICore core, uint interiorId) + { + _core = core; + _interiorId = interiorId; + } + + public IInteriorRoom GetRoomByIndex(uint roomIndex) + { + return new InteriorRoom(_core, _interiorId, roomIndex, true); + } + + public IInteriorRoom GetRoomByHash(uint roomHash) + { + return new InteriorRoom(_core, _interiorId, roomHash, false); + } + + public IInteriorPortal GetPortalByIndex(uint portalIndex) + { + return new InteriorPortal(_core, _interiorId, portalIndex); + } + + public ushort RoomCount + { + get + { + unsafe + { + return _core.Library.Client.Interior_GetRoomCount(_interiorId); + } + } + } + + public ushort PortalCount + { + get + { + unsafe + { + return _core.Library.Client.Interior_GetPortalCount(_interiorId); + } + } + } + + public Position Position + { + get + { + unsafe + { + return _core.Library.Client.Interior_GetPosition(_interiorId); + } + } + } + + public Rotation Rotation + { + get + { + unsafe + { + return _core.Library.Client.Interior_GetPosition(_interiorId); + } + } + } + + public AABB EntitiesExtents + { + get + { + unsafe + { + var interiorExtentInfo = AABB.Zero; + _core.Library.Client.Interior_GetEntitiesExtents(_interiorId, &interiorExtentInfo); + return interiorExtentInfo; + } + } + } +} \ No newline at end of file diff --git a/api/AltV.Net.Client/Elements/Data/InteriorPortal.cs b/api/AltV.Net.Client/Elements/Data/InteriorPortal.cs new file mode 100644 index 00000000..7188e40a --- /dev/null +++ b/api/AltV.Net.Client/Elements/Data/InteriorPortal.cs @@ -0,0 +1,162 @@ +using AltV.Net.Data; + +namespace AltV.Net.Client.Elements.Data; + +public class InteriorPortal : IInteriorPortal +{ + private readonly ICore _core; + private readonly uint _interiorId; + private readonly uint _portalIndex; + + public InteriorPortal(ICore core, uint interiorId, uint portalIndex) + { + _core = core; + _interiorId = interiorId; + _portalIndex = portalIndex; + } + + public uint Index + { + get + { + unsafe + { + return _core.Library.Client.InteriorPortal_GetIndex(_interiorId, _portalIndex); + } + } + } + + public ushort CornerCount + { + get + { + unsafe + { + return _core.Library.Client.InteriorPortal_GetCornerCount(_interiorId, _portalIndex); + } + } + } + + public Position GetCornerPosition(uint cornerIndex) + { + unsafe + { + return _core.Library.Client.InteriorPortal_GetCornerPosition(_interiorId, _portalIndex, cornerIndex); + } + } + + public IInteriorRoom RoomFrom + { + get + { + unsafe + { + var roomFrom = _core.Library.Client.InteriorPortal_GetRoomFrom(_interiorId, _portalIndex); + return new InteriorRoom(_core, _interiorId, roomFrom, true); + } + } + set + { + unsafe + { + _core.Library.Client.InteriorPortal_SetRoomFrom(_interiorId, _portalIndex, value.Index); + } + } + } + + public IInteriorRoom RoomTo + { + get + { + unsafe + { + var roomtTo = _core.Library.Client.InteriorPortal_GetRoomTo(_interiorId, _portalIndex); + return new InteriorRoom(_core, _interiorId, roomtTo, true); + } + } + set + { + unsafe + { + _core.Library.Client.InteriorPortal_SetRoomTo(_interiorId, _portalIndex, value.Index); + } + } + } + + public int Flag + { + get + { + unsafe + { + return _core.Library.Client.InteriorPortal_GetFlag(_interiorId, _portalIndex); + } + } + set + { + unsafe + { + _core.Library.Client.InteriorPortal_SetFlag(_interiorId, _portalIndex, value); + } + } + } + + public ushort EntityCount + { + get + { + unsafe + { + return _core.Library.Client.InteriorPortal_GetEntityCount(_interiorId, _portalIndex); + } + } + } + + public uint GetEntityArcheType(uint entityIndex) + { + unsafe + { + return _core.Library.Client.InteriorPortal_GetEntityArcheType(_interiorId, _portalIndex, entityIndex); + } + } + + public int GetEntityFlag(uint entityIndex) + { + unsafe + { + return _core.Library.Client.InteriorPortal_GetEntityFlag(_interiorId, _portalIndex, entityIndex); + } + } + + public void SetEntityFlag(uint entityIndex, int flag) + { + unsafe + { + _core.Library.Client.InteriorPortal_SetEntityFlag(_interiorId, _portalIndex, entityIndex, flag); + } + } + + public Position GetEntityPosition(uint entityIndex) + { + unsafe + { + return _core.Library.Client.InteriorPortal_GetEntityPosition(_interiorId, _portalIndex, entityIndex); + } + } + + public Rotation GetEntityRotation(uint entityIndex) + { + unsafe + { + return _core.Library.Client.InteriorPortal_GetEntityRotation(_interiorId, _portalIndex, entityIndex); + } + } + + public void SetCornerPosition(uint cornerIndex, Position position) + { + unsafe + { + _core.Library.Client.InteriorPortal_SetCornerPosition(_interiorId, _portalIndex, cornerIndex, position); + } + } +} \ No newline at end of file diff --git a/api/AltV.Net.Client/Elements/Data/InteriorRoom.cs b/api/AltV.Net.Client/Elements/Data/InteriorRoom.cs new file mode 100644 index 00000000..b7821fbf --- /dev/null +++ b/api/AltV.Net.Client/Elements/Data/InteriorRoom.cs @@ -0,0 +1,110 @@ +using AltV.Net.Data; + +namespace AltV.Net.Client.Elements.Data; + +public class InteriorRoom : IInteriorRoom +{ + private readonly ICore _core; + private readonly uint _interiorId; + private readonly uint _roomValue; + private readonly byte _isIndex; + + internal InteriorRoom(ICore core, uint interiorId, uint roomValue, bool isIndex) + { + _core = core; + _interiorId = interiorId; + _roomValue = roomValue; + _isIndex = isIndex ? (byte) 1 : (byte) 0; + } + + public uint Index + { + get + { + unsafe + { + return _core.Library.Client.InteriorRoom_GetIndex(_interiorId, _roomValue, _isIndex); + } + } + } + + public string Name + { + get + { + unsafe + { + var size = 0; + return _core.PtrToStringUtf8AndFree( + _core.Library.Client.InteriorRoom_GetName(_interiorId, _roomValue, _isIndex, &size), size); + } + } + } + + public uint NameHash + { + get + { + unsafe + { + return _core.Library.Client.InteriorRoom_GetNameHash(_interiorId, _roomValue, _isIndex); + } + } + } + + public int Flag + { + get + { + unsafe + { + return _core.Library.Client.InteriorRoom_GetFlag(_interiorId, _roomValue, _isIndex); + } + } + set + { + unsafe + { + _core.Library.Client.InteriorRoom_SetFlag(_interiorId, _roomValue, _isIndex, value); + } + } + } + + public uint Timecycle + { + get + { + unsafe + { + return _core.Library.Client.InteriorRoom_GetTimecycle(_interiorId, _roomValue, _isIndex); + } + } + set + { + unsafe + { + _core.Library.Client.InteriorRoom_SetTimecycle(_interiorId, _roomValue, _isIndex, value); + } + } + } + + public AABB Extents + { + get + { + unsafe + { + var interiorExtentInfo = AABB.Zero; + _core.Library.Client.InteriorRoom_GetExtents(_interiorId, _roomValue, _isIndex, &interiorExtentInfo); + return interiorExtentInfo; + } + } + set + { + unsafe + { + _core.Library.Client.InteriorRoom_SetExtents(_interiorId, _roomValue, _isIndex, value.Min, value.Max); + } + } + } +} \ No newline at end of file diff --git a/api/AltV.Net.Client/ICore.cs b/api/AltV.Net.Client/ICore.cs index 57e2f79e..434d4a68 100644 --- a/api/AltV.Net.Client/ICore.cs +++ b/api/AltV.Net.Client/ICore.cs @@ -234,5 +234,6 @@ ILocalObject CreateLocalObject(uint modelHash, Position position, Rotation rotat bool ReloadVehiclePhysics(uint modelHash); List RunningTimers { get; } + Interior GetInterior(uint interiorId); } } \ No newline at end of file diff --git a/api/AltV.Net/Data/WeaponModelnfo.cs b/api/AltV.Net/Data/WeaponModelnfo.cs index e32e5b01..cbcc56da 100644 --- a/api/AltV.Net/Data/WeaponModelnfo.cs +++ b/api/AltV.Net/Data/WeaponModelnfo.cs @@ -24,6 +24,8 @@ internal readonly struct WeaponModelInfoInternal private readonly int SkillAbove50MaxAmmoMp; private readonly int MaxSkillMaxAmmoMp; private readonly int BonusMaxAmmoMp; + [MarshalAs(UnmanagedType.LPStr)] + private readonly string DamageType; public WeaponModelInfo ToPublic() { @@ -40,7 +42,8 @@ public WeaponModelInfo ToPublic() DefaultMaxAmmoMp = DefaultMaxAmmoMp, SkillAbove50MaxAmmoMp = SkillAbove50MaxAmmoMp, MaxSkillMaxAmmoMp = MaxSkillMaxAmmoMp, - BonusMaxAmmoMp = BonusMaxAmmoMp + BonusMaxAmmoMp = BonusMaxAmmoMp, + DamageType = DamageType }; } } @@ -59,5 +62,6 @@ public struct WeaponModelInfo public int SkillAbove50MaxAmmoMp; public int MaxSkillMaxAmmoMp; public int BonusMaxAmmoMp; + public string DamageType; } } \ No newline at end of file diff --git a/runtime b/runtime index c99af68a..072d3c7d 160000 --- a/runtime +++ b/runtime @@ -1 +1 @@ -Subproject commit c99af68a38a1b9788201c36979bcc796bc6b8b49 +Subproject commit 072d3c7d404b805a0e8c8f4a7709e498cf8fa050