fix(core): Fixes some properties that cannot be modified ingame (#604)
- [X] Adds a property to `CommandProperty` to allow modifying `PropertyObject` where there is no property setter that is accessible.
- [X] Updates AosAttributes and friends
Example of how to make this work:
```cs
[CommandProperty(AccessLevel.GameMaster, canModify: true)]
public AosWeaponAttributes WeaponAttributes { get; private set; }
```
This fix is necessary because in release mode the optimizer will sometimes _entirely remove the setter_ because it knows it can do something that is more efficient _when the property setter is private_. RunUO got around this by declaring a public setter explicitly that _was empty_.
### Screenshot
<img width="313" alt="Screen Shot 2021-05-15 at 11 34 01 PM" src="https://user-images.githubusercontent.com/3953314/118387955-49293c00-b5d6-11eb-8f31-a3b5e31bd18b.png">
This commit is contained in:
parent
3023254d87
commit
db02a6b6e9
16 changed files with 98 additions and 99 deletions
|
|
@ -630,178 +630,178 @@ namespace Server
|
|||
}
|
||||
}
|
||||
|
||||
[CommandProperty(AccessLevel.Counselor)]
|
||||
[CommandProperty(AccessLevel.Counselor, canModify: true)]
|
||||
public Skill Alchemy => this[SkillName.Alchemy];
|
||||
|
||||
[CommandProperty(AccessLevel.Counselor)]
|
||||
[CommandProperty(AccessLevel.Counselor, canModify: true)]
|
||||
public Skill Anatomy => this[SkillName.Anatomy];
|
||||
|
||||
[CommandProperty(AccessLevel.Counselor)]
|
||||
[CommandProperty(AccessLevel.Counselor, canModify: true)]
|
||||
public Skill AnimalLore => this[SkillName.AnimalLore];
|
||||
|
||||
[CommandProperty(AccessLevel.Counselor)]
|
||||
[CommandProperty(AccessLevel.Counselor, canModify: true)]
|
||||
public Skill ItemID => this[SkillName.ItemID];
|
||||
|
||||
[CommandProperty(AccessLevel.Counselor)]
|
||||
[CommandProperty(AccessLevel.Counselor, canModify: true)]
|
||||
public Skill ArmsLore => this[SkillName.ArmsLore];
|
||||
|
||||
[CommandProperty(AccessLevel.Counselor)]
|
||||
[CommandProperty(AccessLevel.Counselor, canModify: true)]
|
||||
public Skill Parry => this[SkillName.Parry];
|
||||
|
||||
[CommandProperty(AccessLevel.Counselor)]
|
||||
[CommandProperty(AccessLevel.Counselor, canModify: true)]
|
||||
public Skill Begging => this[SkillName.Begging];
|
||||
|
||||
[CommandProperty(AccessLevel.Counselor)]
|
||||
[CommandProperty(AccessLevel.Counselor, canModify: true)]
|
||||
public Skill Blacksmith => this[SkillName.Blacksmith];
|
||||
|
||||
[CommandProperty(AccessLevel.Counselor)]
|
||||
[CommandProperty(AccessLevel.Counselor, canModify: true)]
|
||||
public Skill Fletching => this[SkillName.Fletching];
|
||||
|
||||
[CommandProperty(AccessLevel.Counselor)]
|
||||
[CommandProperty(AccessLevel.Counselor, canModify: true)]
|
||||
public Skill Peacemaking => this[SkillName.Peacemaking];
|
||||
|
||||
[CommandProperty(AccessLevel.Counselor)]
|
||||
[CommandProperty(AccessLevel.Counselor, canModify: true)]
|
||||
public Skill Camping => this[SkillName.Camping];
|
||||
|
||||
[CommandProperty(AccessLevel.Counselor)]
|
||||
[CommandProperty(AccessLevel.Counselor, canModify: true)]
|
||||
public Skill Carpentry => this[SkillName.Carpentry];
|
||||
|
||||
[CommandProperty(AccessLevel.Counselor)]
|
||||
[CommandProperty(AccessLevel.Counselor, canModify: true)]
|
||||
public Skill Cartography => this[SkillName.Cartography];
|
||||
|
||||
[CommandProperty(AccessLevel.Counselor)]
|
||||
[CommandProperty(AccessLevel.Counselor, canModify: true)]
|
||||
public Skill Cooking => this[SkillName.Cooking];
|
||||
|
||||
[CommandProperty(AccessLevel.Counselor)]
|
||||
[CommandProperty(AccessLevel.Counselor, canModify: true)]
|
||||
public Skill DetectHidden => this[SkillName.DetectHidden];
|
||||
|
||||
[CommandProperty(AccessLevel.Counselor)]
|
||||
[CommandProperty(AccessLevel.Counselor, canModify: true)]
|
||||
public Skill Discordance => this[SkillName.Discordance];
|
||||
|
||||
[CommandProperty(AccessLevel.Counselor)]
|
||||
[CommandProperty(AccessLevel.Counselor, canModify: true)]
|
||||
public Skill EvalInt => this[SkillName.EvalInt];
|
||||
|
||||
[CommandProperty(AccessLevel.Counselor)]
|
||||
[CommandProperty(AccessLevel.Counselor, canModify: true)]
|
||||
public Skill Healing => this[SkillName.Healing];
|
||||
|
||||
[CommandProperty(AccessLevel.Counselor)]
|
||||
[CommandProperty(AccessLevel.Counselor, canModify: true)]
|
||||
public Skill Fishing => this[SkillName.Fishing];
|
||||
|
||||
[CommandProperty(AccessLevel.Counselor)]
|
||||
[CommandProperty(AccessLevel.Counselor, canModify: true)]
|
||||
public Skill Forensics => this[SkillName.Forensics];
|
||||
|
||||
[CommandProperty(AccessLevel.Counselor)]
|
||||
[CommandProperty(AccessLevel.Counselor, canModify: true)]
|
||||
public Skill Herding => this[SkillName.Herding];
|
||||
|
||||
[CommandProperty(AccessLevel.Counselor)]
|
||||
[CommandProperty(AccessLevel.Counselor, canModify: true)]
|
||||
public Skill Hiding => this[SkillName.Hiding];
|
||||
|
||||
[CommandProperty(AccessLevel.Counselor)]
|
||||
[CommandProperty(AccessLevel.Counselor, canModify: true)]
|
||||
public Skill Provocation => this[SkillName.Provocation];
|
||||
|
||||
[CommandProperty(AccessLevel.Counselor)]
|
||||
[CommandProperty(AccessLevel.Counselor, canModify: true)]
|
||||
public Skill Inscribe => this[SkillName.Inscribe];
|
||||
|
||||
[CommandProperty(AccessLevel.Counselor)]
|
||||
[CommandProperty(AccessLevel.Counselor, canModify: true)]
|
||||
public Skill Lockpicking => this[SkillName.Lockpicking];
|
||||
|
||||
[CommandProperty(AccessLevel.Counselor)]
|
||||
[CommandProperty(AccessLevel.Counselor, canModify: true)]
|
||||
public Skill Magery => this[SkillName.Magery];
|
||||
|
||||
[CommandProperty(AccessLevel.Counselor)]
|
||||
[CommandProperty(AccessLevel.Counselor, canModify: true)]
|
||||
public Skill MagicResist => this[SkillName.MagicResist];
|
||||
|
||||
[CommandProperty(AccessLevel.Counselor)]
|
||||
[CommandProperty(AccessLevel.Counselor, canModify: true)]
|
||||
public Skill Tactics => this[SkillName.Tactics];
|
||||
|
||||
[CommandProperty(AccessLevel.Counselor)]
|
||||
[CommandProperty(AccessLevel.Counselor, canModify: true)]
|
||||
public Skill Snooping => this[SkillName.Snooping];
|
||||
|
||||
[CommandProperty(AccessLevel.Counselor)]
|
||||
[CommandProperty(AccessLevel.Counselor, canModify: true)]
|
||||
public Skill Musicianship => this[SkillName.Musicianship];
|
||||
|
||||
[CommandProperty(AccessLevel.Counselor)]
|
||||
[CommandProperty(AccessLevel.Counselor, canModify: true)]
|
||||
public Skill Poisoning => this[SkillName.Poisoning];
|
||||
|
||||
[CommandProperty(AccessLevel.Counselor)]
|
||||
[CommandProperty(AccessLevel.Counselor, canModify: true)]
|
||||
public Skill Archery => this[SkillName.Archery];
|
||||
|
||||
[CommandProperty(AccessLevel.Counselor)]
|
||||
[CommandProperty(AccessLevel.Counselor, canModify: true)]
|
||||
public Skill SpiritSpeak => this[SkillName.SpiritSpeak];
|
||||
|
||||
[CommandProperty(AccessLevel.Counselor)]
|
||||
[CommandProperty(AccessLevel.Counselor, canModify: true)]
|
||||
public Skill Stealing => this[SkillName.Stealing];
|
||||
|
||||
[CommandProperty(AccessLevel.Counselor)]
|
||||
[CommandProperty(AccessLevel.Counselor, canModify: true)]
|
||||
public Skill Tailoring => this[SkillName.Tailoring];
|
||||
|
||||
[CommandProperty(AccessLevel.Counselor)]
|
||||
[CommandProperty(AccessLevel.Counselor, canModify: true)]
|
||||
public Skill AnimalTaming => this[SkillName.AnimalTaming];
|
||||
|
||||
[CommandProperty(AccessLevel.Counselor)]
|
||||
[CommandProperty(AccessLevel.Counselor, canModify: true)]
|
||||
public Skill TasteID => this[SkillName.TasteID];
|
||||
|
||||
[CommandProperty(AccessLevel.Counselor)]
|
||||
[CommandProperty(AccessLevel.Counselor, canModify: true)]
|
||||
public Skill Tinkering => this[SkillName.Tinkering];
|
||||
|
||||
[CommandProperty(AccessLevel.Counselor)]
|
||||
[CommandProperty(AccessLevel.Counselor, canModify: true)]
|
||||
public Skill Tracking => this[SkillName.Tracking];
|
||||
|
||||
[CommandProperty(AccessLevel.Counselor)]
|
||||
[CommandProperty(AccessLevel.Counselor, canModify: true)]
|
||||
public Skill Veterinary => this[SkillName.Veterinary];
|
||||
|
||||
[CommandProperty(AccessLevel.Counselor)]
|
||||
[CommandProperty(AccessLevel.Counselor, canModify: true)]
|
||||
public Skill Swords => this[SkillName.Swords];
|
||||
|
||||
[CommandProperty(AccessLevel.Counselor)]
|
||||
[CommandProperty(AccessLevel.Counselor, canModify: true)]
|
||||
public Skill Macing => this[SkillName.Macing];
|
||||
|
||||
[CommandProperty(AccessLevel.Counselor)]
|
||||
[CommandProperty(AccessLevel.Counselor, canModify: true)]
|
||||
public Skill Fencing => this[SkillName.Fencing];
|
||||
|
||||
[CommandProperty(AccessLevel.Counselor)]
|
||||
[CommandProperty(AccessLevel.Counselor, canModify: true)]
|
||||
public Skill Wrestling => this[SkillName.Wrestling];
|
||||
|
||||
[CommandProperty(AccessLevel.Counselor)]
|
||||
[CommandProperty(AccessLevel.Counselor, canModify: true)]
|
||||
public Skill Lumberjacking => this[SkillName.Lumberjacking];
|
||||
|
||||
[CommandProperty(AccessLevel.Counselor)]
|
||||
[CommandProperty(AccessLevel.Counselor, canModify: true)]
|
||||
public Skill Mining => this[SkillName.Mining];
|
||||
|
||||
[CommandProperty(AccessLevel.Counselor)]
|
||||
[CommandProperty(AccessLevel.Counselor, canModify: true)]
|
||||
public Skill Meditation => this[SkillName.Meditation];
|
||||
|
||||
[CommandProperty(AccessLevel.Counselor)]
|
||||
[CommandProperty(AccessLevel.Counselor, canModify: true)]
|
||||
public Skill Stealth => this[SkillName.Stealth];
|
||||
|
||||
[CommandProperty(AccessLevel.Counselor)]
|
||||
[CommandProperty(AccessLevel.Counselor, canModify: true)]
|
||||
public Skill RemoveTrap => this[SkillName.RemoveTrap];
|
||||
|
||||
[CommandProperty(AccessLevel.Counselor)]
|
||||
[CommandProperty(AccessLevel.Counselor, canModify: true)]
|
||||
public Skill Necromancy => this[SkillName.Necromancy];
|
||||
|
||||
[CommandProperty(AccessLevel.Counselor)]
|
||||
[CommandProperty(AccessLevel.Counselor, canModify: true)]
|
||||
public Skill Focus => this[SkillName.Focus];
|
||||
|
||||
[CommandProperty(AccessLevel.Counselor)]
|
||||
[CommandProperty(AccessLevel.Counselor, canModify: true)]
|
||||
public Skill Chivalry => this[SkillName.Chivalry];
|
||||
|
||||
[CommandProperty(AccessLevel.Counselor)]
|
||||
[CommandProperty(AccessLevel.Counselor, canModify: true)]
|
||||
public Skill Bushido => this[SkillName.Bushido];
|
||||
|
||||
[CommandProperty(AccessLevel.Counselor)]
|
||||
[CommandProperty(AccessLevel.Counselor, canModify: true)]
|
||||
public Skill Ninjitsu => this[SkillName.Ninjitsu];
|
||||
|
||||
[CommandProperty(AccessLevel.Counselor)]
|
||||
[CommandProperty(AccessLevel.Counselor, canModify: true)]
|
||||
public Skill Spellweaving => this[SkillName.Spellweaving];
|
||||
|
||||
[CommandProperty(AccessLevel.Counselor)]
|
||||
[CommandProperty(AccessLevel.Counselor, canModify: true)]
|
||||
public Skill Mysticism => this[SkillName.Mysticism];
|
||||
|
||||
[CommandProperty(AccessLevel.Counselor)]
|
||||
[CommandProperty(AccessLevel.Counselor, canModify: true)]
|
||||
public Skill Imbuing => this[SkillName.Imbuing];
|
||||
|
||||
[CommandProperty(AccessLevel.Counselor)]
|
||||
[CommandProperty(AccessLevel.Counselor, canModify: true)]
|
||||
public Skill Throwing => this[SkillName.Throwing];
|
||||
|
||||
public override string ToString() => "...";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue