コード例 #1
0
ファイル: SpellCast.cs プロジェクト: pallmall/WCell
		//internal static readonly ObjectPool<List<AuraApplicationInfo>> AuraAppListPool = ObjectPoolMgr.CreatePool(() => new List<AuraApplicationInfo>());

		public static void Trigger(WorldObject caster, SpellEffect triggerEffect, Spell spell)
		{
			var cast = SpellCastPool.Obtain();
			cast.Caster = caster;
			cast.m_triggerEffect = triggerEffect;

			caster.ExecuteInContext(() =>
			{
				cast.Start(spell, true);
				cast.Dispose();
			});
		}
コード例 #2
0
ファイル: SpellCast.cs プロジェクト: pallmall/WCell
		public static void Trigger(WorldObject caster, Spell spell, ref Vector3 targetLoc, WorldObject selected, Item casterItem)
		{
			var cast = SpellCastPool.Obtain();
			cast.Caster = caster;
			cast.TargetLoc = targetLoc;
			cast.Selected = selected;
			cast.CasterItem = casterItem;

			caster.ExecuteInContext(() =>
			{
				cast.Start(spell, true);
				cast.Dispose();
			});
		}