Пример #1
0
 public virtual bool EnchantFitsInSlot(Enchant enchant, Character character, ItemSlot slot)
 {
     return enchant.FitsInSlot(slot);
 }
Пример #2
0
 public override bool EnchantFitsInSlot(Enchant enchant, Character character, ItemSlot slot) {
     if (enchant == null) { return false; }
     // Hide the ranged weapon enchants. None of them apply to melee damage at all.
     if (enchant.Slot == ItemSlot.Ranged) { return false; }
     // Disallow Shield enchants, all shield enchants are ItemSlot.OffHand and nothing else is according to Astry
     if (enchant.Slot == ItemSlot.OffHand) { return false; }
     // Allow offhand Enchants for two-handers if toon has Titan's Grip
     // If not, turn off all enchants for the offhand
     if (character != null
         && character.WarriorTalents.TitansGrip > 0
         && enchant.Slot == ItemSlot.TwoHand
         && slot == ItemSlot.OffHand) {
         return true;
     } else  if (character != null
         && character.WarriorTalents.SingleMindedFury > 0
         && enchant.Slot == ItemSlot.OneHand
         && slot == ItemSlot.OffHand) {
         return true;
     } else if (character != null
         && character.WarriorTalents.TitansGrip == 0
         && (enchant.Slot == ItemSlot.TwoHand || enchant.Slot == ItemSlot.OneHand)
         && slot == ItemSlot.OffHand) {
         return false;
     }
     // If all the above is ok, return base version
     return enchant.FitsInSlot(slot);
 }