Jump to content
  • 0

RefineUI showing incorrect costs


ckx_

Question


  • Group:  Members
  • Topic Count:  6
  • Topics Per Day:  0.01
  • Content Count:  12
  • Reputation:   1
  • Joined:  06/29/22
  • Last Seen:  

I have custom refine costs setup in refine_db.yml. When I use the RefineUI, it shows me the correct cost for refining on the initial screen, the one where you select a weapon. Then, after each refine, it shows the previous levels cost under the option to continue refining. Is this normal?

To illustrate what I mean, I've made a short video:

http://tanasinn.one/pix/Screencast_20240226_115239-2.webm

After the first refine, it shows a cost of 1000, but really +1->+2 is 2000.

This pattern continues throughout the refine process, e.g. if level +2->+3 is 3,000z, it will show the previous level's cost of 2,000z. Then it'll update to 3,000z for +3->+4, even if that cost is higher still. The Refine UI always shows the next level's refine cost as the previous level's.

Note that if you press "Back" and go back to the initial refine window where you select materials, the cost is displayed correctly.

Here's an example of my first two refine levels for level 1 weapons in the yaml DB:

  - Group: Weapon
    Levels:
      - Level: 1
        RefineLevels:
          - Level: 1
            Bonus: 200
            Chances:
              - Type: Normal
                Rate: 10000
                Price: 1000
                Material: RGX_Steel
          - Level: 2
            Bonus: 400
            Chances:
              - Type: Normal
                Rate: 10000
                Price: 2000
                Material: RGX_Steel

I think the cost is sent to the client in clif.cpp's clif_refineui_info function. Near the bottom of that function is a for loop that setups the packet, with the following block of interest:

			if( cost != nullptr ){
				p->req[count].itemId = client_nameid( cost->nameid );
				p->req[count].chance = (uint8)( cost->chance / 100 );
				p->req[count].zeny = cost->zeny;
				p->packetLength += sizeof( struct PACKET_ZC_REFINING_MATERIAL_LIST_SUB );
				count++;
			}

clif_refineui_info is called after every press of the "Refine" button, so I would have expected this to be where the client receives the price for the next refine. Debugging shows that the correct cost is being sent to the client on each Refine press. So now I'm thinking the issue must be client side.

Anyone got any insight into this?

Edited by ckx_
formatting
Link to comment
Share on other sites

0 answers to this question

Recommended Posts

There have been no answers to this question yet

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...