So we took the base clothing bless deed and modified it to be an unbless deed, but we ran into an issue were it will allow users to use the deed on veteran rewards and unbless them and give back a CBD... Any way to block the use of this deed on VetRewards?
 

Attachments

  • ClothingUnBlessDeed.cs
    3.2 KB · Views: 4
I can't tell you the exact solution, but when an item gets blessed, it remembers who blessed the item. You;d have to add an if check to who blessed the item, and disallow null.
 
1621197427912.png
Small update now that I am at my PC and logged into UO. The "BlessedBy" is -null- in a Veteran Reward Item (Or I didn't know at the time, theres a flat IsRewardItem you could use for the if check)

So you'd want
if (BlessedBy != null)
{
//Insert your Unbless Code here
//Insert the Add Clothing Bless Deed Here
}


Keep in mind that is only rough code. I don't know if BlessedBy or IsRewardItem are the proper variables for it, but just the right direction to look at least.
 
Back