diff --git a/api/AltV.Net.CApi/Libraries/ClientLibrary.cs b/api/AltV.Net.CApi/Libraries/ClientLibrary.cs index ba28fbf8..a01ac036 100644 --- a/api/AltV.Net.CApi/Libraries/ClientLibrary.cs +++ b/api/AltV.Net.CApi/Libraries/ClientLibrary.cs @@ -475,7 +475,7 @@ 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_GetEntitiesExtents { get; } public delegate* unmanaged[Cdecl] Interior_GetPortalCount { get; } public delegate* unmanaged[Cdecl] Interior_GetPosition { get; } public delegate* unmanaged[Cdecl] Interior_GetRoomCount { get; } @@ -496,7 +496,7 @@ public unsafe interface IClientLibrary 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_GetExtents { get; } public delegate* unmanaged[Cdecl] InteriorRoom_GetFlag { get; } public delegate* unmanaged[Cdecl] InteriorRoom_GetIndex { get; } public delegate* unmanaged[Cdecl] InteriorRoom_GetName { get; } @@ -1403,7 +1403,7 @@ 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_GetEntitiesExtents { get; } public delegate* unmanaged[Cdecl] Interior_GetPortalCount { get; } public delegate* unmanaged[Cdecl] Interior_GetPosition { get; } public delegate* unmanaged[Cdecl] Interior_GetRoomCount { get; } @@ -1424,7 +1424,7 @@ public unsafe class ClientLibrary : IClientLibrary 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_GetExtents { get; } public delegate* unmanaged[Cdecl] InteriorRoom_GetFlag { get; } public delegate* unmanaged[Cdecl] InteriorRoom_GetIndex { get; } public delegate* unmanaged[Cdecl] InteriorRoom_GetName { get; } @@ -2790,8 +2790,8 @@ 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, InteriorExtentInfo* _extents); - private static void Interior_GetEntitiesExtentsFallback(uint _interiorId, InteriorExtentInfo* _extents) => throw new Exceptions.OutdatedSdkException("Interior_GetEntitiesExtents", "Interior_GetEntitiesExtents 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); @@ -2832,8 +2832,8 @@ public unsafe class ClientLibrary : IClientLibrary 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, InteriorExtentInfo* _extents); - private static void InteriorRoom_GetExtentsFallback(uint _interiorId, uint _roomValue, byte _isIndex, InteriorExtentInfo* _extents) => throw new Exceptions.OutdatedSdkException("InteriorRoom_GetExtents", "InteriorRoom_GetExtents 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); @@ -4182,7 +4182,7 @@ 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_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); @@ -4203,7 +4203,7 @@ public ClientLibrary(Dictionary funcTable) 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_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); diff --git a/api/AltV.Net.Client/Elements/Data/Interior.cs b/api/AltV.Net.Client/Elements/Data/Interior.cs index ff99a5d2..ad90828d 100644 --- a/api/AltV.Net.Client/Elements/Data/Interior.cs +++ b/api/AltV.Net.Client/Elements/Data/Interior.cs @@ -72,13 +72,13 @@ public Rotation Rotation } } - public InteriorExtentInfo EntitiesExtents + public AABB EntitiesExtents { get { unsafe { - var interiorExtentInfo = InteriorExtentInfo.Zero; + var interiorExtentInfo = AABB.Zero; _core.Library.Client.Interior_GetEntitiesExtents(_interiorId, &interiorExtentInfo); return interiorExtentInfo; } diff --git a/api/AltV.Net.Client/Elements/Data/InteriorRoom.cs b/api/AltV.Net.Client/Elements/Data/InteriorRoom.cs index f8aaa9ce..b7821fbf 100644 --- a/api/AltV.Net.Client/Elements/Data/InteriorRoom.cs +++ b/api/AltV.Net.Client/Elements/Data/InteriorRoom.cs @@ -88,13 +88,13 @@ public uint Timecycle } } - public InteriorExtentInfo Extents + public AABB Extents { get { unsafe { - var interiorExtentInfo = InteriorExtentInfo.Zero; + var interiorExtentInfo = AABB.Zero; _core.Library.Client.InteriorRoom_GetExtents(_interiorId, _roomValue, _isIndex, &interiorExtentInfo); return interiorExtentInfo; } 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 3e77ac20..072d3c7d 160000 --- a/runtime +++ b/runtime @@ -1 +1 @@ -Subproject commit 3e77ac2009ff3d02204dfef63ee344c65a36b54c +Subproject commit 072d3c7d404b805a0e8c8f4a7709e498cf8fa050