Skip to content

Commit

Permalink
Merge branch 'rc' into release
Browse files Browse the repository at this point in the history
  • Loading branch information
Doxoh committed Sep 24, 2024
2 parents 03b79fb + 9a5ad5a commit e1106b7
Show file tree
Hide file tree
Showing 177 changed files with 1,866 additions and 4,471 deletions.
2 changes: 1 addition & 1 deletion api/AltV.Net.Async/AltAsync.BaseObject.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public static Task<BaseObjectType> GetTypeAsync(this IBaseObject baseObject) =>
[Obsolete("Use async entities instead")]
public static async Task SetMetaDataAsync(this IBaseObject baseObject, string key, object value)
{
Alt.Core.CreateMValue(out var mValue, value);
Alt.CoreImpl.CreateMValue(out var mValue, value);
await AltVAsync.Schedule(() => baseObject.SetMetaData(key, in mValue));
mValue.Dispose();
}
Expand Down
6 changes: 3 additions & 3 deletions api/AltV.Net.Async/AltAsync.Entity.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public static Task<Rotation> GetRotationAsync(this IEntity entity) =>
[Obsolete("Use async entities instead")]
public static async Task SetSyncedMetaDataAsync(this IEntity entity, string key, object value)
{
Alt.Core.CreateMValue(out var mValue, value);
Alt.CoreImpl.CreateMValue(out var mValue, value);
await AltVAsync.Schedule(() => entity.SetSyncedMetaData(key, mValue));
mValue.Dispose();
}
Expand All @@ -40,7 +40,7 @@ public static Task<T> GetSyncedMetaDataAsync<T>(this IEntity entity, string key)
[Obsolete("Use async entities instead")]
public static async Task SetStreamSyncedMetaDataAsync(this IEntity entity, string key, object value)
{
Alt.Core.CreateMValue(out var mValue, value);
Alt.CoreImpl.CreateMValue(out var mValue, value);
await AltVAsync.Schedule(() => entity.SetStreamSyncedMetaData(key, mValue));
mValue.Dispose();
}
Expand All @@ -56,7 +56,7 @@ public static Task<T> GetStreamSyncedMetaDataAsync<T>(this IEntity entity, strin
[Obsolete("Use async entities instead")]
public static Task DeleteSyncedMetaDataAsync(this IEntity entity, string key) =>
AltVAsync.Schedule(() => entity.DeleteSyncedMetaData(key));

[Obsolete("Use async entities instead")]
public static Task DeleteStreamSyncedMetaDataAsync(this IEntity entity, string key) =>
AltVAsync.Schedule(() => entity.DeleteStreamSyncedMetaData(key));
Expand Down
4 changes: 2 additions & 2 deletions api/AltV.Net.Async/AltAsync.Off.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ namespace AltV.Net.Async
public partial class AltAsync
{
public static void OffServer(string eventName, Function function) =>
Core.OffServer(eventName, function);
CoreImpl.OffServer(eventName, function);

public static void OffClient(string eventName, Function function) =>
Core.OffClient(eventName, function);
CoreImpl.OffClient(eventName, function);
}
}
136 changes: 68 additions & 68 deletions api/AltV.Net.Async/AltAsync.On.cs

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion api/AltV.Net.Async/AltAsync.Ped.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ namespace AltV.Net.Async
public static partial class AltAsync
{
public static Task<IPed> CreatePed(uint model, Position pos, Rotation rot, uint streamingDistance = 0) => AltVAsync.Schedule(() =>
Alt.Core.CreatePed(model, pos, rot, streamingDistance));
Alt.CoreImpl.CreatePed(model, pos, rot, streamingDistance));

public static Task<IPed> CreatePed(PedModel model, Position pos, Rotation rot, uint streamingDistance = 0) =>
CreatePed((uint)model, pos, rot, streamingDistance);
Expand Down
10 changes: 5 additions & 5 deletions api/AltV.Net.Async/AltAsync.Player.cs
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,8 @@ public static async Task<IVehicle> GetVehicleAsync(this IPlayer player)
unsafe
{
player.CheckIfEntityExists();
var vehiclePtr = Alt.Core.Library.Shared.Player_GetVehicle(player.PlayerNativePointer);
return Alt.Core.PoolManager.Vehicle.Get(vehiclePtr);
var vehiclePtr = Alt.CoreImpl.Library.Shared.Player_GetVehicle(player.PlayerNativePointer);
return Alt.CoreImpl.PoolManager.Vehicle.Get(vehiclePtr);
}
});
}
Expand Down Expand Up @@ -156,7 +156,7 @@ await AltVAsync.Schedule(() =>
unsafe
{
player.CheckIfEntityExists();
Alt.Core.Library.Server.Player_Kick(player.PlayerNativePointer, reasonPtr);
Alt.CoreImpl.Library.Server.Player_Kick(player.PlayerNativePointer, reasonPtr);
}
});
Marshal.FreeHGlobal(reasonPtr);
Expand All @@ -167,12 +167,12 @@ public static async Task EmitAsync(this IPlayer player, string eventName, params
{
var size = args.Length;
var mValues = new MValueConst[size];
Alt.Core.CreateMValues(mValues, args);
Alt.CoreImpl.CreateMValues(mValues, args);
var eventNamePtr = MemoryUtils.StringToHGlobalUtf8(eventName);
await AltVAsync.Schedule(() =>
{
player.CheckIfEntityExists();
Alt.Core.TriggerClientEvent(player, eventNamePtr, mValues);
Alt.CoreImpl.TriggerClientEvent(player, eventNamePtr, mValues);
});
Marshal.FreeHGlobal(eventNamePtr);
for (var i = 0; i < size; i++)
Expand Down
4 changes: 2 additions & 2 deletions api/AltV.Net.Async/AltAsync.RegisterEvents.cs
Original file line number Diff line number Diff line change
Expand Up @@ -727,11 +727,11 @@ public static void RegisterEvents(object target)
break;
case AsyncServerEventAttribute @event:
var serverEventName = @event.Name ?? eventMethod.Name;
Core.OnServer(serverEventName, Function.Create(Core, eventMethodDelegate));
CoreImpl.OnServer(serverEventName, Function.Create(CoreImpl, eventMethodDelegate));
break;
case AsyncClientEventAttribute @event:
var clientEventName = @event.Name ?? eventMethod.Name;
Core.OnClient(clientEventName, Function.Create(Core, eventMethodDelegate));
CoreImpl.OnClient(clientEventName, Function.Create(CoreImpl, eventMethodDelegate));
break;
}
});
Expand Down
4 changes: 2 additions & 2 deletions api/AltV.Net.Async/AltAsync.Vehicle.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ namespace AltV.Net.Async
public static partial class AltAsync
{
public static Task<IVehicle> CreateVehicle(uint model, Position pos, Rotation rot, uint streamingDistance = 0) => AltVAsync.Schedule(() =>
Alt.Core.CreateVehicle(model, pos, rot, streamingDistance));
Alt.CreateVehicle(model, pos, rot, streamingDistance));

public static Task<IVehicle> CreateVehicle(VehicleModel model, Position pos, Rotation rot, uint streamingDistance = 0) =>
CreateVehicle((uint) model, pos, rot, streamingDistance);
Expand Down Expand Up @@ -163,7 +163,7 @@ await AltVAsync.Schedule(() =>
unsafe
{
vehicle.CheckIfEntityExists();
Alt.Core.Library.Server.Vehicle_SetNumberplateText(vehicle.VehicleNativePointer, numberPlateTextPtr);
Alt.CoreImpl.Library.Server.Vehicle_SetNumberplateText(vehicle.VehicleNativePointer, numberPlateTextPtr);
}
});
Marshal.FreeHGlobal(numberPlateTextPtr);
Expand Down
2 changes: 1 addition & 1 deletion api/AltV.Net.Async/AltAsync.VirtualEntity.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ namespace AltV.Net.Async;
public partial class AltAsync
{
public static Task<IVirtualEntityGroup> CreateVirtualEntityGroup(uint streamingDistance) =>AltVAsync.Schedule(() =>
Alt.Core.CreateVirtualEntityGroup(streamingDistance));
Alt.CreateVirtualEntityGroup(streamingDistance));

public static Task<IVirtualEntity> CreateVirtualEntity(IVirtualEntityGroup group, Position position,
uint streamingDistance, Dictionary<string, object> dataDict) =>
Expand Down
Loading

0 comments on commit e1106b7

Please sign in to comment.