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


C# BuffIcon类代码示例

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


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

示例1: BuffIcons_Removed

 static void BuffIcons_Removed(BuffIcon buffID)
 {
     if (buffID == BuffIcon.GiftOfLife && timer != null)
     {
         timer.Stop();
         timer = null;
     }
 }
开发者ID:jaryn-kubik,项目名称:RazorEx,代码行数:8,代码来源:GiftOfLife.cs

示例2: BuffIcons_Added

 private static void BuffIcons_Added(BuffIcon buffID, BuffInfo buff)
 {
     if (buffID == BuffIcon.GiftOfLife && buff.Duration > 15)
     {
         if (timer != null)
             timer.Stop();
         timer = Timer.DelayedCallback(TimeSpan.FromSeconds(buff.Duration - 15), OnTimer);
         timer.Start();
     }
 }
开发者ID:jaryn-kubik,项目名称:RazorEx,代码行数:10,代码来源:GiftOfLife.cs

示例3: BuffInfo

        public BuffInfo( BuffIcon iconID, int titleCliloc, int secondaryCliloc, TimeSpan length, Mobile m, bool retainThroughDeath )
            : this(iconID, titleCliloc, secondaryCliloc)
        {
            m_TimeLength = length;
            m_TimeStart = DateTime.Now;

            m_Timer = Timer.DelayCall( length, new TimerStateCallback( RemoveBuffDelegate ), m );

            m_RetainThroughDeath = retainThroughDeath;
        }
开发者ID:Ravenwolfe,项目名称:xrunuo,代码行数:10,代码来源:BuffInfo.cs

示例4: RemoveBuffPacket

		public RemoveBuffPacket( Mobile mob, BuffIcon iconID )
			: base( 0xDF )
		{
			this.EnsureCapacity( 13 );
			m_Stream.Write( (int) mob.Serial );

			m_Stream.Write( (short) iconID );
			m_Stream.Write( (short) 0x0 ); // Type 0 for removal. 1 for add 2 for Data

			m_Stream.Fill( 4 );
		}
开发者ID:xrunuo,项目名称:xrunuo,代码行数:11,代码来源:RemoveBuffPacket.cs

示例5: BuffIcons_Added

 private static void BuffIcons_Added(BuffIcon buffId, BuffInfo info)
 {
     if (buffId == BuffIcon.BloodOathCurse)
     {
         Mobile mobile = World.FindMobile(lastSerial);
         if (mobile == null)
             return;
         lastOath = lastSerial;
         if (Utility.Distance(mobile.Position, World.Player.Position) < 2)
         {
             WorldEx.SendToServer(new SetWarMode(true));
             WorldEx.SendToServer(new SetWarMode(false));
             WorldEx.OverHeadMessage("!Blood Oath!", 0x0017);
         }
     }
 }
开发者ID:jaryn-kubik,项目名称:RazorEx,代码行数:16,代码来源:BloodOath.cs

示例6: BuffInfo

		//Only the timed one needs to Mobile to know when to automagically remove it.
		public BuffInfo( BuffIcon iconID, int titleCliloc, int secondaryCliloc, TimeSpan length, Mobile m )
			: this( iconID, titleCliloc, secondaryCliloc )
		{
			m_TimeLength = length;
			m_TimeStart = DateTime.UtcNow;

			m_Timer = Timer.DelayCall( length, new TimerCallback(
				delegate
				{
					PlayerMobile pm = m as PlayerMobile;

					if( pm == null )
						return;

					pm.RemoveBuff( this );
				} ) );
		}
开发者ID:nathanvy,项目名称:runuo,代码行数:18,代码来源:BuffIcons.cs

示例7: AddBuffPacket

        public AddBuffPacket( Mobile mob, BuffIcon iconID, int titleCliloc, int secondaryCliloc, TextDefinition args, TimeSpan length )
            : base(0xDF)
        {
            bool hasArgs = (args != null);

            this.EnsureCapacity( (hasArgs ? (48 + args.ToString().Length * 2): 44) );
            m_Stream.Write( (int)mob.Serial );

            m_Stream.Write( (short)iconID );	//ID
            m_Stream.Write( (short)0x1 );	//Type 0 for removal. 1 for add 2 for Data

            m_Stream.Fill( 4 );

            m_Stream.Write( (short)iconID );	//ID
            m_Stream.Write( (short)0x01 );	//Type 0 for removal. 1 for add 2 for Data

            m_Stream.Fill( 4 );

            if( length < TimeSpan.Zero )
                length = TimeSpan.Zero;

            m_Stream.Write( (short)length.TotalSeconds );	//Time in seconds

            m_Stream.Fill( 3 );
            m_Stream.Write( (int)titleCliloc );
            m_Stream.Write( (int)secondaryCliloc );

            if( !hasArgs )
            {
                //m_Stream.Fill( 2 );
                m_Stream.Fill( 10 );
            }
            else
            {
                m_Stream.Fill( 4 );
                m_Stream.Write( (short)0x1 );	//Unknown -> Possibly something saying 'hey, I have more data!'?
                m_Stream.Fill( 2 );

                //m_Stream.WriteLittleUniNull( "\t#1018280" );
                m_Stream.WriteLittleUniNull( String.Format( "\t{0}", args.ToString() ) );

                m_Stream.Write( (short)0x1 );	//Even more Unknown -> Possibly something saying 'hey, I have more data!'?
                m_Stream.Fill( 2 );
            }
        }
开发者ID:justdanofficial,项目名称:khaeros,代码行数:45,代码来源:BuffIcons.cs

示例8: BuffInfo

 public BuffInfo( BuffIcon iconID, int titleCliloc, TextDefinition args, bool retainThroughDeath )
     : this(iconID, titleCliloc, titleCliloc + 1, args, retainThroughDeath)
 {
 }
开发者ID:justdanofficial,项目名称:khaeros,代码行数:4,代码来源:BuffIcons.cs

示例9: BuffIcons_Removed

 private static void BuffIcons_Removed(BuffIcon buffId)
 {
     if (buffId == BuffIcon.BloodOathCurse)
         lastSerial = lastOath = 0;
 }
开发者ID:jaryn-kubik,项目名称:RazorEx,代码行数:5,代码来源:BloodOath.cs

示例10: ActionShakeBuff

 public ActionShakeBuff(BuffIcon b, float time)
 {
     this.b = b;
     this.time = time;
 }
开发者ID:RommelLayco,项目名称:pirate-game-project,代码行数:5,代码来源:ActionShakeBuff.cs

示例11: RemoveBuff

		public void RemoveBuff(BuffIcon b)
		{
			if (m_BuffTable == null || !m_BuffTable.ContainsKey(b))
			{
				return;
			}

			BuffInfo info = m_BuffTable[b];

			if (info.Timer != null && info.Timer.Running)
			{
				info.Timer.Stop();
			}

			m_BuffTable.Remove(b);

			NetState state = NetState;

			if (state != null && state.BuffIcon)
			{
				state.Send(new RemoveBuffPacket(this, b));
			}

			if (m_BuffTable.Count <= 0)
			{
				m_BuffTable = null;
			}
		}
开发者ID:zerodowned,项目名称:justuo-with-ec-support,代码行数:28,代码来源:PlayerMobile.cs

示例12: RemoveBuff

        public static void RemoveBuff( Mobile m, BuffIcon b )
        {
            PlayerMobile pm = m as PlayerMobile;

            if( pm != null )
                pm.RemoveBuff( b );
        }
开发者ID:justdanofficial,项目名称:khaeros,代码行数:7,代码来源:BuffIcons.cs

示例13: RemoveBuff

        public void RemoveBuff(BuffIcon b)
        {
            if (m_BuffTable == null || !m_BuffTable.ContainsKey(b))
                return;

            BuffInfo info = m_BuffTable[b];

            if (info.Timer != null && info.Timer.Running)
                info.Timer.Stop();

            m_BuffTable.Remove(b);

            NetState state = this.NetState;

            if (state != null && state.Version >= BuffInfo.RequiredClient)
            {
                state.Send(new RemoveBuffPacket(this, b));
            }

            if (m_BuffTable.Count <= 0)
                m_BuffTable = null;
        }
开发者ID:brodock,项目名称:genova-project,代码行数:22,代码来源:PlayerMobile.cs


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