예제 #1
0
 private void OnActorDead(ref GameDeadEventParam prm)
 {
     if (!this.m_bIsRecordMomentsEnable || !this.m_bIsStartRecordOk)
     {
         return;
     }
     if (!prm.src || prm.src.get_handle().TheActorMeta.ActorType != ActorTypeDef.Actor_Type_Hero)
     {
         return;
     }
     this.UpdateRecordEvent(prm.atker, CRecordUseSDK.RECORD_EVENT_PRIORITY.RECORD_EVENT_TYPE_ONCEKILL);
     if (Singleton <GamePlayerCenter> .get_instance() != null && Singleton <GamePlayerCenter> .get_instance().GetHostPlayer() != null && prm.atker != Singleton <GamePlayerCenter> .get_instance().GetHostPlayer().Captain)
     {
         if (prm.src && prm.src.get_handle().ActorControl != null)
         {
             List <KeyValuePair <uint, ulong> > .Enumerator enumerator = prm.src.get_handle().ActorControl.hurtSelfActorList.GetEnumerator();
             while (enumerator.MoveNext())
             {
                 KeyValuePair <uint, ulong> current = enumerator.get_Current();
                 if (current.get_Key() == Singleton <GamePlayerCenter> .get_instance().GetHostPlayer().Captain.get_handle().ObjID)
                 {
                     this.UpdateRecordEvent(Singleton <GamePlayerCenter> .get_instance().GetHostPlayer().Captain, CRecordUseSDK.RECORD_EVENT_PRIORITY.RECORD_EVENT_TYPE_ASSIST);
                     return;
                 }
             }
         }
         if (prm.atker && prm.atker.get_handle().ActorControl != null)
         {
             List <KeyValuePair <uint, ulong> > .Enumerator enumerator2 = prm.atker.get_handle().ActorControl.helpSelfActorList.GetEnumerator();
             while (enumerator2.MoveNext())
             {
                 KeyValuePair <uint, ulong> current2 = enumerator2.get_Current();
                 if (current2.get_Key() == Singleton <GamePlayerCenter> .get_instance().GetHostPlayer().Captain.get_handle().ObjID)
                 {
                     this.UpdateRecordEvent(Singleton <GamePlayerCenter> .get_instance().GetHostPlayer().Captain, CRecordUseSDK.RECORD_EVENT_PRIORITY.RECORD_EVENT_TYPE_ASSIST);
                     return;
                 }
             }
         }
     }
     else if (Singleton <GamePlayerCenter> .get_instance() != null && Singleton <GamePlayerCenter> .get_instance().GetHostPlayer() != null && prm.atker == Singleton <GamePlayerCenter> .get_instance().GetHostPlayer().Captain)
     {
         HeroWrapper heroWrapper = prm.orignalAtker.get_handle().ActorControl as HeroWrapper;
         if (heroWrapper != null && heroWrapper.ContiKillNum > this.m_iContinuKillMaxNum)
         {
             this.m_iContinuKillMaxNum = heroWrapper.ContiKillNum;
         }
     }
 }
        private void onActorDead(ref GameDeadEventParam prm)
        {
            if (!this.ForwardCheck())
            {
                return;
            }
            if (prm.orignalAtker && prm.orignalAtker.handle.TheActorMeta.ActorType == ActorTypeDef.Actor_Type_Hero && prm.orignalAtker.handle.TheActorMeta.ConfigId == base.groupID && prm.src && prm.src.handle.TheActorMeta.ActorType == ActorTypeDef.Actor_Type_Hero && this.CheckTriggerDistance(ref prm.orignalAtker, ref prm.src) && base.ValidateTriggerActor(ref prm.src))
            {
                Player hostPlayer = Singleton <GamePlayerCenter> .instance.GetHostPlayer();

                if (hostPlayer != null && hostPlayer.Captain && this.CheckReceiveDistance(ref hostPlayer.Captain, ref prm.src))
                {
                    this.TryTrigger(ref prm.orignalAtker, ref prm.src, ref prm.orignalAtker);
                }
            }
        }
예제 #3
0
    private void onActorDead(ref GameDeadEventParam param)
    {
        if (param.src && ActorHelper.IsHostCtrlActor(ref param.src))
        {
            this.hostDeadNum++;
            if (this.hostDeadNum == 1)
            {
                SLevelContext curLvelContext = Singleton <BattleLogic> .GetInstance().GetCurLvelContext();

                if (curLvelContext.m_mapID == 20011)
                {
                    this.CheckTriggerTime(NewbieGuideTriggerTimeType.onHostFirstDead, new uint[0]);
                }
            }
        }
    }
        private void onMonsterGroupDead(ref GameDeadEventParam param)
        {
            CRoleInfo masterRoleInfo = Singleton <CRoleInfoManager> .GetInstance().GetMasterRoleInfo();

            DebugHelper.Assert(masterRoleInfo != null, "Master Roleinfo is NULL!");
            if (masterRoleInfo == null)
            {
                return;
            }
            if (param.src)
            {
                if (param.src.handle.TheActorMeta.ActorType == ActorTypeDef.Actor_Type_Monster)
                {
                    MonsterWrapper monsterWrapper = param.src.handle.AsMonster();
                    DebugHelper.Assert(monsterWrapper != null && monsterWrapper.cfgInfo != null, "Can't find Monster config -- ID: {0}", new object[]
                    {
                        param.src.handle.TheActorMeta.ConfigId
                    });
                    if (monsterWrapper.cfgInfo == null || monsterWrapper.cfgInfo.bMonsterType == 1)
                    {
                        return;
                    }
                }
                if (param.atker && ActorHelper.IsHostActor(ref param.atker))
                {
                    if (Singleton <BattleLogic> .GetInstance().DragonId != 0 && param.src.handle.TheActorMeta.ConfigId == Singleton <BattleLogic> .GetInstance().DragonId)
                    {
                        if (!masterRoleInfo.IsNewbieAchieveSet(4))
                        {
                            Singleton <CNewbieAchieveSys> .GetInstance().ShowAchieve(enNewbieAchieve.COM_ACNT_CLIENT_BITS_TYPE_KILL_LITTLEDRAGON);

                            masterRoleInfo.SetNewbieAchieve(4, true, false);
                        }
                    }
                    else if (!masterRoleInfo.IsNewbieAchieveSet(3))
                    {
                        this.ShowAchieve(enNewbieAchieve.COM_ACNT_CLIENT_BITS_TYPE_DESTORY_MONSTERHOME);
                        masterRoleInfo.SetNewbieAchieve(3, true, false);
                    }
                }
            }
        }
예제 #5
0
 private void OnPlayerDead(ref GameDeadEventParam prm)
 {
     if (((prm.src != 0) && ActorHelper.IsHostCtrlActor(ref prm.src)) && (!this.bFreeCamera && !Singleton <WatchController> .GetInstance().IsWatching))
     {
         if ((this.MobaCamera != null) && (prm.src.handle.ActorControl != null))
         {
             this.MobaCamera.SetAbsoluteLockLocation((Vector3)prm.src.handle.ActorControl.actorLocation);
         }
         if (Singleton <CBattleSystem> .GetInstance().FightForm != null)
         {
             Singleton <CBattleSystem> .GetInstance().FightForm.EnableCameraDragPanelForDead();
         }
         this.enableLockedCamera = false;
         this.enableAbsoluteLocationLockCamera = true;
         this.StopDisplacement();
         if (this.MobaCamera != null)
         {
             this.MobaCamera._lockTransitionRate = 1f;
         }
     }
 }
예제 #6
0
        private void OnActorDead(ref GameDeadEventParam prm)
        {
            PoolObjHandle <ActorRoot> src          = prm.src;
            PoolObjHandle <ActorRoot> orignalAtker = prm.orignalAtker;

            if (src && orignalAtker && src.get_handle().TheActorMeta.ConfigId == Singleton <BattleLogic> .get_instance().DragonId&& src.get_handle().TheActorMeta.ActorType == ActorTypeDef.Actor_Type_Monster)
            {
                if (orignalAtker.get_handle().TheActorMeta.ActorCamp == 1)
                {
                    byte[] expr_7E_cp_0 = this.m_dragonBuffCount;
                    int    expr_7E_cp_1 = 0;
                    expr_7E_cp_0[expr_7E_cp_1] += 1;
                }
                else if (orignalAtker.get_handle().TheActorMeta.ActorCamp == 2)
                {
                    byte[] expr_AC_cp_0 = this.m_dragonBuffCount;
                    int    expr_AC_cp_1 = 1;
                    expr_AC_cp_0[expr_AC_cp_1] += 1;
                }
            }
            this.Draw();
        }
예제 #7
0
        private void onActorDead(ref GameDeadEventParam param)
        {
            CRoleInfo masterRoleInfo = Singleton <CRoleInfoManager> .GetInstance().GetMasterRoleInfo();

            DebugHelper.Assert(masterRoleInfo != null, "Master Roleinfo is NULL!");
            if (masterRoleInfo != null)
            {
                if ((param.atker != 0) && ActorHelper.IsHostActor(ref param.atker))
                {
                    if (param.src.handle.TheActorMeta.ActorType == ActorTypeDef.Actor_Type_Monster)
                    {
                        MonsterWrapper wrapper      = param.src.handle.AsMonster();
                        object[]       inParameters = new object[] { param.src.handle.TheActorMeta.ConfigId };
                        DebugHelper.Assert((wrapper != null) && (wrapper.cfgInfo != null), "Can't find Monster config -- ID: {0}", inParameters);
                        if ((wrapper.cfgInfo.bMonsterType == 1) && !masterRoleInfo.IsNewbieAchieveSet(0))
                        {
                            this.ShowAchieve(enNewbieAchieve.COM_ACNT_CLIENT_BITS_TYPE_KILL_SOLDIER);
                            masterRoleInfo.SetNewbieAchieve(0, true, false);
                        }
                    }
                    else if (param.src.handle.TheActorMeta.ActorType == ActorTypeDef.Actor_Type_Organ)
                    {
                        ResOrganCfgInfo dataCfgInfoByCurLevelDiff = OrganDataHelper.GetDataCfgInfoByCurLevelDiff(param.src.handle.TheActorMeta.ConfigId);
                        object[]        objArray2 = new object[] { param.src.handle.TheActorMeta.ConfigId };
                        DebugHelper.Assert(dataCfgInfoByCurLevelDiff != null, "Can't find Organ config -- ID: {0}", objArray2);
                        if (dataCfgInfoByCurLevelDiff.bOrganType == 1)
                        {
                            if (!masterRoleInfo.IsNewbieAchieveSet(1))
                            {
                                this.ShowAchieve(enNewbieAchieve.COM_ACNT_CLIENT_BITS_TYPE_DESTORY_ARROWTOWER);
                                masterRoleInfo.SetNewbieAchieve(1, true, false);
                            }
                        }
                        else if ((dataCfgInfoByCurLevelDiff.bOrganType == 2) && !masterRoleInfo.IsNewbieAchieveSet(2))
                        {
                            this.ShowAchieve(enNewbieAchieve.COM_ACNT_CLIENT_BITS_TYPE_DESTORY_BASETOWER);
                            masterRoleInfo.SetNewbieAchieve(2, true, false);
                        }
                    }
                }
                if ((param.src.handle.TheActorMeta.ActorType == ActorTypeDef.Actor_Type_Hero) && (param.atker != 0))
                {
                    if (ActorHelper.IsHostActor(ref param.atker))
                    {
                        if (!masterRoleInfo.IsNewbieAchieveSet(8))
                        {
                            this.ShowAchieve(enNewbieAchieve.COM_ACNT_CLIENT_BITS_TYPE_KILL_HERO);
                            masterRoleInfo.SetNewbieAchieve(8, true, false);
                        }
                    }
                    else if (param.atker.handle.TheActorMeta.ActorType != ActorTypeDef.Actor_Type_Hero)
                    {
                        HeroWrapper actorControl = param.src.handle.ActorControl as HeroWrapper;
                        if (actorControl != null)
                        {
                            PoolObjHandle <ActorRoot> lastHeroAtker = actorControl.LastHeroAtker;
                            if (((lastHeroAtker != 0) && ActorHelper.IsHostActor(ref lastHeroAtker)) && !masterRoleInfo.IsNewbieAchieveSet(8))
                            {
                                this.ShowAchieve(enNewbieAchieve.COM_ACNT_CLIENT_BITS_TYPE_KILL_HERO);
                                masterRoleInfo.SetNewbieAchieve(8, true, false);
                            }
                        }
                    }
                }
            }
        }