Inheritance: GeneralScript
Ejemplo n.º 1
0
		/// <summary>
		/// Cancels script and resets session.
		/// </summary>
		public void Clear()
		{
			if (this.Script != null)
				this.Script.Cancel();
			this.Script = null;
			this.Target = null;
		}
Ejemplo n.º 2
0
		/// <summary>
		/// Starts session
		/// </summary>
		/// <param name="target"></param>
		/// <param name="creature"></param>
		private bool Start(NPC target, Creature creature)
		{
			this.Target = target;

			if (target.ScriptType == null)
				return false;

			var script = Activator.CreateInstance(target.ScriptType) as NpcScript;
			script.NPC = target;
			script.Player = creature;
			this.Script = script;
			return true;
		}