Example #1
0
        public override int GetHashCode()
        {
            int hash = Name.GetHashCode();

            if (Icon != null)
            {
                hash ^= Icon.GetHashCode();
            }
            hash ^= IsRepeatable.GetHashCode();
            hash ^= RequiredLevel.GetHashCode();
            hash ^= XpLevel.GetHashCode();
            hash ^= Difficulty.GetHashCode();
            hash ^= CanAbandon.GetHashCode();
            hash ^= IsHidden.GetHashCode();
            hash ^= IsClassQuest.GetHashCode();
            hash ^= IsBonus.GetHashCode();
            hash ^= BonusShareable.GetHashCode();
            hash ^= Category.GetHashCode();
            foreach (var x in Branches)
            {
                hash ^= x.GetHashCode();
            }
            foreach (var x in Classes)
            {
                hash ^= x.Id.GetHashCode();
            }
            return(hash);
        }
 public void UpdateVisualStates()
 {
     MemberTag.SetActive(lockStates.IsMemberLocked);
     OutOfStockImage.SetActive(lockStates.IsOutOfStock);
     if (lockStates.IsLevelLocked && !lockStates.IsMemberLocked)
     {
         LevelIcon.SetActive(value: true);
         LevelIconText.text = Service.Get <ProgressionService>().Level.ToString();
     }
     else
     {
         LevelIcon.SetActive(value: false);
     }
     if (lockStates.IsOutOfStock || lockStates.IsLevelLocked || lockStates.IsMemberLocked)
     {
         setSprites(DisabledButtonAsset, DisabledButtonAsset);
         PriceTag.Hide();
         if (lockStates.IsLevelLocked)
         {
             LevelIconText.text = RequiredLevel.ToString();
         }
         ItemIcon.GetComponent <MaterialSelector>().SelectMaterial((!IsSpecialItem) ? 1 : 3);
     }
     else
     {
         setSprites(theOffSprite, theOnSprite);
         PriceTag.Show();
         ItemIcon.GetComponent <MaterialSelector>().SelectMaterial(IsSpecialItem ? 2 : 0);
     }
 }
 public override void GetProperties(ObjectPropertyList list)
 {
     base.GetProperties(list);
     if (RequiredLevel > 0)
     {
         list.Add(1060658, "Required Level\t{0}", RequiredLevel.ToString());
     }
 }
        public int CompareTo(object obj)
        {
            MarketplaceItem marketplaceItem = (MarketplaceItem)obj;
            int             num             = RequiredLevel.CompareTo(marketplaceItem.RequiredLevel);

            if (num == 0 && marketplaceItem != this && IsSpecialItem)
            {
                num = -1;
            }
            return(num);
        }
 public override void GetProperties(ObjectPropertyList list)
 {
     base.GetProperties(list);
     if (RequiredLevel > 0)
     {
         list.Add(1060658, "Required Level\t{0}", RequiredLevel.ToString());
     }
     if (DexBonusJewelry > 0)
     {
         list.Add(1060659, "Dexterity Bonus to jewelry\t{0}", DexBonusJewelry.ToString());
     }
 }
Example #6
0
 public override void GetProperties(ObjectPropertyList list)
 {
     base.GetProperties(list);
     if (RequiredLevel > 0)
     {
         list.Add(1060658, "Required Level\t{0}", RequiredLevel.ToString());
     }
     if (IntBonusJewelry > 0)
     {
         list.Add(1060659, "Intelligence Bonus to jewelry\t{0}", IntBonusJewelry.ToString());
     }
 }
Example #7
0
 public override void GetProperties(ObjectPropertyList list)
 {
     base.GetProperties(list);
     if (RequiredLevel > 0)
     {
         list.Add(1060658, "Required Level\t{0}", RequiredLevel.ToString());
     }
     if (AttackChance > 0)
     {
         list.Add(1060659, "Attack Chance to weapon\t{0}", AttackChance.ToString());
     }
 }
 public override void GetProperties(ObjectPropertyList list)
 {
     base.GetProperties(list);
     if (RequiredLevel > 0)
     {
         list.Add(1060658, "Required Level\t{0}", RequiredLevel.ToString());
     }
     if (DefendChance > 0)
     {
         list.Add(1060659, "Defend Chance to shield\t{0}", DefendChance.ToString());
     }
 }
 public override void GetProperties(ObjectPropertyList list)
 {
     base.GetProperties(list);
     if (RequiredLevel > 0)
     {
         list.Add(1060658, "Required Level\t{0}", RequiredLevel.ToString());
     }
     if (SpellDamageSpellbook > 0)
     {
         list.Add(1060659, "Spell Damage to spellbook\t{0}", SpellDamageSpellbook.ToString());
     }
     if (SpellDamageJewelry > 0)
     {
         list.Add(1060660, "Spell Damage to jewelry\t{0}", SpellDamageJewelry.ToString());
     }
     if (SpellDamageClothing > 0)
     {
         list.Add(1060661, "Spell Damage to clothing\t{0}", SpellDamageClothing.ToString());
     }
 }
 public override void GetProperties(ObjectPropertyList list)
 {
     base.GetProperties(list);
     if (RequiredLevel > 0)
     {
         list.Add(1060658, "Required Level\t{0}", RequiredLevel.ToString());
     }
     if (ResistPoisonArmor > 0)
     {
         list.Add(1060659, "Resist Poison to armor\t{0}", ResistPoisonArmor.ToString());
     }
     if (ResistPoisonClothing > 0)
     {
         list.Add(1060660, "Resist Poison to clothing\t{0}", ResistPoisonClothing.ToString());
     }
     if (ResistPoisonJewelry > 0)
     {
         list.Add(1060661, "Resist Poison to jewelry\t{0}", ResistPoisonJewelry.ToString());
     }
     if (ResistPoisonShield > 0)
     {
         list.Add(1060662, "Resist Poison to shields\t{0}", ResistPoisonShield.ToString());
     }
 }
Example #11
0
        public override string ToDebugString()
        {
            string subActionStr = "";

            if (succeeded.HasValue)
            {
                subActionStr = $"\n            Sub action: {(succeeded.Value ? Success : Failure)?.CurrentSubAction.ColorizeObject()}";
            }
            return($"{ToolBox.GetDebugSymbol(DetermineFinished())} {nameof(SkillCheckAction)} -> (TargetTag: {TargetTag.ColorizeObject()}, " +
                   $"Required skill: {RequiredSkill.ColorizeObject()}, Required level: {RequiredLevel.ColorizeObject()}, " +
                   $"Succeeded: {(succeeded.HasValue ? succeeded.Value.ToString() : "not determined").ColorizeObject()})" +
                   subActionStr);
        }
Example #12
0
 /// <summary>
 /// Creates the property contract.
 /// </summary>
 /// <param name="requiredLevel">Level of requirement for the property. Can be obligatory, optional, etc</param>
 public RequiredAttributesObjectContract(RequiredLevel requiredLevel)
 {
     this.requiredLevel = requiredLevel;
 }
Example #13
0
 public override string ToDebugString()
 {
     return($"{ToolBox.GetDebugSymbol(HasBeenDetermined())} {nameof(SkillCheckAction)} -> (Target: {TargetTag.ColorizeObject()}, " +
            $"Skill: {RequiredSkill.ColorizeObject()}, Level: {RequiredLevel.ColorizeObject()}, " +
            $"Succeeded: {succeeded.ColorizeObject()})");
 }