Esempio n. 1
0
        // Token: 0x060038A6 RID: 14502 RVA: 0x00101EBC File Offset: 0x001000BC
        private void AddSkillDelayHits(CombatSkillState ss, Fix64 x0, Fix64 x1)
        {
            if (!BJLuaObjHelper.IsSkipLuaHotfix && this.TryInitHotFix("") && this.m_AddSkillDelayHitsCombatSkillStateFix64Fix64_hotfix != null)
            {
                this.m_AddSkillDelayHitsCombatSkillStateFix64Fix64_hotfix.call(new object[]
                {
                    this,
                    ss,
                    x0,
                    x1
                });
                return;
            }
            BJLuaObjHelper.IsSkipLuaHotfix = false;
            int num  = 0;
            int num2 = 0;
            int num3 = this.GetDelayHitFrameMax() - this.m_frameCount;

            if (num3 >= 0 && ss.m_skillInfo.Time_MultiHit.Count > 0)
            {
                num  = Combat.FrameToMillisecond(num3) + ss.m_skillInfo.Time_MultiHit[0];
                num2 = 1;
            }
            while (ss.m_preAttackHitCount < ss.m_skillInfo.HitCountMax)
            {
                CombatActor combatActor = this.SearchHitTarget(x0, x1, this.m_hitId);
                if (combatActor != null)
                {
                    bool isCritical = ss.IsCritical(combatActor.IsHero());
                    do
                    {
                        this.AddDelayHit(combatActor, num);
                        this.m_sourceActor.PreAttack(combatActor, ss.m_skillInfo, isCritical);
                        if (ss.m_skillInfo.Time_MultiHit.Count > 0)
                        {
                            num += ss.m_skillInfo.Time_MultiHit[num2 % ss.m_skillInfo.Time_MultiHit.Count];
                            num2++;
                        }
                        ss.m_preAttackHitCount++;
                        if (combatActor.GetPreAttackHealthPoint() <= 0 && !combatActor.IsHero())
                        {
                            break;
                        }
                    }while (ss.m_preAttackHitCount < ss.m_skillInfo.HitCountMax);
IL_190:
                    combatActor.AddBeHitId(this.m_hitId);
                    continue;
                    goto IL_190;
                }
                break;
            }
        }
Esempio n. 2
0
			// Token: 0x0600389C RID: 14492 RVA: 0x00101268 File Offset: 0x000FF468
			public LuaExportHelper(CombatSkillState owner)
			{
				this.m_owner = owner;
			}
Esempio n. 3
0
 // Token: 0x060038A0 RID: 14496 RVA: 0x00101414 File Offset: 0x000FF614
 public void Setup(ConfigDataFlyObjectInfo flyObjInfo, CombatSkillState ss, CombatActor sourceActor, CombatActor targetActor)
 {
     if (!BJLuaObjHelper.IsSkipLuaHotfix && this.TryInitHotFix("") && this.m_SetupConfigDataFlyObjectInfoCombatSkillStateCombatActorCombatActor_hotfix != null)
     {
         this.m_SetupConfigDataFlyObjectInfoCombatSkillStateCombatActorCombatActor_hotfix.call(new object[]
         {
             this,
             flyObjInfo,
             ss,
             sourceActor,
             targetActor
         });
         return;
     }
     BJLuaObjHelper.IsSkipLuaHotfix = false;
     if (flyObjInfo == null || ss == null || sourceActor == null || targetActor == null)
     {
         base.DeleteMe();
         return;
     }
     this.m_configDataFlyObjectInfo = flyObjInfo;
     this.m_sourceSkillState        = ss;
     this.m_sourceActor             = sourceActor;
     this.m_targetActor             = targetActor;
     this.m_targetTeamNumber        = targetActor.TeamNumber;
     this.m_startPosition           = sourceActor.Position;
     this.m_startZ = sourceActor.Height * 2 / 3 + sourceActor.FootHeight;
     if (flyObjInfo.TrackType == TrackType.TrackType_Parabolic)
     {
         Vector2i vector2i = targetActor.Position - sourceActor.Position;
         int      num      = Math.Max((int)((long)vector2i.magnitude), 1);
         int      num2     = Combat.MillisecondToFrame1(num * 1000 / flyObjInfo.Speed);
         this.m_endZ = targetActor.Height * 2 / 3 + targetActor.FootHeight;
         Fix64 fix  = (Fix64)((long)(-(long)this.m_configDataFlyObjectInfo.Gravity));
         Fix64 fix2 = (Fix64)((long)num) / (Fix64)((long)flyObjInfo.Speed);
         Fix64 fix3 = this.m_vz = Fix64.Zero;
         if (fix2 > Fix64.Zero)
         {
             fix3 = (this.m_vz = (Fix64)((long)(this.m_endZ - this.m_startZ)) / fix2 - fix * fix2 * (Fix64)0.5f);
         }
         Fix64 x = MathUtility.Max(fix3 * fix3 - (Fix64)((long)(2 * this.m_startZ)) * fix, Fix64.Zero);
         Fix64 x2;
         if (fix < Fix64.Zero)
         {
             x2 = (-fix3 - Fix64.Sqrt(x)) / fix;
         }
         else
         {
             x2 = fix2;
         }
         this.m_lifeMax = Combat.MillisecondToFrame1((int)((long)(x2 * (Fix64)1000L)));
         int num3 = num * this.m_lifeMax / num2;
         this.m_endPosition = this.m_startPosition + vector2i.normalized * (Fix64)((long)num3);
         this.m_endZ        = 0;
     }
     else
     {
         int num4 = flyObjInfo.Distance;
         if (num4 <= 0)
         {
             num4 = 1000;
         }
         if (flyObjInfo.TrackType == TrackType.TrackType_Straight)
         {
             this.m_endPosition.x = this.m_startPosition.x + (Fix64)((long)(Fix64.Sign(targetActor.Position.x - sourceActor.Position.x) * num4));
             this.m_endPosition.y = this.m_startPosition.y;
             this.m_endZ          = this.m_startZ;
         }
         else if (flyObjInfo.TrackType == TrackType.TrackType_DownStraight)
         {
             this.m_endPosition.x = this.m_startPosition.x + (Fix64)((long)(Fix64.Sign(targetActor.Position.x - sourceActor.Position.x) * num4));
             this.m_endPosition.y = this.m_startPosition.y;
             this.m_endZ          = (this.m_startZ = 80);
         }
         else if (flyObjInfo.TrackType == TrackType.TrackType_UpStraight)
         {
             this.m_endPosition.x = this.m_startPosition.x + (Fix64)((long)(Fix64.Sign(targetActor.Position.x - sourceActor.Position.x) * num4));
             this.m_endPosition.y = this.m_startPosition.y;
             this.m_endZ          = (this.m_startZ = 150);
         }
         this.m_lifeMax = Combat.MillisecondToFrame1(num4 * 1000 / flyObjInfo.Speed);
     }
     this.m_frameCount         = 0;
     this.m_life               = 0;
     this.m_fxLife             = Fix64.Zero;
     this.m_isGraphicSkillFade = false;
     this.m_hitId              = this.Combat.GetNextHitId();
     this.CreateFx(flyObjInfo.Model, (float)flyObjInfo.ModelScale * 0.01f);
 }
Esempio n. 4
0
 // Token: 0x060038ED RID: 14573 RVA: 0x0010313C File Offset: 0x0010133C
 public void AddSkillDelayHits(CombatSkillState ss, Fix64 x0, Fix64 x1)
 {
     this.m_owner.AddSkillDelayHits(ss, x0, x1);
 }