コード例 #1
0
ファイル: EventSink.cs プロジェクト: MythikGN/Mythik
 public static void InvokeOnConsume(OnConsumeEventArgs e)
 {
     if (OnConsume != null)
     {
         OnConsume(e);
     }
 }
コード例 #2
0
ファイル: EventSink.cs プロジェクト: greeduomacro/RuneUO
		public static void InvokeOnConsume(OnConsumeEventArgs e)
		{
			if (OnConsume != null)
			{
				OnConsume(e);
			}
		}
コード例 #3
0
ファイル: FoodEffectsCore.cs プロジェクト: kejel/ForkUO
        private void EventSink_OnConsume(OnConsumeEventArgs e)
        {
            if (!this.Enabled || !Server.Core.AOS)
                return;

            FoodEffectModule module = e.Consumer.GetModule(typeof(FoodEffectModule)) as FoodEffectModule;

            if (module == null)
                module = new FoodEffectModule(e.Consumer);

            if (e.Consumed is Food)
            {
                Boolean effectAllowed = false;

                if (((Food)e.Consumed).PlayerConstructed)
                    effectAllowed = true;

                if (m_ShouldFoodBeAllowed != null && m_ShouldFoodBeAllowed((Food)e.Consumed))
                    effectAllowed = true;

                if (!m_FoodEffects.ContainsKey(e.Consumed.GetType()))
                    effectAllowed = false;

                if (effectAllowed)
                    module.ApplyEffect(m_FoodEffects[e.Consumed.GetType()]);
            }
        }
コード例 #4
0
ファイル: EventSink_Items.cs プロジェクト: jizzyjim/16Below
 public static void InvokeOnConsume(OnConsumeEventArgs e)
 {
     OnConsume?.Invoke(e);
 }