public ItemDescriptor GetItemDescriptor(ObjectCategory category, int categoryIndexType)
{
int baseIndex = 0;
switch (category)
{
// +0(1 item type)
case Scroll:
baseIndex = 0;
break;
// +1(1 item types)
case Container:
baseIndex = 1;
break;
// +2(21 item types)
case Potion:
baseIndex = 2;
break;
// +23(46 item types)
case Weapon:
baseIndex = 23;
break;
// +69(58 item types)
case Clothe:
baseIndex = 69;
break;
// +127(53 item types)
case Miscellenaous:
baseIndex = 127;
break;
default: throw new NotSupportedException();
}
var index = baseIndex + categoryIndexType;
return ItemDescriptors[index];
}