It depends on what you are willing to change.
In fact if this doesnt work then you can make it your own.
Since you need to check if dwItemKind3 matches with an other dwItemKind3
so IK3_SWORD->IK3_SWORD = ok
IK3_SWORD->IK3_SHIELD = false
Btw for my source i am using this
Open WndField.cpp
Search for
BOOL CWndModelChange::OnChildNotify( UINT message, UINT nID, LRESULT* pLResult )
Replace that function with this function if it isnt the same.
Code:
BOOL CWndModelChange::OnChildNotify( UINT message, UINT nID, LRESULT* pLResult )
{
switch (nID)
{
case WIDC_BUTTON1: // Send LookChange
{
if(pItemElem[0] && pItemElem[1])
{
//Check if the items are still the same itemkind//
if(pItemElem[0]->GetProp()->dwItemKind3 != pItemElem[1]->GetProp()->dwItemKind3)
{
g_WndMng.PutString("The items must be of the same type",0,0xff0000);
return FALSE;
}
else if(pItemElem[0]->GetProp()->dwHanded != pItemElem[1]->GetProp()->dwHanded)
{
g_WndMng.PutString("You cant convert an 1 handed weapon to an 2 handed weapon!");
return FALSE;
}
else
{
g_DPlay.SendModelChange(pItemElem[0]->m_dwObjId, pItemElem[1]->m_dwObjId);
for( int i = 0; i < 3; i++ )
{
if( pItemElem[i] != NULL )
{
if( !g_pPlayer->m_vtInfo.IsTrading( pItemElem[i] ))
pItemElem[i]->SetExtra(0);
}
}
Destroy();
}
}
else
{
g_WndMng.PutString("You need to put 2 Items in the Slots", 0, 0xff0000);
}
break;
}
case WIDC_BUTTON2: // Close
{
for( int i = 0; i < 3; i++ )
{
if( pItemElem[i] != NULL )
{
if( !g_pPlayer->m_vtInfo.IsTrading( pItemElem[i] ))
pItemElem[i]->SetExtra(0);
}
}
Destroy();
break;
}
}
return CWndNeuz::OnChildNotify( message, nID, pLResult );
}
What this will do is after you have put the items in it and hit ok it will check if its still is the same dwItemKind3. So IK3_SWORD->IK3_SWORD and not IK3_SWORD->IK3_YOYO