Example #1
0
		/// <summary>
		///  Returns a generator from cache
		/// </summary>
		/// <param name="dbGenerator"></param>
		/// <returns></returns>
		private static ILootGenerator GetGeneratorInCache(LootGenerator dbGenerator)
		{
			if (m_ClassGenerators[dbGenerator.LootGeneratorClass + dbGenerator.ExclusivePriority] != null)
			{
				return (ILootGenerator)m_ClassGenerators[dbGenerator.LootGeneratorClass + dbGenerator.ExclusivePriority];
			}
			return null;
		}
Example #2
0
		/// <summary>
		/// Stores a generator in a cache to reused the same generators multiple times
		/// </summary>
		/// <param name="dbGenerator"></param>
		/// <param name="generator"></param>
		private static void PutGeneratorInCache(LootGenerator dbGenerator, ILootGenerator generator)
		{
			m_ClassGenerators[dbGenerator.LootGeneratorClass + dbGenerator.ExclusivePriority] = generator;
		}