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

C# Server.AosAttributes类代码示例

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

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



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

示例1: EnhancementAttributes

 public EnhancementAttributes(string title)
 {
     this.Title = title;
     this.Attributes = new AosAttributes(null);
     this.WeaponAttributes = new AosWeaponAttributes(null);
     this.ArmorAttributes = new AosArmorAttributes(null);
     this.AbsorptionAttributes = new SAAbsorptionAttributes(null);
 }
开发者ID:Crome696,项目名称:ServUO,代码行数:8,代码来源:Enhancement.cs


示例2: EnhancementAttributes

		public EnhancementAttributes( string title )
		{
			Title = title;
			Attributes = new AosAttributes( null );
			WeaponAttributes = new AosWeaponAttributes( null );
			ArmorAttributes = new AosArmorAttributes( null );
			AbsorptionAttributes = new SAAbsorptionAttributes( null );
		}
开发者ID:suiy187,项目名称:runuocustom,代码行数:8,代码来源:Enhancement.cs


示例3: BaseClothing

        public BaseClothing( int itemID, Layer layer, int hue )
            : base(itemID)
        {
            Layer = layer;
            Hue = hue;
            m_Quality = ClothingQuality.Regular;

            m_AosAttributes = new AosAttributes( this );
            m_AosClothingAttributes = new AosArmorAttributes( this );
            m_AosSkillBonuses = new AosSkillBonuses( this );
            m_AosResistances = new AosElementAttributes( this );
        }
开发者ID:cynricthehun,项目名称:UOLegends,代码行数:12,代码来源:BaseClothing.cs


示例4: BaseClothing

        public BaseClothing( int itemID, Layer layer, int hue )
            : base(itemID)
        {
            Layer = layer;
            Hue = hue;

            m_Resource = DefaultResource;
            m_Quality = ClothingQuality.Regular;

            m_HitPoints = m_MaxHitPoints = Utility.RandomMinMax( InitMinHits, InitMaxHits );

            m_AosAttributes = new AosAttributes( this );
            m_AosClothingAttributes = new AosArmorAttributes( this );
            m_AosSkillBonuses = new AosSkillBonuses( this );
            m_AosResistances = new AosElementAttributes( this );
        }
开发者ID:evildude807,项目名称:kaltar,代码行数:16,代码来源:BaseClothing.cs


示例5: BaseTalisman

		public BaseTalisman( int itemID ) : base( itemID )
		{
			Layer = Layer.Talisman;
			Weight = 1.0;

			m_Protection = new TalismanAttribute();
			m_Killer = new TalismanAttribute();
			m_Summoner = new TalismanAttribute();
			m_AosAttributes = new AosAttributes( this );
			m_AosSkillBonuses = new AosSkillBonuses( this );
		}
开发者ID:PepeBiondi,项目名称:runsa,代码行数:11,代码来源:BaseTalisman.cs


示例6: Deserialize

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

            int version = reader.ReadInt();

            switch (version)
            {
                case 3:
                    {
                        m_MaxHitPoints = reader.ReadEncodedInt();
                        m_HitPoints = reader.ReadEncodedInt();

                        goto case 2;
                    }
                case 2:
                    {
                        m_Resource = (CraftResource)reader.ReadEncodedInt();
                        m_GemType = (GemType)reader.ReadEncodedInt();

                        goto case 1;
                    }
                case 1:
                    {
                        m_AosAttributes = new AosAttributes(this, reader);
                        m_AosResistances = new AosElementAttributes(this, reader);
                        m_AosSkillBonuses = new AosSkillBonuses(this, reader);

                        if (Core.AOS && Parent is Mobile)
                            m_AosSkillBonuses.AddTo((Mobile)Parent);

                        int strBonus = m_AosAttributes.BonusStr;
                        int dexBonus = m_AosAttributes.BonusDex;
                        int intBonus = m_AosAttributes.BonusInt;

                        if (Parent is Mobile && (strBonus != 0 || dexBonus != 0 || intBonus != 0))
                        {
                            Mobile m = (Mobile)Parent;

                            string modName = Serial.ToString();

                            if (strBonus != 0)
                                m.AddStatMod(new StatMod(StatType.Str, modName + "Str", strBonus, TimeSpan.Zero));

                            if (dexBonus != 0)
                                m.AddStatMod(new StatMod(StatType.Dex, modName + "Dex", dexBonus, TimeSpan.Zero));

                            if (intBonus != 0)
                                m.AddStatMod(new StatMod(StatType.Int, modName + "Int", intBonus, TimeSpan.Zero));
                        }

                        if (Parent is Mobile)
                            ((Mobile)Parent).CheckStatTimers();

                        break;
                    }
                case 0:
                    {
                        m_AosAttributes = new AosAttributes(this);
                        m_AosResistances = new AosElementAttributes(this);
                        m_AosSkillBonuses = new AosSkillBonuses(this);

                        break;
                    }
            }

            if (version < 2)
            {
                m_Resource = CraftResource.Iron;
                m_GemType = GemType.None;
            }
        }
开发者ID:greeduomacro,项目名称:annox,代码行数:72,代码来源:BaseJewel.cs


示例7: Deserialize

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

			int version = reader.ReadInt();

			switch ( version )
			{
#region ItemID_Mods
							                case 6:
							                {
										SaveFlag flags = (SaveFlag)reader.ReadEncodedInt();
						
										if ( GetSaveFlag( flags, SaveFlag.Resource ) )
											m_Resource = (CraftResource)reader.ReadEncodedInt();
										else
											m_Resource = DefaultResource;

										if ( GetSaveFlag( flags, SaveFlag.Attributes ) )
											m_AosAttributes = new AosAttributes( this, reader );
										else
											m_AosAttributes = new AosAttributes( this );
				
										if ( GetSaveFlag( flags, SaveFlag.ClothingAttributes ) )
											m_AosClothingAttributes = new AosArmorAttributes( this, reader );
										else
											m_AosClothingAttributes = new AosArmorAttributes( this );		

										if ( GetSaveFlag( flags, SaveFlag.SkillBonuses ) )
											m_AosSkillBonuses = new AosSkillBonuses( this, reader );
										else
											m_AosSkillBonuses = new AosSkillBonuses( this );
		
										if ( GetSaveFlag( flags, SaveFlag.Resistances ) )
											m_AosResistances = new AosElementAttributes( this, reader );
										else
											m_AosResistances = new AosElementAttributes( this );
		
										if ( GetSaveFlag( flags, SaveFlag.MaxHitPoints ) )
											m_MaxHitPoints = reader.ReadEncodedInt();
			
										if ( GetSaveFlag( flags, SaveFlag.HitPoints ) )
											m_HitPoints = reader.ReadEncodedInt();

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

										if ( GetSaveFlag( flags, SaveFlag.Quality ) )
											m_Quality = (ClothingQuality)reader.ReadEncodedInt();
										else
											m_Quality = ClothingQuality.Regular;
		
										if ( GetSaveFlag( flags, SaveFlag.StrReq ) )
											m_StrReq = reader.ReadEncodedInt();
										else
											m_StrReq = -1;

										if ( GetSaveFlag( flags, SaveFlag.PlayerConstructed ) )
											m_PlayerConstructed = true;
                    
                    								if ( GetSaveFlag( flags, SaveFlag.Identified ) ) 
								                        m_Identified = true;
										break;
                							}
								#endregion
				case 5:
				{
					SaveFlag flags = (SaveFlag)reader.ReadEncodedInt();

					if ( GetSaveFlag( flags, SaveFlag.Resource ) )
						m_Resource = (CraftResource)reader.ReadEncodedInt();
					else
						m_Resource = DefaultResource;

					if ( GetSaveFlag( flags, SaveFlag.Attributes ) )
						m_AosAttributes = new AosAttributes( this, reader );
					else
						m_AosAttributes = new AosAttributes( this );

					if ( GetSaveFlag( flags, SaveFlag.ClothingAttributes ) )
						m_AosClothingAttributes = new AosArmorAttributes( this, reader );
					else
						m_AosClothingAttributes = new AosArmorAttributes( this );

					if ( GetSaveFlag( flags, SaveFlag.SkillBonuses ) )
						m_AosSkillBonuses = new AosSkillBonuses( this, reader );
					else
						m_AosSkillBonuses = new AosSkillBonuses( this );

					if ( GetSaveFlag( flags, SaveFlag.Resistances ) )
						m_AosResistances = new AosElementAttributes( this, reader );
					else
						m_AosResistances = new AosElementAttributes( this );

					if ( GetSaveFlag( flags, SaveFlag.MaxHitPoints ) )
						m_MaxHitPoints = reader.ReadEncodedInt();

					if ( GetSaveFlag( flags, SaveFlag.HitPoints ) )
						m_HitPoints = reader.ReadEncodedInt();

//.........这里部分代码省略.........
开发者ID:greeduomacro,项目名称:unknown-shard-1,代码行数:101,代码来源:BaseClothing.cs


示例8: BaseJewel

        public BaseJewel(int itemID, Layer layer)
            : base(itemID)
        {
            m_AosAttributes = new AosAttributes(this);
            m_AosResistances = new AosElementAttributes(this);
            m_AosSkillBonuses = new AosSkillBonuses(this);
            m_Resource = CraftResource.Iron;
            m_GemType = GemType.None;

            Layer = layer;

            m_HitPoints = m_MaxHitPoints = Utility.RandomMinMax(InitMinHits, InitMaxHits);
        }
开发者ID:greeduomacro,项目名称:annox,代码行数:13,代码来源:BaseJewel.cs


示例9: BaseClothing

        public BaseClothing( int itemID, Layer layer, int hue, ClothEffect effect, int charges )
            : base(itemID)
        {
            Layer = layer;
            Hue = hue;

            m_Resource = DefaultResource;
            m_Quality = ClothingQuality.Regular;
            m_ClothEffect = effect;
            m_Charges = charges;
            m_Identified = false;
            m_IDList = new List<Mobile>();

            m_HitPoints = m_MaxHitPoints = Utility.RandomMinMax( InitMinHits, InitMaxHits );

            m_AosAttributes = new AosAttributes( this );
            m_AosClothingAttributes = new AosArmorAttributes( this );
            m_AosSkillBonuses = new AosSkillBonuses( this );
            m_AosResistances = new AosElementAttributes( this );
        }
开发者ID:Godkong,项目名称:RunUO,代码行数:20,代码来源:BaseClothing.cs


示例10: GetSetProperties

		public static void GetSetProperties( ObjectPropertyList list, AosAttributes attributes, AosAttributes setAttributes, bool equipped )
		{
			int prop;
	            		
			if ( (prop = setAttributes.DefendChance) != 0 )
				list.Add( 1073493, prop.ToString() ); // defense chance increase ~1_val~% (total)
			
			if ( (prop = setAttributes.AttackChance) != 0 )
				list.Add( 1073490, prop.ToString() ); // hit chance increase ~1_val~% (total)
			
			if ( (prop = setAttributes.BonusStr) != 0 )
				list.Add( 1072514, prop.ToString() ); // strength bonus ~1_val~ (total)
			
			if ( (prop = setAttributes.BonusDex) != 0 )
				list.Add( 1072503, prop.ToString() ); // dexterity bonus ~1_val~ (total)
			
			if ( (prop = setAttributes.BonusInt) != 0 )
				list.Add( 1072381, prop.ToString() ); // intelligence bonus ~1_val~ (total)
			
			if ( (prop = setAttributes.LowerManaCost) != 0 )
				list.Add( 1073488, prop.ToString() ); // lower mana cost ~1_val~% (total)
			
			if ( (prop = setAttributes.Luck) != 0 )
				list.Add( 1073489, prop.ToString() ); // luck ~1_val~% (total)
			
			if ( (prop = setAttributes.ReflectPhysical) != 0 )
				list.Add( 1072513, prop.ToString() ); // reflect physical damage ~1_val~% (total)
			
			if ( (prop = setAttributes.SpellDamage) != 0 )
				list.Add( 1072380, prop.ToString() ); // spell damage increase ~1_val~% (total)
			
			if ( (prop = setAttributes.WeaponSpeed) != 0 )
				list.Add( 1074323, prop.ToString() ); // swing speed increase ~1_val~% (total)	
				
			if ( !equipped )
			{			
				if ( (prop = setAttributes.WeaponDamage) != 0 )
					list.Add( 1074325, prop.ToString() ); // increased weapon damage ~1_val~%
	
				if ( (prop = setAttributes.EnhancePotions) != 0 && attributes.EnhancePotions == 0 )
					list.Add( 1060411, prop.ToString() ); // enhance potions ~1_val~%
	
				if ( (prop = setAttributes.CastRecovery) != 0 && attributes.CastRecovery == 0 )
					list.Add( 1060412, prop.ToString() ); // faster cast recovery ~1_val~
	
				if ( (prop = setAttributes.CastSpeed) != 0 && attributes.CastSpeed == 0 )
					list.Add( 1060413, prop.ToString() ); // faster casting ~1_val~
	
				if ( (prop = setAttributes.LowerRegCost) != 0 && attributes.LowerRegCost == 0 )
					list.Add( 1060434, prop.ToString() ); // lower reagent cost ~1_val~%
	
				if ( (prop = setAttributes.RegenHits) != 0 && attributes.RegenHits == 0 )
					list.Add( 1060444, prop.ToString() ); // hit point regeneration ~1_val~
	
				if ( (prop = setAttributes.RegenStam) != 0 && attributes.RegenStam == 0 )
					list.Add( 1060443, prop.ToString() ); // stamina regeneration ~1_val~
	
				if ( (prop = setAttributes.RegenMana) != 0 && attributes.RegenMana == 0 )
					list.Add( 1060440, prop.ToString() ); // mana regeneration ~1_val~
	
				if ( (prop = setAttributes.BonusHits) != 0 && attributes.BonusHits == 0 )
					list.Add( 1060431, prop.ToString() ); // hit point increase ~1_val~
	
				if ( (prop = setAttributes.BonusStam) != 0 && attributes.BonusStam == 0 )
					list.Add( 1060484, prop.ToString() ); // stamina increase ~1_val~
	
				if ( (prop = setAttributes.BonusMana) != 0 && attributes.BonusMana == 0 )
					list.Add( 1060439, prop.ToString() ); // mana increase ~1_val~
	
				if ( (prop = setAttributes.NightSight) != 0 && attributes.NightSight == 0 )
					list.Add( 1060441 ); // night sight
			}
		}
开发者ID:brodock,项目名称:genova-project,代码行数:73,代码来源:SetArmor.cs


示例11: BaseClothing

		public BaseClothing( int itemID, Layer layer, int hue ) : base( itemID )
		{
			Layer = layer;
			Hue = hue;

			m_Resource = DefaultResource;
			m_Quality = ClothingQuality.Regular;

			m_HitPoints = m_MaxHitPoints = Utility.RandomMinMax( InitMinHits, InitMaxHits );

			m_AosAttributes = new AosAttributes( this );
			m_AosClothingAttributes = new AosArmorAttributes( this );
			m_AosSkillBonuses = new AosSkillBonuses( this );
			m_AosResistances = new AosElementAttributes( this );
			
			// Genova: suporte ao UO:ML.
			#region Mondain's Legacy
			m_SetAttributes = new AosAttributes( this );
			m_SetClothingAttributes = new AosArmorAttributes( this );
			m_SetSkillBonuses = new AosSkillBonuses( this );
			
			m_LastEquipped = false;
			#endregion
		}
开发者ID:brodock,项目名称:genova-project,代码行数:24,代码来源:BaseClothing.cs


示例12: BaseTalisman

		public BaseTalisman( int itemID ) : base( itemID )
		{
			Layer = Layer.Talisman;
			Weight = 1;
			
			m_AosAttributes = new AosAttributes( this );
			m_AosSkillBonuses = new AosSkillBonuses( this );
		}
开发者ID:greeduomacro,项目名称:uodarktimes-1,代码行数:8,代码来源:BaseTalisman.cs


示例13: AosAttributes

		public AosAttributes( Item owner, AosAttributes other )
			: base( owner, other )
		{
		}
开发者ID:bugraerdogan,项目名称:silverlight-uo-client,代码行数:4,代码来源:AOS.cs


示例14: Deserialize

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

            int version = reader.ReadInt();

            switch ( version )
            {
                case 12: m_OldCloth = reader.ReadBool(); goto case 11;
                case 11: m_Disease = (Disease)reader.ReadInt(); goto case 10;
                case 10: goto case 9;
                case 9:	goto case 8;
                case 8:	goto case 7;
                case 7:	goto case 6;
                case 6:
                {
                    m_CraftersOriginalName = reader.ReadString();
                    goto case 5;
                }
                case 5:
                {
                    SaveFlag flags = (SaveFlag)reader.ReadEncodedInt();

                    if ( GetSaveFlag( flags, SaveFlag.Resource ) )
                        m_Resource = (CraftResource)reader.ReadEncodedInt();
                    else
                        m_Resource = DefaultResource;

                    if ( GetSaveFlag( flags, SaveFlag.Attributes ) )
                        m_AosAttributes = new AosAttributes( this, reader );
                    else
                        m_AosAttributes = new AosAttributes( this );

                    if ( GetSaveFlag( flags, SaveFlag.ClothingAttributes ) )
                        m_AosClothingAttributes = new AosArmorAttributes( this, reader );
                    else
                        m_AosClothingAttributes = new AosArmorAttributes( this );

                    if ( GetSaveFlag( flags, SaveFlag.SkillBonuses ) )
                        m_AosSkillBonuses = new AosSkillBonuses( this, reader );
                    else
                        m_AosSkillBonuses = new AosSkillBonuses( this );

                    if ( GetSaveFlag( flags, SaveFlag.Resistances ) )
                        m_AosResistances = new AosElementAttributes( this, reader );
                    else
                        m_AosResistances = new AosElementAttributes( this );

                    if ( GetSaveFlag( flags, SaveFlag.MaxHitPoints ) )
                        m_MaxHitPoints = reader.ReadEncodedInt();

                    if ( GetSaveFlag( flags, SaveFlag.HitPoints ) )
                        m_HitPoints = reader.ReadEncodedInt();

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

                    if ( GetSaveFlag( flags, SaveFlag.Quality ) )
                        m_Quality = (ClothingQuality)reader.ReadEncodedInt();
                    else
                        m_Quality = ClothingQuality.Regular;

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

                    if ( GetSaveFlag( flags, SaveFlag.PlayerConstructed ) )
                        m_PlayerConstructed = true;

                    break;
                }
                case 4:
                {
                    m_Resource = (CraftResource)reader.ReadInt();

                    goto case 3;
                }
                case 3:
                {
                    m_AosAttributes = new AosAttributes( this, reader );
                    m_AosClothingAttributes = new AosArmorAttributes( this, reader );
                    m_AosSkillBonuses = new AosSkillBonuses( this, reader );
                    m_AosResistances = new AosElementAttributes( this, reader );

                    goto case 2;
                }
                case 2:
                {
                    m_PlayerConstructed = reader.ReadBool();
                    goto case 1;
                }
                case 1:
                {
                    m_Crafter = reader.ReadMobile();
                    m_Quality = (ClothingQuality)reader.ReadInt();
                    break;
                }
                case 0:
                {
//.........这里部分代码省略.........
开发者ID:justdanofficial,项目名称:khaeros,代码行数:101,代码来源:BaseClothing.cs


示例15: Deserialize

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

            int version = reader.ReadInt();

            switch ( version )
            {
			case 7:
				{
				  #region SF Imbuing
                        Physical_Modded = reader.ReadBool();
                        Fire_Modded = reader.ReadBool();
                        Cold_Modded = reader.ReadBool();
                        Poison_Modded = reader.ReadBool();
                        Energy_Modded = reader.ReadBool();
				  #endregion

                        goto case 6;
                    }
                

                case 6:
                    {
                        this.m_TimesImbued = reader.ReadInt();
                        this.m_BlessedBy = reader.ReadMobile();

                        #region Mondain's Legacy Sets
                        SetFlag sflags = (SetFlag)reader.ReadEncodedInt();

                        if (GetSaveFlag(sflags, SetFlag.Attributes))
                            this.m_SetAttributes = new AosAttributes(this, reader);
                        else
                            this.m_SetAttributes = new AosAttributes(this);

                        if (GetSaveFlag(sflags, SetFlag.ArmorAttributes))
                            this.m_SetSelfRepair = (new AosArmorAttributes(this, reader)).SelfRepair;

                        if (GetSaveFlag(sflags, SetFlag.SkillBonuses))
                            this.m_SetSkillBonuses = new AosSkillBonuses(this, reader);
                        else
                            this.m_SetSkillBonuses = new AosSkillBonuses(this);

                        if (GetSaveFlag(sflags, SetFlag.PhysicalBonus))
                            this.m_SetPhysicalBonus = reader.ReadEncodedInt();

                        if (GetSaveFlag(sflags, SetFlag.FireBonus))
                            this.m_SetFireBonus = reader.ReadEncodedInt();

                        if (GetSaveFlag(sflags, SetFlag.ColdBonus))
                            this.m_SetColdBonus = reader.ReadEncodedInt();

                        if (GetSaveFlag(sflags, SetFlag.PoisonBonus))
                            this.m_SetPoisonBonus = reader.ReadEncodedInt();

                        if (GetSaveFlag(sflags, SetFlag.EnergyBonus))
                            this.m_SetEnergyBonus = reader.ReadEncodedInt();

                        if (GetSaveFlag(sflags, SetFlag.SetHue))
                            this.m_SetHue = reader.ReadEncodedInt();

                        if (GetSaveFlag(sflags, SetFlag.LastEquipped))
                            this.m_LastEquipped = reader.ReadBool();

                        if (GetSaveFlag(sflags, SetFlag.SetEquipped))
                            this.m_SetEquipped = reader.ReadBool();

                        if (GetSaveFlag(sflags, SetFlag.SetSelfRepair))
                            this.m_SetSelfRepair = reader.ReadEncodedInt();
                        #endregion

                        goto case 5;
                    }
                case 5:
                    {
                        SaveFlag flags = (SaveFlag)reader.ReadEncodedInt();

                        if (GetSaveFlag(flags, SaveFlag.Resource))
                            this.m_Resource = (CraftResource)reader.ReadEncodedInt();
                        else
                            this.m_Resource = this.DefaultResource;

                        if (GetSaveFlag(flags, SaveFlag.Attributes))
                            this.m_AosAttributes = new AosAttributes(this, reader);
                        else
                            this.m_AosAttributes = new AosAttributes(this);

                        if (GetSaveFlag(flags, SaveFlag.ClothingAttributes))
                            this.m_AosClothingAttributes = new AosArmorAttributes(this, reader);
                        else
                            this.m_AosClothingAttributes = new AosArmorAttributes(this);

                        if (GetSaveFlag(flags, SaveFlag.SkillBonuses))
                            this.m_AosSkillBonuses = new AosSkillBonuses(this, reader);
                        else
                            this.m_AosSkillBonuses = new AosSkillBonuses(this);

                        if (GetSaveFlag(flags, SaveFlag.Resistances))
                            this.m_AosResistances = new AosElementAttributes(this, reader);
                        else
//.........这里部分代码省略.........
开发者ID:Jascen,项目名称:UOSmart,代码行数:101,代码来源:BaseClothing.cs


示例16: Deserialize

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

            int version = reader.ReadInt();

            int m_PhysicalBonus = 0;
            int m_FireBonus = 0;
            int m_ColdBonus = 0;
            int m_PoisonBonus = 0;
            int m_EnergyBonus = 0;

            switch ( version )
            {
                case 14:
                case 13:
                {
                    m_CustomPropName = reader.ReadString();
                     goto case 12;
                }
                case 12:
                {
                    SaveFlag flags = (SaveFlag)reader.ReadEncodedInt();

                    if ( GetSaveFlag( flags, SaveFlag.Resource ) )
                        m_Resource = (CraftResource)reader.ReadEncodedInt();
                    else
                        m_Resource = DefaultResource;

                    if ( GetSaveFlag( flags, SaveFlag.Attributes ) )
                        m_AosAttributes = new AosAttributes( this, reader );
                    else
                        m_AosAttributes = new AosAttributes( this );

                    if ( GetSaveFlag( flags, SaveFlag.ClothingAttributes ) )
                        m_AosClothingAttributes = new AosArmorAttributes( this, reader );
                    else
                        m_AosClothingAttributes = new AosArmorAttributes( this );

                    if ( GetSaveFlag( flags, SaveFlag.SkillBonuses ) )
                        m_AosSkillBonuses = new AosSkillBonuses( this, reader );
                    else
                        m_AosSkillBonuses = new AosSkillBonuses( this );

                    if ( GetSaveFlag( flags, SaveFlag.Resistances ) )
                        m_AosResistances = new AosElementAttributes( this, reader );
                    else
                        m_AosResistances = new AosElementAttributes( this );

                    if ( GetSaveFlag( flags, SaveFlag.MaxHitPoints ) )
                        m_MaxHitPoints = reader.ReadEncodedInt();

                    if ( GetSaveFlag( flags, SaveFlag.HitPoints ) )
                        m_HitPoints = reader.ReadEncodedInt();

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

                    if ( GetSaveFlag( flags, SaveFlag.Quality ) )
                        m_Quality = (ClothingQuality)reader.ReadEncodedInt();
                    else
                        m_Quality = ClothingQuality.Regular;

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

                    if ( GetSaveFlag( flags, SaveFlag.PlayerConstructed ) )
                        m_PlayerConstructed = true;

                    if ( GetSaveFlag( flags, SaveFlag.Identified ) )
                        m_Identified = true;

                    break;
                }
                case 11:
                {
                    m_Resource = (CraftResource)reader.ReadInt();

                    goto case 10;
                }
                case 10:
                case 9:
                    m_CustomPropName = reader.ReadString();
                    goto case 8;
                case 8: // Fixed durability
                case 7:
                case 6:
                {
                    int m_ArmorBase = reader.ReadInt();
                    goto case 5;
                }
                case 5:
                {
                    int m_OldMaxHitPoints = reader.ReadInt();
                    int m_OldHitPoints = reader.ReadInt();
                    goto case 4;
                }
                case 4:
//.........这里部分代码省略.........
开发者ID:kamronbatman,项目名称:Defiance-AOS-Pre-2012,代码行数:101,代码来源:BaseClothing.cs


示例17: ApplyAttribute

 public static void ApplyAttribute( AosAttributes attrs, AosAttribute attr, int amount )
 {
     if ( attr == AosAttribute.SpellChanneling && attrs.SpellChanneling == 0 )
     {
         attrs[attr] = 1;
         attrs.CastSpeed--;
     }
     else
         attrs[attr] += amount;
 }
开发者ID:kamronbatman,项目名称:Defiance-AOS-Pre-2012,代码行数:10,代码来源:BonusAttribute.cs


示例18: Deserialize

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

			int version = reader.ReadInt();

			switch ( version )
			{
				case 9:
				{
					// erl - added to handle packing out of PlayerConstructed property
					goto case 8;
				}
				case 8:
				{
					// removed all AOS attributes
					goto case 7;
				}
				case 7:
				case 6:
				case 5:
				{
					SaveFlag flags = (SaveFlag)reader.ReadEncodedInt();

					if ( GetSaveFlag( flags, SaveFlag.IOBAlignment ) )
						m_IOBAlignment = (IOBAlignment)reader.ReadEncodedInt();


					// obsolete AOS attributes from version 8 on
					if (version < 8)
					{
						AosAttributes dmy_AosAttributes;
						AosArmorAttributes dmy_AosArmorAttributes;

						if ( GetSaveFlag( flags, SaveFlag.Attributes ) )
							dmy_AosAttributes = new AosAttributes( this, reader );
						//else
							//dmy_AosAttributes = new AosAttributes( this );

						if ( GetSaveFlag( flags, SaveFlag.ArmorAttributes ) )
							dmy_AosArmorAttributes = new AosArmorAttributes( this, reader );
						//else
							//dmy_AosArmorAttributes = new AosArmorAttributes( this );

						// read and throw away
						int foox;
						if ( GetSaveFlag( flags, SaveFlag.PhysicalBonus ) )
							foox = reader.ReadEncodedInt(); // m_PhysicalBonus

						if ( GetSaveFlag( flags, SaveFlag.FireBonus ) )
							foox = reader.ReadEncodedInt(); // m_FireBonus

						if ( GetSaveFlag( flags, SaveFlag.ColdBonus ) )
							foox = reader.ReadEncodedInt(); // m_ColdBonus

						if ( GetSaveFlag( flags, SaveFlag.PoisonBonus ) )
							foox = reader.ReadEncodedInt(); // m_PoisonBonus

						if ( GetSaveFlag( flags, SaveFlag.EnergyBonus ) )
							foox = reader.ReadEncodedInt(); // m_EnergyBonus
					}

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

					if ( GetSaveFlag( flags, SaveFlag.MaxHitPoints ) )
						m_MaxHitPoints = reader.ReadEncodedInt();

					if ( GetSaveFlag( flags, SaveFlag.HitPoints ) )
						m_HitPoints = reader.ReadEncodedInt();

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

					if ( GetSaveFlag( flags, SaveFlag.Quality ) )
						m_Quality = (ArmorQuality)reader.ReadEncodedInt();
					else
						m_Quality = ArmorQuality.Regular;

					if ( version == 5 && m_Quality == ArmorQuality.Low )
						m_Quality = ArmorQuality.Regular;

					if ( GetSaveFlag( flags, SaveFlag.Durability ) )
						m_Durability = (ArmorDurabilityLevel)reader.ReadEncodedInt();

					if ( GetSaveFlag( flags, SaveFlag.Protection ) )
						m_Protection = (ArmorProtectionLevel)reader.ReadEncodedInt();

					if ( GetSaveFlag( flags, SaveFlag.Resource ) )
						m_Resource = (CraftResource)reader.ReadEncodedInt();
					else
						m_Resource = DefaultResource;

					if ( m_Resource == CraftResource.None )
						m_Resource = DefaultResource;

					if ( GetSaveFlag( flags, SaveFlag.BaseArmor ) )
						m_ArmorBase = reader.ReadEncodedInt();
					else
						m_ArmorBase = -1;
//.........这里部分代码省略.........
开发者ID:zerodowned,项目名称:angelisland,代码行数:101,代码来源:BaseArmor.cs


示例19: Deserialize

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

			int version = reader.ReadInt();

			switch ( version )
			{
				case 0:
				{
					SaveFlag flags = (SaveFlag) reader.ReadEncodedInt();

					if ( GetSaveFlag( flags, SaveFlag.Attributes ) )
						m_AosAttributes = new AosAttributes( this, reader );
					else
						m_AosAttributes = new AosAttributes( this );

					if ( GetSaveFlag( flags, SaveFlag.SkillBonuses ) )
						m_AosSkillBonuses = new AosSkillBonuses( this, reader );
					else
						m_AosSkillBonuses = new AosSkillBonuses( this );

					if ( GetSaveFlag( flags, SaveFlag.Protection ) )
						m_Protection = new TalismanAttribute( reader );
					else
						m_Protection = new TalismanAttribute();

					if ( GetSaveFlag( flags, SaveFlag.Killer ) )
						m_Killer = new TalismanAttribute( reader );
					else
						m_Killer = new TalismanAttribute();

					if ( GetSaveFlag( flags, SaveFlag.Summoner ) )
						m_Summoner = new TalismanAttribute( reader );
					else
						m_Summoner = new TalismanAttribute();

					if ( GetSaveFlag( flags, SaveFlag.Removal ) )
						m_Removal = (TalismanRemoval) reader.ReadEncodedInt();

					if ( GetSaveFlag( flags, SaveFlag.KarmaLoss ) )
						m_KarmaLoss = reader.ReadEncodedInt();

					if ( GetSaveFlag( flags, SaveFlag.Skill ) )
						m_Skill = (SkillName) reader.ReadEncodedInt();

					if ( GetSaveFlag( flags, SaveFlag.SuccessBonus ) )
						m_SuccessBonus = reader.ReadEncodedInt();

					if ( GetSaveFlag( flags, SaveFlag.ExceptionalBonus ) )
						m_ExceptionalBonus = reader.ReadEncodedInt();

					if ( GetSaveFlag( flags, SaveFlag.MaxCharges ) )
						m_MaxCharges = reader.ReadEncodedInt();

					if ( GetSaveFlag( flags, SaveFlag.Charges ) )
						m_Charges = reader.ReadEncodedInt();

					if ( GetSaveFlag( flags, SaveFlag.MaxChargeTime ) )
						m_MaxChargeTime = reader.ReadEncodedInt();

					if ( GetSaveFlag( flags, SaveFlag.ChargeTime ) )
						m_ChargeTime = reader.ReadEncodedInt();

					if ( GetSaveFlag( flags, SaveFlag.Slayer ) )
						m_Slayer = (TalismanSlayerName) reader.ReadEncodedInt();

					m_Blessed = GetSaveFlag( flags, SaveFlag.Blessed );

					break;
				}
			}

			if ( Parent is Mobile )
			{
				Mobile m = (Mobile) Parent;

				m_AosAttributes.AddStatBonuses( m );
				m_AosSkillBonuses.AddTo( m );

				if ( m_ChargeTime > 0 )
					StartTimer();
			}
		}
开发者ID:PepeBiondi,项目名称:runsa,代码行数:84,代码来源:BaseTalisman.cs


示例20: Spellbook

		public Spellbook( ulong content, int itemID ) : base( itemID )
		{
			m_AosAttributes = new AosAttributes( this );
			m_AosSkillBonuses = new AosSkillBonuses( this );

			Weight = 3.0;
			Layer = Layer.OneHanded;
			LootType = LootType.Blessed;

			Content = content;
		}
开发者ID:ITLongwell,项目名称:mondains-legacy,代码行数:11,代码来源:Spellbook.cs



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C# Server.AosSkillBonuses类代码示例发布时间:2022-05-26
下一篇:
C# Events.LogEvent类代码示例发布时间: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