Skip to content

Commit b557099

Browse files
update cpp sdk
1 parent 0520764 commit b557099

36 files changed

+460
-468
lines changed

api/AltV.Net.Async/AsyncModule.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,13 +68,13 @@ private readonly Dictionary<string, HashSet<ServerEventAsyncDelegate>> serverEve
6868
=
6969
new Dictionary<string, HashSet<ServerEventAsyncDelegate>>();
7070

71-
public AsyncModule(IServer server, AssemblyLoadContext assemblyLoadContext, CSharpNativeResource cSharpNativeResource,
71+
public AsyncModule(IServer server, AssemblyLoadContext assemblyLoadContext, NativeResource moduleResource,
7272
IBaseBaseObjectPool baseBaseObjectPool, IBaseEntityPool baseEntityPool, IEntityPool<IPlayer> playerPool,
7373
IEntityPool<IVehicle> vehiclePool,
7474
IBaseObjectPool<IBlip> blipPool,
7575
IBaseObjectPool<ICheckpoint> checkpointPool,
7676
IBaseObjectPool<IVoiceChannel> voiceChannelPool,
77-
IBaseObjectPool<IColShape> colShapePool) : base(server, assemblyLoadContext, cSharpNativeResource, baseBaseObjectPool,
77+
IBaseObjectPool<IColShape> colShapePool) : base(server, assemblyLoadContext, moduleResource, baseBaseObjectPool,
7878
baseEntityPool, playerPool, vehiclePool, blipPool,
7979
checkpointPool, voiceChannelPool, colShapePool)
8080
{

api/AltV.Net.Async/AsyncResource.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ public override IBaseObjectPool<IColShape> GetColShapePool(IBaseObjectFactory<IC
6161
}
6262

6363
public override Module GetModule(IServer server, AssemblyLoadContext assemblyLoadContext,
64-
CSharpNativeResource cSharpNativeResource,
64+
NativeResource cSharpNativeResource,
6565
IBaseBaseObjectPool baseBaseObjectPool,
6666
IBaseEntityPool baseEntityPool,
6767
IEntityPool<IPlayer> playerPool,

api/AltV.Net.Mock/MockAltV.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ public MockAltV(string entryPoint)
3434
new MockBaseBaseObjectPool(playerPool, vehiclePool, blipPool, checkpointPool, voiceChannelPool, colShapePool);
3535
var server = new MockServer(IntPtr.Zero, baseObjectPool, entityPool, playerPool, vehiclePool, blipPool,
3636
checkpointPool, voiceChannelPool);
37-
var cSharpNativeResource = new CSharpNativeResource(IntPtr.Zero);
37+
var cSharpNativeResource = new NativeResource(IntPtr.Zero);
3838
var module = resource.GetModule(server, AssemblyLoadContext.Default, cSharpNativeResource, baseObjectPool, entityPool, playerPool,
3939
vehiclePool, blipPool, checkpointPool, voiceChannelPool, colShapePool);
4040
resource.OnStart();

api/AltV.Net.Mock/MockServer.cs

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ public class MockServer : IServer
3131

3232
public string RootDirectory => "";
3333

34-
public CSharpNativeResource Resource => new CSharpNativeResource(IntPtr.Zero);
34+
public NativeResource Resource => new NativeResource(IntPtr.Zero);
3535

3636
internal MockServer(IntPtr nativePointer, IBaseBaseObjectPool baseBaseObjectPool,
3737
IBaseEntityPool baseEntityPool, IEntityPool<IPlayer> playerPool,
@@ -320,14 +320,9 @@ public void RemoveVoiceChannel(IVoiceChannel channel)
320320
Alt.Module.OnRemoveVoiceChannel(channel.NativePointer);
321321
}
322322

323-
public ServerNativeResource GetResource(string name)
323+
public NativeResource GetResource(string name)
324324
{
325-
return new ServerNativeResource(IntPtr.Zero);
326-
}
327-
328-
public CSharpNativeResource GetCSharpResource(string name)
329-
{
330-
return new CSharpNativeResource(IntPtr.Zero);
325+
return new NativeResource(IntPtr.Zero);
331326
}
332327

333328
public IEnumerable<IPlayer> GetPlayers()

api/AltV.Net/Alt.Export.cs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,28 +7,28 @@ namespace AltV.Net
77
public partial class Alt
88
{
99
public static void Export(string key, object value) =>
10-
Module.CSharpNativeResource.SetExport(key, MValue.CreateFromObject(value));
10+
Module.Server.Resource.SetExport(key, MValue.CreateFromObject(value));
1111

1212
public static void Export(string key, bool value) =>
13-
Module.CSharpNativeResource.SetExport(key, MValue.Create(value));
13+
Module.ModuleResource.SetExport(key, MValue.Create(value));
1414

1515
public static void Export(string key, int value) =>
16-
Module.CSharpNativeResource.SetExport(key, MValue.Create(value));
16+
Module.ModuleResource.SetExport(key, MValue.Create(value));
1717

1818
public static void Export(string key, long value) =>
19-
Module.CSharpNativeResource.SetExport(key, MValue.Create(value));
19+
Module.ModuleResource.SetExport(key, MValue.Create(value));
2020

2121
public static void Export(string key, uint value) =>
22-
Module.CSharpNativeResource.SetExport(key, MValue.Create(value));
22+
Module.ModuleResource.SetExport(key, MValue.Create(value));
2323

2424
public static void Export(string key, ulong value) =>
25-
Module.CSharpNativeResource.SetExport(key, MValue.Create(value));
25+
Module.ModuleResource.SetExport(key, MValue.Create(value));
2626

2727
public static void Export(string key, double value) =>
28-
Module.CSharpNativeResource.SetExport(key, MValue.Create(value));
28+
Module.ModuleResource.SetExport(key, MValue.Create(value));
2929

3030
public static void Export(string key, string value) =>
31-
Module.CSharpNativeResource.SetExport(key, MValue.Create(value));
31+
Module.ModuleResource.SetExport(key, MValue.Create(value));
3232

3333
public static void Export(string key, Action value) => Module.SetExport(key, Function.Create(value));
3434

api/AltV.Net/CSharpNativeResource.cs

Lines changed: 0 additions & 41 deletions
This file was deleted.

0 commit comments

Comments
 (0)