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


C# SkillId类代码示例

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


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

示例1: SetCooldown

		public void SetCooldown(SkillId skillId, DateTime endTime)
		{
			if (this._cooldownDictionary.ContainsKey(skillId))
				this._cooldownDictionary[skillId] = endTime;
			else
				this._cooldownDictionary.Add(skillId, endTime);
		}
开发者ID:xKamuna,项目名称:aura,代码行数:7,代码来源:CooldownManager.cs

示例2: SkillComplete

        /// <summary>
        /// Sends SkillComplete to creature's client.
        /// </summary>
        /// <param name="creature"></param>
        /// <param name="skillId"></param>
        public static void SkillComplete(Creature creature, SkillId skillId)
        {
            var packet = new Packet(Op.SkillComplete, creature.EntityId);
            packet.PutUShort((ushort)skillId);

            creature.Client.Send(packet);
        }
开发者ID:pie3467,项目名称:aura,代码行数:12,代码来源:Send.Skills.cs

示例3: SkillStartSilentCancel

		/// <summary>
		/// Sends SkillStartSilentCancel to creature's client.
		/// </summary>
		/// <param name="creature"></param>
		/// <param name="skillId"></param>
		public static void SkillStartSilentCancel(Creature creature, SkillId skillId)
		{
			var packet = new Packet(Op.SkillStartSilentCancel, creature.EntityId);
			packet.PutUShort((ushort)skillId);

			creature.Client.Send(packet);
		}
开发者ID:ripxfrostbite,项目名称:aura,代码行数:12,代码来源:Send.Skills.cs

示例4: AttackerAction

 public AttackerAction(CombatActionType type, Creature creature, SkillId skillId, long targetId)
 {
     this.Type = type;
     this.Creature = creature;
     this.SkillId = skillId;
     this.TargetId = targetId;
 }
开发者ID:Kuukrow,项目名称:aura,代码行数:7,代码来源:CombatAction.cs

示例5: Skill

		/// <summary>
		/// New Skill.
		/// </summary>
		/// <param name="creature"></param>
		/// <param name="id"></param>
		/// <param name="rank"></param>
		/// <param name="race"></param>
		public Skill(Creature creature, SkillId id, SkillRank rank, int race)
		{
			_creature = creature;
			_race = race;

			this.Info.Id = id;
			this.Info.Rank = rank;
			this.Info.MaxRank = rank;

			this.Info.Flag = SkillFlags.Shown;

			// The conditions are set to the max and are reduced afterwards,
			// making them "Complete" once they reach 0. Initializing to 1
			// in case of problems.
			this.Info.ConditionCount1 = 1;
			this.Info.ConditionCount2 = 1;
			this.Info.ConditionCount3 = 1;
			this.Info.ConditionCount4 = 1;
			this.Info.ConditionCount5 = 1;
			this.Info.ConditionCount6 = 1;
			this.Info.ConditionCount7 = 1;
			this.Info.ConditionCount8 = 1;
			this.Info.ConditionCount9 = 1;

			this.LoadRankData();
		}
开发者ID:tkiapril,项目名称:aura,代码行数:33,代码来源:Skill.cs

示例6: NotImplementedException

 ISkill ISkillCollection.this[SkillId skillId]
 {
     get
       {
     Contract.Ensures(Contract.Result<ISkill>() != null);
     throw new NotImplementedException();
       }
 }
开发者ID:jhtodd,项目名称:Eve,代码行数:8,代码来源:ISkillCollectionContracts.cs

示例7: RankUp

		/// <summary>
		/// Broadcasts RankUp in range of creature.
		/// </summary>
		/// <remarks>
		/// The second parameter is the rank, but doesn't seem to be necessary.
		/// </remarks>
		/// <param name="creature"></param>
		/// <param name="skillId">Excluded if 0</param>
		public static void RankUp(Creature creature, SkillId skillId = 0)
		{
			var packet = new Packet(Op.RankUp, creature.EntityId);
			if (skillId > 0)
				packet.PutUShort((ushort)skillId);
			packet.PutShort(1); // Rank

			creature.Region.Broadcast(packet, creature);
		}
开发者ID:ripxfrostbite,项目名称:aura,代码行数:17,代码来源:Send.Skills.cs

示例8: GenericWeapon

		public GenericWeapon(InventorySlotTypeMask slot, DamageInfo[] damages, SkillId skill, float minRange, float maxRange, int attackTime)
		{
			InventorySlotMask = slot;
			Damages = damages;
			Skill = skill;
			MinRange = minRange;
			MaxRange = maxRange;
			AttackTime = attackTime;
		}
开发者ID:NVN,项目名称:WCell,代码行数:9,代码来源:GenericWeapon.cs

示例9: GenericWeapon

		public GenericWeapon(bool isRanged, DamageInfo[] damages, SkillId skill, float minRange, float maxRange, int attackTime)
		{
			IsRanged = isRanged;
			IsMelee = !isRanged;
			Damages = damages;
			Skill = skill;
			MinRange = minRange;
			MaxRange = maxRange;
			AttackTime = attackTime;
		}
开发者ID:pallmall,项目名称:WCell,代码行数:10,代码来源:GenericWeapon.cs

示例10: UpgradeEffect

		// ^ Skill check ^

		/// <summary>
		/// Initializes upgrade effect, setting required default values.
		/// You should generally use this constructor!
		/// </summary>
		/// <param name="type"></param>
		public UpgradeEffect(UpgradeType type)
		{
			Type = type;
			Unk1 = 0;
			Unk2 = 0;
			Stat = 0;
			ValueType = 0;
			Value = 0;
			SkillId = 0;
			SkillVar = 0;
			Unk4 = 0x0A;
			Unk5 = 0;
			CheckType = UpgradeCheckType.None;
			CheckStat = 0;
			CheckRace = 0;
			CheckPtj = 0;
			CheckMonth = 0;
			CheckBroken = false;
			CheckTitleId = 0;
			CheckCondition = 0;
			CheckValueType = 0;
			CheckValue = 0;
			CheckSkillId = 0;
			CheckSkillRank = 0;
		}
开发者ID:tkiapril,项目名称:aura,代码行数:32,代码来源:Items.cs

示例11: Init2


//.........这里部分代码省略.........
					HarmType = HasHarmfulEffects ? HarmType.Harmful : HarmType.Beneficial;
				}
				else
				{
					HarmType = HarmType.Neutral;
				}
			}

            ReqDeadTarget = TargetFlags.HasAnyFlag(SpellTargetFlags.Corpse | SpellTargetFlags.PvPCorpse | SpellTargetFlags.UnitCorpse);

			CostsMana = PowerCost > 0 || PowerCostPercentage > 0;

			HasTargets = !HasEffectWith(effect => effect.HasTargets);

			CasterIsTarget = HasTargets && HasEffectWith(effect => effect.HasTarget(ImplicitTargetType.Self));

			//HasSingleNotSelfTarget = 

			IsAreaSpell = HasEffectWith(effect => effect.IsAreaEffect);

			IsDamageSpell = HasHarmfulEffects && !HasBeneficialEffects && HasEffectWith(effect =>
					effect.EffectType == SpellEffectType.Attack ||
					effect.EffectType == SpellEffectType.EnvironmentalDamage ||
					effect.EffectType == SpellEffectType.InstantKill ||
					effect.EffectType == SpellEffectType.SchoolDamage ||
					effect.IsStrikeEffect);

			if (DamageMultipliers[0] <= 0)
			{
				DamageMultipliers[0] = 1;
			}

			IsHearthStoneSpell = HasEffectWith(effect => effect.HasTarget(ImplicitTargetType.HeartstoneLocation));

			ForeachEffect(effect =>
			{
				if (effect.EffectType == SpellEffectType.Skill)
				{
					SkillId = (SkillId)effect.MiscValue;
				}
			});

			Schools = Utility.GetSetIndices<DamageSchool>((uint)SchoolMask);
			if (Schools.Length == 0)
			{
				Schools = new[] { DamageSchool.Physical };
			}

			RequiresCasterOutOfCombat = !HasHarmfulEffects && CastDelay > 0 &&
                (Attributes.HasFlag(SpellAttributes.CannotBeCastInCombat) ||
                                        AttributesEx.HasFlag(SpellAttributesEx.RemainOutOfCombat) ||
                                        AuraInterruptFlags.HasFlag(AuraInterruptFlags.OnStartAttack));

			if (RequiresCasterOutOfCombat)
			{
				// We fail if being attacked (among others)
				InterruptFlags |= InterruptFlags.OnTakeDamage;
			}

            IsThrow = AttributesExC.HasFlag(SpellAttributesExC.ShootRangedWeapon) &&
                       Attributes.HasFlag(SpellAttributes.Ranged) && Ability != null && Ability.Skill.Id == SkillId.Thrown;

			HasModifierEffects = HasEffectWith(effect => effect.AuraType == AuraType.AddModifierFlat || effect.AuraType == AuraType.AddModifierPercent);
			ForeachEffect(effect =>
			{
				for (var i = 0; i < 3; i++)
				{
					AllAffectingMasks[i] |= effect.AffectMask[i];
				}
			});

			if (Range.MaxDist == 0)
			{
				Range.MaxDist = 5;
			}

			if (RequiredToolIds == null)
			{
				RequiredToolIds = new uint[0];
			}
			else
			{
				if (RequiredToolIds.Length > 0 && (RequiredToolIds[0] > 0 || RequiredToolIds[1] > 0))
				{
					SpellHandler.SpellsRequiringTools.Add(this);
				}
				ArrayUtil.PruneVals(ref RequiredToolIds);
			}

			ArrayUtil.PruneVals(ref RequiredTotemCategories);

			ForeachEffect(effect =>
			{
				if (effect.SpellEffectHandlerCreator != null)
				{
					EffectHandlerCount++;
				}
			});
			//IsHealSpell = HasEffectWith((effect) => effect.IsHealEffect);
		}
开发者ID:WCellFR,项目名称:WCellFR,代码行数:101,代码来源:Spell.cs

示例12: QuestPrerequisiteNotSkill

 public QuestPrerequisiteNotSkill(SkillId skillId, SkillRank rank = SkillRank.Novice)
 {
     this.Id = skillId;
     this.Rank = rank;
 }
开发者ID:Kuukrow,项目名称:aura,代码行数:5,代码来源:Prerequisites.cs

示例13: SetSkillEffect

		/// <summary>
		/// Changes effect to give a skill bonus.
		/// </summary>
		/// <param name="skillId"></param>
		/// <param name="skillVar"></param>
		/// <param name="value"></param>
		public void SetSkillEffect(SkillId skillId, short skillVar, short value, UpgradeValueType valueType)
		{
			Unk2 = 0x1B;

			Stat = UpgradeStat.Skill;
			ValueType = valueType;
			Value = value;
			SkillId = skillId;
			SkillVar = skillVar;
		}
开发者ID:tkiapril,项目名称:aura,代码行数:16,代码来源:Items.cs

示例14: IsOnCooldown

		public bool IsOnCooldown(SkillId skillId)
		{
			if (this._cooldownDictionary.ContainsKey(skillId))
				return (DateTime.Now < this._cooldownDictionary[skillId]);
			return false;
		}
开发者ID:xKamuna,项目名称:aura,代码行数:6,代码来源:CooldownManager.cs

示例15: SetSkillCheck

		/// <summary>
		/// Changes effect to check for a skill rank.
		/// </summary>
		/// <param name="skillId"></param>
		/// <param name="checkType">SkillRankEqual, SkillRankGreaterThan, or SkillRankLowerThan</param>
		/// <param name="rank"></param>
		public void SetSkillCheck(SkillId skillId, UpgradeCheckType checkType, SkillRank rank)
		{
			if (checkType < UpgradeCheckType.SkillRankEqual || checkType > UpgradeCheckType.SkillRankLowerThan)
				throw new ArgumentException(checkType + " is not a skill check.");

			CheckType = checkType;
			CheckSkillId = skillId;
			CheckValue = 0;
			CheckSkillRank = rank;
		}
开发者ID:tkiapril,项目名称:aura,代码行数:16,代码来源:Items.cs


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