GetLocalizationNumber() public static method

Returns the CraftResourceInfo.Number property of 'resource' -or- 0 if an invalid resource was specified.
public static GetLocalizationNumber ( CraftResource resource ) : int
resource CraftResource
return int
コード例 #1
0
 public override void AddNameProperty(ObjectPropertyList list)
 {
     if (!CraftResources.IsStandard(_Resource))
     {
         list.Add(1050039, String.Format("#{0}\t{1}", CraftResources.GetLocalizationNumber(_Resource).ToString(), GetNameString())); // ~1_NUMBER~ ~2_ITEMNAME~
     }
     else
     {
         base.AddNameProperty(list);
     }
 }
コード例 #2
0
 public override void AddNameProperty(ObjectPropertyList list)
 {
     if (Addon != null && Addon.Resource != CraftResource.None)
     {
         list.Add(1152600, string.Format("#{0}", CraftResources.GetLocalizationNumber(Addon.Resource).ToString())); // ~1_RES~ Cauldron of Transmutation
     }
     else
     {
         base.AddNameProperty(list);
     }
 }
コード例 #3
0
        public override void GetProperties(ObjectPropertyList list)
        {
            int oldUses = m_UsesRemaining;

            CheckReplenishUses(false);

            base.GetProperties(list);

            if (m_Crafter != null)
            {
                list.Add(1050043, m_Crafter.RawName);                 // crafted by ~1_NAME~
            }

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

            list.Add(1060584, m_UsesRemaining.ToString());             // uses remaining: ~1_val~

            if (m_ReplenishesCharges)
            {
                list.Add(1070928);                 // Replenish Charges
            }

            if (m_Slayer != SlayerName.None)
            {
                SlayerEntry entry = SlayerGroup.GetEntryByName(m_Slayer);
                if (entry != null)
                {
                    list.Add(entry.GetTitle(EraAOS));
                }
            }

            if (m_Slayer2 != SlayerName.None)
            {
                SlayerEntry entry = SlayerGroup.GetEntryByName(m_Slayer2);
                if (entry != null)
                {
                    list.Add(entry.GetTitle(EraAOS));
                }
            }

            if ((m_Resource >= CraftResource.OakWood && m_Resource <= CraftResource.Frostwood) &&
                Hue == CraftResources.GetHue(m_Resource))
            {
                list.Add(CraftResources.GetLocalizationNumber(m_Resource));
            }

            if (m_UsesRemaining != oldUses)
            {
                Timer.DelayCall(TimeSpan.Zero, InvalidateProperties);
            }
        }
コード例 #4
0
 public override void AddNameProperty(ObjectPropertyList list)
 {
     if (_Resource != CraftResource.None)
     {
         list.Add(1053099, "#{0}\t{1}", CraftResources.GetLocalizationNumber(_Resource), String.Format("#{0}", LabelNumber.ToString())); // ~1_oretype~ ~2_armortype~
     }
     else
     {
         base.AddNameProperty(list);
     }
 }
コード例 #5
0
ファイル: Ore.cs プロジェクト: BackupTheBerlios/sunuo-svn
		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 ) );
			}
		}
コード例 #6
0
        public override void GetProperties(ObjectPropertyList list)
        {
            int oldUses = m_UsesRemaining;

            CheckReplenishUses(false);

            base.GetProperties(list);

            if (m_ReplenishesCharges)
            {
                list.Add(1070928); // Replenish Charges
            }
            if (m_Slayer != SlayerName.None)
            {
                SlayerEntry entry = SlayerGroup.GetEntryByName(m_Slayer);
                if (entry != null)
                {
                    list.Add(entry.Title);
                }
            }

            if (m_Slayer2 != SlayerName.None)
            {
                SlayerEntry entry = SlayerGroup.GetEntryByName(m_Slayer2);
                if (entry != null)
                {
                    list.Add(entry.Title);
                }
            }

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

                if (num > 0)
                {
                    list.Add(num);
                }
                else
                {
                    list.Add(CraftResources.GetName(m_Resource));
                }
            }

            if (m_UsesRemaining != oldUses)
            {
                Timer.DelayCall(TimeSpan.Zero, new TimerCallback(InvalidateProperties));
            }
        }
コード例 #7
0
        public override void GetProperties(ObjectPropertyList list)
        {
            base.GetProperties(list);

            if (m_Crafter != null && DisplaysMakersMark)
            {
                list.Add(1050043, m_Crafter.Name);                   // crafted by ~1_NAME~
            }
            if (m_Quality == CraftQuality.Exceptional)
            {
                list.Add(1060636);                   // exceptional
            }
            if ((m_Resource >= CraftResource.OakWood && m_Resource <= CraftResource.Frostwood) && Hue == CraftResources.GetHue(m_Resource) && DisplaysResource)
            {
                list.Add(CraftResources.GetLocalizationNumber(m_Resource));                     // resource name
            }
        }
コード例 #8
0
ファイル: FurnitureContainer.cs プロジェクト: zmazza/ServUO
        public override void AddCraftedProperties(ObjectPropertyList list)
        {
            if (m_Crafter != null)
            {
                list.Add(1050043, m_Crafter.Name); // crafted by ~1_NAME~
            }

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

            if (m_Resource > CraftResource.Iron)
            {
                list.Add(1114057, "#{0}", CraftResources.GetLocalizationNumber(m_Resource)); // ~1_val~
            }
        }
コード例 #9
0
 public override void AddNameProperty(ObjectPropertyList list)
 {
     if (_Automaton != null)
     {
         if (_Automaton is BlackrockAutomaton)
         {
             list.Add(1157046, String.Format("{0}\t#{1}", _Automaton.Name, "1157178")); // ~1_NAME~'s Broken ~2_TYPE~ Automaton Head
         }
         else
         {
             list.Add(1157046, String.Format("{0}\t#{1}", _Automaton.Name, CraftResources.GetLocalizationNumber(_Automaton.Resource).ToString())); // ~1_NAME~'s Broken ~2_TYPE~ Automaton Head
         }
     }
     else
     {
         base.AddNameProperty(list);
     }
 }
コード例 #10
0
        public override void GetProperties(IPropertyList list)
        {
            base.GetProperties(list);

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

                if (num > 0)
                {
                    list.Add(num);
                }
                else
                {
                    list.Add(CraftResources.GetName(_resource));
                }
            }
        }
コード例 #11
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
        }
コード例 #12
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
        }
コード例 #13
0
ファイル: RunicSewingKit.cs プロジェクト: Tauriella/ServUO-1
        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
        }
コード例 #14
0
ファイル: RunicSewingKit.cs プロジェクト: nogu3ira/xrunuo
        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
        }
コード例 #15
0
ファイル: RunicSewingKit.cs プロジェクト: phpjunkie420/RunUO
        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
        }
コード例 #16
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));
            }
        }
コード例 #17
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
            }
        }
コード例 #18
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));
                }
            }
        }
コード例 #19
0
 public override void AddNameProperty(ObjectPropertyList list)
 {
     list.Add(1157022, string.Format("#{0}", CraftResources.GetLocalizationNumber(_Resource))); // Rebuilt ~1_MATTYPE~ Automaton Head
 }
コード例 #20
0
        public override void GetProperties(ObjectPropertyList list)
        {
            base.GetProperties(list);

            if (m_Crafter != null)
            {
                list.Add(1050043, m_Crafter.Name);                   // crafted by ~1_NAME~
            }
            if (m_Quality == CraftQuality.Exceptional)
            {
                list.Add(1060636);                   // exceptional
            }
            if (m_AosSkillBonuses != null)
            {
                m_AosSkillBonuses.GetProperties(list);
            }

            int prop;

            if ((m_Resource >= CraftResource.OakWood && m_Resource <= CraftResource.Frostwood) && Hue == CraftResources.GetHue(m_Resource))
            {
                list.Add(CraftResources.GetLocalizationNumber(m_Resource));
            }

            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.BonusDex) != 0)
            {
                list.Add(1060409, prop.ToString());                   // dexterity bonus ~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.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 = GetLowerStatReq()) != 0)
            {
                list.Add(1060435, prop.ToString());                   // lower requirements ~1_val~%
            }
            if ((prop = 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.SpellChanneling) != 0)
            {
                list.Add(1060482);                   // spell channeling
            }
            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~%
            }
            if ((prop = ComputeStatReq(StatType.Str)) > 0)
            {
                list.Add(1061170, prop.ToString());                   // strength requirement ~1_val~
            }
        }
コード例 #21
0
 public override void AddNameProperty(ObjectPropertyList list)
 {
     list.Add(1152600, String.Format("#{0}", CraftResources.GetLocalizationNumber(Resource))); // ~1_RES~ Cauldron of Transmutation
 }
コード例 #22
0
            public override void GetProperties(ObjectPropertyList list)
            {
                base.GetProperties(list);

                if (Addon == null || !(Addon is CauldronOfTransmutation))
                {
                    return;
                }

                int left = 0;

                if (DateTime.UtcNow < ((CauldronOfTransmutation)Addon).Expires)
                {
                    left = (int)(((CauldronOfTransmutation)Addon).Expires - DateTime.UtcNow).TotalSeconds;
                }

                list.Add(1072517, left.ToString()); // Lifespan: ~1_val~ seconds

                CraftResource res  = Addon.Resource;
                CraftResource res2 = (CraftResource)(int)res + 1;

                list.Add(1152630, String.Format("#{0}\t#{1}", CraftResources.GetLocalizationNumber(Addon.Resource), CraftResources.GetLocalizationNumber(res2))); // transmutes ~1_SOURCE~ to ~2_DEST~
                list.Add(1152631, String.Format("3\t1"));                                                                                                         // ratio ~1_INPUT~ to ~2_OUTPUT~
                list.Add(1060584, ((CauldronOfTransmutation)Addon).Charges.ToString());                                                                           // uses remaining: ~1_val~
            }
コード例 #23
0
 public override void AddNameProperty(ObjectPropertyList list)
 {
     list.Add(1152599, string.Format("#{0}\t#1152606", CraftResources.GetLocalizationNumber(_Resource))); // ~1_RES~ ~2_TYPE~ Talisman
 }
コード例 #24
0
        public virtual bool TryRepair(Mobile from)
        {
            if (from.Backpack != null && IsChildOf(from.Backpack))
            {
                Type res = RepairResource;

                if (_Automaton == null || _Automaton.ControlMaster != from)
                {
                    from.SendLocalizedMessage(1157051); // You must be the owner of that pet to have it repair.
                }
                else if (from.Backpack.GetAmount(res) < RepairAmount)
                {
                    if (res == typeof(CrystallineBlackrock))
                    {
                        from.SendLocalizedMessage(1157179, String.Format("\t{0}", _Automaton.Name));
                    }
                    else
                    {
                        from.SendLocalizedMessage(1157050, String.Format("#{0}\t{1}", CraftResources.GetLocalizationNumber(_Automaton.Resource).ToString(), _Automaton.Name)); // You need 75 ~1_MATERIAL~ ingots to repair the ~2_CREATURE~.
                    }
                }
                else
                {
                    from.Backpack.ConsumeTotal(res, RepairAmount);

                    return(RetrieveAutomaton(from));
                }
            }

            return(false);
        }
コード例 #25
0
ファイル: HarvestMap.cs プロジェクト: pallop/Servuo
 public override void AddNameProperty(ObjectPropertyList list)
 {
     list.Add(1152598, String.Format("#{0}\t#{1}", CraftResources.GetLocalizationNumber(Resource), IsMinerMap ? "1152604" : "1152605")); // ~1_RES~ ~2_TYPE~ Map
 }