• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# SpellId类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: FixTameSpell

		static void FixTameSpell(SpellId id, SpellId triggerId)
		{
			// add a spell-trigger
			var spell = SpellHandler.Get(id);
			var effect = spell.AddTriggerSpellEffect(triggerId, ImplicitSpellTargetType.SingleEnemy);
			effect.Amplitude = spell.Durations.Min;
		}
开发者ID:KroneckerX,项目名称:WCell,代码行数:7,代码来源:QuestSpells.cs


示例2: AddProcTrigger

		static void AddProcTrigger(SpellId id, SpellId triggerId)
		{
			SpellHandler.Apply(spell =>
			{
				var effect = spell.AddAuraEffect(AuraType.ProcTriggerSpell, ImplicitSpellTargetType.Self);
				effect.TriggerSpellId = triggerId;
			},id);
		}
开发者ID:remixod,项目名称:netServer,代码行数:8,代码来源:ShamanFixes.cs


示例3: GetReadySpell

		public Spell GetReadySpell(SpellId spellId)
		{
			foreach (var spell in m_readySpells)
			{
				if (spell.SpellId == spellId)
				{
					return spell;
				}
			}
			return null;
		}
开发者ID:KroneckerX,项目名称:WCell,代码行数:11,代码来源:NPCSpellCollection.cs


示例4: GetReadySpell

		public Spell GetReadySpell(SpellId spellId)
		{
			for (int i = 0; i < m_readySpells.Count; i++)
			{
				var spell = m_readySpells[i];
				if (spell.SpellId == spellId)
				{
					return spell;
				}
			}
			return null;
		}
开发者ID:pallmall,项目名称:WCell,代码行数:12,代码来源:NPCSpellCollection.cs


示例5: FixTameSpell

		static void FixTameSpell(SpellId id, SpellId triggerId)
		{
			// convert the Dummy aura into a spell-trigger
			var spell = SpellHandler.Get(id);
			var effect = spell.GetEffect(SpellEffectType.ApplyAura);
			effect.AuraType = AuraType.None;
			effect.EffectType = SpellEffectType.TriggerSpell;
			//spell.Durations.Min = 200;
			//spell.Durations.Max = 200;
			effect.Amplitude = spell.Durations.Min;
			effect.TriggerSpellId = triggerId;
		}
开发者ID:pallmall,项目名称:WCell,代码行数:12,代码来源:QuestSpells.cs


示例6: AddAura

		public void AddAura(SpellId spellId)
		{
			var spell = SpellHandler.Get(spellId);
			if (spell == null)
			{
				LogManager.GetCurrentClassLogger().Warn("Tried to add invalid Aura-Spell \"{0}\" to NPCEntry: {1}", spellId, this);
			}
			else
			{
				Auras.Add(spell);
			}
		}
开发者ID:remixod,项目名称:netServer,代码行数:12,代码来源:NPCAddonData.cs


示例7: SendSpellMiss

		/// <summary>
		/// Correct 3.0.9
		/// </summary>
		public static void SendSpellMiss(SpellId spell, WorldObject caster, bool doIt, ICollection<CastMiss> missedTargets)
		{
			using (var packet = new RealmPacketOut(RealmServerOpCode.SMSG_SPELLLOGMISS, 34))
			{
				packet.Write((uint)spell);
				packet.Write(caster.EntityId);
				packet.Write(doIt);// 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);
				}
				caster.SendPacketToArea(packet);
			}
		}
开发者ID:pallmall,项目名称:WCell,代码行数:19,代码来源:CombatLogHandler.cs


示例8: DynamicObject

		public DynamicObject(Unit creator, SpellId spellId, float radius, Region region, Vector3 pos)
		{
			if (creator == null)
				throw new ArgumentNullException("creator", "creator must not be null");

			Master = m_creator = creator;
			EntityId = EntityId.GetDynamicObjectId(++lastId);
			Type |= ObjectTypes.DynamicObject;
			SetEntityId(DynamicObjectFields.CASTER, Caster.EntityId);
			SpellId = spellId;
			Radius = radius;
			Bytes = 0x01EEEEEE;
			ScaleX = 1;

			m_position = pos;
			region.AddObjectLater(this);
		}
开发者ID:pallmall,项目名称:WCell,代码行数:17,代码来源:DynamicObject.cs


示例9: 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


示例10: HandleTrainerList

		static void HandleTrainerList(PacketParser parser)
		{
			var spells = parser.ParsedPacket["Spells"].List;
			foreach (var spellSegment in spells)
			{
				var id = (SpellId)spellSegment["Spell"].UIntValue;
				var moneyCost = spellSegment["MoneyCost"].IntValue;
				var talentCost = spellSegment["TalentCost"].IntValue;
				var profCost = spellSegment["ProfessionPointCost"].IntValue;
				int reqLevel = spellSegment["RequiredLevel"].ByteValue;
				var reqSkill = (SkillId)spellSegment["RequiredSkill"].UIntValue;
				var reqSkillValue = spellSegment["RequiredSkillLevel"].IntValue;
				var reqSpells = new SpellId[3];

				reqSpells[0] = (SpellId)spellSegment["RequiredSpellId1"].UIntValue;
				reqSpells[1] = (SpellId)spellSegment["RequiredSpellId2"].UIntValue;
				reqSpells[2] = (SpellId)spellSegment["RequiredSpellId3"].UIntValue;

				// TODO: Calc exact money cost, depending on the faction
			}
		}
开发者ID:remixod,项目名称:netServer,代码行数:21,代码来源:TrainerInfoExtractor.cs


示例11: FixFeralSwiftness

		private static void FixFeralSwiftness(SpellId origSpell, SpellId triggerSpell)
		{
			// Feral Swiftness should only be applied in Cat Form
			SpellHandler.Apply(spell =>
			{
				// only as cat
				// triggers the dodge effect spell
				spell.AllowedShapeshiftMask = ShapeshiftMask.Cat;
				spell.AddTriggerSpellEffect(triggerSpell);
			},
			origSpell);
			SpellHandler.Apply(spell =>
			{
				// this spell applies the dodge bonus for Feral Swiftness
				// "increases your chance to dodge while in Cat Form, Bear Form and Dire Bear Form"
				// must be passive
				spell.Attributes |= SpellAttributes.Passive;
				spell.AllowedShapeshiftMask = ShapeshiftMask.Cat | ShapeshiftMask.Bear | ShapeshiftMask.DireBear;
			},
			triggerSpell);
		}
开发者ID:ray2006,项目名称:WCell,代码行数:21,代码来源:DruidFeralCombatFixes.cs


示例12: Replace

		/// <summary>
		/// Only works if you have 2 valid spell ids and oldSpellId already exists.
		/// </summary>
		public void Replace(SpellId oldSpellId, SpellId newSpellId)
		{
			Spell oldSpell, newSpell = SpellHandler.Get(newSpellId);
			if (m_byId.TryGetValue((uint)oldSpellId, out oldSpell))
			{
				Replace(oldSpell, newSpell);
			}
		}
开发者ID:pallmall,项目名称:WCell,代码行数:11,代码来源:SpellCollection.cs


示例13: Remove

		public void Remove(SpellId spellId)
		{
			Replace(SpellHandler.Get(spellId), null);
		}
开发者ID:pallmall,项目名称:WCell,代码行数:4,代码来源:SpellCollection.cs


示例14:

		public Spell this[SpellId id]
		{
			get
			{
				Spell spell;
				m_byId.TryGetValue((uint)id, out spell);
				return spell;
			}
		}
开发者ID:pallmall,项目名称:WCell,代码行数:9,代码来源:SpellCollection.cs


示例15: Contains

		public bool Contains(SpellId id)
		{
			return m_byId.ContainsKey((uint)id);
		}
开发者ID:pallmall,项目名称:WCell,代码行数:4,代码来源:SpellCollection.cs


示例16: SendImpact

		public static void SendImpact(WorldObject target, SpellId id)
		{
			var spell = Get(id);
			SendImpact(target, spell.Visual);
		}
开发者ID:pallmall,项目名称:WCell,代码行数:5,代码来源:SpellHandler.cs


示例17: AddPeriodicTriggerSpellEffect

		/// <summary>
		/// Adds a SpellEffect that will trigger the given Spell on oneself
		/// </summary>
		public SpellEffect AddPeriodicTriggerSpellEffect(SpellId triggerSpell)
		{
			return AddPeriodicTriggerSpellEffect(triggerSpell, ImplicitTargetType.Self);
		}
开发者ID:WCellFR,项目名称:WCellFR,代码行数:7,代码来源:Spell.cs


示例18: SendCastFailed

		public static void SendCastFailed(IPacketReceiver receiver, SpellId spellId, SpellFailedReason reason)
		{
			using (var packet = new RealmPacketOut(RealmServerOpCode.SMSG_PET_CAST_FAILED, 8))
			{
				packet.Write(0);				// unkown
				packet.Write((uint)spellId);
				packet.Write((byte)reason);
				receiver.Send(packet);
			}
		}
开发者ID:KroneckerX,项目名称:WCell,代码行数:10,代码来源:PetHandler.cs


示例19: AddSpell

		/// <summary>
		/// Adds a Spell that will be used by all NPCs of this Entry
		/// </summary>
		public void AddSpell(SpellId spellId)
		{
			var spell = SpellHandler.Get(spellId);
			if (spell != null)
			{
				AddSpell(spell);
			}
		}
开发者ID:KroneckerX,项目名称:WCell,代码行数:11,代码来源:NPCEntry.cs


示例20: GetSpellEntry

		/// <summary>
		/// Returns the TrainerSpellEntry from SpellsForSale with the given spellId, else null.
		/// </summary>
		public TrainerSpellEntry GetSpellEntry(SpellId spellId)
		{
			TrainerSpellEntry entry;
			Spells.TryGetValue(spellId, out entry);
			return entry;
		}
开发者ID:KroneckerX,项目名称:WCell,代码行数:9,代码来源:TrainerEntry.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# SpellLine类代码示例发布时间:2022-05-24
下一篇:
C# SpellFailedReason类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap