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

C# DamageSchool类代码示例

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

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



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

示例1: ModDamageDoneFactorSilently

		protected internal override void ModDamageDoneFactorSilently(DamageSchool school, float delta)
		{
			if (m_damageDoneFactors == null)
			{
				m_damageDoneFactors = new float[(int)DamageSchool.Count];
			}
			m_damageDoneFactors[(int)school] += delta;
		}
开发者ID:remixod,项目名称:netServer,代码行数:8,代码来源:NPC.Mechanics.cs


示例2: GetDamageDoneFactor

		public override float GetDamageDoneFactor(DamageSchool school)
		{
			if (m_damageDoneFactors == null)
			{
				return 1;
			}
			return 1 + m_damageDoneFactors[(int)school];
		}
开发者ID:remixod,项目名称:netServer,代码行数:8,代码来源:NPC.Mechanics.cs


示例3: RemoveDamageDoneModSilently

		/// <summary>
		/// Modifies the damage for the given school by the given delta.
        /// Requires a call to <see cref="WCell.RealmServer.Modifiers.UnitUpdates.UpdateAllDamages"/> afterwards.
		/// </summary>
		/// <param name="school"></param>
		/// <param name="delta"></param>
		protected internal override void RemoveDamageDoneModSilently(DamageSchool school, int delta)
		{
			if (m_damageDoneMods == null)
			{
				return;
			}
			m_damageDoneMods[(int)school] -= delta;
		}
开发者ID:remixod,项目名称:netServer,代码行数:14,代码来源:NPC.Mechanics.cs


示例4: AddDamageDoneModSilently

		/// <summary>
		/// Modifies the damage for the given school by the given delta.
        /// Requires a call to <see cref="WCell.RealmServer.Modifiers.UnitUpdates.UpdateAllDamages"/> afterwards.
		/// </summary>
		/// <param name="school"></param>
		/// <param name="delta"></param>
		protected internal override void AddDamageDoneModSilently(DamageSchool school, int delta)
		{
			if (m_damageDoneMods == null)
			{
				m_damageDoneMods = new int[(int)DamageSchool.Count];
			}
			m_damageDoneMods[(int)school] += delta;
		}
开发者ID:remixod,项目名称:netServer,代码行数:14,代码来源:NPC.Mechanics.cs


示例5: GetDamageDoneMod

		public override int GetDamageDoneMod(DamageSchool school)
		{
			var amount = 0;

			if (IsHunterPet && m_master != null)
			{
				if (school != DamageSchool.Physical)
				{
					// "0.13% spell damage (0.18 spell damage with 2/2 Wild Hunt)"	
					var bonus = m_master.GetDamageDoneMod(school);
					amount += (bonus * PetMgr.PetSpellDamageOfOwnerPercent + 50) / 100;	 // rounding
				}
			}
			if (m_damageDoneMods != null)
			{
				amount += m_damageDoneMods[(int)school];
			}
			return amount;
		}
开发者ID:remixod,项目名称:netServer,代码行数:19,代码来源:NPC.Mechanics.cs


示例6: GetCritChance

 public override float GetCritChance(DamageSchool school)
 {
     var value = m_entry.Rank > CreatureRank.Normal ? BossSpellCritChance : 0;
     if (m_CritMods != null)
     {
         value += m_CritMods[(int)school];
     }
     return value;
 }
开发者ID:ebakkedahl,项目名称:WCell,代码行数:9,代码来源:NPC.cs


示例7: CalcPowerCost

 public int CalcPowerCost(Unit caster, DamageSchool school)
 {
     return caster.GetPowerCost(school, this, CalcBasePowerCost(caster));
 }
开发者ID:ebakkedahl,项目名称:WCell,代码行数:4,代码来源:Spell.cs


示例8: SetResistance

		public void SetResistance(DamageSchool school, int value)
		{
			Resistances[(uint)school] = value;
		}
开发者ID:KroneckerX,项目名称:WCell,代码行数:4,代码来源:NPCEntry.cs


示例9: GetResistance

		public int GetResistance(DamageSchool school)
		{
			if (Resistances == null)
			{
				return 0;
			}
			return Resistances.Get((uint)school);
		}
开发者ID:KroneckerX,项目名称:WCell,代码行数:8,代码来源:NPCEntry.cs


示例10: ConsumePower

		/// <summary>
		/// Tries to consume the given amount of Power, also considers modifiers to Power-cost.
		/// </summary>
		public bool ConsumePower(DamageSchool type, Spell spell, int neededPower)
		{
			neededPower = GetPowerCost(type, spell, neededPower);

			if (Power >= neededPower)
			{
				Power -= neededPower;
				return true;
			}

			return false;
		}
开发者ID:ray2006,项目名称:WCell,代码行数:15,代码来源:Unit.cs


示例11: ModDamageTakenPctMod

		public void ModDamageTakenPctMod(DamageSchool[] schools, int delta)
		{
			if (m_damageTakenPctMods == null)
			{
				m_damageTakenPctMods = CreateDamageSchoolArr();
			}

			foreach (var school in schools)
			{
				m_damageTakenPctMods[(int)school] += delta;
			}
		}
开发者ID:enjoii,项目名称:WCell,代码行数:12,代码来源:Unit.Mechanics.cs


示例12: GetGeneratedThreat

		/// <summary>
		/// Threat mod in percent
		/// </summary>
		public virtual int GetGeneratedThreat(int dmg, DamageSchool school, SpellEffect effect)
		{
			if (m_threatMods == null)
			{
				return dmg;
			}
			return dmg + ((dmg * m_threatMods[(int)school]) / 100);
		}
开发者ID:enjoii,项目名称:WCell,代码行数:11,代码来源:Unit.Mechanics.cs


示例13: GetPowerCost

		/// <summary>
		/// Returns the modified power-cost needed to cast a Spell of the given DamageSchool 
		/// and the given base amount of power required
		/// </summary>
		public virtual int GetPowerCost(DamageSchool school, Spell spell, int cost)
		{
			int modifier = PowerCostModifier;
			if (m_schoolPowerCostMods != null)
			{
				modifier += m_schoolPowerCostMods[(int)school];
			}

			cost += modifier;

			cost = (int)(Math.Round(PowerCostMultiplier) * cost);
			return cost;
		}
开发者ID:ray2006,项目名称:WCell,代码行数:17,代码来源:Unit.cs


示例14: GetTargetResistanceMod

		//public void ModDebuffResistance(DamageTypeMask schools, float delta)
		//{
		//    foreach (var school in UnitMechanics.DamageTypeMasks) {
		//        if ((schools & school) != 0) {
		//            ModDebuffResistance(UnitMechanics.DamageTypeLookup[school], delta);
		//        }
		//    }
		//}
		#endregion

		#region Target Resistances
		public int GetTargetResistanceMod(DamageSchool school)
		{
			if (m_TargetResMods == null)
			{
				return 0;
			}
			return m_TargetResMods[(int)school];
		}
开发者ID:enjoii,项目名称:WCell,代码行数:19,代码来源:Unit.Mechanics.cs


示例15: IsImmune

		/// <summary>
		/// Indicates whether the owner is immune against the given DamageSchool
		/// </summary>
		public bool IsImmune(DamageSchool school)
		{
			return m_dmgImmunities != null && m_dmgImmunities[(int)school] > 0;
		}
开发者ID:enjoii,项目名称:WCell,代码行数:7,代码来源:Unit.Mechanics.cs


示例16: ModDebuffResistance

		public void ModDebuffResistance(DamageSchool school, int delta)
		{
			if (m_debuffResistances == null)
			{
				m_debuffResistances = CreateDamageSchoolArr();
			}
			m_debuffResistances[(int)school] += delta;
		}
开发者ID:enjoii,项目名称:WCell,代码行数:8,代码来源:Unit.Mechanics.cs


示例17: SetDebuffResistance

		public void SetDebuffResistance(DamageSchool school, int value)
		{
			if (m_debuffResistances == null)
			{
				m_debuffResistances = CreateDamageSchoolArr();
			}
			m_debuffResistances[(uint)school] = value;
		}
开发者ID:enjoii,项目名称:WCell,代码行数:8,代码来源:Unit.Mechanics.cs


示例18: GetDebuffResistance

		public int GetDebuffResistance(DamageSchool school)
		{
			if (m_debuffResistances == null)
			{
				return 0;
			}
			return m_debuffResistances[(int)school];
		}
开发者ID:enjoii,项目名称:WCell,代码行数:8,代码来源:Unit.Mechanics.cs


示例19: DecDmgImmunityCount

		/// <summary>
		/// Decreases immunity-count against given damage-school
		/// </summary>
		public void DecDmgImmunityCount(DamageSchool school)
		{
			if (m_dmgImmunities == null)
			{
				return;
			}
			int val = m_dmgImmunities[(int)school];
			if (val > 0)
			{
				m_dmgImmunities[(int)school]--;
			}
		}
开发者ID:enjoii,项目名称:WCell,代码行数:15,代码来源:Unit.Mechanics.cs


示例20: IncDmgImmunityCount

		/// <summary>
		/// Adds immunity against given damage-school
		/// </summary>
		public void IncDmgImmunityCount(DamageSchool school)
		{
			if (m_dmgImmunities == null)
			{
				m_dmgImmunities = CreateDamageSchoolArr();
			}
			var val = m_dmgImmunities[(int)school];

			if (val == 0)
			{
				// new immunity: Gets rid of all Auras that use this school
				Auras.RemoveWhere(aura => aura.Spell.SchoolMask.HasAnyFlag((DamageSchoolMask)(1 << (int)school)));
			}

			m_dmgImmunities[(int)school]++;
		}
开发者ID:enjoii,项目名称:WCell,代码行数:19,代码来源:Unit.Mechanics.cs



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C# DamageToUnitDelegate类代码示例发布时间:2022-05-24
下一篇:
C# Damage类代码示例发布时间: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