Closed SebasCapo closed 2 years ago
Why are u setting Pickup.Locked
to true
if you want people to be able to pick it up?
Try Pickup.InUse = false;
and Pickup.Locked = false;
(should be one of them tho)
Why are u setting
Pickup.Locked
totrue
if you want people to be able to pick it up?
That is not at all what I said though, I simply mentioned why it's important to fix this, as it's a feature that used to work pre-Parabellum and setting Pickup.Locked
to true wouldn't be achieve the same effect.
Try
Pickup.InUse = false;
andPickup.Locked = false;
(should be one of them tho)
I will try this and see if it works, though it doesn't fix the issue I'm having. Nice thing about fixing the event is that you can have behavior work differently for specific players when, for example, certain conditions are met.
Can someone re-verify if this bug still exists please?
Just tested it on 4.1.7, seems to have been fixed, honestly unsure as to why as I don't see anything on the changelog referring to this, must've been base-game? Maybe? Will check again when we rollback to 11.1.0.
Thank you for looking into it regardless. <3
Describe the bug Setting
PickingUpItemEventArgs.IsAllowed
to false makes the item unable to be grabbed after your first attempt at doing so. (This also causes weird behaviors when trying the same thing on a custom item)To Reproduce Steps to reproduce the behavior:
PickingUpItemEventArgs
, doesn't need anything else other thanev.IsAllowed
being set tofalse
.Expected behavior Be able to attempt to grab this item, this is important to allow custom behavior to happen when player interacts with it, something that is not possible when setting
Pickup.Locked
totrue
.Server logs Not necessary
EXILED Version ("latest" is not a version): 3.7.2
Results of
show plugins
command in console: Not necessaryAdditional context Funnily enough, this works differently on custom items (Mainly due to how the base
CustomItem.cs
pickup logic was made), instead of locking the item, it just lets you grab it. Ideally this would also be fixed in the same PR, but we can't expect god to do all the work. :')