Trade Bug

Submit your code requests, and if you are good at coding come help others with their requests.
Post Reply
Warlord
Regular
Posts: 34
Joined: Sun Dec 05, 2004 11:08 am

Post by Warlord »

So I found out that I have a problem with Trade also. If you change item..and one of you puts yes and the other one no..then it is cancelled.

so..if you put exchange again..then you put yes and the other ppl put alos yes, so the trade is completed..


I just got it with my hero robe :D

who could fix it, please help me!


Thanks :D

I don't use 3.02 files. Older ones.
Audioslave
noob
Posts: 24
Joined: Sat Dec 25, 2004 2:40 pm

Post by Audioslave »

In game.cpp look for this function

Code: Select all

void CGame::_ClearExchangeStatus(int iClientH)
After the last

Code: Select all

}
Add this:

Code: Select all

m_pClientList[iClientH]->m_bIsExchangeConfirm = FALSE;
Warlord
Regular
Posts: 34
Joined: Sun Dec 05, 2004 11:08 am

Post by Warlord »

I have this code. And I have already that code in the source..so What should i do?

Code: Select all

void CGame::_ClearExchangeStatus(int iToH)
{
	if ((iToH <= 0) || (iToH >= DEF_MAXCLIENTS)) return;
	if (m_pClientList[iToH] == NULL) return;

	if (m_pClientList[iToH]->m_cExchangeName != FALSE) 
  SendNotifyMsg(NULL, iToH, DEF_NOTIFY_CANCELEXCHANGEITEM, NULL, NULL, NULL, NULL, NULL, NULL,
      NULL, NULL, NULL, NULL, NULL);	

	// m_pClientList[iToH]->m_cExchangeName    = FALSE;
	m_pClientList[iToH]->m_dwInitCCTime     = FALSE;
	m_pClientList[iToH]->m_iAlterItemDropIndex = 0;
	//m_pClientList[iToH]->m_cExchangeItemIndex = -1;
	m_pClientList[iToH]->m_iExchangeH = NULL;

	m_pClientList[iToH]->m_bIsExchangeMode = FALSE;

	ZeroMemory(m_pClientList[iToH]->m_cExchangeName, sizeof(m_pClientList[iToH]->m_cExchangeName));

}
So is there any difference if i put m_bIsExchangeMode = FALSE; or m_bIsExchangeConfirm = FALSE;
Dshaked
&lt;3 bd long time
Posts: 747
Joined: Tue Oct 11, 2005 6:40 pm

Post by Dshaked »

void CGame::_ClearExchangeStatus(int iToH)
{
if ((iToH <= 0) || (iToH >= DEF_MAXCLIENTS)) return;
if (m_pClientList[iToH] == NULL) return;

if (m_pClientList[iToH]->m_cExchangeName != FALSE)
  SendNotifyMsg(NULL, iToH, DEF_NOTIFY_CANCELEXCHANGEITEM, NULL, NULL, NULL, NULL, NULL, NULL,
      NULL, NULL, NULL, NULL, NULL);

// m_pClientList[iToH]->m_cExchangeName    = FALSE;
m_pClientList[iToH]->m_dwInitCCTime    = FALSE;
m_pClientList[iToH]->m_iAlterItemDropIndex = 0;
//m_pClientList[iToH]->m_cExchangeItemIndex = -1;
m_pClientList[iToH]->m_iExchangeH = NULL;
m_pClientList[iToH]->m_bIsExchangeConfirm = FALSE; //lisätty by hiski 29.03.05
m_pClientList[iToH]->m_bIsExchangeMode = FALSE;

ZeroMemory(m_pClientList[iToH]->m_cExchangeName, sizeof(m_pClientList[iToH]->m_cExchangeName));

}
Old Helbreath Nemesis Player<br><img src='http://img232.imageshack.us/img232/9784/dshakedqc5.jpg' border='0' alt='user posted image' /><br><img src='http://img232.imageshack.us/img232/6475 ... barqj0.jpg' border='0' alt='user posted image' /><br><a href='index.php?showtopic=7107&hl=' target='_blank'>MainServer Hexing Tutorial</a><br><a href='index.php?showtopic=7663&hl=x-mas' target='_blank'>My Files</a>
juggalo2
Spamtastic
Posts: 1144
Joined: Sun Jul 17, 2005 5:28 pm

Post by juggalo2 »

Code: Select all

void CGame::_ClearExchangeStatus(int iToH)
{
	if ((iToH <= 0) || (iToH >= DEF_MAXCLIENTS)) return;
	if (m_pClientList[iToH] == NULL) return;

	if (m_pClientList[iToH]->m_cExchangeName != FALSE) 
  SendNotifyMsg(NULL, iToH, DEF_NOTIFY_CANCELEXCHANGEITEM, NULL, NULL, NULL, NULL, NULL, NULL,
      NULL, NULL, NULL, NULL, NULL);	

	// m_pClientList[iToH]->m_cExchangeName    = FALSE;
	m_pClientList[iToH]->m_dwInitCCTime     = FALSE;
	m_pClientList[iToH]->m_iAlterItemDropIndex = 0;
	//m_pClientList[iToH]->m_cExchangeItemIndex = -1;
	m_pClientList[iToH]->m_iExchangeH = NULL;

	m_pClientList[iToH]->m_bIsExchangeMode = FALSE;
	m_pClientList[iToH]->m_bIsExchangeConfirm = FALSE;

	ZeroMemory(m_pClientList[iToH]->m_cExchangeName, sizeof(m_pClientList[iToH]->m_cExchangeName));

}
<img src='http://lifeplaysu420.com/unknow/nightsign.png' border='0' alt='user posted image' /><br>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br>Wanna make money for surfing the net sing up at <br><a href='http://www.cashfiesta.com/php/join.php? ... yprivitera' target='_blank'>cash fiesta</a><br>its all free hey why ntot make money while fucking around on the computer<br><br><br>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Warlord
Regular
Posts: 34
Joined: Sun Dec 05, 2004 11:08 am

Post by Warlord »

But it isn't working right... <_<

Okay, I'll Try :D
Post Reply