I got a problem with the stack when they are moved by the core (e.g., sold by a vendor), and I think it's a bug in the 096 core.
Suppose I got a stack of an item in the backpack. This item has some CProp, which are NOT part of the "stacking.cfg" cprop.
Now, suppose I buy the same item (objtype) from a vendor. This item has not the CProp of the item in my backpack.
But here's the problem: that item is stacked with the others.
I see that canInsert() receive a request to stack (btw, the "adding_item" is valorized), and after onInsert() (here, "adding_item" is NOT valorized).
Some suggestion? Is really a bug of the 096?
Problem with stack when moved by the core
Moderator: POL Developer
-
- Distro Developer
- Posts: 2824
- Joined: Thu Feb 02, 2006 1:41 pm
- Location: San Antonio, Texas
- Contact:
Re: Problem with stack when moved by the core
Could be though I don't remember seeing it. One way to find out is to upgrade to a current core. I am pretty sure the developers aren't fixing bugs in 0.96 any longer.
Re: Problem with stack when moved by the core
Eh, I know we should upgrade. We will do it soon.
In the meantime, apart from checking manually the conditions in the canInsert() script, isn't anywhere some configuration to tell the POL how to handle correctly this situation?
In the meantime, apart from checking manually the conditions in the canInsert() script, isn't anywhere some configuration to tell the POL how to handle correctly this situation?
-
- Distro Developer
- Posts: 2824
- Joined: Thu Feb 02, 2006 1:41 pm
- Location: San Antonio, Texas
- Contact:
Re: Problem with stack when moved by the core
I don't think there's a way to tell POL 0.96 how to handle joining stacks of items with different CProps. I remember in POL 0.95 you couldn't even stack them at all if the CProps were different. You could have the OnInsert script do a check of the items being moved to a container to see if they have different CProps and then return an error if there was a difference. I don't know how you can initiate a core or script move and tell POL to create a new stack. It seems to always want to merge a stack of a particular objtype being moved to an existing stack if it exists in a container. If I'm wrong then hopefully someone will point that out.
Re: Problem with stack when moved by the core
Thank you Yukiko. I am modifying the canInsert() in the way you've suggested, checking in it if CProps between items are different.
This isn't very elegant, and a little heavy for the core, but I can't find another solution.
This isn't very elegant, and a little heavy for the core, but I can't find another solution.
-
- Distro Developer
- Posts: 2824
- Joined: Thu Feb 02, 2006 1:41 pm
- Location: San Antonio, Texas
- Contact:
Re: Problem with stack when moved by the core
You can use the uo.em function GetObjPropertyNames to get a list of the CProps attached to the two different stacks. It returns an aray of type string containing the CProp names. Then it's s simple matter of comparing the lists of names to look for a match (or mismatch).
Re: Problem with stack when moved by the core
Yes, I already know that function, anyway thankYukiko wrote:You can use the uo.em function GetObjPropertyNames to get a list of the CProps attached to the two different stacks. It returns an aray of type string containing the CProp names. Then it's s simple matter of comparing the lists of names to look for a match (or mismatch).

Re: Problem with stack when moved by the core
And when you feel like upgrading Core 098.2 has it fixed
07-20-2009 MuadDib:
Fixed: Item::Facing updates were no longer updating surrounding clients.
Fixed: Bug with stackables where graphic and crops may be different, still allowing to combine stack (of same objtype)
07-20-2009 MuadDib:
Fixed: Item::Facing updates were no longer updating surrounding clients.
Fixed: Bug with stackables where graphic and crops may be different, still allowing to combine stack (of same objtype)