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


C# SpellId类代码示例

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


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


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