Skip to content

Commit 924eef5

Browse files
v8.12.0-rc.3 (#62)
* Fix Npc (#58) * Fix breaking change (#61)
1 parent c82bdc2 commit 924eef5

File tree

2 files changed

+13
-8
lines changed

2 files changed

+13
-8
lines changed

EXILED/Exiled.API/Features/Npc.cs

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,26 +5,22 @@
55
// </copyright>
66
// -----------------------------------------------------------------------
77

8-
#nullable enable
98
namespace Exiled.API.Features
109
{
10+
#nullable enable
1111
using System;
1212
using System.Collections.Generic;
1313
using System.Linq;
1414

1515
using CommandSystem;
16-
1716
using Exiled.API.Enums;
1817
using Exiled.API.Extensions;
1918
using Exiled.API.Features.Components;
19+
using Exiled.API.Features.Roles;
2020
using Footprinting;
21-
2221
using MEC;
23-
2422
using Mirror;
25-
2623
using PlayerRoles;
27-
2824
using UnityEngine;
2925

3026
using Object = UnityEngine.Object;
@@ -60,8 +56,8 @@ public override Vector3 Position
6056
set
6157
{
6258
base.Position = value;
63-
if (Role is Roles.FpcRole fpcRole)
64-
fpcRole.RelativePosition = new(value);
59+
if (Role is FpcRole fpcRole)
60+
fpcRole.ClientRelativePosition = new(value);
6561
}
6662
}
6763

EXILED/Exiled.API/Features/Player.cs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2478,6 +2478,15 @@ public void ResetAmmoLimit(AmmoType ammoType)
24782478
/// <returns>If the player has a custom limit for the specific <see cref="AmmoType"/>.</returns>
24792479
public bool HasCustomAmmoLimit(AmmoType ammoType) => CustomAmmoLimits.ContainsKey(ammoType);
24802480

2481+
/// <summary>
2482+
/// Gets the maximum amount of an <see cref="ItemCategory"/> the player can hold, based on the armor the player is wearing, as well as server configuration.
2483+
/// </summary>
2484+
/// <param name="category">The <see cref="ItemCategory"/> to check.</param>
2485+
/// <returns>The maximum amount of items in the category that the player can hold.</returns>
2486+
[Obsolete("Use Player::GetCategoryLimit(ItemCategory, bool) instead.")]
2487+
public int GetCategoryLimit(ItemCategory category) =>
2488+
InventorySystem.Configs.InventoryLimits.GetCategoryLimit(category, referenceHub);
2489+
24812490
/// <summary>
24822491
/// Gets the maximum amount of an <see cref="ItemCategory"/> the player can hold, based on the armor the player is wearing, as well as server configuration.
24832492
/// </summary>

0 commit comments

Comments
 (0)