当前位置: 首页>>代码示例>>C#>>正文


C# SlayerName类代码示例

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


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

示例1: Deserialize

		public override void Deserialize(GenericReader reader)
		{
			base.Deserialize(reader);

			int version = reader.ReadInt();
			// version 0
            m_Slayer = (SlayerName)reader.ReadInt();
		}
开发者ID:greeduomacro,项目名称:UO-Forever,代码行数:8,代码来源:XmlSlayer.cs

示例2: GetEntryByName

		public static SlayerEntry GetEntryByName( SlayerName name )
		{
			int v = (int)name;

			if ( v >= 0 && v < m_TotalEntries.Length )
				return m_TotalEntries[v];

			return null;
		}
开发者ID:nick12344356,项目名称:The-Basement,代码行数:9,代码来源:SlayerGroup.cs

示例3: XmlSlayer

		public XmlSlayer(string slayer)
		{
            try
            {
                m_Slayer = (SlayerName)Enum.Parse(typeof(SlayerName), slayer, true);
            }
            catch
            {
                m_Slayer = SlayerName.None;
            }
		}
开发者ID:greeduomacro,项目名称:UO-Forever,代码行数:11,代码来源:XmlSlayer.cs

示例4: Deserialize

		public override void Deserialize( GenericReader reader )
		{
			base.Deserialize( reader );
			
			int version = reader.ReadInt();

			switch( version )
			{
				case 0:
				{
					m_Slayer = (SlayerName)reader.ReadInt();
					break;
				}
			}
		}
开发者ID:romeov007,项目名称:imagine-uo,代码行数:15,代码来源:SlayerRune.cs

示例5: SlayerEntry

		public SlayerEntry(SlayerName name, params Type[] types)
		{
			Name = name;
			Types = types;
		}
开发者ID:greeduomacro,项目名称:UO-Forever,代码行数:5,代码来源:SlayerEntry.cs

示例6: Deserialize

		public override void Deserialize( GenericReader reader )
		{
			base.Deserialize( reader );

			int version = reader.ReadInt();

			switch ( version )
			{
				case 3:
				{
					m_ReplenishesCharges = reader.ReadBool();

					if( m_ReplenishesCharges )
						m_LastReplenished = reader.ReadDateTime();

					goto case 2;
				}
				case 2:
				{
					m_Crafter = reader.ReadMobile();

					m_Quality = (InstrumentQuality)reader.ReadEncodedInt();
					m_Slayer = (SlayerName)reader.ReadEncodedInt();
					m_Slayer2 = (SlayerName)reader.ReadEncodedInt();

					UsesRemaining = reader.ReadEncodedInt();

					m_WellSound = reader.ReadEncodedInt();
					m_BadlySound = reader.ReadEncodedInt();
					
					break;
				}
				case 1:
				{
					m_Crafter = reader.ReadMobile();

					m_Quality = (InstrumentQuality)reader.ReadEncodedInt();
					m_Slayer = (SlayerName)reader.ReadEncodedInt();

					UsesRemaining = reader.ReadEncodedInt();

					m_WellSound = reader.ReadEncodedInt();
					m_BadlySound = reader.ReadEncodedInt();

					break;
				}
				case 0:
				{
					m_WellSound = reader.ReadInt();
					m_BadlySound = reader.ReadInt();
					UsesRemaining = Utility.RandomMinMax( InitMinUses, InitMaxUses );

					break;
				}
			}

			CheckReplenishUses();
		}
开发者ID:romeov007,项目名称:imagine-uo,代码行数:58,代码来源:BaseInstrument.cs

示例7: Deserialize

        public override void Deserialize( GenericReader reader )
        {
            base.Deserialize(reader);

            int version = reader.ReadInt();

            switch( version )
            {
                case 11:
                case 10:
                case 9:
                case 8:
                    {
                        if( version <= 9 )
                        {
                            reader.ReadMobile();
                            reader.ReadString();
                            reader.ReadMobile();
                        }

                        goto case 7;
                    }
                case 7:
                case 6:
                case 5:
                    {
                        SaveFlag flags = (SaveFlag)reader.ReadInt();

                        if( GetSaveFlag(flags, SaveFlag.DamageLevel) )
                        {
                            m_DamageLevel = (WeaponDamageLevel)reader.ReadInt();

                            if( m_DamageLevel > WeaponDamageLevel.Vanq )
                                m_DamageLevel = WeaponDamageLevel.Ruin;
                        }

                        if( GetSaveFlag(flags, SaveFlag.AccuracyLevel) )
                        {
                            m_AccuracyLevel = (WeaponAccuracyLevel)reader.ReadInt();

                            if( m_AccuracyLevel > WeaponAccuracyLevel.Supremely )
                                m_AccuracyLevel = WeaponAccuracyLevel.Accurate;
                        }

                        if( GetSaveFlag(flags, SaveFlag.DurabilityLevel) )
                        {
                            m_DurabilityLevel = (WeaponDurabilityLevel)reader.ReadInt();

                            if( m_DurabilityLevel > WeaponDurabilityLevel.Indestructible )
                                m_DurabilityLevel = WeaponDurabilityLevel.Durable;
                        }

                        if( GetSaveFlag(flags, SaveFlag.Quality) )
                            m_Quality = (WeaponQuality)reader.ReadInt();
                        else
                            m_Quality = WeaponQuality.Regular;

                        if( GetSaveFlag(flags, SaveFlag.Hits) )
                            m_Hits = reader.ReadInt();

                        if( GetSaveFlag(flags, SaveFlag.MaxHits) )
                            m_MaxHits = reader.ReadInt();

                        if( GetSaveFlag(flags, SaveFlag.Slayer) )
                            m_Slayer = (SlayerName)reader.ReadInt();

                        if( GetSaveFlag(flags, SaveFlag.Poison) )
                            m_Poison = Poison.Deserialize(reader);

                        if( GetSaveFlag(flags, SaveFlag.PoisonCharges) )
                            m_PoisonCharges = reader.ReadInt();

                        if( GetSaveFlag(flags, SaveFlag.Crafter) )
                            m_Crafter = reader.ReadMobile();

                        if( GetSaveFlag(flags, SaveFlag.Identified) )
                        {
                            if( version <= 10 )
                                m_Identified = true;
                            else
                                m_Identified = reader.ReadBool();
                        }

                        if( GetSaveFlag(flags, SaveFlag.StrReq) )
                            m_StrReq = reader.ReadInt();
                        else
                            m_StrReq = -1;

                        if( GetSaveFlag(flags, SaveFlag.DexReq) )
                            m_DexReq = reader.ReadInt();
                        else
                            m_DexReq = -1;

                        if( GetSaveFlag(flags, SaveFlag.IntReq) )
                            m_IntReq = reader.ReadInt();
                        else
                            m_IntReq = -1;

                        if( GetSaveFlag(flags, SaveFlag.MinDamage) )
                            m_MinDamage = reader.ReadInt();
//.........这里部分代码省略.........
开发者ID:greeduomacro,项目名称:hubroot,代码行数:101,代码来源:BaseWeapon.cs

示例8: Deserialize

		public override void Deserialize( GenericReader reader )
		{
			base.Deserialize( reader );

			int version = reader.ReadInt();
			SaveFlag flags = (SaveFlag)reader.ReadInt();

			switch ( version )
			{
				case 8:
				{
					// turnned off AOS attributes
					goto case 7;
				}
				case 7:
				{
					goto case 6;
				}
				case 6:
				{
					goto case 5;
				}
				case 5:
				{
					if ( GetSaveFlag( flags, SaveFlag.DamageLevel ) )
						m_DamageLevel = (WeaponDamageLevel)reader.ReadInt();

					if ( GetSaveFlag( flags, SaveFlag.AccuracyLevel ) )
						m_AccuracyLevel = (WeaponAccuracyLevel)reader.ReadInt();

					if ( GetSaveFlag( flags, SaveFlag.DurabilityLevel ) )
						m_DurabilityLevel = (WeaponDurabilityLevel)reader.ReadInt();

					if ( GetSaveFlag( flags, SaveFlag.Quality ) )
						m_Quality = (WeaponQuality)reader.ReadInt();
					else
						m_Quality = WeaponQuality.Regular;

					if ( GetSaveFlag( flags, SaveFlag.Hits ) )
						m_Hits = reader.ReadInt();

					if ( GetSaveFlag( flags, SaveFlag.MaxHits ) )
						m_MaxHits = reader.ReadInt();

					if ( GetSaveFlag( flags, SaveFlag.Slayer ) )
						m_Slayer = (SlayerName)reader.ReadInt();

					if ( GetSaveFlag( flags, SaveFlag.Poison ) )
						m_Poison = Poison.Deserialize( reader );

					if ( GetSaveFlag( flags, SaveFlag.PoisonCharges ) )
						m_PoisonCharges = reader.ReadInt();

					if ( GetSaveFlag( flags, SaveFlag.Crafter ) )
						m_Crafter = reader.ReadMobile();

					if ( GetSaveFlag( flags, SaveFlag.Identified ) )
						m_Identified = ( version >= 6 || reader.ReadBool() );

					if ( GetSaveFlag( flags, SaveFlag.StrReq ) )
						m_StrReq = reader.ReadInt();
					else
						m_StrReq = -1;

					if ( GetSaveFlag( flags, SaveFlag.DexReq ) )
						m_DexReq = reader.ReadInt();
					else
						m_DexReq = -1;

					if ( GetSaveFlag( flags, SaveFlag.IntReq ) )
						m_IntReq = reader.ReadInt();
					else
						m_IntReq = -1;

					if ( GetSaveFlag( flags, SaveFlag.MinDamage ) )
						m_MinDamage = reader.ReadInt();
					else
						m_MinDamage = -1;

					if ( GetSaveFlag( flags, SaveFlag.MaxDamage ) )
						m_MaxDamage = reader.ReadInt();
					else
						m_MaxDamage = -1;

					if ( GetSaveFlag( flags, SaveFlag.HitSound ) )
						m_HitSound = reader.ReadInt();
					else
						m_HitSound = -1;

					if ( GetSaveFlag( flags, SaveFlag.MissSound ) )
						m_MissSound = reader.ReadInt();
					else
						m_MissSound = -1;

					if ( GetSaveFlag( flags, SaveFlag.Speed ) )
						m_Speed = reader.ReadInt();
					else
						m_Speed = -1;

					if ( GetSaveFlag( flags, SaveFlag.MaxRange ) )
//.........这里部分代码省略.........
开发者ID:zerodowned,项目名称:angelisland,代码行数:101,代码来源:BaseWeapon.cs

示例9: Deserialize

		public override void Deserialize( GenericReader reader )
		{
			base.Deserialize( reader );
			
			int version = reader.ReadInt();
			
			_Quality = (InstrumentQuality)reader.ReadInt();
			_UsesRemaining = reader.ReadInt();
			_Slayer = (SlayerName)reader.ReadInt();
			_Slayer2 = (SlayerName)reader.ReadInt();
			_Crafter = reader.ReadMobile();
		}
开发者ID:Tukaramdas,项目名称:ServUO-EC-Test-Fork,代码行数:12,代码来源:ItemListEntries.cs

示例10: CheckSlays

        private static bool CheckSlays( SlayerName slayer, Mobile target )
        {
            if ( slayer == SlayerName.None )
                return false;

            SlayerEntry entry = SlayerGroup.GetEntryByName( slayer );

            return entry != null && entry.Slays( target );
        }
开发者ID:Ravenwolfe,项目名称:xrunuo,代码行数:9,代码来源:BaseInstrument.cs

示例11: HasSlayer

		private static bool HasSlayer(Item item, string name, SlayerName attr)
		{
			var pi = item.GetType().GetProperty(name, TypeOfSlayerName);

			if (pi == null)
			{
				return false;
			}

			return ((SlayerName)pi.GetValue(item, null) == attr);
		}
开发者ID:Vita-Nex,项目名称:Core,代码行数:11,代码来源:AttributesExt.cs

示例12: GetSlayerWeight

		private static double GetSlayerWeight(SlayerName attr)
		{
			if (attr == SlayerName.None)
			{
				return 0;
			}

			return IsSuper(attr) ? 1.3 : 1.1;
		}
开发者ID:Vita-Nex,项目名称:Core,代码行数:9,代码来源:AttributesExt.cs

示例13: GetModForAttribute

        public static int GetModForAttribute(SlayerName attr)
        {
            foreach (KeyValuePair<int, ImbuingDefinition> kvp in m_Table)
            {
                int mod = kvp.Key;
                ImbuingDefinition def = kvp.Value;

                if (def.Attribute is SlayerName && (SlayerName)def.Attribute == attr)
                    return mod;
            }

            return -1;
        }
开发者ID:Ziden,项目名称:ServUO-EC-Test-Fork,代码行数:13,代码来源:Imbuing.cs

示例14: Deserialize

        public override void Deserialize( GenericReader reader )
        {
            base.Deserialize( reader );

            int version = reader.ReadInt();

            switch ( version )
            {
                case 27:
                case 26: m_BetaNerf = reader.ReadBool(); goto case 25;
                case 25: m_Components = reader.ReadStrongItemList(); goto case 24;
                case 24: m_NewCrafting = reader.ReadBool(); m_QualityDefense = reader.ReadInt(); goto case 23;
                case 23: m_HasHalo = reader.ReadBool(); goto case 22;
                case 22:
                case 21:
                case 20:
                {
                    m_QualityDamage = reader.ReadInt();
                    m_QualitySpeed = reader.ReadInt();
                    m_QualityAccuracy = reader.ReadInt();
                    goto case 19;
                }
                case 19:
                case 18:
                case 17:
                case 16:
                case 15:
                case 14:
                case 13:
                case 12:
                case 11:
                case 10:
                {
                    m_CraftersOriginalName = reader.ReadString();
                    goto case 9;
                }
                case 9:
                {
                    m_Engraved1 = reader.ReadString();
                    m_Engraved2 = reader.ReadString();
                    m_Engraved3 = reader.ReadString();
                    goto case 5;
                }
                case 8:
                case 7:
                case 6:
                case 5:
                {
                    SaveFlag flags = (SaveFlag)reader.ReadInt();

                    if ( GetSaveFlag( flags, SaveFlag.DamageLevel ) )
                    {
                        m_DamageLevel = (WeaponDamageLevel)reader.ReadInt();

                        if ( m_DamageLevel > WeaponDamageLevel.Vanq )
                            m_DamageLevel = WeaponDamageLevel.Ruin;
                    }

                    if ( GetSaveFlag( flags, SaveFlag.AccuracyLevel ) )
                    {
                        m_AccuracyLevel = (WeaponAccuracyLevel)reader.ReadInt();

                        if ( m_AccuracyLevel > WeaponAccuracyLevel.Supremely )
                            m_AccuracyLevel = WeaponAccuracyLevel.Accurate;
                    }

                    if ( GetSaveFlag( flags, SaveFlag.DurabilityLevel ) )
                    {
                        m_DurabilityLevel = (WeaponDurabilityLevel)reader.ReadInt();

                        if ( m_DurabilityLevel > WeaponDurabilityLevel.Indestructible )
                            m_DurabilityLevel = WeaponDurabilityLevel.Durable;
                    }

                    if ( GetSaveFlag( flags, SaveFlag.Quality ) )
                        m_Quality = (WeaponQuality)reader.ReadInt();
                    else
                        m_Quality = WeaponQuality.Regular;

                    if ( GetSaveFlag( flags, SaveFlag.Hits ) )
                        m_Hits = reader.ReadInt();

                    if ( GetSaveFlag( flags, SaveFlag.MaxHits ) )
                        m_MaxHits = reader.ReadInt();

                    if ( GetSaveFlag( flags, SaveFlag.Slayer ) )
                        m_Slayer = (SlayerName)reader.ReadInt();

                    if ( GetSaveFlag( flags, SaveFlag.Poison ) )
                        m_Poison = Poison.Deserialize( reader );

                    if ( GetSaveFlag( flags, SaveFlag.PoisonCharges ) )
                        m_PoisonCharges = reader.ReadInt();

                    if ( GetSaveFlag( flags, SaveFlag.Crafter ) )
                        m_Crafter = reader.ReadMobile();

                    if ( GetSaveFlag( flags, SaveFlag.Identified ) )
                        m_Identified = ( version >= 6 || reader.ReadBool() );

//.........这里部分代码省略.........
开发者ID:justdanofficial,项目名称:khaeros,代码行数:101,代码来源:BaseWeapon.cs

示例15: Deserialize

        public override void Deserialize( GenericReader reader )
        {
            base.Deserialize( reader );

            int version = reader.ReadInt();

            switch ( version )
            {
                case 5:
                    {
                        m_Exceptional = reader.ReadBool();
                        m_Crafter = reader.ReadMobile();

                        goto case 4;
                    }
                case 4:
                    {
                        m_Slayer = (SlayerName) reader.ReadEncodedInt();
                        m_Slayer2 = (SlayerName) reader.ReadEncodedInt();

                        m_UsesRemaining = reader.ReadEncodedInt();

                        m_WellSound = reader.ReadEncodedInt();
                        m_BadlySound = reader.ReadEncodedInt();

                        break;
                    }
            }
        }
开发者ID:Ravenwolfe,项目名称:xrunuo,代码行数:29,代码来源:BaseInstrument.cs


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