The DPSrvr.cpp code goes like this:
I want to add an item id check on this system to prevent duplication's.
Example:
If the user put's a guardian weapon on the first slot the user is not allowed to put a guard weapon again on the 2nd and 3rd slot.
I tried this code base on the model change function:
But it's not working. >.<
I've been exploring around the source code :( but no luck i hope you can help me. thanks :)
I want to add an item id check on this system to prevent duplication's.
Example:
If the user put's a guardian weapon on the first slot the user is not allowed to put a guard weapon again on the 2nd and 3rd slot.
I tried this code base on the model change function:
Code:
DWORD dwItem1, dwItem2, dwItem3;
ar >> dwItem1 >> dwItem2 >> dwItem3;
if( pUser )
{
CItemElem * pItemElem = pUser->m_Inventory.GetAtId( dwItem1 );
CItemElem * pItemElem1 = pUser->m_Inventory.GetAtId( dwItem2 );
CItemElem * pItemElem2 = pUser->m_Inventory.GetAtId( dwItem3 );
if(pItemElem->GetProp()->dwID == pItemElem1->GetProp()->dwID == pItemElem2->GetProp()->dwID )
{
pUser->AddText("You can not use the same item!");
return;
}
}
I've been exploring around the source code :( but no luck i hope you can help me. thanks :)