IsStandard() 공개 정적인 메소드

Returns true if 'resource' is None, Iron, RegularLeather or RegularWood. False if otherwise.
public static IsStandard ( CraftResource resource ) : bool
resource CraftResource
리턴 bool
예제 #1
0
파일: Ingots.cs 프로젝트: nydehi/imagine-uo
        public override void GetProperties(ObjectPropertyList list)
        {
            base.GetProperties(list);

            if (!CraftResources.IsStandard(m_Resource))
            {
                int num = CraftResources.GetLocalizationNumber(m_Resource);

                if (num > 0)
                {
                    list.Add(num);
                }
                else
                {
                    list.Add(CraftResources.GetName(m_Resource));
                }
            }
        }
예제 #2
0
        public override LocalizedText GetNameProperty()
        {
            string v = " ";

            if (!CraftResources.IsStandard(Resource))
            {
                int num = CraftResources.GetLocalizationNumber(Resource);

                if (num > 0)
                {
                    v = String.Format("#{0}", num);
                }
                else
                {
                    v = CraftResources.GetName(Resource);
                }
            }

            return(new LocalizedText(1061119, v));              // ~1_LEATHER_TYPE~ runic sewing kit
        }
예제 #3
0
        public override void OnSingleClick(Mobile from)
        {
            var v = " ";

            if (!CraftResources.IsStandard(Resource))
            {
                var num = CraftResources.GetLocalizationNumber(Resource);

                if (num > 0)
                {
                    v = $"#{num}";
                }
                else
                {
                    v = CraftResources.GetName(Resource);
                }
            }

            LabelTo(from, 1061119, v); // ~1_LEATHER_TYPE~ runic sewing kit
        }
예제 #4
0
        public override void AddNameProperty(IPropertyList list)
        {
            var v = " ";

            if (!CraftResources.IsStandard(Resource))
            {
                var num = CraftResources.GetLocalizationNumber(Resource);

                if (num > 0)
                {
                    v = $"#{num}";
                }
                else
                {
                    v = CraftResources.GetName(Resource);
                }
            }

            list.Add(1061119, v); // ~1_LEATHER_TYPE~ runic sewing kit
        }
예제 #5
0
        public override void OnSingleClick(Mobile from)
        {
            string v = " ";

            if (!CraftResources.IsStandard(Resource))
            {
                int num = CraftResources.GetLocalizationNumber(Resource);

                if (num > 0)
                {
                    v = String.Format("#{0}", num);
                }
                else
                {
                    v = CraftResources.GetName(Resource);
                }
            }

            LabelTo(from, 1061119, v);               // ~1_LEATHER_TYPE~ runic sewing kit
        }
예제 #6
0
        public override void AddNameProperty(ObjectPropertyList list)
        {
            string v = " ";

            if (!CraftResources.IsStandard(this.Resource))
            {
                int num = CraftResources.GetLocalizationNumber(this.Resource);

                if (num > 0)
                {
                    v = String.Format("#{0}", num);
                }
                else
                {
                    v = CraftResources.GetName(this.Resource);
                }
            }

            list.Add(1061119, v); // ~1_LEATHER_TYPE~ runic sewing kit
        }
        public static bool IsValidItem(Item i)
        {
            if (i is PigmentsOfTokuno)
            {
                return(false);
            }

            Type t = i.GetType();

            CraftResource resource = CraftResource.None;

            if (i is BaseWeapon)
            {
                resource = ((BaseWeapon)i).Resource;
            }
            else if (i is BaseArmor)
            {
                resource = ((BaseArmor)i).Resource;
            }

            if (!CraftResources.IsStandard(resource))
            {
                return(true);
            }

            return(
                IsInTypeList(t, TreasuresOfTokuno.LesserArtifacts) ||
                IsInTypeList(t, TreasuresOfTokuno.GreaterArtifacts)
                // Genova: suporte ao UO:ML.
                #region Mondain's Legacy
                || IsInTypeList(t, MondainsLegacy.PigmentList)
                #endregion
                || IsInTypeList(t, DemonKnight.ArtifactRarity10) ||
                IsInTypeList(t, DemonKnight.ArtifactRarity11) ||
                IsInTypeList(t, DemonKnight.ArtifactRarity10) ||
                IsInTypeList(t, StealableArtifactsSpawner.TypesOfEntires) ||
                IsInTypeList(t, Paragon.Artifacts) ||
                IsInTypeList(t, Leviathan.Artifacts) ||
                IsInTypeList(t, TreasureMapChest.Artifacts)
                );
        }
예제 #8
0
        public static bool IsValidItem(Item i)
        {
            if (i is BasePigmentsOfTokuno)
            {
                return(false);
            }

            Type t = i.GetType();

            CraftResource resource = CraftResource.None;

            if (i is BaseWeapon)
            {
                resource = ((BaseWeapon)i).Resource;
            }
            else if (i is BaseArmor)
            {
                resource = ((BaseArmor)i).Resource;
            }
            else if (i is BaseClothing)
            {
                resource = ((BaseClothing)i).Resource;
            }

            if (!CraftResources.IsStandard(resource))
            {
                return(true);
            }

            if (i.IsArtifact)
            {
                return(true);
            }

            if (i is BaseAddonDeed && ((BaseAddonDeed)i).UseCraftResource && !((BaseAddonDeed)i).IsReDeed && ((BaseAddonDeed)i).Resource != CraftResource.None)
            {
                return(true);
            }

            return(false);
        }
예제 #9
0
        public override void AddNameProperty(IPropertyList list)
        {
            if (CraftResources.IsStandard(Resource))
            {
                list.Add(1061119, " "); // ~1_LEATHER_TYPE~ runic sewing kit
                return;
            }

            var num = CraftResources.GetLocalizationNumber(Resource);

            if (num > 0)
            {
                // ~1_LEATHER_TYPE~ runic sewing kit
                list.Add(1061119, $"#{num}");
            }
            else
            {
                // ~1_LEATHER_TYPE~ runic sewing kit
                list.Add(1061119, CraftResources.GetName(Resource));
            }
        }
예제 #10
0
        public override void AddNameProperties(ObjectPropertyList list)
        {
            base.AddNameProperties(list);
            int index = CraftResources.GetIndex(Resource);

            if (index >= 1 && index <= 6)
            {
                return;
            }
            if (!CraftResources.IsStandard(Resource))
            {
                int num = CraftResources.GetLocalizationNumber(Resource);
                if (num > 0)
                {
                    list.Add(num);
                }
                else
                {
                    list.Add(CraftResources.GetName(Resource));
                }
            }
        }
예제 #11
0
        public override void AddCraftedProperties(ObjectPropertyList list)
        {
            if (m_PlayerConstructed && m_Crafter != null)
            {
                list.Add(1050043, m_Crafter.Name); // crafted by ~1_NAME~
            }

            if (m_Quality == ItemQuality.Exceptional)
            {
                list.Add(1060636); // Exceptional
            }

            if (m_Resource > CraftResource.Iron && !CraftResources.IsStandard(m_Resource))
            {
                list.Add(1114057, "#{0}", CraftResources.GetLocalizationNumber(m_Resource)); // ~1_val~
            }

            if (m_IsShipwreckedItem)
            {
                list.Add(1041645); // recovered from a shipwreck
            }
        }
예제 #12
0
        public static bool IsValidItem(Item i)
        {
            if (i is BasePigmentsOfTokuno)
            {
                return(false);
            }

            Type t = i.GetType();

            CraftResource resource = CraftResource.None;

            if (i is BaseWeapon)
            {
                resource = ((BaseWeapon)i).Resource;
            }
            else if (i is BaseArmor)
            {
                resource = ((BaseArmor)i).Resource;
            }

            if (!CraftResources.IsStandard(resource))
            {
                return(true);
            }

            return(
                IsInTypeList(t, TreasuresOfTokuno.LesserArtifactsTotal) ||
                IsInTypeList(t, TreasuresOfTokuno.GreaterArtifacts) ||
                IsInTypeList(t, DemonKnight.ArtifactRarity10) ||
                IsInTypeList(t, DemonKnight.ArtifactRarity11) ||
                IsInTypeList(t, BaseCreature.MinorArtifactsMl) ||
                IsInTypeList(t, StealableArtifactsSpawner.TypesOfEntires) ||
                IsInTypeList(t, Paragon.Artifacts) ||
                IsInTypeList(t, Leviathan.Artifacts) ||
                IsInTypeList(t, TreasureMapChest.Artifacts)
                );
        }
            public bool CanHue(Item item)
            {
                if (item is BaseWeapon && (((BaseWeapon)item).ArtifactRarity > 0 || !CraftResources.IsStandard(((BaseWeapon)item).Resource)))
                {
                    return(true);
                }

                if (item is BaseArmor && (((BaseArmor)item).ArtifactRarity > 0 || !CraftResources.IsStandard(((BaseArmor)item).Resource)))
                {
                    return(true);
                }

                if (item is BaseClothing && ((BaseClothing)item).ArtifactRarity > 0)
                {
                    return(true);
                }

                if (item is BaseJewel && ((BaseJewel)item).ArtifactRarity > 0)
                {
                    return(true);
                }

                for (int i = 0; i < Paragon.Artifacts.Length; i++)
                {
                    Type type = Paragon.Artifacts[i];

                    if (type == item.GetType())
                    {
                        return(true);
                    }
                }

                for (int i = 0; i < Leviathan.Artifacts.Length; i++)
                {
                    Type type = Leviathan.Artifacts[i];

                    if (type == item.GetType())
                    {
                        return(true);
                    }
                }

                for (int i = 0; i < TreasureMapChest.m_Artifacts.Length; i++)
                {
                    Type type = TreasureMapChest.m_Artifacts[i];

                    if (type == item.GetType())
                    {
                        return(true);
                    }
                }

                for (int i = 0; i < TokunoTreasures.MinorArtifacts.Length; i++)
                {
                    Type type = TokunoTreasures.MinorArtifacts[i];

                    if (type == item.GetType())
                    {
                        return(true);
                    }
                }

                for (int i = 0; i < TokunoTreasures.MajorArtifacts.Length; i++)
                {
                    Type type = TokunoTreasures.MajorArtifacts[i];

                    if (type == item.GetType())
                    {
                        return(true);
                    }
                }

                return(false);
            }
예제 #14
0
        public static bool IsValidItem(Item i)
        {
            if (i is BasePigmentsOfTokuno)
            {
                return(false);
            }

            Type t = i.GetType();

            CraftResource resource = CraftResource.None;

            if (i is BaseWeapon)
            {
                resource = ((BaseWeapon)i).Resource;
            }
            else if (i is BaseArmor)
            {
                resource = ((BaseArmor)i).Resource;
            }
            else if (i is BaseClothing)
            {
                resource = ((BaseClothing)i).Resource;
            }

            if (!CraftResources.IsStandard(resource))
            {
                return(true);
            }

            if (i is ITokunoDyable)
            {
                return(true);
            }

            if (Server.Engines.Blackthorn.BlackthornRewards.IsTokunoDyable(t))
            {
                return(true);
            }

            if (i.IsArtifact)
            {
                return(true);
            }

            return(
                IsInTypeList(t, TreasuresOfTokuno.LesserArtifactsTotal) ||
                IsInTypeList(t, TreasuresOfTokuno.GreaterArtifacts) ||
                #region Mondain's Legacy
                IsInTypeList(t, MondainsLegacy.PigmentList) ||
                #endregion
                #region TOL
                IsInTypeList(t, TimeOfLegends.PigmentList) ||
                #endregion
                IsInTypeList(t, DemonKnight.DoomArtifact) ||
                IsInTypeList(t, MondainsLegacy.Artifacts) ||
                IsInTypeList(t, StealableArtifactsSpawner.TypesOfEntires) ||
                IsInTypeList(t, Paragon.Artifacts) ||
                IsInTypeList(t, Leviathan.Artifacts) ||
                IsInTypeList(t, TreasureMapChest.Artifacts) ||
                IsInTypeList(t, m_Replicas) ||
                IsInTypeList(t, m_DyableHeritageItems) ||
                IsInTypeList(t, m_Glasses));
        }
            public bool CanHue(Item item)
            {
                if (item is BaseWeapon && (((BaseWeapon)item).ArtifactRarity > 0 || !CraftResources.IsStandard(((BaseWeapon)item).Resource)))
                {
                    return(true);
                }

                if (item is BaseArmor && (((BaseArmor)item).ArtifactRarity > 0 || !CraftResources.IsStandard(((BaseArmor)item).Resource)))
                {
                    return(true);
                }

                if (item is BaseClothing && ((BaseClothing)item).ArtifactRarity > 0)
                {
                    return(true);
                }

                if (item is BaseJewel && ((BaseJewel)item).ArtifactRarity > 0)
                {
                    return(true);
                }

                if (item is StealableArtifact || item is StealableContainerArtifact || item is StealableLightArtifact || item is StealableLongswordArtifact || item is StealablePlateGlovesArtifact || item is StealableWarHammerArtifact || item is StealableExecutionersAxeArtifact || item is StealableFoodArtifact)
                {
                    return(true);
                }

                for (int i = 0; i < Paragon.Artifacts.Length; i++)
                {
                    Type type = Paragon.Artifacts[i];

                    if (type == item.GetType())
                    {
                        return(true);
                    }
                }

                for (int i = 0; i < Leviathan.Artifacts.Length; i++)
                {
                    Type type = Leviathan.Artifacts[i];

                    if (type == item.GetType())
                    {
                        return(true);
                    }
                }

                for (int i = 0; i < TreasureMapChest.m_Artifacts.Length; i++)
                {
                    Type type = TreasureMapChest.m_Artifacts[i];

                    if (type == item.GetType())
                    {
                        return(true);
                    }
                }

                for (int i = 0; i < TokunoTreasures.MinorArtifacts.Length; i++)
                {
                    Type type = TokunoTreasures.MinorArtifacts[i];

                    if (type == item.GetType())
                    {
                        return(true);
                    }
                }

                for (int i = 0; i < TokunoTreasures.MajorArtifacts.Length; i++)
                {
                    Type type = TokunoTreasures.MajorArtifacts[i];

                    if (type == item.GetType())
                    {
                        return(true);
                    }
                }

                return(false);
            }
예제 #16
0
        public override void GetProperties(ObjectPropertyList list)
        {
            base.GetProperties(list);

            if (m_AosAttributes.Brittle != 0)
            {
                list.Add(1116209); // Brittle
            }
            if (m_AosSkillBonuses != null)
            {
                m_AosSkillBonuses.GetProperties(list);
            }

            base.AddResistanceProperties(list);

            int prop = 0;

            if ((prop = (m_AosAttributes.WeaponDamage)) != 0)
            {
                list.Add(1060401, prop.ToString()); // damage increase ~1_val~%
            }
            if ((prop = m_AosAttributes.DefendChance) != 0)
            {
                list.Add(1060408, prop.ToString()); // defense chance increase ~1_val~%
            }
            if ((prop = m_AosAttributes.EnhancePotions) != 0)
            {
                list.Add(1060411, prop.ToString()); // enhance potions ~1_val~%
            }
            if ((prop = m_AosAttributes.CastRecovery) != 0)
            {
                list.Add(1060412, prop.ToString()); // faster cast recovery ~1_val~
            }
            if ((prop = m_AosAttributes.CastSpeed) != 0)
            {
                list.Add(1060413, prop.ToString()); // faster casting ~1_val~
            }
            if ((prop = (m_AosAttributes.AttackChance)) != 0)
            {
                list.Add(1060415, prop.ToString()); // hit chance increase ~1_val~%
            }
            if ((prop = m_AosAttributes.BonusDex) != 0)
            {
                list.Add(1060409, prop.ToString()); // dexterity bonus ~1_val~
            }
            if ((prop = m_AosAttributes.BonusHits) != 0)
            {
                list.Add(1060431, prop.ToString()); // hit point increase ~1_val~
            }
            if ((prop = m_AosAttributes.BonusInt) != 0)
            {
                list.Add(1060432, prop.ToString()); // intelligence bonus ~1_val~
            }
            if ((prop = m_AosAttributes.LowerManaCost) != 0)
            {
                list.Add(1060433, prop.ToString()); // lower mana cost ~1_val~%
            }
            if ((prop = m_AosAttributes.LowerRegCost) != 0)
            {
                list.Add(1060434, prop.ToString()); // lower reagent cost ~1_val~%
            }
            if ((prop = m_LowerStatReq) != 0)
            {
                list.Add(1060435, m_LowerStatReq.ToString()); // lower requirements ~1_val~%
            }
            if ((prop = m_AosAttributes.SpellChanneling) != 0)
            {
                list.Add(1060482); // spell channeling
            }
            if (!CraftResources.IsStandard(m_Resource))
            {
                list.Add(CraftResources.GetName(m_Resource));
            }

            if ((prop = (GetLuckBonus() + m_AosAttributes.Luck)) != 0)
            {
                list.Add(1060436, prop.ToString()); // luck ~1_val~
            }
            if ((prop = m_AosAttributes.BonusMana) != 0)
            {
                list.Add(1060439, prop.ToString()); // mana increase ~1_val~
            }
            if ((prop = m_AosAttributes.RegenMana) != 0)
            {
                list.Add(1060440, prop.ToString()); // mana regeneration ~1_val~
            }
            if ((prop = m_AosAttributes.NightSight) != 0)
            {
                list.Add(1060441); // night sight
            }
            if ((prop = m_AosAttributes.ReflectPhysical) != 0)
            {
                list.Add(1060442, prop.ToString()); // reflect physical damage ~1_val~%
            }
            if ((prop = m_AosAttributes.RegenStam) != 0)
            {
                list.Add(1060443, prop.ToString()); // stamina regeneration ~1_val~
            }
            if ((prop = m_AosAttributes.RegenHits) != 0)
            {
                list.Add(1060444, prop.ToString()); // hit point regeneration ~1_val~
            }
            if ((prop = m_AosAttributes.SpellDamage) != 0)
            {
                list.Add(1060483, prop.ToString()); // spell damage increase ~1_val~%
            }
            if ((prop = m_AosAttributes.BonusStam) != 0)
            {
                list.Add(1060484, prop.ToString()); // stamina increase ~1_val~
            }
            if ((prop = m_AosAttributes.BonusStr) != 0)
            {
                list.Add(1060485, prop.ToString()); // strength bonus ~1_val~
            }
            //if ( (prop = m_AosAttributes.WeaponSpeed) != 0 )
            //	list.Add( 1060486, prop.ToString() ); // swing speed increase ~1_val~%

            int hookCliloc = BaseFishingHook.GetHookType(m_HookType);

            if (m_HookType > HookType.None && hookCliloc > 0)
            {
                list.Add(1150885, String.Format("#{0}", hookCliloc));                               //special hook: ~1_token~
                list.Add(1150889, String.Format("#{0}", BaseFishingHook.GetCondition(m_HookUses))); //Hook condition: ~1_val~
            }

            if (m_BaitType != null)
            {
                object label = FishInfo.GetFishLabel(m_BaitType);
                if (label is int)
                {
                    list.Add(1116468, String.Format("#{0}", (int)label)); //baited to attract: ~1_val~
                }
                else if (label is string)
                {
                    list.Add(1116468, (string)label);
                }

                list.Add(1116466, m_BaitUses.ToString()); // amount: ~1_val~
            }

            list.Add(1061170, GetStrRequirement().ToString()); // strength requirement ~1_val~
        }
예제 #17
0
        public static bool CanHue(Item item)
        {
            if (item.IsNamed)
            {
                return(true);
            }

            if (item is PigmentsOfTokuno || item is PigmentsOfTokunoMajor)
            {
                return(false);
            }

            if (item is IFactionArtifact)
            {
                return(true);
            }

            if (item is ElvenGlasses)
            {
                return(true);
            }

            if (item is LuckyNecklace)
            {
                return(true);
            }

            if (item is BaseWeapon && (((BaseWeapon)item).ArtifactRarity > 0 || !CraftResources.IsStandard(((BaseWeapon)item).Resource)))
            {
                return(true);
            }

            if (item is BaseArmor && (((BaseArmor)item).ArtifactRarity > 0 || !CraftResources.IsStandard(((BaseArmor)item).Resource)))
            {
                return(true);
            }

            if (item is BaseClothing && ((BaseClothing)item).ArtifactRarity > 0)
            {
                return(true);
            }

            if (item is BaseJewel && ((BaseJewel)item).ArtifactRarity > 0)
            {
                return(true);
            }

            if (item is StealableArtifact || item is StealableContainerArtifact || item is StealableLightArtifact || item is StealableLongswordArtifact || item is StealablePlateGlovesArtifact || item is StealableWarHammerArtifact || item is StealableExecutionersAxeArtifact || item is StealableFoodArtifact)
            {
                return(true);
            }

            if (item is SamuraiHelm || item is LeggingsOfEmbers || item is HolySword || item is ShaminoCrossbow)
            {
                return(true);
            }

            #region Heritage Items
            if (item is DupresShield || item is OssianGrimoire || item is QuiverOfInfinity)
            {
                return(true);
            }
            #endregion

            #region Champion Artifacts
            if (item is AcidProofRobe || item is CrownOfTalKeesh || item is Calm || item is FangOfRactus || item is GladiatorsCollar || item is OrcChieftainHelm ||
                item is Pacify || item is Quell || item is ShroudOfDeciet || item is Subdue || item is ANecromancerShroud || item is BraveKnightOfTheBritannia ||
                item is CaptainJohnsHat || item is DetectiveBoots || item is DjinnisRing || item is EmbroideredOakLeafCloak || item is GuantletsOfAnger || item is LieutenantOfTheBritannianRoyalGuard ||
                item is OblivionsNeedle || item is RoyalGuardSurvivalKnife || item is SamaritanRobe || item is TheMostKnowledgePerson || item is TheRobeOfBritanniaAri)
            {
                return(true);
            }
            #endregion

            for (int i = 0; i < Paragon.Artifacts.Length; i++)
            {
                Type type = Paragon.Artifacts[i];

                if (type == item.GetType())
                {
                    return(true);
                }
            }

            if (item is ScrappersCompendium)
            {
                return(true);
            }

            for (int i = 0; i < NamedMiniBosses.Artifacts.Length; i++)
            {
                Type type = NamedMiniBosses.Artifacts[i];

                if (type == item.GetType())
                {
                    return(true);
                }
            }

            for (int i = 0; i < Leviathan.Artifacts.Length; i++)
            {
                Type type = Leviathan.Artifacts[i];

                if (type == item.GetType())
                {
                    return(true);
                }
            }


            for (int i = 0; i < TreasureMapChest.m_Artifacts.Length; i++)
            {
                Type type = TreasureMapChest.m_Artifacts[i];

                if (type == item.GetType())
                {
                    return(true);
                }
            }

            for (int i = 0; i < TokunoTreasures.MinorArtifacts.Length; i++)
            {
                Type type = TokunoTreasures.MinorArtifacts[i];

                if (type == item.GetType())
                {
                    return(true);
                }
            }

            for (int i = 0; i < TokunoTreasures.MajorArtifacts.Length; i++)
            {
                Type type = TokunoTreasures.MajorArtifacts[i];

                if (type == item.GetType())
                {
                    return(true);
                }
            }

            if (CraftableArtifacts.IsCraftableArtifact(item))
            {
                return(true);
            }

            if (item is CrimsonCincture || item is DreadsRevenge)
            {
                return(true);
            }

            for (int i = 0; i < MoonglowZooCollection.RewardList.Length; i++)
            {
                RewardEntry entry = (RewardEntry)MoonglowZooCollection.RewardList[i];

                if (entry.Type == item.GetType())
                {
                    return(true);
                }
            }

            for (int i = 0; i < VesperMuseumCollection.RewardList.Length; i++)
            {
                RewardEntry entry = (RewardEntry)VesperMuseumCollection.RewardList[i];

                if (entry.Type == item.GetType())
                {
                    return(true);
                }
            }

            for (int i = 0; i < BritainLibraryAnimalTrainerCollection.RewardList.Length; i++)
            {
                RewardEntry entry = (RewardEntry)BritainLibraryAnimalTrainerCollection.RewardList[i];

                if (entry.Type == item.GetType())
                {
                    return(true);
                }
            }

            if (item is DecorativeCarpet)
            {
                return(true);
            }

            if (SAArtifacts.IsSAArtifact(item))
            {
                return(true);
            }

            if (item is NocturneEarrings)
            {
                return(true);
            }

            return(false);
        }