Server.SkillHandlers.Discordance.ProcessDiscordance C# (CSharp) Méthode

ProcessDiscordance() private static méthode

private static ProcessDiscordance ( Server.SkillHandlers.DiscordanceInfo info ) : void
info Server.SkillHandlers.DiscordanceInfo
Résultat void
		private static void ProcessDiscordance( DiscordanceInfo info )
		{
			Mobile from = info.m_From;
			Mobile targ = info.m_Creature;
			bool ends = false;

			// According to uoherald bard must remain alive, visible, and 
			// within range of the target or the effect ends in 15 seconds.
			if ( !targ.Alive || targ.Deleted || !from.Alive || from.Hidden )
				ends = true;
			else
			{
				int range = (int) targ.GetDistanceToSqrt( from );
				int maxRange = BaseInstrument.GetBardRange( from, SkillName.Discordance );

				if ( from.Map != targ.Map || range > maxRange )
					ends = true;
			}

			if ( ends && info.m_Ending && info.m_EndTime < DateTime.Now )
			{
				if ( info.m_Timer != null )
					info.m_Timer.Stop();

				info.Clear();
				m_Table.Remove( targ );
			}
			else
			{
				if ( ends && !info.m_Ending )
				{
					info.m_Ending = true;
					info.m_EndTime = DateTime.Now + TimeSpan.FromSeconds( 15 );
				}
				else if ( !ends )
				{
					info.m_Ending = false;
					info.m_EndTime = DateTime.Now;
				}

				targ.FixedEffect( 0x376A, 1, 32 );
			}
		}