当前位置: 首页>>代码示例>>C#>>正文


C# Spells.SpellCast类代码示例

本文整理汇总了C#中WCell.RealmServer.Spells.SpellCast的典型用法代码示例。如果您正苦于以下问题:C# SpellCast类的具体用法?C# SpellCast怎么用?C# SpellCast使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


SpellCast类属于WCell.RealmServer.Spells命名空间,在下文中一共展示了SpellCast类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: DynamicObject

		public DynamicObject(SpellCast cast, float radius)
			: this(cast.CasterUnit,
			cast.Spell.SpellId, radius,
			cast.Caster.Region,
			cast.TargetLoc)
		{
		}
开发者ID:pallmall,项目名称:WCell,代码行数:7,代码来源:DynamicObject.cs

示例2: Summon

		public virtual NPC Summon(SpellCast cast, ref Vector3 targetLoc, NPCEntry entry)
		{
			var caster = cast.CasterUnit;
			var duration = cast.Spell.GetDuration(cast.CasterReference);

			NPC minion;
			if (caster != null)
			{
				minion = caster.SpawnMinion(entry, ref targetLoc, duration);
			}
			else
			{
				minion = entry.Create(cast.TargetMap.DifficultyIndex);

				minion.Position = targetLoc;
				minion.Brain.IsRunning = true;
				minion.Phase = cast.Phase;
				cast.Map.AddObject(minion);
			}

			if (caster is Character)
			{
				minion.Level = caster.Level;
			}
			minion.Summoner = caster;
			minion.Creator = cast.CasterReference.EntityId;

			return minion;
		}
开发者ID:Jeroz,项目名称:WCell,代码行数:29,代码来源:SpellSummons.cs

示例3: NotifyCasted

 internal void NotifyCasted(SpellCast cast)
 {
     var evt = Casted;
     if (evt != null)
     {
         evt(cast);
     }
 }
开发者ID:ebakkedahl,项目名称:WCell,代码行数:8,代码来源:Spell.Events.cs

示例4: Summon

		public virtual NPC Summon(SpellCast cast, ref Vector3 targetLoc, NPCEntry entry)
		{
			var caster = cast.CasterUnit;
			var pet = caster.SpawnMinion(entry, ref targetLoc, cast.Spell.GetDuration(caster.CasterInfo));
			pet.Summoner = caster;
			pet.Creator = caster.EntityId;
			return pet;
		}
开发者ID:ray2006,项目名称:WCell,代码行数:8,代码来源:SpellSummonHandlers.cs

示例5: NotifyCancelled

		internal void NotifyCancelled(SpellCast cast, SpellFailedReason reason)
		{
			var evt = Cancelling;
			if (evt != null)
			{
				evt(cast, reason);
			}
		}
开发者ID:KroneckerX,项目名称:WCell,代码行数:8,代码来源:Spell.Events.cs

示例6: OnDebuff

		/// <summary>
		/// Called when this Unit got the given debuff by the given SpellCast
		/// </summary>
		/// <param name="cast"></param>
		internal void OnDebuff(SpellCast cast, Aura debuff)
		{
			// force combat mode
			IsInCombat = true;

			var evt = Debuff;
			if (evt != null)
			{
				evt(this, cast, debuff);
			}
		}
开发者ID:pallmall,项目名称:WCell,代码行数:15,代码来源:UnitEvents.cs

示例7: Summon

		public override NPC Summon(SpellCast cast, ref Vector3 targetLoc, NPCEntry entry)
		{
			var caster = cast.CasterUnit;
			if (caster is Character)
			{
				return ((Character)caster).SpawnPet(entry, ref targetLoc, cast.Spell.GetDuration(caster.SharedReference));
			}
			else
			{
				return base.Summon(cast, ref targetLoc, entry);
			}
		}
开发者ID:MeaNone,项目名称:WCell,代码行数:12,代码来源:SpellSummons.cs

示例8: NotifyCasting

		/// <summary>
		/// Triggers the Casting event
		/// </summary>
		internal SpellFailedReason NotifyCasting(SpellCast cast)
		{
			var evt = Casting;
			if (evt != null)
			{
				var err = evt(cast);
				if (err != SpellFailedReason.Ok)
				{
					cast.Cancel(err);
					return err;
				}
			}
			return SpellFailedReason.Ok;
		}
开发者ID:KroneckerX,项目名称:WCell,代码行数:17,代码来源:Spell.Events.cs

示例9: CheckInitialize

        /// <summary>
        /// Ensure that the constraints are correct for the Flag aura to be applied
        /// </summary>
        protected override void CheckInitialize(SpellCast creatingCast, ObjectReference casterReference, Unit target, ref SpellFailedReason failReason)
        {
			if (!(target is Character))
			{
				failReason = SpellFailedReason.BadTargets;
			}
			else
			{
				Instance = target.Region as WarsongGulch;
				if (Instance == null)
				{
					failReason = SpellFailedReason.IncorrectArea;
				}
			}
        }
开发者ID:NVN,项目名称:WCell,代码行数:18,代码来源:WarsongFlagsHandler.cs

示例10: SendSpellMiss

 /// <summary>
 /// Correct 3.0.9
 /// </summary>
 public static void SendSpellMiss(SpellCast cast, bool display, ICollection<MissedTarget> missedTargets)
 {
     using (var packet = new RealmPacketOut(RealmServerOpCode.SMSG_SPELLLOGMISS, 34))
     {
         packet.Write(cast.Spell.Id);
         packet.Write(cast.CasterReference.EntityId);
         packet.Write(display);// TODO: test this value. Its a bool that seems to determine whether to display this packet in the combat log
         packet.Write(missedTargets.Count);
         foreach (var miss in missedTargets)
         {
             packet.Write(miss.Target.EntityId);
             packet.Write((byte)miss.Reason);
         }
         cast.SendPacketToArea(packet);
     }
 }
开发者ID:ebakkedahl,项目名称:WCell,代码行数:19,代码来源:CombatLogHandler.cs

示例11: CheckInitialize

			protected override void CheckInitialize(SpellCast creatingCast, ObjectReference casterReference, Unit target, ref SpellFailedReason failReason)
			{
				if (target is Character)
				{
					var chr = (Character)target;
					var ap = target.TotalMeleeAP;
					var sp = chr.GetDamageDoneMod(DamageSchool.Holy);
					if (ap > sp)
					{
						totalBonus = ap;
					}
					else
					{
						totalBonus = sp;
					}
				}
			}
开发者ID:remixod,项目名称:netServer,代码行数:17,代码来源:PlayerSpells.cs

示例12: PrepareAI

		/// <summary>
		/// Find valid targets for AI cast during preparation
		/// </summary>
		SpellFailedReason PrepareAI(SpellCast cast)
		{
			var caster = cast.CasterUnit;
			cast.SourceLoc = caster.Position;

			if (caster.Target != null)
			{
				caster.SpellCast.TargetLoc = caster.Target.Position;
			}


			// TODO: Init handlers
			//var targets = FindValidTargetsForCaster(caster);
			//if (targets == null)
			//{
			//    return SpellFailedReason.NoValidTargets;
			//}

			return SpellFailedReason.NoValidTargets;
		}
开发者ID:MeaNone,项目名称:WCell,代码行数:23,代码来源:SpellCast.AI.cs

示例13: FerociousBiteHandler

		public FerociousBiteHandler(SpellCast cast, SpellEffect effect)
			: base(cast, effect)
		{
		}
开发者ID:primax,项目名称:WCell,代码行数:4,代码来源:DruidFeralCombatFixes.cs

示例14: SendSpellFailedOther

		internal static void SendSpellFailedOther(SpellCast spellCast, SpellFailedReason reason)
		{
			using (var packet = new RealmPacketOut(RealmServerOpCode.SMSG_SPELL_FAILED_OTHER, 15))
			{
				spellCast.Caster.EntityId.WritePacked(packet);
				packet.Write(spellCast.Id);
				packet.Write(spellCast.Spell.Id);
				packet.Write((byte)reason);

				spellCast.Caster.SendPacketToArea(packet);
			}
		}
开发者ID:pallmall,项目名称:WCell,代码行数:12,代码来源:SpellHandler.cs

示例15: ReadinessHandler

 public ReadinessHandler(SpellCast cast, SpellEffect effect)
     : base(cast, effect)
 {
 }
开发者ID:MeaNone,项目名称:WCell,代码行数:4,代码来源:HunterMarkmanshipFixes.cs


注:本文中的WCell.RealmServer.Spells.SpellCast类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。