當前位置: 首頁>>代碼示例>>C#>>正文


C# Spells.Spell類代碼示例

本文整理匯總了C#中WCell.RealmServer.Spells.Spell的典型用法代碼示例。如果您正苦於以下問題:C# Spell類的具體用法?C# Spell怎麽用?C# Spell使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


Spell類屬於WCell.RealmServer.Spells命名空間,在下文中一共展示了Spell類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: InitSneedSpells

		public static void InitSneedSpells()
		{
			disarm = SpellHandler.Get(SpellId.Disarm_2);  //disarm
			disarm.AISettings.SetCooldown(10000);
			disarm.OverrideAITargetDefinitions(DefaultTargetAdders.AddAreaSource,		// random hostile nearby character
											   DefaultTargetEvaluators.RandomEvaluator,
											   DefaultTargetFilters.IsPlayer, DefaultTargetFilters.IsHostile);


			SpellHandler.Apply(spell => spell.CooldownTime = 20000, SpellId.MoltenMetal);
			SpellHandler.Apply(spell => spell.CooldownTime = 25000, SpellId.MeltOre);


			// Rhakzor's slam has a cooldown of about 12s
			SpellHandler.Apply(spell => { spell.AISettings.SetCooldown(10000, 14000); }, SpellId.RhahkZorSlam);


			SpellHandler.Apply(spell => spell.CooldownTime = 10000, SpellId.SmiteSlam);

			// remember the Spells for later use
			terrify = SpellHandler.Get(SpellId.Terrify);
			terrify.AISettings.SetCooldown(21000);
			terrify.OverrideAITargetDefinitions(DefaultTargetAdders.AddAreaSource,		// random hostile nearby character
											   DefaultTargetEvaluators.RandomEvaluator,
											   DefaultTargetFilters.IsPlayer, DefaultTargetFilters.IsHostile);

			distractingPain = SpellHandler.Get(SpellId.DistractingPain);
			distractingPain.AISettings.SetCooldown(12000);
			distractingPain.OverrideAITargetDefinitions(DefaultTargetAdders.AddAreaSource,		// random hostile nearby character
											   DefaultTargetEvaluators.RandomEvaluator,
											   DefaultTargetFilters.IsPlayer, DefaultTargetFilters.IsHostile);

			ejectSneed = SpellHandler.Get(SpellId.EjectSneed);
		}
開發者ID:KroneckerX,項目名稱:WCell,代碼行數:34,代碼來源:Deadmines.cs

示例2: DumpSpell

 public static void DumpSpell(TextWriter writer, Spell spell)
 {
     spell.Dump(writer, "\t");
     writer.WriteLine();
     writer.WriteLine("#################################################################");
     writer.WriteLine();
 }
開發者ID:KroneckerX,項目名稱:WCell,代碼行數:7,代碼來源:SpellOutput.cs

示例3: InitMarrowgar

 static void InitMarrowgar()
 {
     BoneSlice = SpellHandler.Get(SpellId.BoneSlice);
     BoneStorm = SpellHandler.Get(SpellId.BoneStorm);
     ColdFlame = SpellHandler.Get(SpellId.Coldflame_3);
     ColdFlameBone = SpellHandler.Get(SpellId.Coldflame_13);
     boneLength = urand.Next(20, 30);
 }
開發者ID:NVN,項目名稱:WCell,代碼行數:8,代碼來源:IcecrownCitadel.cs

示例4: InitMarrowgar

 public static void InitMarrowgar()
 {
     BoneSlice = SpellHandler.Get(SpellId.BoneSlice);
     BoneStorm = SpellHandler.Get(SpellId.BoneStorm);
     ColdFlame = SpellHandler.Get(SpellId.Coldflame_3);
     ColdFlameBone = SpellHandler.Get(SpellId.Coldflame_13);
     boneLength = Utility.Random(20, 30);
 }
開發者ID:KroneckerX,項目名稱:WCell,代碼行數:8,代碼來源:IcecrownCitadel.cs

示例5: CheckDebuffResist

		/// <summary>
		/// Checks whether the given target resisted the debuff, represented through the given spell
		/// </summary>
		public static CastMissReason CheckDebuffResist(Unit target, Spell spell, int casterLevel, bool hostile)
		{
			var missReason = CastMissReason.None;
			if (hostile && target.CheckDebuffResist(casterLevel, target.GetLeastResistantSchool(spell)))
			{
				missReason = CastMissReason.Resist;
			}
			return missReason;
		}
開發者ID:enjoii,項目名稱:WCell,代碼行數:12,代碼來源:SpellCast.Aura.cs

示例6: AddSpell

		internal void AddSpell(Spell spell)
		{
			if (spell == null)
			{
				throw new ArgumentNullException("spell");
			}
			Spells.Add(spell);
			spell.Line = this;
		}
開發者ID:pallmall,項目名稱:WCell,代碼行數:9,代碼來源:SpellLine.cs

示例7: AISpellCastAction

        public AISpellCastAction(Unit owner, Spell spell)
            : base(owner)
        {
            m_spell = spell;

            //if (m_target != null)
            //{
            //    m_range = new SimpleRange(m_spell.Range.Min, m_spell.Range.Max);
            //}
        }
開發者ID:ebakkedahl,項目名稱:WCell,代碼行數:10,代碼來源:AISpellCastAction.cs

示例8: Init

		public static void Init(TestContext testContext)
		{
			chr = Setup.AllianceCharacterPool.Create();
			client = chr.FakeClient;
			disenchantSpell = SpellHandler.Get(SpellId.DisenchantPT);
			disenchantSpell.CastDelay = 0;	// we don't want to wait

			ItemMgr.LoadAll();
			//LootMgr.LoadAll();
			ContentMgr.Load<ItemLootItemEntry>();
		}
開發者ID:NVN,項目名稱:WCell,代碼行數:11,代碼來源:DisenchantingTest.cs

示例9: SpellCastAction

		public SpellCastAction(IBrain owner, Unit target, Spell spell) : base(owner)
		{
			m_ownerBrain = owner;
			m_target = target;
			m_spell = spell;

			if (m_target != null)
				m_range = new AIRange(m_spell.Range.Min, m_spell.Range.Max);

			IsPrimary = true;
		}
開發者ID:KroneckerX,項目名稱:WCell,代碼行數:11,代碼來源:SpellCastAction.cs

示例10: Trigger

		//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();
			});
		}
開發者ID:pallmall,項目名稱:WCell,代碼行數:14,代碼來源:SpellCast.cs

示例11: Trigger

		public static void Trigger(WorldObject caster, Spell spell, ref Vector3 targetLoc, WorldObject selected, Item casterItem)
		{
			var cast = ObtainPooledCast(caster);
			cast.TargetLoc = targetLoc;
			cast.Selected = selected;
			cast.CasterItem = casterItem;

			cast.ExecuteInContext(() =>
			{
				cast.Start(spell, true);
				//cast.Dispose();
			});
		}
開發者ID:primax,項目名稱:WCell,代碼行數:13,代碼來源:SpellCast.cs

示例12: CheckImmune

		/// <summary>
		/// Returns whether the spell can be casted (true) or if immunity of the target prevents it (false)
		/// </summary>
		public static bool CheckImmune(Unit target, Spell spell, bool hostile)
		{
			if (spell.Mechanic != SpellMechanic.None &&
						hostile == spell.Mechanic.IsNegative() &&
						((spell.Mechanic == SpellMechanic.Invulnerable_2 || spell.Mechanic == SpellMechanic.Invulnerable) &&
						!spell.Attributes.HasFlag(SpellAttributes.UnaffectedByInvulnerability) &&
						(target.IsImmune(SpellMechanic.Invulnerable_2) || target.IsImmune(SpellMechanic.Invulnerable))) ||
						(target.IsImmune(spell.Mechanic) || target.IsImmune(spell.DispelType)))
			{
				return false;
			}
			return true;
		}
開發者ID:enjoii,項目名稱:WCell,代碼行數:16,代碼來源:SpellCast.Perform.cs

示例13: SpellLine

		public SpellLine(SpellLineId id, params Spell[] spells)
		{
			LineId = id;
			AuraUID =  (uint)id;
			Spells = new List<Spell>();
			if (spells.Length > 0)
			{
				m_firstSpell = spells[0];

				for (var i = 0; i < spells.Length; i++)
				{
					var spell = spells[i];
					AddSpell(spell);
				}
			}
		}
開發者ID:pallmall,項目名稱:WCell,代碼行數:16,代碼來源:SpellLine.cs

示例14: DisplayPath

		private static void DisplayPath(Spell spell, WorldObject caster, WorldObject target, ref Vector3 to)
		{
			if (!(caster is Character)) return;
			if (!NPCMgr.Loaded)
			{
				NPCMgr.LoadAllLater();
				caster.Say("Loading NPCs...");
				return;
			}


			var from = caster.Position;
			from.Z += 5;
			to.Z += 5;
			caster.Map.Terrain.FindPath(new PathQuery(from, ref to, caster, OnFoundPath));
		}
開發者ID:KroneckerX,項目名稱:WCell,代碼行數:16,代碼來源:DebugSpells.cs

示例15: WSGFaction

#pragma warning restore 0649

		#endregion

		protected WSGFaction(WarsongGulch instance,
			SpellId flagSpell,
			SpellId flagDropSpell,
			SpellId flagDropDebuff,
			SpellId flagCarrierDebuffSpellId,
			GOEntryId flagStand,
			GOEntryId flagDropId)
		{
			Instance = instance;
			_flagSpell = SpellHandler.Get(flagSpell);
			_flagDropSpell = SpellHandler.Get(flagDropSpell);
			_flagDropDebuff = SpellHandler.Get(flagDropDebuff);
			_flagCarrierDebuffSpell = SpellHandler.Get(flagCarrierDebuffSpellId);
			FlagStandEntry = GOMgr.GetEntry(flagStand);
			DroppedFlagEntry = GOMgr.GetEntry(flagDropId);

			_flagRespawn = WarsongGulch.FlagRespawnTime;
			Score = 0;
		}
開發者ID:pallmall,項目名稱:WCell,代碼行數:23,代碼來源:WSGFaction.cs


注:本文中的WCell.RealmServer.Spells.Spell類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。