Inventory Icon Problem

01/09/2015 23:48 kamoteshake#1
Hi there,

Im currently working on the baruna element upgrade. I got a little bit of a problem but not that major. so usually when you put an item from the inventory to another window to use it. the icon in the inventory will have a big check on it. but when I did the baruna element upgrade. only the weapon have a check on it.

[Only registered and activated users can see links. Click Here To Register...]

I checked the other window I made. it's working fine on the baruna awake cancel.

[Only registered and activated users can see links. Click Here To Register...]


what do you guys think the problem is? I double checked everything.

Thanks.
01/10/2015 12:47 yvansinues#2
maybe its not coded?
01/10/2015 12:52 Wharsh#3
Try to have 1 stacks of each item then try to put it. then check if there is check in it.
01/11/2015 02:42 kamoteshake#4
Thanks for the replies.

Quote:
Originally Posted by Wharsh View Post
Try to have 1 stacks of each item then try to put it. then check if there is check in it.
so I tested creating 99 of each. well actually 2 stacks. and still no check after putting the items in. do you have any ideas what's causing the problem?
01/11/2015 05:57 xTwiLightx#5
I think that the other Items (Elemental Orb and other stuff in that window) are not recognized in that if-struct:

Code:
if(
( pItemElem->m_nItemNum == pItemElem->GetExtra() || !m_useDieFlag ) 
&& ( IsUsingItem(pItemElem) || pItemElem->m_bRepair || ( nParent == APP_INVENTORY && g_pPlayer->GetPetId() == pItemElem->m_dwObjId ) || pPlayer->GetTicket() == pItemElem )
)
Only if one of these conditions exist, the icon will be rendered with lower alpha and that check:

Code:
					{
						RanderIcon( p2DRender, pItemElem, x * 35, y * 35, nParent, 60 );
#if __VER >= 17
						CheckTexture = m_textureMng.AddTexture( D3DDEVICE, MakePath( DIR_THEME, "WndItemCheck.bmp" ),0xffff00ff );
					    CheckTexture->Render(p2DRender,CPoint(x * 35, (y * 35) + 5),255);
#endif//__VER >= 17
					}
I guess you should add one condition that check if your Baruna Element Upgrade window is opened.
01/11/2015 07:41 kamoteshake#6
so I checked the other stuff.. if the item has only 1 quantitiy. it will add the check. if it's greater than 1 then it wont have the check.

Quote:
if(
( pItemElem->m_nItemNum == pItemElem->GetExtra() || !m_useDieFlag )
&& ( IsUsingItem(pItemElem) || pItemElem->m_bRepair || ( nParent == APP_INVENTORY && g_pPlayer->GetPetId() == pItemElem->m_dwObjId ) || pPlayer->GetTicket() == pItemElem )
)
I removed the red part above. and now even the items with 1 quantity doesnt have any check when I use them.

so I did it like this:
Quote:
if(
( ( pItemElem->m_nItemNum != pItemElem->GetExtra() || pItemElem->m_nItemNum == pItemElem->GetExtra() )|| !m_useDieFlag )
&& ( IsUsingItem(pItemElem) || pItemElem->m_bRepair || ( nParent == APP_INVENTORY && g_pPlayer->GetPetId() == pItemElem->m_dwObjId ) || pPlayer->GetTicket() == pItemElem )
)
which works fine. but I have a feeling that this is not the right or most efficient way of fixing this. what do you guys think?
01/11/2015 15:13 xTwiLightx#7
Quote:
Originally Posted by kamoteshake View Post
so I checked the other stuff.. if the item has only 1 quantitiy. it will add the check. if it's greater than 1 then it wont have the check.



I removed the red part above. and now even the items with 1 quantity doesnt have any check when I use them.

so I did it like this:


which works fine. but I have a feeling that this is not the right or most efficient way of fixing this. what do you guys think?
I guess it won't affect your performance that much.
01/11/2015 16:43 Avalion#8
Test the old school shining ori converter and upgrading to see if you can apply more suns / moons after applying 1 to said converter.