Darwin
Member
I'm creating custom clothing for veterans that doesn't conform to the traditional 3 physical resist vet clothing system. However, I'm having a hard time coding it so that characters with accounts that do not meet the required Veteran Age cannot wear the clothing. In the code of the item's file, I currently have:
I checked the ethereals.cs code as a reference to get an idea of how it works, but it appears that characters can now ride any ethereal at any age too. To test my code, I have a veteran account that claims the clothing, and a brand new account (1 day old). However I code it though, either both characters can wear the clothing, or both characters cannot wear it, which means that the code is not accounting for the account age. For the classic veteran clothing it recognizes the item by it's hue and it's label; but I am currently not using those in my RewardSystem.cs file for my new clothing. The current code for that, looks like this:
Any suggestions or help on this would be much appreciated.
C#:
public override bool CanEquip(Mobile m)
{
if (!base.CanEquip(m))
return false;
if (m_IsRewardItem && !RewardSystem.CheckIsUsableBy(m, this, null))
{
m.SendLocalizedMessage(1071936); // You cannot equip that.
return false;
}
return true;
}
I checked the ethereals.cs code as a reference to get an idea of how it works, but it appears that characters can now ride any ethereal at any age too. To test my code, I have a veteran account that claims the clothing, and a brand new account (1 day old). However I code it though, either both characters can wear the clothing, or both characters cannot wear it, which means that the code is not accounting for the account age. For the classic veteran clothing it recognizes the item by it's hue and it's label; but I am currently not using those in my RewardSystem.cs file for my new clothing. The current code for that, looks like this:
C#:
new RewardList(RewardInterval, 1, new RewardEntry[]
{
new RewardEntry(cloaksAndRobes, "New Veteran Cloak", typeof(NewVeteranCloak)),
}),
Any suggestions or help on this would be much appreciated.