Ejemplo n.º 1
0
 private bool ListenAttackStart(EvtAttackStart evt)
 {
     if ((this._owner.avatar.AttackTarget != null) && (this._owner.avatar.AttackTarget.GetRuntimeID() == evt.targetID))
     {
         this._aiTree.SendEvent("AITargetAttackStart_0");
     }
     return(false);
 }
Ejemplo n.º 2
0
        private bool ListenAttackStart(EvtAttackStart evt)
        {
            MonsterActor actor = Singleton <EventManager> .Instance.GetActor <MonsterActor>(evt.targetID);

            if ((((actor != null) && (actor.metaConfig.subTypeName == this._monsterSubTypeName)) && ((actor.entity.CurrentSkillID == "DEF_ATK") && (base.step == 1))) && ((base.GetCurrentStepState() == BaseLevelTutorial.StepState.Sleep) && !this.IsAllStepDone()))
            {
                this.ActiveCurrentStep();
                this.WaitShowTutorialStep(this.GetDelayTime(base.step), new Action(this.ShowTutorialStep2));
            }
            return(false);
        }
Ejemplo n.º 3
0
 private bool OnAttackStart(EvtAttackStart evt)
 {
     for (int i = 0; i < this._threatTable.Count; i++)
     {
         uint num2 = this._threatTable.Keys[i];
         this._threatTable[num2] = Mathf.Clamp(this._threatTable[num2] + -5, 0, 100);
     }
     if ((this._owner.monster.AttackTarget != null) && this._threatTable.ContainsKey(this._owner.monster.AttackTarget.GetRuntimeID()))
     {
         uint runtimeID = this._owner.monster.AttackTarget.GetRuntimeID();
         this._threatTable[runtimeID] = Mathf.Clamp(this._threatTable[runtimeID] + -15, 0, 100);
     }
     this.ThreatTableChanged();
     return(false);
 }
Ejemplo n.º 4
0
        private bool ListenAttackStart(EvtAttackStart evt)
        {
            if (this.isUpdating)
            {
                switch (Singleton <RuntimeIDManager> .Instance.ParseCategory(evt.targetID))
                {
                case 3:
                {
                    this.avatarAttackTimes++;
                    if (this.attackTimeList.ContainsKey(evt.skillID))
                    {
                        Dictionary <string, uint> dictionary;
                        string str;
                        uint   num3 = dictionary[str];
                        (dictionary = this.attackTimeList)[str = evt.skillID] = num3 + 1;
                    }
                    else
                    {
                        this.attackTimeList[evt.skillID] = 1;
                    }
                    AvatarActor actor = Singleton <EventManager> .Instance.GetActor <AvatarActor>(evt.targetID);

                    if (((actor != null) && actor.config.Skills.ContainsKey(evt.skillID)) && (actor.config.Skills[evt.skillID].SkillCategoryTag != null))
                    {
                        for (int i = 0; i < actor.config.Skills[evt.skillID].SkillCategoryTag.Length; i++)
                        {
                            if ((actor.config.Skills[evt.skillID].SkillCategoryTag[i] == AttackResult.AttackCategoryTag.Branch) || (actor.config.Skills[evt.skillID].SkillCategoryTag[i] == AttackResult.AttackCategoryTag.Charge))
                            {
                                AvatarStastics avatarStastics = this.GetAvatarStastics(evt.targetID);
                                if (avatarStastics != null)
                                {
                                    avatarStastics.avatarSpecialAttackTimes = SafeInt32.op_Increment(avatarStastics.avatarSpecialAttackTimes);
                                }
                                this.specialAttackTimes++;
                                break;
                            }
                        }
                    }
                    break;
                }

                case 4:
                    this.monsterAttackTimes++;
                    break;
                }
            }
            return(true);
        }
Ejemplo n.º 5
0
 private bool OnSkillStart(EvtAttackStart evt)
 {
     if (this.config.SkillIDs != null)
     {
         for (int i = 0; i < this.config.SkillIDs.Length; i++)
         {
             if ((this.config.SkillIDs[i] == evt.skillID) && !this._animatorEntity.ContainAnimEventPredicate(this.config.IgnorePredicate))
             {
                 DelegateUtils.UpdateField <float>(ref this._heat, this._heat + this.config.SkillHeatAdds[i], new Action <float, float>(this.UpdateOverheatDisplayValue));
                 this._coolSpeed = 0f;
                 break;
             }
         }
     }
     return(true);
 }
Ejemplo n.º 6
0
        private bool ListenMonsterAttackStart(EvtAttackStart evt)
        {
            MonsterActor actor = Singleton <EventManager> .Instance.GetActor <MonsterActor>(evt.targetID);

            if (((actor != null) && (base.step == 10)) && ((base.GetCurrentStepState() == BaseLevelTutorial.StepState.Sleep) && !this.IsAllStepDone()))
            {
                this.ActiveCurrentStep();
                this._witchTimeActor     = actor;
                this._witchTimeAttacking = true;
            }
            if ((((actor != null) && (base.step == 15)) && ((base.GetCurrentStepState() == BaseLevelTutorial.StepState.Sleep) && !this.IsAllStepDone())) && this._lastMonsterBorn)
            {
                this.ActiveCurrentStep();
                this._witchTimeActor     = actor;
                this._witchTimeAttacking = true;
            }
            return(false);
        }
Ejemplo n.º 7
0
        private bool ListenAttackStart(EvtAttackStart evt)
        {
            if (this._mode == TutorialBranchAttackMode.Start)
            {
                this._avatar = Singleton <AvatarManager> .Instance.GetLocalAvatar();

                if (this._avatar == null)
                {
                    return(false);
                }
                if (Singleton <AvatarManager> .Instance.IsLocalAvatar(evt.targetID))
                {
                    bool flag           = this._avatar.CurrentSkillID == "ATK02_New";
                    bool locomotionBool = this._avatar.GetLocomotionBool("AbilityUnlockBranchAttack");
                    if ((flag && locomotionBool) && this.IsInStep(4))
                    {
                        this._delayTime = this.GetDelayTime(base.step);
                        this.EnterReadyForBranchAttack();
                    }
                }
            }
            return(false);
        }
Ejemplo n.º 8
0
 private bool ListenAttackStart(EvtAttackStart evt)
 {
     return(false);
 }