예제 #1
0
		/// <summary>
		/// Starts play effect.
		/// </summary>
		/// <param name="creature"></param>
		/// <param name="instrumentType"></param>
		/// <param name="quality"></param>
		/// <param name="compressedMml"></param>
		/// <param name="scoreId"></param>
		private void StartPlay(Creature creature, Skill skill, InstrumentType instrumentType, int quality, string compressedMml, int scoreId)
		{
			// [200200, NA242 (2016-12-15)]
			// The playing effect for instruments was turned into a prop,
			// presumably to have something to reference in the world
			// for jams, and to make it more than a temp effect.

			//Send.PlayEffect(creature, instrumentType, quality, mml, rndScore);

			var regionId = creature.RegionId;
			var pos = creature.GetPosition();

			var prop = new PlayingInstrumentProp(regionId, pos.X, pos.Y);
			prop.CompressedMML = compressedMml;
			prop.ScoreId = scoreId;
			prop.Quality = quality;
			prop.Instrument = instrumentType;
			prop.StartTime = DateTime.Now;
			prop.CreatureEntityId = creature.EntityId;

			creature.Region.AddProp(prop);

			creature.Temp.PlayingInstrumentProp = prop;
		}