|
You last visited: Today at 17:57
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.
09/11/2016, 21:24
|
#1
|
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 !
|
|
|
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
|
|
|
09/11/2016, 21:43
|
#3
|
elite*gold: 50
Join Date: Feb 2014
Posts: 288
Received Thanks: 245
|
It is silly to load the Texture every **** frame
|
|
|
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
|
|
|
09/11/2016, 22:13
|
#5
|
elite*gold: 0
Join Date: Mar 2008
Posts: 598
Received Thanks: 465
|
Quote:
Originally Posted by Jupsi332
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)
|
|
|
09/11/2016, 22:17
|
#6
|
elite*gold: 50
Join Date: Feb 2014
Posts: 288
Received Thanks: 245
|
Quote:
Originally Posted by Mognakor
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
|
|
|
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"
|
|
|
09/11/2016, 23:45
|
#8
|
elite*gold: 0
Join Date: Aug 2010
Posts: 98
Received Thanks: 76
|
Quote:
Originally Posted by naruto66620
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;
|
|
|
09/12/2016, 11:08
|
#9
|
elite*gold: 0
Join Date: Dec 2013
Posts: 80
Received Thanks: 4
|
Quote:
Originally Posted by sebariio
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..
|
|
|
09/12/2016, 11:13
|
#10
|
elite*gold: 0
Join Date: Mar 2008
Posts: 665
Received Thanks: 230
|
Quote:
Originally Posted by Dark®©
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.
|
|
|
09/12/2016, 13:26
|
#11
|
elite*gold: 7
Join Date: Sep 2012
Posts: 4,466
Received Thanks: 3,218
|
Little Detail  Sweet release  Nice Work
|
|
|
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..
|
|
|
09/12/2016, 14:34
|
#13
|
elite*gold: 0
Join Date: Jul 2016
Posts: 36
Received Thanks: 17
|
Quote:
Originally Posted by jericho2nd
where should i put that code? under what function ..thanks for this..
|
To lazy to read 2 posts above yours?
|
|
|
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 ._.
|
|
|
10/01/2016, 17:32
|
#15
|
elite*gold: 0
Join Date: Mar 2008
Posts: 333
Received Thanks: 284
|
The define doesn't matter anyways?
|
|
|
 |
|
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.
|
|