當前位置: 首頁>>代碼示例>>C#>>正文


C# ActorController.DoHeal方法代碼示例

本文整理匯總了C#中ActorController.DoHeal方法的典型用法代碼示例。如果您正苦於以下問題:C# ActorController.DoHeal方法的具體用法?C# ActorController.DoHeal怎麽用?C# ActorController.DoHeal使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在ActorController的用法示例。


在下文中一共展示了ActorController.DoHeal方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: DoEffectOnTarget


//.........這裏部分代碼省略.........
            }
            num = num * (long)(10000 + this.damageMod) / 10000L;
            num = num * (long)num5 / 10000L;
            if (this.talentEnhanceDamage != null)
            {
                int num9 = (int)(target.CurHP * 10000L / target.MaxHP);
                if (num9 <= this.talentEnhanceDamage.Value2)
                {
                    num = num * (long)(10000 + this.talentEnhanceDamage.Value1) / 10000L;
                }
            }
            if (!flag && info.TriggerDoubleDamage && this.doubleDamage != null && Time.time >= this.doubleDamage.Cooldown && UtilFunc.RangeRandom(0, 10000) < this.doubleDamage.Value1)
            {
                num = num * (long)this.doubleDamage.Value2 / 10000L;
                this.doubleDamage.Cooldown = Time.time + (float)this.doubleDamage.Value3;
            }
            if (target.shareDamage > 0)
            {
                num = Globals.Instance.ActorMgr.DoShareDamage(target, num, target.shareDamage);
            }
            num2 = target.DoDamage(num, this, ActorController.CanHitBack(info));
            if (num2 > 0 && target.damageReflect > 0)
            {
                long damage = (long)num2 * (long)target.damageReflect / 10000L;
                this.DoReflectDamage(damage, target);
            }
            if (num2 > 0 && target.reflexDamage != null && Time.time >= target.reflexDamage.Cooldown && UtilFunc.RangeRandom(0, 10000) < target.reflexDamage.Value1)
            {
                long num10 = (long)num2 * (long)target.reflexDamage.Value2 / 10000L;
                if (num10 > 0L)
                {
                    target.reflexDamage.Cooldown = Time.time + (float)target.reflexDamage.Value3;
                    this.DoReflectDamage(num10, target);
                }
            }
            if (target.uiText != null && num2 > 0)
            {
                if (target.factionType == ActorController.EFactionType.ERed)
                {
                    if (flag)
                    {
                        GameUIManager.mInstance.HUDTextMgr.RequestShow(target, EShowType.EST_CriticalDamage, num2, null, 0);
                    }
                    else if (this.actorType == ActorController.EActorType.EPlayer && this.Skills[0] != null && this.Skills[0].Info != info)
                    {
                        GameUIManager.mInstance.HUDTextMgr.RequestShow(target, EShowType.EST_SkillDamage, num2, null, 0);
                    }
                    else
                    {
                        GameUIManager.mInstance.HUDTextMgr.RequestShow(target, EShowType.EST_Damage, num2, null, 0);
                    }
                }
                else
                {
                    GameUIManager.mInstance.HUDTextMgr.RequestShow(target, EShowType.EST_Damage, -num2, null, 2);
                }
            }
            num8 += (float)num2 * info.ThreatCoef;
            if (this.suckPct > 0)
            {
                long value3 = (long)num2 * (long)this.suckPct / 10000L;
                this.DoSuckHeal(value3, this, true);
            }
            if (num2 > 0 && this.damageToHeal != null && Time.time >= this.damageToHeal.Cooldown && UtilFunc.RangeRandom(0, 10000) < this.damageToHeal.Value1)
            {
                this.damageToHeal.Cooldown = Time.time + (float)this.damageToHeal.Value3;
                long value4 = (long)num2 * (long)this.damageToHeal.Value2 / 10000L;
                this.DoSuckHeal(value4, this, false);
            }
            if (this.attackToHeal != null && Time.time >= this.attackToHeal.Cooldown && UtilFunc.RangeRandom(0, 10000) < this.attackToHeal.Value1)
            {
                this.attackToHeal.Cooldown = Time.time + (float)this.attackToHeal.Value3;
                long value5 = (long)this.GetAtt(EAttID.EAID_Attack) * (long)this.attackToHeal.Value2 / 10000L;
                this.DoSuckHeal(value5, this, false);
            }
        }
        if (num4 > 0L)
        {
            num4 = num4 * (long)(10000 + this.healMod) / 10000L;
            num3 = target.DoHeal(num4, this);
            if (num3 > 0 && target.uiText != null && this.factionType == ActorController.EFactionType.EBlue)
            {
                GameUIManager.mInstance.HUDTextMgr.RequestShow(target, EShowType.EST_Heal, num3, null, 0);
            }
        }
        if (num8 > 0f && this.IsHostileTo(target))
        {
            target.AiCtrler.ThreatMgr.AddThreat(this, num8);
        }
        if ((this.actorType == ActorController.EActorType.EPlayer || this.actorType == ActorController.EActorType.EPet) && target.AiCtrler.ThreatMgr.TargetActor != null && target.AiCtrler.ThreatMgr.TargetActor.IsBuilding)
        {
            target.AiCtrler.ThreatMgr.Clear();
            target.AiCtrler.SetInitTarget(this);
        }
        if (info.CastType == 0 || info.CastType == 1)
        {
            this.CastTriggerSkill(target);
        }
        this.CountSkillDamageHeal(info, (long)num2, (long)num3);
    }
開發者ID:floatyears,項目名稱:Decrypt,代碼行數:101,代碼來源:ActorController.cs


注:本文中的ActorController.DoHeal方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。