Register for your free account! | Forgot your password?

You last visited: Today at 17:57

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

Advertisement



Add a lock on bind items

Discussion on Add a lock on bind items within the Flyff PServer Guides & Releases forum part of the Flyff Private Server category.

Reply
 
Old   #1
 
sebariio's Avatar
 
elite*gold: 0
Join Date: Aug 2010
Posts: 98
Received Thanks: 76
Add a lock on bind items

It's this :


Code:
#ifdef __GAMEGUARD
			if( pItemElem->IsBinds() )
			{
				CTexture* pTexture = CWndBase::m_textureMng.AddTexture( g_Neuz.m_pd3dDevice, MakePath( DIR_ICON, "lock.dds" ), 0xffff00ff );
				if( pTexture )
				{
					if( pItemElem->GetProp()->dwParts == PARTS_CAP || pItemElem->GetProp()->dwParts == PARTS_UPPER_BODY || pItemElem->GetProp()->dwParts == PARTS_HAND || pItemElem->GetProp()->dwParts == PARTS_FOOT 
					||	pItemElem->GetProp()->dwParts == PARTS_LWEAPON || pItemElem->GetProp()->dwParts == PARTS_RWEAPON || pItemElem->GetProp()->dwParts == PARTS_SHIELD || pItemElem->GetProp()->dwParts == PARTS_BULLET 	
					||	pItemElem->GetProp()->dwParts == PARTS_CLOAK || pItemElem->GetProp()->dwParts == PARTS_MASK || pItemElem->GetProp()->dwParts == PARTS_RIDE )
					{
						cpAdd = CPoint( 29, 2 );
						p2DRender->RenderTexture2( DrawRect.TopLeft()+cpAdd, pTexture, sx, sy, D3DCOLOR_XRGB( 255, 255, 255 ) );
					}
					else if( pItemElem->GetProp()->dwParts == PARTS_EARRING1 || pItemElem->GetProp()->dwParts == PARTS_RING1 || pItemElem->GetProp()->dwParts == PARTS_NECKLACE1 || pItemElem->GetProp()->dwParts == PARTS_RING2 || pItemElem->GetProp()->dwParts == PARTS_EARRING2
					|| pItemElem->GetProp()->dwParts == PARTS_HAT || pItemElem->GetProp()->dwParts == PARTS_CLOTH || pItemElem->GetProp()->dwParts == PARTS_GLOVE || pItemElem->GetProp()->dwParts == PARTS_BOOTS )
					{
						cpAdd = CPoint( 15, 2 );
						p2DRender->RenderTexture2( DrawRect.TopLeft()+cpAdd, pTexture, sx, sy, D3DCOLOR_XRGB( 255, 255, 255 ) );
					}
				}
			}
#endif // __GAMEGUARD
lock image :

if you use my code, pute a thank !
sebariio is offline  
Thanks
10 Users
Old 09/11/2016, 21:30   #2
 
elite*gold: 115
Join Date: Jan 2012
Posts: 1,156
Received Thanks: 894
****. your inventory is now like a shop
Rhyder` is offline  
Old 09/11/2016, 21:43   #3
 
Mike Oxmaul's Avatar
 
elite*gold: 50
Join Date: Feb 2014
Posts: 288
Received Thanks: 245
It is silly to load the Texture every **** frame
Mike Oxmaul is offline  
Thanks
3 Users
Old 09/11/2016, 22:07   #4

 
elite*gold: 28
Join Date: Feb 2010
Posts: 463
Received Thanks: 277
Well, edit ->

Code:
#ifdef __CLIENT
			if( pItemElem && pItemElem->IsBinds() )
			{
				CTexture* pTexture = CWndBase::m_textureMng.AddTexture( g_Neuz.m_pd3dDevice, MakePath( DIR_ICON, "lock.dds" ), 0xffff00ff );
				if( pItemElem->GetProp()->dwParts == PARTS_CAP || pItemElem->GetProp()->dwParts == PARTS_UPPER_BODY || pItemElem->GetProp()->dwParts == PARTS_HAND || pItemElem->GetProp()->dwParts == PARTS_FOOT 
				||	pItemElem->GetProp()->dwParts == PARTS_LWEAPON || pItemElem->GetProp()->dwParts == PARTS_RWEAPON || pItemElem->GetProp()->dwParts == PARTS_SHIELD || pItemElem->GetProp()->dwParts == PARTS_BULLET 	
				||	pItemElem->GetProp()->dwParts == PARTS_CLOAK || pItemElem->GetProp()->dwParts == PARTS_MASK || pItemElem->GetProp()->dwParts == PARTS_RIDE )
				{
					cpAdd = CPoint( 29, 2 );
					if(pTexture)
					p2DRender->RenderTexture2( DrawRect.TopLeft()+cpAdd, pTexture, sx, sy, D3DCOLOR_XRGB( 255, 255, 255 ) );
				}
				else if( pItemElem->GetProp()->dwParts == PARTS_EARRING1 || pItemElem->GetProp()->dwParts == PARTS_RING1 || pItemElem->GetProp()->dwParts == PARTS_NECKLACE1 || pItemElem->GetProp()->dwParts == PARTS_RING2 || pItemElem->GetProp()->dwParts == PARTS_EARRING2
				|| pItemElem->GetProp()->dwParts == PARTS_HAT || pItemElem->GetProp()->dwParts == PARTS_CLOTH || pItemElem->GetProp()->dwParts == PARTS_GLOVE || pItemElem->GetProp()->dwParts == PARTS_BOOTS )
				{
					cpAdd = CPoint( 15, 2 );
					if(pTexture)
					p2DRender->RenderTexture2( DrawRect.TopLeft()+cpAdd, pTexture, sx, sy, D3DCOLOR_XRGB( 255, 255, 255 ) );
				}
			}
#endif // __CLIENT
ZeroTwo02 is offline  
Old 09/11/2016, 22:13   #5
 
Mognakor's Avatar
 
elite*gold: 0
Join Date: Mar 2008
Posts: 598
Received Thanks: 465
Quote:
Originally Posted by Jupsi332 View Post
It is silly to load the Texture every **** frame
I'm not completly sure, but i think what actually happens is this:

We can see he uses textureManager so there probably is some caching involved. But because he asks the textureManager for the image and never tells the manager to free it, the manager increases the count of active copies and never reduces them, so the image doesn't leave the cache (maybe it even causes a memory leak)
Mognakor is offline  
Thanks
1 User
Old 09/11/2016, 22:17   #6
 
Mike Oxmaul's Avatar
 
elite*gold: 50
Join Date: Feb 2014
Posts: 288
Received Thanks: 245
Quote:
Originally Posted by Mognakor View Post
I'm not completly sure, but i think what actually happens is this:

We can see he uses textureManager so there probably is some caching involved. But because he asks the textureManager for the image and never tells the manager to free it, the manager increases the count of active copies and never reduces them, so the image doesn't leave the cache (maybe it even causes a memory leak)
It needs CPU to fill the pointer, search through the Cache etc

And i think you dont need such big if cases when using pItemElem->GetProp()->dwItemKind2 == IK2_CLOTHING
Mike Oxmaul is offline  
Old 09/11/2016, 22:43   #7

 
elite*gold: 28
Join Date: Feb 2010
Posts: 463
Received Thanks: 277
Well... Just us the function "CWndQueryEquip::OnDraw"
ZeroTwo02 is offline  
Old 09/11/2016, 23:45   #8
 
sebariio's Avatar
 
elite*gold: 0
Join Date: Aug 2010
Posts: 98
Received Thanks: 76
Quote:
Originally Posted by naruto66620 View Post
Well, edit ->

Code:
#ifdef __CLIENT
			if( pItemElem && pItemElem->IsBinds() )
			{
				CTexture* pTexture = CWndBase::m_textureMng.AddTexture( g_Neuz.m_pd3dDevice, MakePath( DIR_ICON, "lock.dds" ), 0xffff00ff );
				if( pItemElem->GetProp()->dwParts == PARTS_CAP || pItemElem->GetProp()->dwParts == PARTS_UPPER_BODY || pItemElem->GetProp()->dwParts == PARTS_HAND || pItemElem->GetProp()->dwParts == PARTS_FOOT 
				||	pItemElem->GetProp()->dwParts == PARTS_LWEAPON || pItemElem->GetProp()->dwParts == PARTS_RWEAPON || pItemElem->GetProp()->dwParts == PARTS_SHIELD || pItemElem->GetProp()->dwParts == PARTS_BULLET 	
				||	pItemElem->GetProp()->dwParts == PARTS_CLOAK || pItemElem->GetProp()->dwParts == PARTS_MASK || pItemElem->GetProp()->dwParts == PARTS_RIDE )
				{
					cpAdd = CPoint( 29, 2 );
					if(pTexture)
					p2DRender->RenderTexture2( DrawRect.TopLeft()+cpAdd, pTexture, sx, sy, D3DCOLOR_XRGB( 255, 255, 255 ) );
				}
				else if( pItemElem->GetProp()->dwParts == PARTS_EARRING1 || pItemElem->GetProp()->dwParts == PARTS_RING1 || pItemElem->GetProp()->dwParts == PARTS_NECKLACE1 || pItemElem->GetProp()->dwParts == PARTS_RING2 || pItemElem->GetProp()->dwParts == PARTS_EARRING2
				|| pItemElem->GetProp()->dwParts == PARTS_HAT || pItemElem->GetProp()->dwParts == PARTS_CLOTH || pItemElem->GetProp()->dwParts == PARTS_GLOVE || pItemElem->GetProp()->dwParts == PARTS_BOOTS )
				{
					cpAdd = CPoint( 15, 2 );
					if(pTexture)
					p2DRender->RenderTexture2( DrawRect.TopLeft()+cpAdd, pTexture, sx, sy, D3DCOLOR_XRGB( 255, 255, 255 ) );
				}
			}
#endif // __CLIENT
#ifdef __CLIENT, for WndField?
don't need to verify pItemElem...
if( pItemBase && pItemBase->GetTexture() )
CItemElem *pItemElem = (CItemElem *)pItemBase;
sebariio is offline  
Old 09/12/2016, 11:08   #9
 
Dark®©'s Avatar
 
elite*gold: 0
Join Date: Dec 2013
Posts: 80
Received Thanks: 4
Quote:
Originally Posted by sebariio View Post
It's this :


Code:
#ifdef __GAMEGUARD
			if( pItemElem->IsBinds() )
			{
				CTexture* pTexture = CWndBase::m_textureMng.AddTexture( g_Neuz.m_pd3dDevice, MakePath( DIR_ICON, "lock.dds" ), 0xffff00ff );
				if( pTexture )
				{
					if( pItemElem->GetProp()->dwParts == PARTS_CAP || pItemElem->GetProp()->dwParts == PARTS_UPPER_BODY || pItemElem->GetProp()->dwParts == PARTS_HAND || pItemElem->GetProp()->dwParts == PARTS_FOOT 
					||	pItemElem->GetProp()->dwParts == PARTS_LWEAPON || pItemElem->GetProp()->dwParts == PARTS_RWEAPON || pItemElem->GetProp()->dwParts == PARTS_SHIELD || pItemElem->GetProp()->dwParts == PARTS_BULLET 	
					||	pItemElem->GetProp()->dwParts == PARTS_CLOAK || pItemElem->GetProp()->dwParts == PARTS_MASK || pItemElem->GetProp()->dwParts == PARTS_RIDE )
					{
						cpAdd = CPoint( 29, 2 );
						p2DRender->RenderTexture2( DrawRect.TopLeft()+cpAdd, pTexture, sx, sy, D3DCOLOR_XRGB( 255, 255, 255 ) );
					}
					else if( pItemElem->GetProp()->dwParts == PARTS_EARRING1 || pItemElem->GetProp()->dwParts == PARTS_RING1 || pItemElem->GetProp()->dwParts == PARTS_NECKLACE1 || pItemElem->GetProp()->dwParts == PARTS_RING2 || pItemElem->GetProp()->dwParts == PARTS_EARRING2
					|| pItemElem->GetProp()->dwParts == PARTS_HAT || pItemElem->GetProp()->dwParts == PARTS_CLOTH || pItemElem->GetProp()->dwParts == PARTS_GLOVE || pItemElem->GetProp()->dwParts == PARTS_BOOTS )
					{
						cpAdd = CPoint( 15, 2 );
						p2DRender->RenderTexture2( DrawRect.TopLeft()+cpAdd, pTexture, sx, sy, D3DCOLOR_XRGB( 255, 255, 255 ) );
					}
				}
			}
#endif // __GAMEGUARD
lock image :

if you use my code, pute a thank !

where should i put that code? under what func. ..BTW thanks for this..
Dark®© is offline  
Old 09/12/2016, 11:13   #10
 
elite*gold: 0
Join Date: Mar 2008
Posts: 665
Received Thanks: 230
Quote:
Originally Posted by Dark®© View Post
where should i put that code? under what func. ..BTW thanks for this..
::OnDraw?
And load texture in constructor.

I'm only curious about what is each add-on in inventory.
alfredico is offline  
Thanks
1 User
Old 09/12/2016, 13:26   #11



 
- DK's Avatar
 
elite*gold: 7
Join Date: Sep 2012
Posts: 4,466
Received Thanks: 3,218
Little Detail Sweet release Nice Work
- DK is offline  
Thanks
1 User
Old 09/12/2016, 13:28   #12
 
elite*gold: 0
Join Date: Jul 2015
Posts: 170
Received Thanks: 10
where should i put that code? under what function ..thanks for this..
jericho2nd is offline  
Old 09/12/2016, 14:34   #13
 
elite*gold: 0
Join Date: Jul 2016
Posts: 36
Received Thanks: 17
Quote:
Originally Posted by jericho2nd View Post
where should i put that code? under what function ..thanks for this..


To lazy to read 2 posts above yours?
Lodelight is offline  
Old 09/30/2016, 23:40   #14
 
elite*gold: 0
Join Date: Sep 2016
Posts: 25
Received Thanks: 9
nice release but W.T.F #ifdef __GAMEGUARD ? i still don't understand why you defined that ._.
Pradaa is offline  
Old 10/01/2016, 17:32   #15
 
elite*gold: 0
Join Date: Mar 2008
Posts: 333
Received Thanks: 284
The define doesn't matter anyways?
Nortix is offline  
Reply


Similar Threads Similar Threads
WTS LVL 180 WI + BIND ITEMS
01/12/2013 - Cabal Online Trading - 3 Replies
As the Title says i wanted to sell my Wizard via char transfer, or full acc. Or Trade For LoL Account ! . Helm : Titanium martialhelm of Fatal +10 = 40DMG/7RATE Orbs : Topaz orb of Fatal +12 = 40 DMG Topaz orb of Fatal +10 =40 DMG Suit: Mystic suit of quat..+8 7% All Skill amp nonslot Gloves: Titanium martialgloves +10= 7% Magic skill amp/ 3% Max Critical Rate Boots: Mystic boots of quat. +10 = 7 All Skill amp +10MAXHP steal (All items are binding)
Character Bind Items to Account Bind Items!
03/31/2011 - Cabal Guides & Templates - 8 Replies
CAN ANYONE POST A GUIDE HOW TO CHANGE CHARACTER BIND ITEMS TO ACCOUNT BIND ITEMS. WANT TO TRANSFER MY ITEMS TO MY NEWLY CREATED CHARACTER WITH THE SAME ACCOUNT.
Character Bind Items to Account Bind Items!
03/24/2011 - Cabal Online - 2 Replies
Can Anyone post a guide how to change an item which is Character Bind To an Account Bind.. i need to transfer my other item which i did loot on the weak dungeouns to my newly created character in the same account!



All times are GMT +1. The time now is 17:58.


Powered by vBulletin®
Copyright ©2000 - 2025, 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 ©2025 elitepvpers All Rights Reserved.