EXILED
EXILED copied to clipboard
SetAmmo&CategoryLimit
Maybe add XML for AddOperation?
Maybe add XML for AddOperation?
i just haven't got the time for it rn
Fix french comments
No worries not finished pr
@louis1706 is this ready for review ?
No idea
Fixed some stuff but
System.Reflection.TargetException: Object does not match target type.
at System.Reflection.RuntimeMethodInfo.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00024] in <75633565436c42f0a6426b33f0132ade>:0
at System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) [0x00000] in <75633565436c42f0a6426b33f0132ade>:0
at Exiled.API.Extensions.MirrorExtensions.AddOperation[T] (Mirror.SyncList`1[T] synclist, Mirror.SyncList`1+Operation[T] op, System.Int32 itemIndex, T oldItem, T newItem, System.Boolean checkAccess) [0x00005] in <08fb87aec36d49e9bf960e3df1b821f7>:0
at Exiled.API.Features.Player.SetAmmoLimit (Exiled.API.Enums.AmmoType ammotype, System.UInt16 value) [0x0005f] in <08fb87aec36d49e9bf960e3df1b821f7>:0
Spent 6 hours on this, cannot get it working If someone else is able to do so go ahead, but I am unable
For anyone fixing it
SyncList<T>[index] = newItem
might be useful
note: no error anymore but we need to send the synclist to only one player and not update to the server
I just thought: if we set a limit for one ammo/category, a list for all other will be created and it means armor will not work anymore for every ammo/category?
breaking change : GetAmmoLimit and GetCategoryLimit both take the bool parameter "ignoreArmor" fix : Categories that used to return -1 when getting their limit now return 1 (the real limit)