Jump to content

Recommended Posts

Caution: The following text was translated with DeepL from German to English. Not because I don't know English, but I am way too lazy to translate this. 😄

It's been copied from my thread from another competitor board in the german m2 scene, because I thought it could help more people.

---------------------------------------------------

Hello everyone,

Today, it was brought to my attention that there is an ancient bug in Metin2 that we have simply accepted until now.

 

Introduction:
Our mouse is on an item (Unknown Dagger), we click on it and... oops?
An Unidentified Robe has been picked up. Why on earth...?

 

Before (the item is green, which is not picked up because there is a bag with the robe behind it):

spacer.png

 

Afterwards (The item is green, which you will actually pick up, i.e., the bag behind the text, in this case the earrings):

.png

 

Description:

There are two different methods in Metin2 for finding the “item to be picked up.” Both are called “Pick,” item.Pick() and textTail.Pick().

One applies to the text tail, i.e., the pure text. The other applies to the model (i.e., when you go over the bag model).

However, only the former is marked in green, i.e., the item on whose text tail I am currently standing. In this case, the dagger.

The client source has the following order for which item it picks up:

1) Is my mouse over a model? -> Pick up

2) Is my mouse over text? -> Pick up

 

Well, who noticed?

Only case 2 is marked in green, even if case 1 would be picked up. This is due to an incorrect implementation in the client (game.py).

This causes us to click on the dagger and still pick up a robe.

 

To fix this:

With this fix, we solve this visual problem and fix the feedback for the user.

 

Client

1) Search in game.py

        if -1 != self.PickingItemIndex:
            textTail.SelectItemName(self.PickingItemIndex)

 

2) Replace with

        picked_item_vid = item.Pick()
        if -1 != picked_item_vid:
            textTail.SelectItemName(picked_item_vid)

 

Notes:

Apart from this bug, there are other things that go wrong when picking up an item with the mouse, in my opinion. However, these would all be separate releases, which I could release if there were enough requests.

The following would be examples:

1) Why can I pick up an item by clicking on a model? Isn't that counterintuitive? It would be better if you could only pick up items via the model if “Show item names” is set to “Limited.” In other words, if you can't always see the item names.

2) The distance calculation on the client is always 150 for picking up items, but on the server it is higher. The consequence is that the character has to walk up to almost every item to pick it up. Even though the server would allow picking up items from further away.

3) Even if an item is within this range of 150, the player makes a rotational movement on the spot. They “twitch.”

 

Hope this helps and have a wonderful weekend 🙂

~Lead

  • Metin2 Dev 8
  • Good 1
  • Love 1
  • Love 1
Link to comment
https://metin2.dev/topic/34031-fix-pickup-wrong-item/
Share on other sites

Don't use any images from : imgur, turkmmop, freakgamers, inforge, hizliresim... Or your content will be deleted without notice...
Use : https://metin2.download/media/add/

Please use https://metin2.download/ when uploading files smaller than 100MB, otherwise the approval will take longer due to manual upload.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.