Maybe you should check the soul and equipment types before merging them lol
I thought some people would try to play smart and do it...
Something like this
Code:
if (source.Itemtype.RequireWeaponType > 0)
{
switch (source.Itemtype.RequireWeaponType.ToString().Length)
{
case 1: // sort
{
if (source.Itemtype.RequireWeaponType != (int) target.GetSort())
return;
break;
}
case 3: // specific type
{
if (source.Itemtype.RequireWeaponType != target.GetItemSubtype())
return;
break;
}
}
}
else
{
switch (source.GetItemSubtype())
{
case 800: // weapons
{
switch ((source.Type%1000)/100)
{
case 0:
case 1: // single hand
if (target.GetSort() != ItemSort.ITEMSORT_WEAPON_SINGLE_HAND
&& target.GetSort() != ItemSort.ITEMSORT_WEAPON_SINGLE_HAND2)
return;
break;
case 2:
case 3: // double hand
if (target.GetItemSubtype() == 500
|| target.GetSort() != ItemSort.ITEMSORT_WEAPON_DOUBLE_HAND)
return;
break;
case 4: // shield
if (target.GetSort() != ItemSort.ITEMSORT_WEAPON_SHIELD)
return;
break;
case 5: // backsword
if (target.GetItemSubtype() != 421)
return;
break;
case 6: // bow
if (target.GetItemSubtype() != 500)
return;
break;
case 7: // beads
if (target.GetItemSubtype() != 610)
return;
break;
}
break;
}
case 820: // headwear
{
if (Calculations.GetItemPosition(target.Type) != ItemPosition.HEADWEAR)
return;
break;
}
case 821: // neck
{
if (Calculations.GetItemPosition(target.Type) != ItemPosition.NECKLACE)
return;
break;
}
case 822: // armor
{
if (Calculations.GetItemPosition(target.Type) != ItemPosition.ARMOR)
return;
break;
}
case 823: // ring
{
if (Calculations.GetItemPosition(target.Type) != ItemPosition.RING)
return;
break;
}
case 824: // boots
{
if (Calculations.GetItemPosition(target.Type) != ItemPosition.BOOTS)
return;
break;
}
}
}