Aura.Channel.World.Dungeons.Puzzles.MonsterGroup.AddKeyForLock C# (CSharp) Method

AddKeyForLock() public method

Adds key for lock place to a random monster of this group as a drop.
public AddKeyForLock ( PuzzlePlace lockPlace ) : void
lockPlace PuzzlePlace
return void
		public void AddKeyForLock(PuzzlePlace lockPlace)
		{
			var place = lockPlace as PuzzlePlace;
			if (!place.IsLock)
			{
				Log.Warning("PuzzleChest.AddKeyForLock: This place isn't a Lock. ({0})", this.Puzzle.Name);
				return;
			}

			if (this.Count == 0)
			{
				Log.Warning("MonsterGroup.AddKeyForLock: No monsters in group.");
				return;
			}

			if (place.Key == null)
			{
				Log.Warning("MonsterGroup.AddKeyForLock: Place's key is null.");
				return;
			}

			this.AddDrop(place.Key);
		}