After tinkering with CEP I saw a new Item property - Use Limitation: Gender.
It doesn't have or at least I can't find any functionalities implemented, so I started implementing my own. I saw in itempropdef.2da that the ID of the property is 150 and that it is getting its values from gender.2da
The problem is that I can't get what gender is selected (I think it's called subtype?) for it to limit.
GetItemPropertyCostTableValue() in the following function always returns 0:
// This scipt is attached on OnPlayerEquipItem
object oItem = GetPCItemLastEquipped();
object oPC = GetPCItemLastEquippedBy();
itemproperty ipLoop = GetFirstItemProperty(oItem);
while (GetIsItemPropertyValid(ipLoop))
{
if (GetItemPropertyType(ipLoop) == 150 ) // Check to see if the item has UseLimitationGender
{
int nCost = GetItemPropertyCostTableValue(ipLoop);
SendMessageToPC(oPC, IntToString(nCost));
}
ipLoop = GetNextItemProperty(oItem);
}
I guess GetItemPropertyCostTableValue() is not the function I have to use?
Yes, I know all of this can be achieved with a simple variable on the equipment but I want to use the property (it has a text in the game interface).