[VERY RARE] Some dropped items by players get bugged

This is not a Support area! Discuss about the Server here. Non-Server related discussion goes in Off-Topic Discussion.
Forum rules
READ NOW: L2j Forums Rules of Conduct
User avatar
Pere
Posts: 400
Joined: Sat Jan 05, 2008 11:09 am
Location: Catalunya, Berguedà

[VERY RARE] Some dropped items by players get bugged

Post by Pere »

I don't post this at bugs because I bring a lot of info about it to [Discuss about], a temp fix for it and added to this I'm too lazy to search my rev numbers xD

You know that sometimes, when a player drops an item, it stays on the floor unable to be picked up again. Even more, when you try to pick it up you get "bugged" and have to target yourself to be able to walk again.

Ok, today I've began to study a case of bugged dropped item (a Triton Pole ^^) and I've found out a lot of useful information about it, just sniffing my pickup packet and using L2World.getInstance().findObject().
The object is not null, and it is instance of l2iteminstance... but!! It has itemLocation = INVENTORY, owner = 27XXXXXX and lastChange != REMOVED. Something happened during its drop, and my first suspicious is Inventory.dropItem() because here is where all these variables are set:

Code: Select all

		synchronized (item)		{			if (!_items.contains(item))				return null; 			removeItem(item);			item.setOwnerId(process, 0, actor, reference);			item.setLocation(ItemLocation.VOID);			item.setLastChange(L2ItemInstance.REMOVED); 			item.updateDatabase();			refreshWeight();		}
I don't know how that could happen, so I'm here to ask for your opinions about it.

Here my temp fix patch:

Code: Select all

### Eclipse Workspace Patch 1.0#P L2_GameServerIndex: java/com.l2jserver/gameserver/ai/L2CharacterAI.java===================================================================--- java/com.l2jserver/gameserver/ai/L2CharacterAI.java	(revision 209)+++ java/com.l2jserver/gameserver/ai/L2CharacterAI.java	(working copy)@@ -502,7 +502,23 @@ 		clientStopAutoAttack();  		if (object instanceof L2ItemInstance && ((L2ItemInstance)object).getLocation() != ItemLocation.VOID)-			return;+		{+			if (_actor.getKnownList().knowsObject(object))+			{+				//TODO: Temp fix for bugged items on the floor.+				_log.warning("A bugged item has just been picked up!" ++						" Its owner id was " + ((L2ItemInstance)object).getOwnerId() + +						" and its item id is " + ((L2ItemInstance)object).getObjectId() + ".");+				+				((L2ItemInstance)object).setOwnerId("Bugged item pick up", 0, (L2PcInstance)_actor, null);+				((L2ItemInstance)object).setLocation(ItemLocation.VOID);+				((L2ItemInstance)object).setLastChange(L2ItemInstance.REMOVED);++				((L2ItemInstance)object).updateDatabase();+			}+			else+				return;+		}  		// Set the Intention of this AbstractAI to AI_INTENTION_PICK_UP 		changeIntention(AI_INTENTION_PICK_UP, object, null); 
By the way, there's another kind of bugged items where your character doesn't get bugged when trying to pick it up, but it is caused because the item is not contained by L2World._allVisibleObjects. This bug has an easier temp fix, but I don't know how is it caused neither...


Thank you ^^
Bones tardes amics meus tots!
User avatar
JIV
L2j Veteran
L2j Veteran
Posts: 1882
Joined: Sun Jan 06, 2008 8:17 pm
Location: Slovakia
Contact:

Re: [VERY RARE] Some dropped items by players get bugged

Post by JIV »

User avatar
Pere
Posts: 400
Joined: Sat Jan 05, 2008 11:09 am
Location: Catalunya, Berguedà

Re: [VERY RARE] Some dropped items by players get bugged

Post by Pere »

These items are not stackable. By the way, now that you say... since then I don't see more stackable items on the floor o.O
Bones tardes amics meus tots!
User avatar
janiii
L2j Veteran
L2j Veteran
Posts: 4269
Joined: Wed May 28, 2008 3:15 pm
Location: Slovakia

Re: [VERY RARE] Some dropped items by players get bugged

Post by janiii »

all the magic is to find out when it happens, to have a scenario what the player exactly did, also which item it was - check the item logs, maybe they could help to understand what was happening.

- stackable/non-stackable ?
- equipped/not equipped ?
- having same item more times in inventory / paperdoll ? / dropping only a part of stackable ?
- is it for sure on player drop from inventory ? (or is it also on mob drop ? auto loot on ?)
- drop config ? item deletion config ?
- item log of the bugged item ?

JUST GET MORE INFO so that we can reproduce it
DO NOT EVEN TRY TO MESS WITH ME!
forum flOOder dancing dEVILoper
I don't give private support - PM will be ignored!
User avatar
jurchiks
Posts: 6769
Joined: Sat Sep 19, 2009 4:16 pm
Location: Eastern Europe

Re: [VERY RARE] Some dropped items by players get bugged

Post by jurchiks »

just had an idea: maybe it's caused by SaveDroppedItems function, like you drop the item, the saving runs and something goes wrong...?
If you have problems, FIRST TRY SOLVING THEM YOURSELF, and if you get errors, TRY TO ANALYZE THEM, and ONLY if you can't help it, THEN ask here.
Otherwise you will never learn anything if all you do is copy-paste!
Discussion breeds innovation.
lion
L2j Veteran
L2j Veteran
Posts: 967
Joined: Sun Mar 11, 2007 7:49 pm
Location: Ukraine

Re: [VERY RARE] Some dropped items by players get bugged

Post by lion »

jurchiks wrote:just had an idea: maybe it's caused by SaveDroppedItems function, like you drop the item, the saving runs and something goes wrong...?
i see some time this on my server and i don't use SaveDroppedItems function
User avatar
Pere
Posts: 400
Joined: Sat Jan 05, 2008 11:09 am
Location: Catalunya, Berguedà

Re: [VERY RARE] Some dropped items by players get bugged

Post by Pere »

janiii wrote:- stackable/non-stackable ?
- equipped/not equipped ?
- having same item more times in inventory / paperdoll ? / dropping only a part of stackable ?
- is it for sure on player drop from inventory ? (or is it also on mob drop ? auto loot on ?)
- drop config ? item deletion config ?
- item log of the bugged item ?
- sometimes yes sometimes not
- sometimes yes (PK drop like this time) sometimes not
- only from players drop, never from mobs (autoloot off server)
- item deletion has nothing to do here, sometimes players drop to trade and then this happens (xD)
- I don't have item logs :oops:
Bones tardes amics meus tots!
User avatar
denser
Posts: 1392
Joined: Wed May 30, 2007 9:13 pm
Location: Russia
Contact:

Re: [VERY RARE] Some dropped items by players get bugged

Post by denser »

i can reproduce...

enable tvt
//tvt_advance - spawn noc for register
//tvt_advance - despawn lack of registration
now try to walk through that place where was spawned npc...

also if you drop there something - it will stuck...


also very rare stuck items on floor in goddarg on stairs near teleporter...
Tiger, once tasted human flesh, will want to taste it again
L2J - the place where glad to see you any time!
badriniki
Posts: 22
Joined: Mon Jun 23, 2008 9:58 pm

Re: [VERY RARE] Some dropped items by players get bugged

Post by badriniki »

These items are not buged for me o.O, thanks by the way ^^
User avatar
janiii
L2j Veteran
L2j Veteran
Posts: 4269
Joined: Wed May 28, 2008 3:15 pm
Location: Slovakia

Re: [VERY RARE] Some dropped items by players get bugged

Post by janiii »

- does the player who cannot pick up the item get a system message? or just nothing happens?
- still waiting for the drop/save/delete configs if you dont have default values..
DO NOT EVEN TRY TO MESS WITH ME!
forum flOOder dancing dEVILoper
I don't give private support - PM will be ignored!
User avatar
denser
Posts: 1392
Joined: Wed May 30, 2007 9:13 pm
Location: Russia
Contact:

Re: [VERY RARE] Some dropped items by players get bugged

Post by denser »

janiii wrote:- does the player who cannot pick up the item get a system message? or just nothing happens?
- still waiting for the drop/save/delete configs if you dont have default values..
1 - nothing...if you see item from far - you run to it to some distance and stand still
2 - config in default values for drop
Tiger, once tasted human flesh, will want to taste it again
L2J - the place where glad to see you any time!
User avatar
janiii
L2j Veteran
L2j Veteran
Posts: 4269
Joined: Wed May 28, 2008 3:15 pm
Location: Slovakia

Re: [VERY RARE] Some dropped items by players get bugged

Post by janiii »

denser wrote:i can reproduce...

enable tvt
//tvt_advance - spawn noc for register
//tvt_advance - despawn lack of registration
now try to walk through that place where was spawned npc...

also if you drop there something - it will stuck...


also very rare stuck items on floor in goddarg on stairs near teleporter...
could not reproduce.. i can pickup all with a pickup shortcut .
DO NOT EVEN TRY TO MESS WITH ME!
forum flOOder dancing dEVILoper
I don't give private support - PM will be ignored!
User avatar
denser
Posts: 1392
Joined: Wed May 30, 2007 9:13 pm
Location: Russia
Contact:

Re: [VERY RARE] Some dropped items by players get bugged

Post by denser »

janiii, after npc despawn - you can walk through that place where stay npc? i have invis obstacle, when i run there player jumps..
Tiger, once tasted human flesh, will want to taste it again
L2J - the place where glad to see you any time!
User avatar
janiii
L2j Veteran
L2j Veteran
Posts: 4269
Joined: Wed May 28, 2008 3:15 pm
Location: Slovakia

Re: [VERY RARE] Some dropped items by players get bugged

Post by janiii »

denser wrote:janiii, after npc despawn - you can walk through that place where stay npc? i have invis obstacle, when i run there player jumps..
yes, there is some untargetable space, but i can still pick up items using the pickup command/shortcut.
DO NOT EVEN TRY TO MESS WITH ME!
forum flOOder dancing dEVILoper
I don't give private support - PM will be ignored!
User avatar
Pere
Posts: 400
Joined: Sat Jan 05, 2008 11:09 am
Location: Catalunya, Berguedà

Re: [VERY RARE] Some dropped items by players get bugged

Post by Pere »

You are talking about a client glitch, but I am talking about a server one:

The item is perfectly shown in the server, but when someone activates the Action packet something goes wrong, and this is because the L2ItemInstance has Location = INVENTORY, not VOID (nothing happens and your char can't move anymore without targetting itself).

In other cases it simply isn't in the L2World _visibleObjects list (but yes on the region's one) and the onAction returns an ACTIONFAILED packet (nothing happens).
Bones tardes amics meus tots!
Post Reply