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


C# DamageAction.GetDamagePercent方法代码示例

本文整理汇总了C#中WCell.RealmServer.Misc.DamageAction.GetDamagePercent方法的典型用法代码示例。如果您正苦于以下问题:C# DamageAction.GetDamagePercent方法的具体用法?C# DamageAction.GetDamagePercent怎么用?C# DamageAction.GetDamagePercent使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在WCell.RealmServer.Misc.DamageAction的用法示例。


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

示例1: OnAttack

		public override void OnAttack(DamageAction action)
		{
			//if (!action.IsDot)
			{
				var amount = action.GetDamagePercent(EffectValue);
				Owner.Heal(amount, m_aura.CasterUnit, m_spellEffect);
			}
		}
开发者ID:KroneckerX,项目名称:WCell,代码行数:8,代码来源:LifeLeechPercentAuraHandler.cs

示例2: OnAttack

			public override void OnAttack(DamageAction action)
			{
				if (action.IsMagic)
				{
					// "Increases damage of all spells against targets with less than 35% health by $s1%."
					if (action.Victim.HealthPct <= 35)
					{
						action.Damage += action.GetDamagePercent(EffectValue);
					}
				}
			}
开发者ID:remixod,项目名称:netServer,代码行数:11,代码来源:MageFireFixes.cs

示例3: OnDefend

			public override void OnDefend(DamageAction action)
			{
				// absorb EffectValue % from the damage
				var absorbed = Math.Min(action.GetDamagePercent(EffectValue), RemainingValue);

				// RemainingValue corresponds to AMZ's health, when it reaches 0, AMZ will be destroyed
				RemainingValue = action.Absorb(absorbed, (DamageSchoolMask)m_spellEffect.MiscValue);
			}
开发者ID:remixod,项目名称:netServer,代码行数:8,代码来源:DeathKnightUnholyFixes.cs

示例4: OnAttack

			public override void OnAttack(DamageAction action)
			{
				var attacker = action.Attacker;		// same as Owner
				var victim = action.Victim;
				var dmg = action.GetDamagePercent(EffectValue);
				victim.AddMessage(() => victim.DealSpellDamage(attacker, m_spellEffect, dmg, false, false));	// may not crit
			}
开发者ID:remixod,项目名称:netServer,代码行数:7,代码来源:DeathKnightUnholyFixes.cs

示例5: OnHit

        public override void OnHit(DamageAction action)
        {
            var chr = action.Attacker as Character;
            if (chr != null)
            {
                if (chr.Group != null)
                {
                    List<Character> origGroup = new List<Character>(chr.Group.GetAllCharacters());
                    List<Character> scrambledGroup = new List<Character>();

                    Random randNum = new Random();
                    int i = -1;
                    foreach (Character groupMember in origGroup)
                    {
                        i++;
                        if (groupMember == chr)
                            continue;
                        if (randNum.NextDouble() < (3 - scrambledGroup.Count / origGroup.Count - i))
                            scrambledGroup.Add(groupMember);
                    }
                    var effect = SpellHandler.Get(SpellId.DivineStorm_2).GetEffect(SpellEffectType.Heal);
                    foreach (Character target in scrambledGroup)
                        target.Heal(action.GetDamagePercent(25), chr, effect);
                }
            }
            base.OnHit(action);
        }
开发者ID:KroneckerX,项目名称:WCell,代码行数:27,代码来源:PaladinRetributionFixes.cs


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