Skip to content

Commit

Permalink
update weaponmodel damagetype
Browse files Browse the repository at this point in the history
  • Loading branch information
Doxoh committed Nov 14, 2024
1 parent d46be5a commit 71071fd
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 16 deletions.
20 changes: 10 additions & 10 deletions api/AltV.Net.CApi/Libraries/ClientLibrary.cs
Original file line number Diff line number Diff line change
Expand Up @@ -475,7 +475,7 @@ public unsafe interface IClientLibrary
public delegate* unmanaged[Cdecl]<nint, nint, nint, ClientEvents.HttpResponseModuleDelegate, void> HttpClient_Put { get; }
public delegate* unmanaged[Cdecl]<nint, nint, nint, void> HttpClient_SetExtraHeader { get; }
public delegate* unmanaged[Cdecl]<nint, nint, nint, ClientEvents.HttpResponseModuleDelegate, void> HttpClient_Trace { get; }
public delegate* unmanaged[Cdecl]<uint, InteriorExtentInfo*, void> Interior_GetEntitiesExtents { get; }
public delegate* unmanaged[Cdecl]<uint, AABB*, void> Interior_GetEntitiesExtents { get; }
public delegate* unmanaged[Cdecl]<uint, ushort> Interior_GetPortalCount { get; }
public delegate* unmanaged[Cdecl]<uint, Vector3> Interior_GetPosition { get; }
public delegate* unmanaged[Cdecl]<uint, ushort> Interior_GetRoomCount { get; }
Expand All @@ -496,7 +496,7 @@ public unsafe interface IClientLibrary
public delegate* unmanaged[Cdecl]<uint, uint, int, void> InteriorPortal_SetFlag { get; }
public delegate* unmanaged[Cdecl]<uint, uint, uint, void> InteriorPortal_SetRoomFrom { get; }
public delegate* unmanaged[Cdecl]<uint, uint, uint, void> InteriorPortal_SetRoomTo { get; }
public delegate* unmanaged[Cdecl]<uint, uint, byte, InteriorExtentInfo*, void> InteriorRoom_GetExtents { get; }
public delegate* unmanaged[Cdecl]<uint, uint, byte, AABB*, void> InteriorRoom_GetExtents { get; }
public delegate* unmanaged[Cdecl]<uint, uint, byte, int> InteriorRoom_GetFlag { get; }
public delegate* unmanaged[Cdecl]<uint, uint, byte, uint> InteriorRoom_GetIndex { get; }
public delegate* unmanaged[Cdecl]<uint, uint, byte, int*, nint> InteriorRoom_GetName { get; }
Expand Down Expand Up @@ -1403,7 +1403,7 @@ public unsafe class ClientLibrary : IClientLibrary
public delegate* unmanaged[Cdecl]<nint, nint, nint, ClientEvents.HttpResponseModuleDelegate, void> HttpClient_Put { get; }
public delegate* unmanaged[Cdecl]<nint, nint, nint, void> HttpClient_SetExtraHeader { get; }
public delegate* unmanaged[Cdecl]<nint, nint, nint, ClientEvents.HttpResponseModuleDelegate, void> HttpClient_Trace { get; }
public delegate* unmanaged[Cdecl]<uint, InteriorExtentInfo*, void> Interior_GetEntitiesExtents { get; }
public delegate* unmanaged[Cdecl]<uint, AABB*, void> Interior_GetEntitiesExtents { get; }
public delegate* unmanaged[Cdecl]<uint, ushort> Interior_GetPortalCount { get; }
public delegate* unmanaged[Cdecl]<uint, Vector3> Interior_GetPosition { get; }
public delegate* unmanaged[Cdecl]<uint, ushort> Interior_GetRoomCount { get; }
Expand All @@ -1424,7 +1424,7 @@ public unsafe class ClientLibrary : IClientLibrary
public delegate* unmanaged[Cdecl]<uint, uint, int, void> InteriorPortal_SetFlag { get; }
public delegate* unmanaged[Cdecl]<uint, uint, uint, void> InteriorPortal_SetRoomFrom { get; }
public delegate* unmanaged[Cdecl]<uint, uint, uint, void> InteriorPortal_SetRoomTo { get; }
public delegate* unmanaged[Cdecl]<uint, uint, byte, InteriorExtentInfo*, void> InteriorRoom_GetExtents { get; }
public delegate* unmanaged[Cdecl]<uint, uint, byte, AABB*, void> InteriorRoom_GetExtents { get; }
public delegate* unmanaged[Cdecl]<uint, uint, byte, int> InteriorRoom_GetFlag { get; }
public delegate* unmanaged[Cdecl]<uint, uint, byte, uint> InteriorRoom_GetIndex { get; }
public delegate* unmanaged[Cdecl]<uint, uint, byte, int*, nint> InteriorRoom_GetName { get; }
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -4182,7 +4182,7 @@ public ClientLibrary(Dictionary<ulong, IntPtr> funcTable)
HttpClient_Put = (delegate* unmanaged[Cdecl]<nint, nint, nint, ClientEvents.HttpResponseModuleDelegate, void>) GetUnmanagedPtr<HttpClient_PutDelegate>(funcTable, 8280976854604120523UL, HttpClient_PutFallback);
HttpClient_SetExtraHeader = (delegate* unmanaged[Cdecl]<nint, nint, nint, void>) GetUnmanagedPtr<HttpClient_SetExtraHeaderDelegate>(funcTable, 4939806300942583161UL, HttpClient_SetExtraHeaderFallback);
HttpClient_Trace = (delegate* unmanaged[Cdecl]<nint, nint, nint, ClientEvents.HttpResponseModuleDelegate, void>) GetUnmanagedPtr<HttpClient_TraceDelegate>(funcTable, 12260251650657662947UL, HttpClient_TraceFallback);
Interior_GetEntitiesExtents = (delegate* unmanaged[Cdecl]<uint, InteriorExtentInfo*, void>) GetUnmanagedPtr<Interior_GetEntitiesExtentsDelegate>(funcTable, 15230725921455826742UL, Interior_GetEntitiesExtentsFallback);
Interior_GetEntitiesExtents = (delegate* unmanaged[Cdecl]<uint, AABB*, void>) GetUnmanagedPtr<Interior_GetEntitiesExtentsDelegate>(funcTable, 15230725921455826742UL, Interior_GetEntitiesExtentsFallback);
Interior_GetPortalCount = (delegate* unmanaged[Cdecl]<uint, ushort>) GetUnmanagedPtr<Interior_GetPortalCountDelegate>(funcTable, 9833874365185055719UL, Interior_GetPortalCountFallback);
Interior_GetPosition = (delegate* unmanaged[Cdecl]<uint, Vector3>) GetUnmanagedPtr<Interior_GetPositionDelegate>(funcTable, 10883468373939012235UL, Interior_GetPositionFallback);
Interior_GetRoomCount = (delegate* unmanaged[Cdecl]<uint, ushort>) GetUnmanagedPtr<Interior_GetRoomCountDelegate>(funcTable, 15377866266281851140UL, Interior_GetRoomCountFallback);
Expand All @@ -4203,7 +4203,7 @@ public ClientLibrary(Dictionary<ulong, IntPtr> funcTable)
InteriorPortal_SetFlag = (delegate* unmanaged[Cdecl]<uint, uint, int, void>) GetUnmanagedPtr<InteriorPortal_SetFlagDelegate>(funcTable, 9853055316547927459UL, InteriorPortal_SetFlagFallback);
InteriorPortal_SetRoomFrom = (delegate* unmanaged[Cdecl]<uint, uint, uint, void>) GetUnmanagedPtr<InteriorPortal_SetRoomFromDelegate>(funcTable, 12340070947493379575UL, InteriorPortal_SetRoomFromFallback);
InteriorPortal_SetRoomTo = (delegate* unmanaged[Cdecl]<uint, uint, uint, void>) GetUnmanagedPtr<InteriorPortal_SetRoomToDelegate>(funcTable, 16837975631170049766UL, InteriorPortal_SetRoomToFallback);
InteriorRoom_GetExtents = (delegate* unmanaged[Cdecl]<uint, uint, byte, InteriorExtentInfo*, void>) GetUnmanagedPtr<InteriorRoom_GetExtentsDelegate>(funcTable, 8261388998032521861UL, InteriorRoom_GetExtentsFallback);
InteriorRoom_GetExtents = (delegate* unmanaged[Cdecl]<uint, uint, byte, AABB*, void>) GetUnmanagedPtr<InteriorRoom_GetExtentsDelegate>(funcTable, 8261388998032521861UL, InteriorRoom_GetExtentsFallback);
InteriorRoom_GetFlag = (delegate* unmanaged[Cdecl]<uint, uint, byte, int>) GetUnmanagedPtr<InteriorRoom_GetFlagDelegate>(funcTable, 7856663484428066825UL, InteriorRoom_GetFlagFallback);
InteriorRoom_GetIndex = (delegate* unmanaged[Cdecl]<uint, uint, byte, uint>) GetUnmanagedPtr<InteriorRoom_GetIndexDelegate>(funcTable, 15158102510225914020UL, InteriorRoom_GetIndexFallback);
InteriorRoom_GetName = (delegate* unmanaged[Cdecl]<uint, uint, byte, int*, nint>) GetUnmanagedPtr<InteriorRoom_GetNameDelegate>(funcTable, 4739364089865431579UL, InteriorRoom_GetNameFallback);
Expand Down
4 changes: 2 additions & 2 deletions api/AltV.Net.Client/Elements/Data/Interior.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
4 changes: 2 additions & 2 deletions api/AltV.Net.Client/Elements/Data/InteriorRoom.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
6 changes: 5 additions & 1 deletion api/AltV.Net/Data/WeaponModelnfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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()
{
Expand All @@ -40,7 +42,8 @@ public WeaponModelInfo ToPublic()
DefaultMaxAmmoMp = DefaultMaxAmmoMp,
SkillAbove50MaxAmmoMp = SkillAbove50MaxAmmoMp,
MaxSkillMaxAmmoMp = MaxSkillMaxAmmoMp,
BonusMaxAmmoMp = BonusMaxAmmoMp
BonusMaxAmmoMp = BonusMaxAmmoMp,
DamageType = DamageType
};
}
}
Expand All @@ -59,5 +62,6 @@ public struct WeaponModelInfo
public int SkillAbove50MaxAmmoMp;
public int MaxSkillMaxAmmoMp;
public int BonusMaxAmmoMp;
public string DamageType;
}
}
2 changes: 1 addition & 1 deletion runtime

0 comments on commit 71071fd

Please sign in to comment.