Skip to content

Commit 069c996

Browse files
authored
fixed GetBaseObjectById cast error (#777)
1 parent 9c31b1d commit 069c996

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

api/AltV.Net.Shared/SharedCore.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -265,10 +265,10 @@ public ISharedBaseObject GetBaseObjectById(BaseObjectType type, uint id)
265265
unsafe
266266
{
267267
CheckIfCallIsValid();
268-
var entityPointer = Library.Shared.Core_GetBaseObjectByID(NativePointer, (byte)type, (ushort)id);
268+
var entityPointer = Library.Shared.Core_GetBaseObjectByID(NativePointer, (byte)type, id);
269269
if (entityPointer == IntPtr.Zero) return null;
270270

271-
return (ISharedEntity)PoolManager.Get(entityPointer, type);
271+
return PoolManager.Get(entityPointer, type);
272272
}
273273
}
274274

0 commit comments

Comments
 (0)