• Unfortunately, we have experienced significant hard drive damage that requires urgent maintenance and rebuilding. The forum will be a state of read only until we install our new drives and rebuild all the configurations needed. Please follow our Facebook page for updates, we will be back up shortly! (The forum could go offline at any given time due to the nature of the failed drives whilst awaiting the upgrades.) When you see an Incapsula error, you know we are in the process of migration.

Shopping cart Red chip fix!

Game Developer
Loyal Member
Joined
Jun 19, 2009
Messages
1,491
Reaction score
460
Hi,
This is just a quick fix for the red chip buy bug.
When you doubble click the item that cost red chips it will buy it instead of adding it too the cart.
It was a quick fix(Hot fix) There might be some unknown bugs! (Haven't any discovered yet.)

In WndShop.cpp Find
PHP:
void CWndShop::AddCartItem( DWORD dwNum, CItemElem* pItemElem, CHAR cTab )
{
	if( pItemElem )
	{
and put this under it.

PHP:
#ifdef __QUGET_SHOP_CART_RED_CHIP_BUG_FIX
		CWndShop* pwndShop = (CWndShop*)g_WndMng.GetWndBase(APP_SHOP_);
		if(pwndShop)
		{
			LPCHARACTER lpCharacter = pwndShop->m_pMover->GetCharacter();
			if(lpCharacter->m_nVenderType == 1)
			{
				if(g_pPlayer->m_Inventory.GetAtItemNum( II_CHP_RED ) - (int)pItemElem->GetChipCost() >= 0) //±¸¸ÅÇÏ·Á´Â Ç°¸ñÀÇ Ä¨°³¼ö ÀÌ»óÀ» °¡Áö°í ÀÖ´ÂÁö È®ÀÎ.
				{

					g_DPlay.SendBuyChipItem(cTab,(BYTE)(pItemElem->m_dwObjId),dwNum,pItemElem->m_dwItemId);
					return;
				}
				else
				{
					g_WndMng.OpenMessageBox( _T( prj.GetText(TID_GAME_CANNT_BY_REDCHIP) ) );
					return;
				}
			}
		}
#endif

And define this __QUGET_SHOP_CART_RED_CHIP_BUG_FIX in versioncommon.h(in your neuz)

Have fun ^^
 
Experienced Elementalist
Joined
Apr 1, 2010
Messages
267
Reaction score
136
yes same ...

i have add new packet after , but i have same ...

I have found this bug in lot of times....
 
Experienced Elementalist
Joined
Nov 5, 2011
Messages
242
Reaction score
75
There is an other bug.. if you have 0 penya and buy something with redchips, it tells taht you don't have penya ...
 
Experienced Elementalist
Joined
Nov 5, 2011
Messages
242
Reaction score
75
I'm sure it's somewhere in
PHP:
void CWndConfirmBuy::OnOK()

EDIT:
Maybe something like this should get it fixed?

PHP:
		#ifdef __SHOPPING_CART
		else if ( (int)pItemElem->GetChipCost() >= 0 > g_pPlayer->m_Inventory.GetAtItemNum( II_CHP_RED ) )
		  continue;
		#endif
 
Last edited:
Elite Diviner
Joined
Mar 12, 2009
Messages
487
Reaction score
67
Look for the TID_ and u will find the right place for the problem in the source :)

Edit:

I would make it a for statement. Like int i = g_pPlayer->m_Inventory.GetAtItemNum( II_CHP_RED );
and so on.
 
Last edited:
Back
Top