Jump to content
Sign in to follow this  
wouter2004

Corsair client - wrong fairy level

Recommended Posts

When compiling the Corsair client code, I noticed that the fairy level in the form top left corner is incorrect. (see screenshot below)

 

I noticed that the UIStartForm.ccp file, in void CStartMgr::RefreshPet the "int nLevel" is incorrectly calculated.

 

When I change the value into "int nLevel = 100" it changes the value, but the following code does not work.

 

	CItemRecord* pInfo = GetItemRecordInfo( ID );
	if(pInfo){
		int nLevel = pGrid.GetAttr(ITEMATTR_VAL_STR)
			+ pGrid.GetAttr(ITEMATTR_VAL_AGI) 
			+ pGrid.GetAttr(ITEMATTR_VAL_DEX) 
			+ pGrid.GetAttr(ITEMATTR_VAL_CON) 
			+ pGrid.GetAttr(ITEMATTR_VAL_STA);

Does anyone know how to fix this? Thanks in advance! 🙂

 

2097930144_2021-10-2222_32_22-SunnyPiratesOnline-1400x900-60FPS.png.59a2c29d514f981ecc01d7fb2f70700c.png

Share this post


Link to post
Share on other sites

The strange thing is, when I downloaded the precompiled co client files, the glitch was fixed and I didn’t change the lua files on the server. I think it’s iteminfo related perhaps the pInfo is NULL.

 

but I will look at the files you mentioned, perhaps I have an old version.

Share this post


Link to post
Share on other sites
5 hours ago, JaR said:

nothing has been changed there, maybe your fairy.lua or pet.lua file, try adding SynLook somewhere

SynLook is already there in almost all faiy.lua functions, but nothing was changed on server side.

  • When I compile the clean CO client from this forum, the fairy level is incorrect (becomes 0).
  • When I use the precompiled CO executables, the fairy level is correctly shown.

The only thing which I changed was the client executable in the system folder.

 

Update I found the fix, the sourcecode was wrong after all:

 


		//nLevel= pGrid.GetAttr(ITEMATTR_VAL_STR) + pGrid.GetAttr(ITEMATTR_VAL_AGI) + pGrid.GetAttr(ITEMATTR_VAL_DEX) + pGrid.GetAttr(ITEMATTR_VAL_CON) + pGrid.GetAttr(ITEMATTR_VAL_STA);
		int nLevel= pGrid.GetInstAttr(ITEMATTR_VAL_STR) + pGrid.GetInstAttr(ITEMATTR_VAL_AGI) + pGrid.GetInstAttr(ITEMATTR_VAL_DEX) + pGrid.GetInstAttr(ITEMATTR_VAL_CON) + pGrid.GetInstAttr(ITEMATTR_VAL_STA);

 

695951323_2021-10-2314_51_44-SunnyPiratesOnline-1400x900-60FPS.png.baef4f89b1f43a5fa6ad50e48fba8a56.png

 

Edited by wouter2004
  • Thanks 1

Share this post


Link to post
Share on other sites

Join the conversation

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

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  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.

Sign in to follow this  

×
×
  • Create New...