Register for your free account! | Forgot your password?

Go Back   elitepvpers > MMORPGs > Flyff > Flyff Private Server
You last visited: Today at 21:45

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



ITM_SEND_TBL items are untradable.

Discussion on ITM_SEND_TBL items are untradable. within the Flyff Private Server forum part of the Flyff category.

Reply
 
Old   #1
 
FlyffDeveloper's Avatar
 
elite*gold: 0
Join Date: Aug 2017
Posts: 187
Received Thanks: 117
ITM_SEND_TBL items are untradable.

Hey everyone,


I'm using the itm_send_tbl to send item from my webshop to the players. However once I moved over from php to C# it seems like items from the webshop are untradeable.

I'm using the following snippet in my webshop code to create an entry to the ITM_SEND_TBL,

ITEM_SEND_TBL sendItem = new ITEM_SEND_TBL()
{
m_idPlayer = selectedCharacter,
serverindex = "01",
Item_Name = shopItem.itemid.ToString(),
Item_count = shopItem.count.Value,
idSender = "0000000",
ReceiveDt = DateTime.UtcNow,
SendComment = "Bought from Webshop"
};

Any ideas? I haven't done anything in the code related to sending items or trading items and this worked without any problems in the php version of the website with the same method of sending items.
FlyffDeveloper is offline  
Old 06/25/2018, 12:25   #2
 
xTwiLightx's Avatar
 
elite*gold: 0
Join Date: Jan 2009
Posts: 1,739
Received Thanks: 1,669
Your provided code does not help at all, since it only shows us how your instance is being constructed - better provide the classes' code. Is there any log written (error.txt, error.log, CQuery-Logfile)?

My only guess is that m_bCharged is set to 1 when a data set is being inserted into the table. Nonetheless that should not make the trading impossible iirc.
xTwiLightx is offline  
Old 06/25/2018, 12:34   #3
 
FlyffDeveloper's Avatar
 
elite*gold: 0
Join Date: Aug 2017
Posts: 187
Received Thanks: 117
Quote:
Originally Posted by xTwiLightx View Post
Your provided code does not help at all, since it only shows us how your instance is being constructed - better provide the classes' code. Is there any log written (error.txt, error.log, CQuery-Logfile)?

My only guess is that m_bCharged is set to 1 when a data set is being inserted into the table. Nonetheless that should not make the trading impossible iirc.
Im using an edmx to auto-generate the C# classes from the flyff-database tables. So I'm not sure what other additional information I can give.

I know that when it is inserted m_bCharged is set to 0 and I experimented with different values. Since I also thought it has to be something with that.

Certain items like fashion from a box also turns into 'Event Reward' items.
Which makes it seem like somewhere in the code or through the system it is set to be binded.
FlyffDeveloper is offline  
Old 06/25/2018, 12:47   #4
 
xTwiLightx's Avatar
 
elite*gold: 0
Join Date: Jan 2009
Posts: 1,739
Received Thanks: 1,669
That is strange, because there is no flag set when using ITEM_SEND_TBL.

Code:
BOOL CDbManager::SendItemtoCharacter( int nSlot, CMover* pMover, CQuery *qry, CQuery *qry1, CQuery *qrylog, LPDB_OVERLAPPED_PLUS lpDbOverlappedPlus )
and
Code:
BOOL CDbManager::GetSendItem( CQuery *pQry, __SendItemContents * pSendItemContents )
are your methods for research.

m_bCharged is set to "TRUE" in SendItemtoCharacter initially, but should be overwritten in GetSendItem:
Code:
pItemElem->m_bCharged				= pQry->GetInt( "m_bCharged" ) <= 0 ? TRUE : FALSE;
Also, m_bCharged is not being used as a check for trading.
xTwiLightx is offline  
Thanks
1 User
Old 06/25/2018, 13:39   #5
 
FlyffDeveloper's Avatar
 
elite*gold: 0
Join Date: Aug 2017
Posts: 187
Received Thanks: 117
Alright I'll check those out.

Its weird if charged is unrelated to being tradeable or not. I know that it triggers the "TID_GAME_CANNOTTRADE_ITEM" message which is only being used in TradeSetItem2.

The only check in that method that I can imagine might be the culprit woud be the "IsBinds" check.

So what I tried was to disable a few of the checks temporarily to see which ones are causing the item to be untradeable.
Code:
BOOL CItemElem::IsBinds( void )
{
	ItemProp* pProperty = GetProp();
	if( m_dwKeepTime && pProperty->dwItemKind2 != IK2_WARP )
	{
		if(m_dwKeepTime > 0)
			return TRUE;
	}
		
#ifdef __MODEL_CHANGE
	if(m_dwnewID != NULL)
		return TRUE;
#endif
	
#if __VER >= 11 // __SYS_IDENTIFY
	if( g_xRandomOptionProperty->GetRandomOptionSize( GetRandomOptItemId() ) > 0
		&& ( g_xRandomOptionProperty->GetRandomOptionKind( this ) == CRandomOptionProperty::eBlessing || g_xRandomOptionProperty->GetRandomOptionKind( this ) == CRandomOptionProperty::eEatPet ) )
		return TRUE;
	if( GetLevelDown() < 0 )
		return TRUE;
#endif	// __SYS_IDENTIFY

	return FALSE;

        //Disable these two
	if( IsFlag( CItemElem::binds ) )
		//return TRUE;	
		
	if( (pProperty->dwFlag & IP_FLAG_BINDS) == IP_FLAG_BINDS )
		//return TRUE;
}
However even with these two checks at the bottom, items are still untradeable (although some items like fashion is tradeable, but any other items like scrolls are not).

I'll keep digging
FlyffDeveloper is offline  
Old 06/27/2018, 11:48   #6
 
elite*gold: 0
Join Date: Jan 2017
Posts: 301
Received Thanks: 28
Quote:
Originally Posted by FlyffDeveloper View Post
Alright I'll check those out.

Its weird if charged is unrelated to being tradeable or not. I know that it triggers the "TID_GAME_CANNOTTRADE_ITEM" message which is only being used in TradeSetItem2.

The only check in that method that I can imagine might be the culprit woud be the "IsBinds" check.

So what I tried was to disable a few of the checks temporarily to see which ones are causing the item to be untradeable.
Code:
BOOL CItemElem::IsBinds( void )
{
	ItemProp* pProperty = GetProp();
	if( m_dwKeepTime && pProperty->dwItemKind2 != IK2_WARP )
	{
		if(m_dwKeepTime > 0)
			return TRUE;
	}
		
#ifdef __MODEL_CHANGE
	if(m_dwnewID != NULL)
		return TRUE;
#endif
	
#if __VER >= 11 // __SYS_IDENTIFY
	if( g_xRandomOptionProperty->GetRandomOptionSize( GetRandomOptItemId() ) > 0
		&& ( g_xRandomOptionProperty->GetRandomOptionKind( this ) == CRandomOptionProperty::eBlessing || g_xRandomOptionProperty->GetRandomOptionKind( this ) == CRandomOptionProperty::eEatPet ) )
		return TRUE;
	if( GetLevelDown() < 0 )
		return TRUE;
#endif	// __SYS_IDENTIFY

	return FALSE;

        //Disable these two
	if( IsFlag( CItemElem::binds ) )
		//return TRUE;	
		
	if( (pProperty->dwFlag & IP_FLAG_BINDS) == IP_FLAG_BINDS )
		//return TRUE;
}
However even with these two checks at the bottom, items are still untradeable (although some items like fashion is tradeable, but any other items like scrolls are not).

I'll keep digging
Maybe try compare the fashion and scrolls entries in propitem/spec. Maybe something is different
KingKeesie is offline  
Old 06/27/2018, 15:02   #7
 
FlyffDeveloper's Avatar
 
elite*gold: 0
Join Date: Aug 2017
Posts: 187
Received Thanks: 117
I doubt its anything in that. Because if I spawn the same item with /ci it is tradeable. So its def something being set in the code when its being sent over or something. I did some more testing yesterday and might have figured something out.

But I need to do some more testing to confirm.
FlyffDeveloper is offline  
Old 06/27/2018, 18:32   #8
 
Blouflash's Avatar
 
elite*gold: 0
Join Date: Jan 2015
Posts: 183
Received Thanks: 699
Quote:
Originally Posted by FlyffDeveloper View Post
I doubt its anything in that. Because if I spawn the same item with /ci it is tradeable. So its def something being set in the code when its being sent over or something. I did some more testing yesterday and might have figured something out.

But I need to do some more testing to confirm.
Visual Studio provides you with a debugger. Use it!

You can start your debugging journey here: CDPSrvr::OnTradePut
Blouflash is offline  
Old 06/27/2018, 19:11   #9
 
FlyffDeveloper's Avatar
 
elite*gold: 0
Join Date: Aug 2017
Posts: 187
Received Thanks: 117
What i've figured out is that the following check causes the majority of the items to be untradeable

"if( IsFlag( CItemElem::binds ) )"

so now I'm just looking at why the SendItem methods could be making it so that this flag is set to be untradeable.
FlyffDeveloper is offline  
Old 07/15/2018, 08:25   #10
 
FlyffDeveloper's Avatar
 
elite*gold: 0
Join Date: Aug 2017
Posts: 187
Received Thanks: 117
This issue can be closed as I fixed it.

There was some check in the IsBinds() code regarding the Model_Change feature that wasn't coded correctly and caused the issue.


#closerequest
FlyffDeveloper is offline  
Reply


Similar Threads Similar Threads
Making Untradable items Tradable
04/29/2014 - RFO Hacks, Bots, Cheats, Exploits & Guides - 182 Replies
deleted
[Release] Trade untradable items for client version 1.9.0.1/1.9.0.2/1.9.0.3
12/01/2010 - Aion Hacks, Bots, Cheats & Exploits - 69 Replies
Yap, tested and working. Screenshot: Unpatched - http://i21.servimg.com/u/f21/12/01/15/44/patch-11 .png Patched - http://i21.servimg.com/u/f21/12/01/15/44/patch-10 .png Download: Click Here
ANYONE HERE GO A MLE UNTRADABLE ITEMS - TRADABLE?
02/25/2010 - RF Online - 0 Replies
anyone here got a hack which you can trade untradable items using MLE?
TRADE MY TUT:MAKING-UNTRADABLE-TRADABLE ITEMS USING CE METHOD
11/25/2009 - RF Online - 17 Replies
NO LEECHERS NO BEGGING ALLOWED



All times are GMT +2. The time now is 21:45.


Powered by vBulletin®
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2024 elitepvpers All Rights Reserved.