private bool ListenKilled(EvtKilled evt)
        {
            bool flag = Singleton <RuntimeIDManager> .Instance.ParseCategory(evt.targetID) == 4;

            bool flag2 = Singleton <RuntimeIDManager> .Instance.ParseCategory(evt.targetID) == 3;

            if (!flag || !flag2)
            {
                if (flag)
                {
                    this._killAmount++;
                    if (((this._killAmount == 4) && (base.step == 13)) && ((base.GetCurrentStepState() == BaseLevelTutorial.StepState.Sleep) && !this.IsAllStepDone()))
                    {
                        this.ActiveCurrentStep();
                        this.WaitShowTutorialStep(this.GetDelayTime(base.step), new Action(this.ShowTutorialStep13));
                    }
                }
                if (flag2)
                {
                    if ((base.step == 2) && !this.IsAllStepDone())
                    {
                        this.isFirstDead = true;
                        this.ActiveCurrentStep();
                        this.WaitShowTutorialStep(0f, new Action(this.ShowTutorialStep2));
                    }
                    if ((base.step == 13) && !this.IsAllStepDone())
                    {
                        this.Finish();
                        Singleton <NotifyManager> .Instance.FireNotify(new Notify(NotifyTypes.SwapBtnVisible, true));
                    }
                }
            }
            return(false);
        }
        private bool ListenKilled(EvtKilled evt)
        {
            AvatarActor actor = Singleton <EventManager> .Instance.GetActor <AvatarActor>(evt.killerID);

            MonsterActor actor2 = Singleton <EventManager> .Instance.GetActor <MonsterActor>(evt.targetID);

            MonoMainCamera mainCamera = Singleton <CameraManager> .Instance.GetMainCamera();

            if ((((actor != null) && (actor2 != null)) && (Singleton <AvatarManager> .Instance.IsLocalAvatar(actor.runtimeID) && (Singleton <MonsterManager> .Instance.LivingMonsterCount() == 0))) && mainCamera.followState.slowMotionKillState.active)
            {
                if (string.IsNullOrEmpty(evt.killerAnimEventID) || !actor.config.AnimEvents.ContainsKey(evt.killerAnimEventID))
                {
                    return(false);
                }
                AttackResult.AttackCategoryTag[] categoryTag = actor.config.AnimEvents[evt.killerAnimEventID].AttackProperty.CategoryTag;
                if (categoryTag == null)
                {
                    return(false);
                }
                bool flag = false;
                for (int i = 0; i < categoryTag.Length; i++)
                {
                    if (categoryTag[i] == AttackResult.AttackCategoryTag.SwitchIn)
                    {
                        flag = true;
                        break;
                    }
                }
                if (flag)
                {
                    this.Finish();
                }
            }
            return(false);
        }
        private bool ListenKilled(EvtKilled evt)
        {
            switch (Singleton <RuntimeIDManager> .Instance.ParseCategory(evt.targetID))
            {
            case 3:
            {
                AvatarStastics avatarStastics = this.GetAvatarStastics(evt.targetID);
                if (avatarStastics == null)
                {
                    return(true);
                }
                avatarStastics.isAlive = 0;
                break;
            }

            case 4:
            {
                MonsterStastics monsterStastics = this.GetMonsterStastics(evt.targetID);
                if (monsterStastics != null)
                {
                    monsterStastics.isAlive = false;
                }
                break;
            }
            }
            return(false);
        }
 private bool OnPostKilled(EvtKilled evt)
 {
     if (this._saveActive)
     {
         this.StopSaving();
     }
     return(true);
 }
Beispiel #5
0
 private bool ListenKilled(EvtKilled evt)
 {
     if (this._hasHelperAvatar && Singleton <AvatarManager> .Instance.IsHelperAvatar(evt.targetID))
     {
         this.Fail();
     }
     return(false);
 }
 private bool OnKilled(EvtKilled evt)
 {
     if (evt.killerID == base.actor.runtimeID)
     {
         base.actor.abilityPlugin.HandleActionTargetDispatch(this.config.Actions, base.instancedAbility, base.instancedModifier, null, null);
     }
     return(true);
 }
 private bool ListenMonsterKilled(EvtKilled evt)
 {
     if (((Singleton <EventManager> .Instance.GetActor <MonsterActor>(evt.targetID) != null) && (base.step == 7)) && ((base.GetCurrentStepState() == BaseLevelTutorial.StepState.Sleep) && !this.IsAllStepDone()))
     {
         this.ActiveCurrentStep();
         this.WaitShowTutorialStep(this.GetDelayTime(base.step), new Action(this.ShowTutorialStep8));
     }
     return(false);
 }
Beispiel #8
0
        public bool ListenKill(EvtKilled evt)
        {
            MonoMainCamera mainCamera = Singleton <CameraManager> .Instance.GetMainCamera();

            if ((mainCamera.followState.active && mainCamera.followState.followAvatarAndBossState.active) && (mainCamera.followState.followAvatarAndBossState.bossTarget.GetRuntimeID() == evt.targetID))
            {
                Singleton <CameraManager> .Instance.DisableBossCamera();
            }
            return(true);
        }
Beispiel #9
0
 private bool ListenKill(EvtKilled evt)
 {
     if (Singleton <RuntimeIDManager> .Instance.ParseCategory(evt.targetID) == 3)
     {
         if (!Singleton <AvatarManager> .Instance.IsPlayerAvatar(evt.targetID))
         {
             return(false);
         }
         if (< > f__am$cache1C == null)
         {
Beispiel #10
0
 private bool ListenKilled(EvtKilled evt)
 {
     if (Singleton <RuntimeIDManager> .Instance.ParseCategory(evt.targetID) != 3)
     {
         return(false);
     }
     if (this._threatTable.ContainsKey(evt.targetID))
     {
         this._threatTable.Remove(evt.targetID);
     }
     return(true);
 }
 private bool ListenKill(EvtKilled evt)
 {
     if (Singleton <RuntimeIDManager> .Instance.ParseCategory(evt.targetID) == 3)
     {
         if (!Singleton <AvatarManager> .Instance.IsPlayerAvatar(evt.targetID))
         {
             return(false);
         }
         this._avatarKilledNum++;
     }
     return(true);
 }
Beispiel #12
0
 private bool ListenKilled(EvtKilled evt)
 {
     for (int i = 0; i < this._mirrorDatas.Length; i++)
     {
         MirrorData data = this._mirrorDatas[i];
         if (data.mirrorRuntimeID == evt.targetID)
         {
             this.KillSingleMirror(i);
             return(true);
         }
     }
     return(false);
 }
Beispiel #13
0
        private bool ListenKill(EvtKilled evt)
        {
            if (Singleton <RuntimeIDManager> .Instance.ParseCategory(evt.targetID) == 4)
            {
                BaseMonoMonster item = Singleton <MonsterManager> .Instance.TryGetMonsterByRuntimeID(evt.targetID);

                if ((item != null) && this._attackingMonsters.Contains(item))
                {
                    this.RemoveAttackingMonster(item);
                }
            }
            return(true);
        }
        private bool ListenKilled(EvtKilled evt)
        {
            AvatarActor actor = Singleton <EventManager> .Instance.GetActor <AvatarActor>(evt.killerID);

            MonsterActor actor2 = Singleton <EventManager> .Instance.GetActor <MonsterActor>(evt.targetID);

            if (((actor != null) && (actor2 != null)) && this._inStastics)
            {
                int num = this._killedAmountLs.SeekAddPosition <Tuple <float, int> >();
                this._killedAmountLs[num] = Tuple.Create <float, int>(this._stasticsTimer, 1);
            }
            return(false);
        }
Beispiel #15
0
        private bool ListenKilled(EvtKilled evt)
        {
            BaseActor actor = Singleton <EventManager> .Instance.GetActor(evt.killerID);

            if (((actor != null) && (actor is AvatarActor)) && Singleton <AvatarManager> .Instance.IsLocalAvatar(actor.runtimeID))
            {
                this._tempKilledNum++;
                if (this._tempKilledNum >= this.targetKilledNum)
                {
                    this.Finish();
                }
            }
            return(false);
        }
        private bool ListenKilled(EvtKilled evt)
        {
            AvatarActor actor = Singleton <EventManager> .Instance.GetActor <AvatarActor>(evt.killerID);

            MonsterActor actor2 = Singleton <EventManager> .Instance.GetActor <MonsterActor>(evt.targetID);

            if (((actor == null) || (actor2 == null)) || !this._inStastics)
            {
                return(false);
            }
            this._tempKilledAmount++;
            this._tempMaxKilledAmount = Mathf.Max(this._tempMaxKilledAmount, this._tempKilledAmount);
            if (this._tempKilledAmount >= this.targetKilledAmount)
            {
                this.Finish();
            }
            return(true);
        }
Beispiel #17
0
 public bool OnKilled(EvtKilled evt)
 {
     if (Singleton <RuntimeIDManager> .Instance.ParseCategory(evt.killerID) == 3)
     {
         if (Singleton <RuntimeIDManager> .Instance.ParseCategory(evt.targetID) != 4)
         {
             return(false);
         }
         if (!Singleton <AvatarManager> .Instance.IsLocalAvatar(evt.killerID))
         {
             return(false);
         }
         this._monsterKillAmount++;
         if ((this._maxMonsterDisappearAmount != 0) && ((this._monsterEnterAmount + this._monsterKillAmount) == this._maxMonsterDisappearAmount))
         {
             Singleton <EventManager> .Instance.FireEvent(new EvtLevelDefendState(DefendModeType.Result, this._maxMonsterDisappearAmount), MPEventDispatchMode.Normal);
         }
     }
     return(false);
 }
Beispiel #18
0
        private bool ListenKilled(EvtKilled evt)
        {
            BaseActor actor = Singleton <EventManager> .Instance.GetActor(evt.killerID);

            BaseActor actor2 = Singleton <EventManager> .Instance.GetActor(evt.targetID);

            if ((((actor != null) && (actor is AvatarActor)) && (Singleton <AvatarManager> .Instance.IsLocalAvatar(actor.runtimeID) && (actor2 != null))) && (actor2 is PropObjectActor))
            {
                PropObjectActor actor3 = actor2 as PropObjectActor;
                if ((actor3 != null) && actor3.config.Name.Contains("Box"))
                {
                    this._tempBoxOpenedNum++;
                    if (this._tempBoxOpenedNum >= this.targetBoxOpenedNum)
                    {
                        this.Finish();
                    }
                }
            }
            return(false);
        }
        private bool ListenKill(EvtKilled evt)
        {
            if (Singleton <RuntimeIDManager> .Instance.ParseCategory(evt.targetID) == 4)
            {
                BaseMonoAvatar avatar = Singleton <AvatarManager> .Instance.TryGetAvatarByRuntimeID(evt.killerID);

                if (avatar == null)
                {
                    return(true);
                }
                Singleton <MissionModule> .Instance.TryToUpdateKillAnyEnemy();

                MonsterActor actor = (MonsterActor)Singleton <EventManager> .Instance.GetActor(evt.targetID);

                if (actor != null)
                {
                    if (actor.uniqueMonsterID != 0)
                    {
                        Singleton <MissionModule> .Instance.TryToUpdateKillUniqueMonsterMission(actor.uniqueMonsterID);
                    }
                    else
                    {
                        int monsterID = MonsterUIMetaDataReaderExtend.GetMonsterUIMetaDataByName(actor.metaConfig.subTypeName).monsterID;
                        Singleton <MissionModule> .Instance.TryToUpdateKillMonsterMission(monsterID);
                    }
                    Singleton <MissionModule> .Instance.TryToUpdateKillMonsterWithCategoryName(actor.metaConfig.categoryName);
                }
                ConfigAvatarAnimEvent event2 = SharedAnimEventData.ResolveAnimEvent(avatar.config, evt.killerAnimEventID);
                if (((event2 != null) && (event2.AttackProperty != null)) && (event2.AttackProperty.CategoryTag != null))
                {
                    AttackResult.AttackCategoryTag[] categoryTag = event2.AttackProperty.CategoryTag;
                    if (categoryTag.Length > 0)
                    {
                        Singleton <MissionModule> .Instance.TryToUpdateKillByAttackCategoryTag(categoryTag);
                    }
                }
            }
            return(true);
        }
Beispiel #20
0
 private bool OnKilled(EvtKilled evt)
 {
     this._suicideTimer.Reset(false);
     if (evt.killerID == base.actor.runtimeID)
     {
         base.entity.TriggerAttackPattern(this.config.SuicideHitAnimEventID, Singleton <EventManager> .Instance.GetAbilityHitboxTargettingMask(base.actor.runtimeID, MixinTargetting.Enemy));
         if (this.config.SuicideHitAlliedAnimEventID != null)
         {
             base.entity.TriggerAttackPattern(this.config.SuicideHitAlliedAnimEventID, Singleton <EventManager> .Instance.GetAbilityHitboxTargettingMask(base.actor.runtimeID, MixinTargetting.Allied));
         }
         base.FireMixinEffect(this.config.SuicideEffect, base.entity, false);
     }
     else
     {
         base.entity.TriggerAttackPattern(this.config.KilledHitAnimEventID, Singleton <EventManager> .Instance.GetAbilityHitboxTargettingMask(base.actor.runtimeID, MixinTargetting.Enemy));
         if (this.config.KilledHitAlliedAnimEventID != null)
         {
             base.entity.TriggerAttackPattern(this.config.KilledHitAlliedAnimEventID, Singleton <EventManager> .Instance.GetAbilityHitboxTargettingMask(base.actor.runtimeID, MixinTargetting.Allied));
         }
         base.FireMixinEffect(this.config.KilledEffect, base.entity, false);
     }
     return(true);
 }
Beispiel #21
0
        private bool ListenKilled(EvtKilled evt)
        {
            AvatarActor actor = Singleton <EventManager> .Instance.GetActor <AvatarActor>(evt.killerID);

            MonsterActor actor2 = Singleton <EventManager> .Instance.GetActor <MonsterActor>(evt.targetID);

            if (((actor != null) && (actor2 != null)) && Singleton <AvatarManager> .Instance.IsLocalAvatar(actor.runtimeID))
            {
                if (string.IsNullOrEmpty(evt.killerAnimEventID) || !actor.config.AnimEvents.ContainsKey(evt.killerAnimEventID))
                {
                    return(false);
                }
                AttackResult.AttackCategoryTag[] categoryTag = actor.config.AnimEvents[evt.killerAnimEventID].AttackProperty.CategoryTag;
                if (categoryTag == null)
                {
                    return(false);
                }
                bool flag = false;
                for (int i = 0; i < categoryTag.Length; i++)
                {
                    if (categoryTag[i] == AttackResult.AttackCategoryTag.Branch)
                    {
                        flag = true;
                        break;
                    }
                }
                if (flag)
                {
                    this._tempKilledNum++;
                    if (this._tempKilledNum >= this.targetKilledNum)
                    {
                        this.Finish();
                    }
                }
            }
            return(false);
        }
Beispiel #22
0
 private bool OnKilled(EvtKilled evt)
 {
     this._globalShieldValue.Pub(0f);
     return(true);
 }
Beispiel #23
0
 private bool OnKilled(EvtKilled evt)
 {
     DelegateUtils.UpdateField <float>(ref this.shield, 0f, new Action <float, float>(this.OnShieldChanged));
     return(true);
 }
Beispiel #24
0
 private bool OnKill(EvtKilled evt)
 {
     base.RemovePlugin <MonsterAIPlugin>();
     return(true);
 }