• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# Network.EquipmentInfo类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中Server.Network.EquipmentInfo的典型用法代码示例。如果您正苦于以下问题:C# EquipmentInfo类的具体用法?C# EquipmentInfo怎么用?C# EquipmentInfo使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



EquipmentInfo类属于Server.Network命名空间,在下文中一共展示了EquipmentInfo类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: OnSingleClick

		public override void OnSingleClick( Mobile from )
		{
			ArrayList attrs = new ArrayList();

			if ( !Identified )
				attrs.Add( new EquipInfoAttribute( 1038000 ) ); // Unidentified
			else
				attrs.Add( new EquipInfoAttribute( 1041367, m_Charges ) );

			EquipmentInfo eqInfo = new EquipmentInfo( 1017413, Crafter, false, (EquipInfoAttribute[])attrs.ToArray( typeof( EquipInfoAttribute ) ) );
			from.Send( new DisplayEquipmentInfo( this, eqInfo ) );
		}
开发者ID:kamronbatman,项目名称:DefianceUO-Pre1.10,代码行数:12,代码来源:icestaff.cs


示例2: OnSingleClick

		public override void OnSingleClick( Mobile from )
		{
			ArrayList attrs = new ArrayList();

			if ( DisplayLootType )
			{
				if ( LootType == LootType.Blessed )
					attrs.Add( new EquipInfoAttribute( 1038021 ) ); // blessed
				else if ( LootType == LootType.Cursed )
					attrs.Add( new EquipInfoAttribute( 1049643 ) ); // cursed
			}

			if ( m_Quality == InstrumentQuality.Exceptional )
				attrs.Add( new EquipInfoAttribute( 1018305 - (int)m_Quality ) );

			if( m_ReplenishesCharges )
				attrs.Add( new EquipInfoAttribute( 1070928 ) ); // Replenish Charges

			// TODO: Must this support item identification?
			if( m_Slayer != SlayerName.None )
			{
				SlayerEntry entry = SlayerGroup.GetEntryByName( m_Slayer );
				if( entry != null )
					attrs.Add( new EquipInfoAttribute( entry.Title ) );
			}

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

			int number;

			if ( Name == null )
			{
				number = LabelNumber;
			}
			else
			{
				this.LabelTo( from, Name );
				number = 1041000;
			}

			if ( attrs.Count == 0 && Crafter == null && Name != null )
				return;

			EquipmentInfo eqInfo = new EquipmentInfo( number, m_Crafter, false, (EquipInfoAttribute[])attrs.ToArray( typeof( EquipInfoAttribute ) ) );

			from.Send( new DisplayEquipmentInfo( this, eqInfo ) );
		}
开发者ID:romeov007,项目名称:imagine-uo,代码行数:52,代码来源:BaseInstrument.cs


示例3: OnSingleClick

		public override void OnSingleClick( Mobile from )
		{
			if (this.HideAttributes == true)
			{
				base.OnSingleClick(from);
				return;
			}

			ArrayList attrs = new ArrayList();

            if (DisplayLootType)
            {
                if (LootType == LootType.Blessed)
                    attrs.Add(new EquipInfoAttribute(1038021)); // blessed
                else if (LootType == LootType.Cursed)
                    attrs.Add(new EquipInfoAttribute(1049643)); // cursed
            }

            if (Name != null || OldName == null) // only use the new ([X/Y/Z]) method on things we don't have OldNames for
            {
                if (m_Quality == ArmorQuality.Exceptional)
                    attrs.Add(new EquipInfoAttribute(1018305 - (int)m_Quality));

                if (m_Identified)
                {
                    if (m_Durability != ArmorDurabilityLevel.Regular)
                        attrs.Add(new EquipInfoAttribute(1038000 + (int)m_Durability));

                    if (m_Protection > ArmorProtectionLevel.Regular && m_Protection <= ArmorProtectionLevel.Invulnerability)
                        attrs.Add(new EquipInfoAttribute(1038005 + (int)m_Protection));
                }
                else if (m_Durability != ArmorDurabilityLevel.Regular || (m_Protection > ArmorProtectionLevel.Regular && m_Protection <= ArmorProtectionLevel.Invulnerability))
                {
                    attrs.Add(new EquipInfoAttribute(1038000)); // Unidentified
                }
            }
            
			int number;

			if ( Name == null )
			{
				if (OldName == null)
				{
					number = LabelNumber;
				}
				else
				{
					string oldname = OldName;
					//yay!  Show us the old way!
					if (m_Quality == ArmorQuality.Exceptional)
					{
						oldname = "exceptional " + oldname;
					}

					if (m_Identified)
					{
						if (m_Durability != ArmorDurabilityLevel.Regular)
						{
							//attrs.Add(new EquipInfoAttribute(1038000 + (int)m_Durability));
							oldname = m_Durability.ToString().ToLower() + " " + oldname;
						}

						if (m_Protection > ArmorProtectionLevel.Regular && m_Protection <= ArmorProtectionLevel.Invulnerability)
						{
							//attrs.Add(new EquipInfoAttribute(1038005 + (int)m_Protection));
							oldname = oldname + " of " + m_Protection.ToString().ToLower();
						}
					}
					else if (m_Durability != ArmorDurabilityLevel.Regular 
						     || (m_Protection > ArmorProtectionLevel.Regular && m_Protection <= ArmorProtectionLevel.Invulnerability))
					{
						oldname = "magic " + oldname;
					}

					//crafted-by goes at the end
					if (m_Crafter != null)
					{
						oldname += " crafted by " + m_Crafter.Name;
					}

					this.LabelTo(from, oldname);
					number = 1041000;
				}
			}
			else
			{
				this.LabelTo( from, Name );
				number = 1041000;
			}

			if ( attrs.Count == 0 && Crafter == null && Name != null )
				return;

			if (OldName == null)
			{
				EquipmentInfo eqInfo = new EquipmentInfo(number, m_Crafter, false, (EquipInfoAttribute[])attrs.ToArray(typeof(EquipInfoAttribute)));
				from.Send(new DisplayEquipmentInfo(this, eqInfo));
			}
			else
			{
//.........这里部分代码省略.........
开发者ID:zerodowned,项目名称:angelisland,代码行数:101,代码来源:BaseArmor.cs


示例4: OnSingleClick

		public override void OnSingleClick( Mobile from )
		{
			ArrayList attrs = new ArrayList();

			if ( DisplayLootType )
			{
				if ( LootType == LootType.Blessed )
					attrs.Add( new EquipInfoAttribute( 1038021 ) ); // blessed
				else if ( LootType == LootType.Cursed )
					attrs.Add( new EquipInfoAttribute( 1049643 ) ); // cursed
			}

			if ( !Identified )
			{
				attrs.Add( new EquipInfoAttribute( 1038000 ) ); // Unidentified
			}
			else
			{
				int num = 0;

				switch ( m_WandEffect )
				{
					case WandEffect.Clumsiness:			num = 3002011; break;
					case WandEffect.Identification:		num = 1044063; break;
					case WandEffect.Healing:			num = 3002014; break;
					case WandEffect.Feeblemindedness:	num = 3002013; break;
					case WandEffect.Weakness:			num = 3002018; break;
					case WandEffect.MagicArrow:			num = 3002015; break;
					case WandEffect.Harming:			num = 3002022; break;
					case WandEffect.Fireball:			num = 3002028; break;
					case WandEffect.GreaterHealing:		num = 3002039; break;
					case WandEffect.Lightning:			num = 3002040; break;
					case WandEffect.ManaDraining:		num = 3002041; break;
				}

				if ( num > 0 )
					attrs.Add( new EquipInfoAttribute( num, m_Charges ) );
			}

			int number;

			if ( Name == null )
			{
				number = 1017085;
			}
			else
			{
				this.LabelTo( from, Name );
				number = 1041000;
			}

			if ( attrs.Count == 0 && Crafter == null && Name != null )
				return;

			EquipmentInfo eqInfo = new EquipmentInfo( number, Crafter, false, (EquipInfoAttribute[])attrs.ToArray( typeof( EquipInfoAttribute ) ) );

			from.Send( new DisplayEquipmentInfo( this, eqInfo ) );
		}
开发者ID:jackuoll,项目名称:Pre-AOS-RunUO,代码行数:58,代码来源:BaseWand.cs


示例5: OnSingleClick

		public override void OnSingleClick(Mobile from)
		{
			var attrs = new List<EquipInfoAttribute>();

			if (DisplayLootType)
			{
				if (LootType == LootType.Blessed)
				{
					attrs.Add(new EquipInfoAttribute(1038021)); // blessed
				}
				else if (LootType == LootType.Cursed)
				{
					attrs.Add(new EquipInfoAttribute(1049643)); // cursed
				}
			}

			#region Factions
			if (m_FactionState != null)
			{
				attrs.Add(new EquipInfoAttribute(1041350)); // faction item
			}
			#endregion

			if (m_Quality == WeaponQuality.Exceptional)
			{
				attrs.Add(new EquipInfoAttribute(1018305 - (int)m_Quality));
			}

			if (m_Identified || from.AccessLevel >= AccessLevel.GameMaster)
			{
				if (m_Slayer != SlayerName.None)
				{
					SlayerEntry entry = SlayerGroup.GetEntryByName(m_Slayer);
					if (entry != null)
					{
						attrs.Add(new EquipInfoAttribute(entry.Title));
					}
				}

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

				if (m_DurabilityLevel != WeaponDurabilityLevel.Regular)
				{
					attrs.Add(new EquipInfoAttribute(1038000 + (int)m_DurabilityLevel));
				}

				if (m_DamageLevel != WeaponDamageLevel.Regular)
				{
					attrs.Add(new EquipInfoAttribute(1038015 + (int)m_DamageLevel));
				}

				if (m_AccuracyLevel != WeaponAccuracyLevel.Regular)
				{
					attrs.Add(new EquipInfoAttribute(1038010 + (int)m_AccuracyLevel));
				}
			}
			else if (m_Slayer != SlayerName.None || m_Slayer2 != SlayerName.None ||
					 m_DurabilityLevel != WeaponDurabilityLevel.Regular || m_DamageLevel != WeaponDamageLevel.Regular ||
					 m_AccuracyLevel != WeaponAccuracyLevel.Regular)
			{
				attrs.Add(new EquipInfoAttribute(1038000)); // Unidentified
			}

			if (m_Poison != null && m_PoisonCharges > 0)
			{
				attrs.Add(new EquipInfoAttribute(1017383, m_PoisonCharges));
			}

			int number;

			if (Name == null)
			{
				number = LabelNumber;
			}
			else
			{
				LabelTo(from, Name);
				number = 1041000;
			}

			if (attrs.Count == 0 && Crafter == null && Name != null)
			{
				return;
			}

			EquipmentInfo eqInfo = new EquipmentInfo(number, m_Crafter, false, attrs.ToArray());

			from.Send(new DisplayEquipmentInfo(this, eqInfo));
		}
开发者ID:Tukaramdas,项目名称:ServUO-EC-Test-Fork,代码行数:96,代码来源:BaseWeapon.cs


示例6: OnSingleClick

		public override void OnSingleClick( Mobile from )
		{
			if ( Deleted || !from.CanSee( this ) )
				return;

			LabelToExpansion(from);

			int number;

			if ( String.IsNullOrEmpty( Name ) )
				number = LabelNumber;
			else
			{
				this.LabelTo( from, Name );
				number = 1041000;
			}

			if ( DisplayDyable )
				LabelDyableTo( from );

			List<EquipInfoAttribute> attrs = new List<EquipInfoAttribute>();

			bool ismagical = AddEquipInfoAttributes( from, attrs );

			if ( attrs.Count > 0 || Crafter != null || number != 1041000 )
			{

				EquipmentInfo eqInfo = new EquipmentInfo( number, m_Crafter, from.AccessLevel < AccessLevel.GameMaster && ismagical && !m_Identified, attrs.ToArray() );
				from.Send( new DisplayEquipmentInfo( this, eqInfo ) );
			}
		}
开发者ID:greeduomacro,项目名称:UO-Forever,代码行数:31,代码来源:BaseClothing.cs


示例7: OnSingleClick

        // Special version that DOES NOT show armor attributes and tags
        public override void OnSingleClick(Mobile from)
        {
            ArrayList attrs = new ArrayList();

            int number;

            if (Name == null)
            {
                number = LabelNumber;
            }
            else
            {
                this.LabelTo(from, Name);
                number = 1041000;
            }

            if (attrs.Count == 0 && Crafter == null && Name != null)
                return;

            EquipmentInfo eqInfo = new EquipmentInfo(number, Crafter, false, (EquipInfoAttribute[])attrs.ToArray(typeof(EquipInfoAttribute)));

            from.Send(new DisplayEquipmentInfo(this, eqInfo));

        }
开发者ID:zerodowned,项目名称:angelisland,代码行数:25,代码来源:BoneHelm.cs


示例8: OnSingleClick

        public override void OnSingleClick( Mobile from )
        {
            if ( Deleted || !from.CanSee( this ) )
                return;

            int number;

            if ( String.IsNullOrEmpty( Name ) )
                number = LabelNumber;
            else
            {
                this.LabelTo( from, Name );
                number = 1041000;
            }

            List<EquipInfoAttribute> attrs = new List<EquipInfoAttribute>();

            AddEquipInfoAttributes( from, attrs );

            if ( attrs.Count > 0 || Crafter != null || String.IsNullOrEmpty( Name ) )
            {
                EquipmentInfo eqInfo = new EquipmentInfo( number, m_Crafter, false, attrs.ToArray() );
                from.Send( new DisplayEquipmentInfo( this, eqInfo ) );
            }

            if ( CheckContentDisplay( from ) )
                LabelTo( from, "({0} item{2}, {1} stones)", TotalItems, TotalWeight, TotalItems != 1 ? "s" : String.Empty );
                //LabelTo( from, 1050044, String.Format( "{0}\t{1}", TotalItems.ToString(), TotalWeight.ToString() ) );
        }
开发者ID:kamronbatman,项目名称:Defiance-AOS-Pre-2012,代码行数:29,代码来源:BaseQuiver.cs


示例9: OnSingleClick

		public override void OnSingleClick( Mobile from )
		{
			if (this.HideAttributes == true)
			{
				base.OnSingleClick(from);
				return;
			}

			ArrayList attrs = new ArrayList();

			if ( DisplayLootType )
			{
				if ( LootType == LootType.Blessed )
					attrs.Add( new EquipInfoAttribute( 1038021 ) ); // blessed
				else if ( LootType == LootType.Cursed )
					attrs.Add( new EquipInfoAttribute( 1049643 ) ); // cursed
			}

			if ( m_Quality == JewelQuality.Exceptional )
				attrs.Add( new EquipInfoAttribute( 1018305 - (int)m_Quality ) );

			int number;

			if ( Name == null )
			{
				number = LabelNumber;
			}
			else
			{
				this.LabelTo( from, Name );
				number = 1041000;
			}

			if (Identified == false && MagicCharges > 0)
				attrs.Add( new EquipInfoAttribute( 1038000 ) ); // unidentified
			else if (Identified == true && MagicCharges > 0)
			{
				switch(MagicType)
				{
					case JewelMagicEffect.MagicReflect:
						attrs.Add( new EquipInfoAttribute(1044416, m_MagicCharges) ); // magic reflection
						break;
					case JewelMagicEffect.Invisibility:
						attrs.Add( new EquipInfoAttribute(1044424, m_MagicCharges) ); // invisibility
						break;
					case JewelMagicEffect.Bless:
						attrs.Add( new EquipInfoAttribute(1044397, m_MagicCharges) ); // bless
						break;
					case JewelMagicEffect.Teleport:
						attrs.Add( new EquipInfoAttribute(1044402, m_MagicCharges) ); // teleport
						break;
					case JewelMagicEffect.Agility:
						attrs.Add( new EquipInfoAttribute(1044389, m_MagicCharges) ); // agility
						break;
					case JewelMagicEffect.Cunning:
						attrs.Add( new EquipInfoAttribute(1044390, m_MagicCharges) ); // cunning
						break;
					case JewelMagicEffect.Strength:
						attrs.Add( new EquipInfoAttribute(1044396, m_MagicCharges) ); // strength
						break;
					case JewelMagicEffect.NightSight:
						attrs.Add( new EquipInfoAttribute(1044387, m_MagicCharges) ); // night sight
						break;
					case JewelMagicEffect.Curse:
						attrs.Add( new EquipInfoAttribute(1044407, m_MagicCharges) ); // curse
						break;
					case JewelMagicEffect.Clumsy:
						attrs.Add( new EquipInfoAttribute(1044382, m_MagicCharges) ); // clumsy
						break;
					case JewelMagicEffect.Feeblemind:
						attrs.Add( new EquipInfoAttribute(1044384, m_MagicCharges) ); // feeblemind
						break;
					case JewelMagicEffect.Weakness:
						attrs.Add( new EquipInfoAttribute(1044388, m_MagicCharges) ); // weaken
						break;
				}
			}

			if ( attrs.Count == 0 && Name != null && m_Crafter == null )
				return;

			EquipmentInfo eqInfo = new EquipmentInfo( number, m_Crafter, false, (EquipInfoAttribute[])attrs.ToArray( typeof( EquipInfoAttribute ) ) );

			from.Send( new DisplayEquipmentInfo( this, eqInfo ) );
		}
开发者ID:zerodowned,项目名称:angelisland,代码行数:85,代码来源:BaseJewel.cs


示例10: OnSingleClick

		public override void OnSingleClick( Mobile from )
		{
			if ( m_Description != null && m_Description.Length > 0 )
				LabelTo( from, m_Description );

			ArrayList attrs = new ArrayList();

			if ( m_Quality == RunebookQuality.Exceptional )
				attrs.Add( new EquipInfoAttribute( 1018305 - (int)m_Quality ) );

			int number = LabelNumber;

			if ( Crafter == null && attrs.Count == 0 )
			{
				base.OnSingleClick( from );
				return;
			}

			EquipmentInfo eqInfo = new EquipmentInfo( number, m_Crafter, false, (EquipInfoAttribute[])attrs.ToArray( typeof( EquipInfoAttribute ) ) );

			from.Send( new DisplayEquipmentInfo( this, eqInfo ) );
		}
开发者ID:zerodowned,项目名称:angelisland,代码行数:22,代码来源:Runebook.cs


示例11: OnSingleClick

		public override void OnSingleClick( Mobile from )
		{
			ArrayList attrs = new ArrayList();

			int num = 1041424;
			attrs.Add( new EquipInfoAttribute( num, m_Charges ) );

			int number;

			if ( Name == null )
			{
				number = 1017085;
			}
			else
			{
				this.LabelTo( from, Name );
				number = 1041000;
			}

			EquipmentInfo eqInfo = new EquipmentInfo( number, Crafter, false, (EquipInfoAttribute[])attrs.ToArray( typeof( EquipInfoAttribute ) ) );

			from.Send( new DisplayEquipmentInfo( this, eqInfo ) );
		}
开发者ID:zerodowned,项目名称:angelisland,代码行数:23,代码来源:FireworksWand.cs


示例12: OnSingleClick

		public override void OnSingleClick( Mobile from )
		{
			ArrayList attrs = new ArrayList();

			if ( DisplayLootType )
			{
				if ( LootType == LootType.Blessed )
					attrs.Add( new EquipInfoAttribute( 1038021 ) ); // blessed
				else if ( LootType == LootType.Cursed )
					attrs.Add( new EquipInfoAttribute( 1049643 ) ); // cursed
			}

			#region Factions
			if ( m_FactionState != null )
				attrs.Add( new EquipInfoAttribute( 1041350 ) ); // faction item
			#endregion

			if ( m_Quality == WeaponQuality.Exceptional )
				attrs.Add( new EquipInfoAttribute( 1018305 - (int)m_Quality ) );

			if ( m_Identified )
			{
				if ( m_Slayer != SlayerName.None )
					attrs.Add( new EquipInfoAttribute( SlayerGroup.GetEntryByName( m_Slayer ).Title ) );

				if ( m_DurabilityLevel != WeaponDurabilityLevel.Regular )
					attrs.Add( new EquipInfoAttribute( 1038000 + (int)m_DurabilityLevel ) );

				if ( m_DamageLevel != WeaponDamageLevel.Regular )
					attrs.Add( new EquipInfoAttribute( 1038015 + (int)m_DamageLevel ) );

				if ( m_AccuracyLevel != WeaponAccuracyLevel.Regular )
					attrs.Add( new EquipInfoAttribute( 1038010 + (int)m_AccuracyLevel ) );
			}
            else if (m_Slayer != SlayerName.None || m_DurabilityLevel != WeaponDurabilityLevel.Regular || m_DamageLevel != WeaponDamageLevel.Regular || m_AccuracyLevel != WeaponAccuracyLevel.Regular || m_ChargedAbility != WeaponChargedAbility.Regular && m_AbilityCharges > 0 )
			{
				attrs.Add( new EquipInfoAttribute( 1038000 ) ); // Unidentified
			}

			if ( m_Poison != null && m_PoisonCharges > 0 )
				attrs.Add( new EquipInfoAttribute( 1017383, m_PoisonCharges ) );

			int number;

			/*if ( Name == null )
			{
				number = LabelNumber;
			}
			else
			{
				this.LabelTo( from, Name );
				number = 1041000;
			}*/

            string name = Name == null ? ItemData.Name.ToLower() : Name;
            if (Name == null && m_Identified && m_ChargedAbility != WeaponChargedAbility.Regular && m_AbilityCharges > 0)
                name += String.Format(" of {0}: {1}", GetChargedAbilityName(m_ChargedAbility), m_AbilityCharges);
            this.LabelTo( from, name );
            number = 1041000;

			if ( attrs.Count == 0 && Crafter == null && Name != null )
				return;

			EquipmentInfo eqInfo = new EquipmentInfo( number, m_Crafter, false, (EquipInfoAttribute[])attrs.ToArray( typeof( EquipInfoAttribute ) ) );

			from.Send( new DisplayEquipmentInfo( this, eqInfo ) );
		}
开发者ID:kamronbatman,项目名称:DefianceUO-Pre1.10,代码行数:67,代码来源:BaseWeapon.cs


示例13: OnSingleClick

		public override void OnSingleClick(Mobile from)
		{
			ArrayList attrs = new ArrayList();

			if (Quality == ClothingQuality.Exceptional)
				attrs.Add(new EquipInfoAttribute(1018305 - (int)Quality));

			int number;

			if ( Name == null )
			{
				this.LabelTo( from, "cloth gloves" );
				number = 1041000;
			}
			else
			{
				this.LabelTo( from, Name );
				number = 1041000;
			}

			if (attrs.Count == 0 && Crafter == null && Name != null)
				return;

			EquipmentInfo eqInfo = new EquipmentInfo(number, Crafter, false, (EquipInfoAttribute[])attrs.ToArray(typeof(EquipInfoAttribute)));

			from.Send(new DisplayEquipmentInfo(this, eqInfo));
		}
开发者ID:zerodowned,项目名称:angelisland,代码行数:27,代码来源:ClothGloves.cs


示例14: OnSingleClick

		public override void OnSingleClick(Mobile from)
		{
			int number;

			if ( Name == null )
			{
				number = LabelNumber;
			}
			else
			{
				this.LabelTo( from, Name );
				number = 1041000;
			}

			ArrayList attrs = new ArrayList();

			if (Quality == WeaponQuality.Exceptional)
				attrs.Add( new EquipInfoAttribute( 1018305 - (int)m_Quality ) );

			EquipmentInfo eqInfo = new EquipmentInfo( number, m_Crafter, false, (EquipInfoAttribute[])attrs.ToArray( typeof( EquipInfoAttribute ) ) );

			from.Send( new DisplayEquipmentInfo( this, eqInfo ) );
		}
开发者ID:zerodowned,项目名称:angelisland,代码行数:23,代码来源:Bola.cs


示例15: OnSingleClick

		public override void OnSingleClick(Mobile from)
		{
			ArrayList attrs = new ArrayList();

			if (DisplayLootType)
			{
				if (LootType == LootType.Blessed)
					attrs.Add(new EquipInfoAttribute(1038021)); // blessed
				else if (LootType == LootType.Cursed)
					attrs.Add(new EquipInfoAttribute(1049643)); // cursed
			}

			string name = Name;
			bool hasability = ( m_ChargedAbility != JewelChargedAbility.Regular ) && ( m_AbilityCharges > 0 );

			if ( !m_Identified && hasability )
				attrs.Add(new EquipInfoAttribute(1038000)); // Unidentified
			else if ( String.IsNullOrEmpty( Name ) )
			{
				string gemtype = GetGemType( m_GemType );
				string chargeability = GetChargedAbilityName( m_ChargedAbility );
				name = String.Format( "{0}{1}{2}", String.IsNullOrEmpty( gemtype ) ? "" : String.Format( "{0} ", gemtype ), ItemData.Name.ToLower(), hasability ? String.Format( " of {0}: {1}", chargeability, m_AbilityCharges ) : "" );
			}

			this.LabelTo(from, name);
			int number = 1041000;

			EquipmentInfo eqInfo = new EquipmentInfo(number, null, false, (EquipInfoAttribute[])attrs.ToArray(typeof(EquipInfoAttribute)));
			from.Send(new DisplayEquipmentInfo(this, eqInfo));
		}
开发者ID:kamronbatman,项目名称:DefianceUO-Pre1.10,代码行数:30,代码来源:BaseJewel.cs


示例16: OnSingleClick


//.........这里部分代码省略.........

				if ( iProps[0] > (int) ArmorProtectionLevel.Regular )
					attrs.Add( new EquipInfoAttribute( 1038005 + iProps[0] ) );

			}
			else if( ItemType.IsSubclassOf( typeof( BaseClothing ) ) )
			{
				// Send charges and charge type info

				MagicEffect MagicType = (MagicEffect) iProps[0];

				switch (MagicType)
				{
					case MagicEffect.MagicReflect:
						attrs.Add(new EquipInfoAttribute(1044416, iProps[1])); // magic reflection
						break;
					case MagicEffect.Invisibility:
						attrs.Add(new EquipInfoAttribute(1044424, iProps[1])); // invisibility
						break;
					case MagicEffect.Bless:
						attrs.Add(new EquipInfoAttribute(1044397, iProps[1])); // bless
						break;
					case MagicEffect.Agility:
						attrs.Add(new EquipInfoAttribute(1044389, iProps[1])); // agility
						break;
					case MagicEffect.Cunning:
						attrs.Add(new EquipInfoAttribute(1044390, iProps[1])); // cunning
						break;
					case MagicEffect.Strength:
						attrs.Add(new EquipInfoAttribute(1044396, iProps[1])); // strength
						break;
					case MagicEffect.NightSight:
						attrs.Add(new EquipInfoAttribute(1044387, iProps[1])); // night sight
						break;
					case MagicEffect.Curse:
						attrs.Add(new EquipInfoAttribute(1044407, iProps[1])); // curse
						break;
					case MagicEffect.Clumsy:
						attrs.Add(new EquipInfoAttribute(1044382, iProps[1])); // clumsy
						break;
					case MagicEffect.Feeblemind:
						attrs.Add(new EquipInfoAttribute(1044384, iProps[1])); // feeblemind
						break;
					case MagicEffect.Weakness:
						attrs.Add(new EquipInfoAttribute(1044388, iProps[1])); // weaken
						break;
				}
			}
			else if( ItemType.IsSubclassOf( typeof( BaseJewel ) ) )
			{
				// Send charges and charge type info

				JewelMagicEffect MagicType = (JewelMagicEffect) iProps[0];

				switch(MagicType)
				{
					case JewelMagicEffect.MagicReflect:
						attrs.Add( new EquipInfoAttribute(1044416, iProps[1] ) ); // magic reflection
						break;
					case JewelMagicEffect.Invisibility:
						attrs.Add( new EquipInfoAttribute(1044424, iProps[1] ) ); // invisibility
						break;
					case JewelMagicEffect.Bless:
						attrs.Add( new EquipInfoAttribute(1044397, iProps[1] ) ); // bless
						break;
					case JewelMagicEffect.Teleport:
						attrs.Add( new EquipInfoAttribute(1044402, iProps[1] ) ); // teleport
						break;
					case JewelMagicEffect.Agility:
						attrs.Add( new EquipInfoAttribute(1044389, iProps[1] ) ); // agility
						break;
					case JewelMagicEffect.Cunning:
						attrs.Add( new EquipInfoAttribute(1044390, iProps[1] ) ); // cunning
						break;
					case JewelMagicEffect.Strength:
						attrs.Add( new EquipInfoAttribute(1044396, iProps[1] ) ); // strength
						break;
					case JewelMagicEffect.NightSight:
						attrs.Add( new EquipInfoAttribute(1044387, iProps[1] ) ); // night sight
						break;
					case JewelMagicEffect.Curse:
						attrs.Add( new EquipInfoAttribute(1044407, iProps[1] ) ); // curse
						break;
					case JewelMagicEffect.Clumsy:
						attrs.Add( new EquipInfoAttribute(1044382, iProps[1] ) ); // clumsy
						break;
					case JewelMagicEffect.Feeblemind:
						attrs.Add( new EquipInfoAttribute(1044384, iProps[1] ) ); // feeblemind
						break;
					case JewelMagicEffect.Weakness:
						attrs.Add( new EquipInfoAttribute(1044388, iProps[1] ) ); // weaken
						break;
				}
			}
			else
				return;

			EquipmentInfo eqInfo = new EquipmentInfo( 1041000, null, false, (EquipInfoAttribute[])attrs.ToArray( typeof( EquipInfoAttribute ) ) );
			from.Send( new DisplayEquipmentInfo( this, eqInfo ) );
		}
开发者ID:zerodowned,项目名称:angelisland,代码行数:101,代码来源:EnchantedItem.cs


示例17: OnSingleClick

        public override void OnSingleClick( Mobile from )
        {
            if ( Deleted || !from.CanSee( this ) )
                return;

            int number;

            if ( String.IsNullOrEmpty( Name ) )
                number = LabelNumber;
            else
            {
                this.LabelTo( from, Name );
                number = 1041000;
            }

            List<EquipInfoAttribute> attrs = new List<EquipInfoAttribute>();

            AddEquipInfoAttributes( from, attrs );

            if ( attrs.Count > 0 || Crafter != null || String.IsNullOrEmpty( Name ) )
            {
                EquipmentInfo eqInfo = new EquipmentInfo( number, m_Crafter, false, attrs.ToArray() );
                from.Send( new DisplayEquipmentInfo( this, eqInfo ) );
            }
        }
开发者ID:kamronbatman,项目名称:Defiance-AOS-Pre-2012,代码行数:25,代码来源:BaseArmor.cs


示例18: DisplayDurabilityTo


//.........这里部分代码省略.........
            LabelToExpansion(from);

            //			if ( this is IUsesRemaining && ((IUsesRemaining)this).ShowUsesRemaining )
            //				DisplayDurabilityTo( from, ((IUsesRemaining)this).UsesRemaining );

            if (IsAesthetic)
            {
                LabelTo(from, "[Aesthetic]", 2049);
            }

            int number;
            string name = Name;
            if (IsAesthetic)
                name = name + "[Aesthetic]";
            /*
			if ( m_Resource != CraftResource.None && m_Resource != CraftResource.RegularWood && m_Resource != CraftResource.Iron && m_Resource != CraftResource.RegularLeather && String.IsNullOrEmpty( name ) )
			{
				StringList stringlist = StringList.Default;

				if ( from.NetState != null && from.NetState.LTable != null )
					stringlist = from.NetState.LTable;

				if ( String.IsNullOrEmpty( name ) && stringlist[LabelNumber] != null )
					name = stringlist[LabelNumber].Text;

				if ( name.StartsWith( "a " ) && name.Length > 2 )
					name = name.Substring( 2, name.Length-2 );
				else if ( name.StartsWith( "an " ) && name.Length > 3 )
					name = name.Substring( 3, name.Length-3 );

				int oreType = 0;
				bool dragonscale = false;

				//dragon scale - 1053112

				switch ( m_Resource )
				{
					case CraftResource.DullCopper:	oreType = 1053108; break; // dull copper
					case CraftResource.ShadowIron:	oreType = 1053107; break; // shadow iron
					case CraftResource.Copper:		oreType = 1053106; break; // copper
					case CraftResource.Bronze:		oreType = 1053105; break; // bronze
					case CraftResource.Gold:			oreType = 1053104; break; // golden
					case CraftResource.Agapite:		oreType = 1053103; break; // agapite
					case CraftResource.Verite:		oreType = 1053102; break; // verite
					case CraftResource.Valorite:		oreType = 1053101; break; // valorite
					case CraftResource.SpinedLeather:	oreType = 1061118; break; // spined
					case CraftResource.HornedLeather:	oreType = 1061117; break; // horned
					case CraftResource.BarbedLeather:	oreType = 1061116; break; // barbed
					case CraftResource.RedScales:		oreType = 1060814; dragonscale = true; break; // red
					case CraftResource.YellowScales:	oreType = 1060818; dragonscale = true; break; // yellow
					case CraftResource.BlackScales:	oreType = 1060820; dragonscale = true; break; // black
					case CraftResource.GreenScales:	oreType = 1060819; dragonscale = true; break; // green
					case CraftResource.WhiteScales:	oreType = 1060821; dragonscale = true; break; // white
					case CraftResource.BlueScales:	oreType = 1060815; dragonscale = true; break; // blue
					case CraftResource.OakWood:		oreType = 1072533; break;
					case CraftResource.AshWood:		oreType = 1072534; break;
					case CraftResource.YewWood:		oreType = 1072535; break;
					case CraftResource.Bloodwood:		oreType = 1072538; break;
					case CraftResource.Heartwood:		oreType = 1072536; break;
					case CraftResource.Frostwood:		oreType = 1072539; break;
				}

				string resource = stringlist[oreType].Text;
				if ( dragonscale )
					resource = String.Format( "{0} {1}", resource, stringlist[1053112].Text );

				name = String.Format( "{0} {1}", resource, name );
			}
			else
				name = Name;
*/
            if (String.IsNullOrEmpty(name))
            {
                number = LabelNumber;
            }
            else
            {
                LabelTo(from, name, 1153);
                number = 1041000;
            }

            if (DisplayDyable)
            {
                LabelDyableTo(from);
            }

            var attrs = new List<EquipInfoAttribute>();

            bool ismagical = AddEquipInfoAttributes(from, attrs) ||
                             (m_Resource > CraftResource.Valorite && m_Resource < CraftResource.RegularLeather) ||
                             base.Hue > 0;

            if (attrs.Count > 0 || Crafter != null || number != 1041000)
            {
                var eqInfo = new EquipmentInfo(
                    number, m_Crafter, /*from.AccessLevel < AccessLevel.GameMaster &&*/ ismagical && !Identified,
                    attrs.ToArray());
                from.Send(new DisplayEquipmentInfo(this, eqInfo));
            }
        }
开发者ID:greeduomacro,项目名称:UO-Forever,代码行数:101,代码来源:BaseWeapon.cs


示例19: OnSingleClick


//.........这里部分代码省略.........
						}

						if (m_AccuracyLevel != WeaponAccuracyLevel.Regular)
						{
							if (m_AccuracyLevel == WeaponAccuracyLevel.Accurate)
							{
								oldname = "accurate " + oldname;
								article = "an";
							}
							else
							{
								oldname = m_AccuracyLevel.ToString().ToLower() + " accurate " + oldname;
								if (m_AccuracyLevel == WeaponAccuracyLevel.Eminently || m_AccuracyLevel == WeaponAccuracyLevel.Exceedingly)
								{
									article = "an";
								}
								else
								{
									article = "a";
								}
							}
						}

						if (m_DurabilityLevel != WeaponDurabilityLevel.Regular)
						{
							oldname = m_DurabilityLevel.ToString().ToLower() + " " + oldname;
							if (m_DurabilityLevel == WeaponDurabilityLevel.Indestructible)
							{
								article = "an";
							}
							else
							{
								article = "a";
							}
						}

						if (m_DamageLevel != WeaponDamageLevel.Regular)
						{
							if (m_DamageLevel == WeaponDamageLevel.Vanq) //silly people abbreviated vanquishing in the enumeration!
							{
								oldname = oldname + " of vanquishing";
							}
							else
							{
								oldname = oldname + " of " + m_DamageLevel.ToString().ToLower();
							}
						}
					}
					else if( m_Slayer != SlayerName.None 
						     || m_DurabilityLevel != WeaponDurabilityLevel.Regular 
						     || m_DamageLevel != WeaponDamageLevel.Regular 
						     || m_AccuracyLevel != WeaponAccuracyLevel.Regular )
					{
						oldname = "magic " + oldname;
						article = "a";
					}

					//crafted-by goes at the end
					if (m_Crafter != null)
					{
						oldname += " crafted by " + m_Crafter.Name;
					}

					if (m_Poison != null && m_PoisonCharges > 0)
					{
						oldname = "poisoned " + oldname;
						oldname = (oldname + ", charges: " + m_PoisonCharges);
						article = "a";
					}

					//finally, add the article
					oldname = article + " " + oldname;

					this.LabelTo(from, oldname);
					number = 1041000;
				}
			}
			else
			{
				this.LabelTo(from, Name);
				number = 1041000;
			}

			if (attrs.Count == 0 && Crafter == null && Name != null)
				return;

			if (Name != null || OldName == null)
			{
				EquipmentInfo eqInfo = new EquipmentInfo(number, m_Crafter, false, (EquipInfoAttribute[])attrs.ToArray(typeof(EquipInfoAttribute)));
				from.Send(new DisplayEquipmentInfo(this, eqInfo));
			}
			else
			{
				if (attrs.Count > 0)
				{
					EquipmentInfo eqInfo = new EquipmentInfo(number, null, false, (EquipInfoAttribute[])attrs.ToArray(typeof(EquipInfoAttribute)));
					from.Send(new DisplayEquipmentInfo(this, eqInfo));
				}
			}
		}
开发者ID:zerodowned,项目名称:angelisland,代码行数:101,代码来源:BaseWeapon.cs


示例20: DisplayEquipmentInfo

		public DisplayEquipmentInfo( Item item, EquipmentInfo info ) : base( 0x1C )
		{
			EquipInfoAttribute[] attrs = info.Attributes;
			string text = CliLoc.LocToString( info.Number );

			if ( info.Crafter != null && info.Crafter.Name != null )
				text = string.Format( "{0} [crafted by {1}]", text, info.Crafter.Name );

			for ( int i = 0; i < attrs.Length; ++i )
			{
				if ( attrs[i].Charges > 0 )
					text = string.Format( "{0} [{1}:{2}]", text, CliLoc.LocToString(attrs[i].Number), attrs[i].Charges.ToString() );
				else if ( attrs[i].Charges == 0 )
					text = string.Format( "{0} [{1}:None]", text, CliLoc.LocToString(attrs[i].Number) );
				else
					text = string.Format( "{0} [{1}]", text, CliLoc.LocToString(attrs[i].Number) );
			}

			//if (!info.Unidentified)
			//text = string.Format("{0} [unidentified]", text);

			this.EnsureCapacity(45 + text.Length);
			m_Stream.Write((int)item.Serial);
			m_Stream.Write((short)item.ItemID);
			m_Stream.Write((byte)MessageType.Label);
			m_Stream.Write((short)906);
			m_Stream.Write((short)3);
			m_Stream.WriteAsciiFixed("", 30);
			m_Stream.WriteAsciiNull(text);

			m_Stream.Write((int)-1);
		}
开发者ID:FreeReign,项目名称:imaginenation,代码行数:32,代码来源:Packets.cs



注:本文中的Server.Network.EquipmentInfo类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# Network.NetState类代码示例发布时间:2022-05-26
下一篇:
C# Network.EncodedReader类代码示例发布时间:2022-05-26
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap