Пример #1
0
		public StargateDesign( string combo, string area, string design, uint startingpos, StargateAddon gate ) : this( combo, area, design, startingpos, false, gate )
		{
		}
Пример #2
0
		public StargateDesign( string combo, string area, string design, StargateAddon gate ) : this( combo, area, design, 0, gate )
		{
		}
Пример #3
0
		public StargateDesign( string combo, string design, uint startingpos, StargateAddon gate ) : this( combo, "Uknown Area", design, startingpos, gate )
		{
		}
Пример #4
0
		public StargateDesign( string combo, StargateAddon gate ) : this( combo, "Unknown Area", gate )
		{
		}
Пример #5
0
		public StargateDesign( string combo, string design, StargateAddon gate ) : this( combo, "Uknown Area", design, gate )
		{
		}
Пример #6
0
		public StargateDesign( string combo, string area, string design, uint startingpos, bool reversed, StargateAddon gate )
		{
			m_Combination = combo;
			m_Area = area;

			m_ActivateHue = DefaultNormalHue;
			m_NormalHue = DefaultNormalHue;
			m_DeactivateHue = DefaultDeactivateHue;
			m_StartingPos = startingpos;
			m_Reversed = reversed;
			m_Gate = gate;
			Design = design;
		}
Пример #7
0
		public GateComponent( StargateAddon gate ) : base( gate.Location, gate.Map )
		{
			m_Connected = gate != null;
			if ( m_Connected )
				m_ConnectedGate = gate;
		}
Пример #8
0
			public ExpireTimer( StargateAddon gate ) : base( TimeSpan.FromSeconds( 45.0 ) )
			{
				m_Gate = gate;
				Priority = TimerPriority.OneSecond;
			}
Пример #9
0
		public void DeactivateGate( GateComponent source, GateComponent destination, StargateAddon target )
		{
			if ( source != null )
				source.Delete();
			if ( destination != null )
				destination.Delete();

			foreach( SymbolComponent s in m_ActiveSymbols )
				s.PlaySymbolEffect( false );
			m_ActiveSymbols.Clear();
			m_InUse = false;
			m_CurrentCombo = null;

			if ( target != null )
			{
				foreach( SymbolComponent s in target.Components )
					s.PlaySymbolEffect( false );
				target.ActiveSymbols.Clear();
				target.InUse = false;
				target.CurrentCombo = null;
			}
		}
Пример #10
0
		public void ActivateGate( Mobile from, StargateAddon gate )
		{
			if ( gate == this )
			{
				from.SendMessage( "The stargate cannot dial to itself." );
				DeactivateGate( null, null, null );
			}
			else if ( gate.InUse )
			{
				from.SendMessage( "The stargate could not reach the destination." );
				DeactivateGate( null, null, null );

				if ( gate.Expire != null )
				{
					gate.Expire.Stop();
					gate.Expire = null;
				}
			}
			else
			{
				from.SendMessage( "The stargate activates with a gate to {0}.", gate.GateDesign.Area );

				GateComponent gatesource = new GateComponent( gate );
				gatesource.Hue = m_GateDesign.GateHue;
				gatesource.MoveToWorld( Location, Map );

				GateComponent gatedest = new GateComponent();
				gatedest.Name = String.Format( "Stargate from {0}", m_GateDesign.Area );
				gatedest.Hue = gate.GateDesign.GateHue;
				gatedest.MoveToWorld( gate.Location, gate.Map );

				m_InUse = gate.InUse = true;
				foreach( SymbolComponent s in gate.Components )
					s.PlaySymbolEffect( true );
				Timer.DelayCall( TimeSpan.FromSeconds( 45.0 ), new TimerStateCallback( DeactivateCallBack ), new object[]{ this, gatesource, gatedest, gate } );
				return;
			}
		}