Using deprecated hook 'OnCollectiblePickup'Fixed

Server is reporting 'ZLevelsRemastered v3.0.4' is using deprecated hook 'OnCollectiblePickup', which will stop working on Saturday, 31 December 2022. Please ask the author to update to 'OnCollectiblePickup(CollectibleEntity collectible, BasePlayer player)'

Nivex Please can you update the hook?

fixed in next update

nivex

fixed in next update

It'll still show the warning until we fix the call though yet.

ok thanks

This warning is doing absolutely nothing to stop the plugin from working and should be ignored. all my levels are going up as normal

Ok thanks, by the way our gathering levels are not working after september 1st update

MNdwpVT1OAcDNc1.jpg gertKaapo

Ok thanks, by the way our gathering levels are not working after september 1st update

There was an issue with the hook; you can either use an old version of the plugin pre this hook change or update Oxide again.

Was redirected here by the plugin dev.  Oxide is updated.  Acquire still not working.

asrYFSmDfkdu8TR.png JackReigns

Was redirected here by the plugin dev.  Oxide is updated.  Acquire still not working.

The plugin isn't updated, it's using the old signature from before last month. @nivex

Old:
void OnCollectiblePickup(Item item, BasePlayer player, CollectibleEntity entity)​

New from last month:

void OnCollectiblePickup(CollectibleEntity entity, BasePlayer player)​

API Change

void OnCollectiblePickup(Item item, BasePlayer player, CollectibleEntity entity)

->

void OnCollectiblePickup(CollectibleEntity entity, BasePlayer player)

var skillName = string.Empty; `under insert`

Item item = new Item();
foreach (var itemList in entity.itemList)
{
    Item t = ItemManager.CreateByItemID(itemList.itemid, item.amount);
    item = t;
}

           
if(item == null)
   return;

This is a source for arbitrary use before updating.

DDS9ZepWdH7MGoI.png YaMang

API Change

void OnCollectiblePickup(Item item, BasePlayer player, CollectibleEntity entity)

->

void OnCollectiblePickup(CollectibleEntity entity, BasePlayer player)

var skillName = string.Empty; `under insert`

Item item = new Item();
foreach (var itemList in entity.itemList)
{
    Item t = ItemManager.CreateByItemID(itemList.itemid, item.amount);
    item = t;
}

           
if(item == null)
   return;

This is a source for arbitrary use before updating.

You don't need to create the items as far as I know.

Xi18aasNjmDFuq6.png Wulf

You don't need to create the items as far as I know.

I'm not sure, but GetItem is null

Is there another way?

00ckTVQotyaOZDz.png YaMang

I'm not sure, but GetItem is null

Is there another way?

Yes, the item is already created later, creating it twice wouldn't be good. You can set the amount via ItemAmount.amount, so you'd have to loop all relevant code for each item in ItemAmount.itemList and handle each individually using modified methods for modifying the amount.

Nivex is working on an update though that handles this as well.

NVKwk64cprEELem.png Wulf

Yes, the item is already created later, creating it twice wouldn't be good. You can set the amount via ItemAmount.amount, so you'd have to loop all relevant code for each item in ItemAmount.itemList and handle each individually using modified methods for modifying the amount.

Nivex is working on an update though that handles this as well.

I wonder how they fixed it after the update!

i just noob :D

qKubfAMsDHUcRoT.png Wulf

You don't need to create the items as far as I know.

I applied the modified code,
The level increases, but the actual acquisition magnification is not modified.

We'll have to wait for an update...

Locked automatically