コード例 #1
0
ファイル: HeroWrapper.cs プロジェクト: wujiangu/wanshiwu0.1
        protected override void OnRevive()
        {
            VInt  num3;
            VInt3 zero    = VInt3.zero;
            VInt3 forward = VInt3.forward;

            if (this.autoRevived && this.m_reviveContext.bBaseRevive)
            {
                Singleton <BattleLogic> .GetInstance().mapLogic.GetRevivePosDir(ref base.actor.TheActorMeta, false, out zero, out forward);

                base.actor.EquipComponent.ResetHasLeftEquipBoughtArea();
            }
            else
            {
                Player player = ActorHelper.GetOwnerPlayer(ref this.actorPtr);
                zero    = player.Captain.handle.location;
                forward = player.Captain.handle.forward;
            }
            if (PathfindingUtility.GetGroundY(zero, out num3))
            {
                base.actor.groundY = num3;
                zero.y             = num3.i;
            }
            base.actor.forward  = forward;
            base.actor.location = zero;
            base.actor.ObjLinker.SetForward(forward, -1);
            base.OnRevive();
            Player ownerPlayer = ActorHelper.GetOwnerPlayer(ref this.actorPtr);

            if (ownerPlayer != null)
            {
                Singleton <EventRouter> .instance.BroadCastEvent <Player>(EventID.PlayerReviveTime, ownerPlayer);
            }
        }
コード例 #2
0
 public override void OnActorDeath(ref DefaultGameEventParam prm)
 {
     this.CachedSource   = prm.src;
     this.CachedAttacker = prm.orignalAtker;
     if (((prm.src != 0) && this.bCanStat) && this.ShouldCare(prm.src.handle))
     {
         bool   flag        = true;
         Player ownerPlayer = ActorHelper.GetOwnerPlayer(ref prm.src);
         DebugHelper.Assert(ownerPlayer != null, "咦,怎么会取不到ActorRoot对应的Player呢?");
         ReadonlyContext <PoolObjHandle <ActorRoot> > .Enumerator enumerator = ownerPlayer.GetAllHeroes().GetEnumerator();
         while (enumerator.MoveNext())
         {
             PoolObjHandle <ActorRoot> current = enumerator.Current;
             if (!current.handle.ActorControl.IsDeadState)
             {
                 flag = false;
                 break;
             }
         }
         if (flag)
         {
             this.EncounterCount++;
             this.bCanStat = false;
             bool flag2 = this.CheckResult();
             if (flag2 != this.bCheckResult)
             {
                 this.bCheckResult = flag2;
                 this.TriggerAllDeathEvent();
             }
         }
     }
 }
コード例 #3
0
        public override uint SelectSkillTarget(SkillSlot _slot)
        {
            uint               num             = this.lockTargetID;
            SelectEnemyType    selectEnemyType = SelectEnemyType.SelectLowHp;
            Player             ownerPlayer     = ActorHelper.GetOwnerPlayer(ref this.actorPtr);
            SkillSelectControl instance        = Singleton <SkillSelectControl> .GetInstance();

            Skill skill = (_slot.NextSkillObj == null) ? _slot.SkillObj : _slot.NextSkillObj;
            uint  dwSkillTargetFilter = skill.cfgData.dwSkillTargetFilter;

            if (skill.cfgData.bSkillTargetRule == 2)
            {
                num = this.actor.ObjID;
            }
            else
            {
                ActorRoot useSkillTargetLockAttackMode = _slot.skillIndicator.GetUseSkillTargetLockAttackMode();
                if (useSkillTargetLockAttackMode != null)
                {
                    if (this.IsValidLockTargetID(useSkillTargetLockAttackMode.ObjID))
                    {
                        num = useSkillTargetLockAttackMode.ObjID;
                        Singleton <NetLockAttackTarget> .GetInstance().SendLockAttackTarget(num);
                    }
                }
                else if (!this.IsValidLockTargetID(this.lockTargetID))
                {
                    if (ownerPlayer != null)
                    {
                        selectEnemyType = ownerPlayer.AttackTargetMode;
                    }
                    int srchR;
                    if (skill.AppointType == 1)
                    {
                        srchR = skill.GetMaxSearchDistance(_slot.GetSkillLevel());
                    }
                    else
                    {
                        srchR = skill.cfgData.iMaxAttackDistance;
                    }
                    if (selectEnemyType == SelectEnemyType.SelectLowHp)
                    {
                        num = Singleton <AttackModeTargetSearcher> .GetInstance().SearchLowestHpTarget(ref this.actorPtr, srchR, dwSkillTargetFilter, true, SearchTargetPriority.CommonAttack);
                    }
                    else
                    {
                        num = Singleton <AttackModeTargetSearcher> .GetInstance().SearchNearestTarget(ref this.actorPtr, srchR, dwSkillTargetFilter, true, SearchTargetPriority.CommonAttack);
                    }
                    if (this.IsValidLockTargetID(num))
                    {
                        Singleton <NetLockAttackTarget> .GetInstance().SendLockAttackTarget(num);
                    }
                }
                else if (!this.IsValidSkillTargetID(num, dwSkillTargetFilter))
                {
                    num = 0u;
                }
            }
            return(num);
        }
コード例 #4
0
        protected uint ExecuteSearchTraget(int srchR, ref bool bSearched)
        {
            Player          ownerPlayer = ActorHelper.GetOwnerPlayer(ref this.actorPtr);
            SelectEnemyType type        = SelectEnemyType.SelectLowHp;
            LastHitMode     lastHitMode = LastHitMode.None;

            if (ownerPlayer != null)
            {
                type        = ownerPlayer.AttackTargetMode;
                lastHitMode = ownerPlayer.useLastHitMode;
            }
            uint result;

            if (lastHitMode == LastHitMode.None)
            {
                result = this.NormalModeCommonAttackSearchTarget(srchR, type, ref bSearched);
            }
            else if (this.commonAttackButtonType == CommonAttackButtonType.CommonAttackButton)
            {
                result = this.LastHitModeCommonAttackSearchTarget(srchR, type, ref bSearched);
            }
            else
            {
                result = this.LastHitAttackSearchTarget(srchR, type, ref bSearched);
            }
            return(result);
        }
コード例 #5
0
        private void ReadyUseSkillLockAttackMode(Skill readySkillObj)
        {
            this.skillTargetId = 0u;
            SelectEnemyType selectEnemyType = SelectEnemyType.SelectLowHp;
            uint            num             = this.Actor.get_handle().LockTargetAttackModeControl.GetLockTargetID();

            if (!this.Actor.get_handle().LockTargetAttackModeControl.IsValidLockTargetID(num))
            {
                Player ownerPlayer = ActorHelper.GetOwnerPlayer(ref this.Actor);
                if (ownerPlayer != null)
                {
                    selectEnemyType = ownerPlayer.AttackTargetMode;
                }
                if (readySkillObj.AppointType == 1)
                {
                    num = 0u;
                }
                else
                {
                    int  srchR = readySkillObj.cfgData.iMaxAttackDistance;
                    uint dwSkillTargetFilter = readySkillObj.cfgData.dwSkillTargetFilter;
                    if (selectEnemyType == SelectEnemyType.SelectLowHp)
                    {
                        num = Singleton <AttackModeTargetSearcher> .GetInstance().SearchLowestHpTarget(ref this.Actor, srchR, dwSkillTargetFilter, true, SearchTargetPriority.CommonAttack);
                    }
                    else
                    {
                        num = Singleton <AttackModeTargetSearcher> .GetInstance().SearchNearestTarget(ref this.Actor, srchR, dwSkillTargetFilter, true, SearchTargetPriority.CommonAttack);
                    }
                }
            }
            PoolObjHandle <ActorRoot> actor = Singleton <GameObjMgr> .GetInstance().GetActor(num);

            if (actor)
            {
                this.skillTargetId = actor.get_handle().ObjID;
                this.skillIndicator.SetSkillUsePosition(actor.get_handle());
            }
            else
            {
                this.skillIndicator.SetSkillUseDefaultPosition();
            }
            if (readySkillObj.AppointType == 1 && readySkillObj.cfgData.bSkillTargetRule != 2)
            {
                this.skillIndicator.SetGuildPrefabShow(false);
                this.skillIndicator.SetGuildWarnPrefabShow(false);
                this.skillIndicator.SetUseAdvanceMode(false);
                this.skillIndicator.SetSkillUseDefaultPosition();
                this.skillIndicator.SetEffectPrefabShow(false);
                this.skillIndicator.SetFixedPrefabShow(true);
            }
            else
            {
                this.skillIndicator.SetGuildPrefabShow(true);
                this.skillIndicator.SetGuildWarnPrefabShow(false);
                this.skillIndicator.SetUseAdvanceMode(true);
            }
        }
コード例 #6
0
ファイル: SkillSlot.cs プロジェクト: isoundy000/wzry-1
        private void ReadyUseSkillLockAttackMode(Skill readySkillObj)
        {
            uint            dwSkillTargetFilter = 0;
            SelectEnemyType selectLowHp         = SelectEnemyType.SelectLowHp;
            uint            lockTargetID        = this.Actor.handle.LockTargetAttackModeControl.GetLockTargetID();

            if (!this.Actor.handle.LockTargetAttackModeControl.IsValidLockTargetID(lockTargetID))
            {
                Player ownerPlayer = ActorHelper.GetOwnerPlayer(ref this.Actor);
                if (ownerPlayer != null)
                {
                    selectLowHp = ownerPlayer.AttackTargetMode;
                }
                if (readySkillObj.AppointType == SkillRangeAppointType.Target)
                {
                    lockTargetID = 0;
                }
                else
                {
                    int iMaxAttackDistance = (int)readySkillObj.cfgData.iMaxAttackDistance;
                    dwSkillTargetFilter = readySkillObj.cfgData.dwSkillTargetFilter;
                    if (selectLowHp == SelectEnemyType.SelectLowHp)
                    {
                        lockTargetID = Singleton <AttackModeTargetSearcher> .GetInstance().SearchLowestHpTarget(ref this.Actor, iMaxAttackDistance, dwSkillTargetFilter);
                    }
                    else
                    {
                        lockTargetID = Singleton <AttackModeTargetSearcher> .GetInstance().SearchNearestTarget(ref this.Actor, iMaxAttackDistance, dwSkillTargetFilter);
                    }
                }
            }
            PoolObjHandle <ActorRoot> actor = Singleton <GameObjMgr> .GetInstance().GetActor(lockTargetID);

            if (actor != 0)
            {
                this.skillIndicator.SetSkillUsePosition(actor.handle);
            }
            else
            {
                this.skillIndicator.SetSkillUseDefaultPosition();
            }
            if ((readySkillObj.AppointType == SkillRangeAppointType.Target) && (readySkillObj.cfgData.dwSkillTargetRule != 2))
            {
                this.skillIndicator.SetGuildPrefabShow(false);
                this.skillIndicator.SetGuildWarnPrefabShow(false);
                this.skillIndicator.SetUseAdvanceMode(false);
                this.skillIndicator.SetSkillUseDefaultPosition();
                this.skillIndicator.SetEffectPrefabShow(false);
                this.skillIndicator.SetFixedPrefabShow(true);
            }
            else
            {
                this.skillIndicator.SetGuildPrefabShow(true);
                this.skillIndicator.SetGuildWarnPrefabShow(false);
                this.skillIndicator.SetUseAdvanceMode(true);
            }
        }
コード例 #7
0
        public override uint SelectSkillTarget(SkillSlot _slot)
        {
            int                iMaxSearchDistance           = 0;
            int                dwSkillTargetFilter          = 0;
            ActorRoot          useSkillTargetLockAttackMode = null;
            uint               lockTargetID = this.lockTargetID;
            SelectEnemyType    selectLowHp  = SelectEnemyType.SelectLowHp;
            Player             ownerPlayer  = ActorHelper.GetOwnerPlayer(ref this.actorPtr);
            SkillSelectControl instance     = Singleton <SkillSelectControl> .GetInstance();

            Skill skill = (_slot.NextSkillObj == null) ? _slot.SkillObj : _slot.NextSkillObj;

            if (skill.cfgData.dwSkillTargetRule == 2)
            {
                return(base.actor.ObjID);
            }
            useSkillTargetLockAttackMode = _slot.skillIndicator.GetUseSkillTargetLockAttackMode();
            if (useSkillTargetLockAttackMode != null)
            {
                if (this.IsValidLockTargetID(useSkillTargetLockAttackMode.ObjID))
                {
                    lockTargetID = useSkillTargetLockAttackMode.ObjID;
                    Singleton <NetLockAttackTarget> .GetInstance().SendLockAttackTarget(lockTargetID);
                }
                return(lockTargetID);
            }
            if (!this.IsValidLockTargetID(this.lockTargetID))
            {
                if (ownerPlayer != null)
                {
                    selectLowHp = ownerPlayer.AttackTargetMode;
                }
                dwSkillTargetFilter = (int)skill.cfgData.dwSkillTargetFilter;
                if (skill.AppointType == SkillRangeAppointType.Target)
                {
                    iMaxSearchDistance = skill.cfgData.iMaxSearchDistance;
                }
                else
                {
                    iMaxSearchDistance = (int)skill.cfgData.iMaxAttackDistance;
                }
                if (selectLowHp == SelectEnemyType.SelectLowHp)
                {
                    lockTargetID = Singleton <AttackModeTargetSearcher> .GetInstance().SearchLowestHpTarget(ref this.actorPtr, iMaxSearchDistance, dwSkillTargetFilter);
                }
                else
                {
                    lockTargetID = Singleton <AttackModeTargetSearcher> .GetInstance().SearchNearestTarget(ref this.actorPtr, iMaxSearchDistance, dwSkillTargetFilter);
                }
                if (this.IsValidLockTargetID(lockTargetID))
                {
                    Singleton <NetLockAttackTarget> .GetInstance().SendLockAttackTarget(lockTargetID);
                }
            }
            return(lockTargetID);
        }
コード例 #8
0
        protected override void OnRevive()
        {
            VInt3 vInt    = VInt3.zero;
            VInt3 forward = VInt3.forward;

            if (this.autoRevived && this.m_reviveContext.bBaseRevive && !base.GetNoAbilityFlag(ObjAbilityType.ObjAbility_DeadControl))
            {
                Singleton <BattleLogic> .GetInstance().mapLogic.GetRevivePosDir(ref this.actor.TheActorMeta, false, out vInt, out forward);

                this.actor.EquipComponent.ResetHasLeftEquipBoughtArea();
            }
            else
            {
                Player ownerPlayer = ActorHelper.GetOwnerPlayer(ref this.actorPtr);
                vInt    = ownerPlayer.Captain.get_handle().location;
                forward = ownerPlayer.Captain.get_handle().forward;
            }
            DefaultGameEventParam defaultGameEventParam = new DefaultGameEventParam(this.actorPtr, this.actorPtr);

            Singleton <GameEventSys> .get_instance().SendEvent <DefaultGameEventParam>(GameEventDef.Event_ActorClearMove, ref defaultGameEventParam);

            VInt groundY;

            if (PathfindingUtility.GetGroundY(vInt, out groundY))
            {
                this.actor.groundY = groundY;
                vInt.y             = groundY.i;
            }
            this.actor.forward  = forward;
            this.actor.location = vInt;
            this.actor.ObjLinker.SetForward(forward, -1);
            base.OnRevive();
            if (!this.actor.ActorAgent.IsAutoAI())
            {
                base.SetObjBehaviMode(ObjBehaviMode.State_Revive);
            }
            Player ownerPlayer2 = ActorHelper.GetOwnerPlayer(ref this.actorPtr);

            if (ownerPlayer2 != null)
            {
                Singleton <EventRouter> .get_instance().BroadCastEvent <Player>(EventID.PlayerReviveTime, ownerPlayer2);
            }
            if (this.bDeadLevelUp)
            {
                this.OnAdvanceSkin();
                this.bDeadLevelUp = false;
            }
        }
コード例 #9
0
        protected uint ExecuteSearchTarget(int srchR, ref bool bSearched)
        {
            PoolObjHandle <ActorRoot> poolObjHandle  = this.actorPtr;
            MonsterWrapper            monsterWrapper = poolObjHandle.handle.ActorControl as MonsterWrapper;

            if (monsterWrapper != null && monsterWrapper.isCalledMonster)
            {
                poolObjHandle = monsterWrapper.hostActor;
            }
            Player ownerPlayer = ActorHelper.GetOwnerPlayer(ref poolObjHandle);

            if (ownerPlayer == null)
            {
                return(0u);
            }
            SelectEnemyType attackTargetMode   = ownerPlayer.AttackTargetMode;
            LastHitMode     useLastHitMode     = ownerPlayer.useLastHitMode;
            AttackOrganMode curAttackOrganMode = ownerPlayer.curAttackOrganMode;
            OperateMode     operateMode        = ownerPlayer.GetOperateMode();
            uint            result;

            if (operateMode == OperateMode.LockMode)
            {
                result = this.NormalModeCommonAttackSearchTarget(srchR, attackTargetMode, ref bSearched);
            }
            else if (this.commonAttackButtonType == CommonAttackButtonType.CommonAttackButton)
            {
                if (useLastHitMode == LastHitMode.None && curAttackOrganMode == AttackOrganMode.None)
                {
                    result = this.NormalModeCommonAttackSearchTarget(srchR, attackTargetMode, ref bSearched);
                }
                else
                {
                    result = this.AdvancedModeCommonAttackSearchTarget(srchR, attackTargetMode, ref bSearched);
                }
            }
            else if (this.commonAttackButtonType == CommonAttackButtonType.LastHitButton)
            {
                result = this.LastHitModeSearchTarget(srchR, attackTargetMode, ref bSearched);
            }
            else
            {
                result = this.AttackOrganModeSearchTarget(srchR, attackTargetMode, ref bSearched);
            }
            return(result);
        }
コード例 #10
0
        public uint CommonAttackSearchEnemy(PoolObjHandle <ActorRoot> InActor, int srchR)
        {
            SelectEnemyType selectLowHp;
            Player          ownerPlayer = ActorHelper.GetOwnerPlayer(ref InActor);

            if (ownerPlayer == null)
            {
                selectLowHp = SelectEnemyType.SelectLowHp;
            }
            else
            {
                selectLowHp = ownerPlayer.AttackTargetMode;
            }
            if (selectLowHp == SelectEnemyType.SelectLowHp)
            {
                return(this.CommonAttackSearchLowestHpTarget(InActor.handle.ActorControl, srchR));
            }
            return(this.CommonAttackSearchNearestTarget(InActor.handle.ActorControl, srchR));
        }
コード例 #11
0
        public override uint CommonAttackSearchEnemy(int srchR)
        {
            SkillCache      skillUseCache        = null;
            SelectEnemyType selectLowHp          = SelectEnemyType.SelectLowHp;
            uint            commonAttackTargetID = this.commonAttackTargetID;
            Player          ownerPlayer          = ActorHelper.GetOwnerPlayer(ref this.actorPtr);

            if (ownerPlayer != null)
            {
                if (base.IsValidTargetID(commonAttackTargetID))
                {
                    this.SetCommonAttackTarget(commonAttackTargetID);
                    return(commonAttackTargetID);
                }
                selectLowHp = ownerPlayer.AttackTargetMode;
            }
            if (selectLowHp == SelectEnemyType.SelectLowHp)
            {
                commonAttackTargetID = Singleton <CommonAttackSearcher> .GetInstance().CommonAttackSearchLowestHpTarget(base.actor.ActorControl, srchR);
            }
            else
            {
                commonAttackTargetID = Singleton <CommonAttackSearcher> .GetInstance().CommonAttackSearchNearestTarget(base.actor.ActorControl, srchR);
            }
            if (!base.IsValidTargetID(commonAttackTargetID))
            {
                skillUseCache = base.actor.ActorControl.actor.SkillControl.SkillUseCache;
                if ((skillUseCache != null) && !skillUseCache.GetSpecialCommonAttack())
                {
                    this.CancelCommonAttackMode();
                    commonAttackTargetID = 0;
                }
            }
            if (commonAttackTargetID == 0)
            {
                this.ClearCommonAttackTarget();
                return(commonAttackTargetID);
            }
            this.SetCommonAttackTarget(commonAttackTargetID);
            return(commonAttackTargetID);
        }
コード例 #12
0
        public uint AdvanceCommonAttackSearchEnemy(PoolObjHandle <ActorRoot> InActor, int srchR)
        {
            uint      objID          = 0;
            SkillSlot slot           = null;
            bool      useAdvanceMode = false;
            Player    ownerPlayer    = ActorHelper.GetOwnerPlayer(ref InActor);

            if (InActor.handle.SkillControl.TryGetSkillSlot(SkillSlotType.SLOT_SKILL_0, out slot) && (slot.skillIndicator != null))
            {
                useAdvanceMode = slot.skillIndicator.GetUseAdvanceMode();
            }
            if (!useAdvanceMode)
            {
                SelectEnemyType selectLowHp;
                if (ownerPlayer == null)
                {
                    selectLowHp = SelectEnemyType.SelectLowHp;
                }
                else
                {
                    selectLowHp = ownerPlayer.AttackTargetMode;
                }
                if (selectLowHp == SelectEnemyType.SelectLowHp)
                {
                    return(this.CommonAttackSearchLowestHpTarget(InActor.handle.ActorControl, srchR));
                }
                return(this.CommonAttackSearchNearestTarget(InActor.handle.ActorControl, srchR));
            }
            ActorRoot useSkillTargetDefaultAttackMode = null;

            if ((slot != null) || (slot.skillIndicator != null))
            {
                useSkillTargetDefaultAttackMode = slot.skillIndicator.GetUseSkillTargetDefaultAttackMode();
                if (useSkillTargetDefaultAttackMode != null)
                {
                    objID = useSkillTargetDefaultAttackMode.ObjID;
                }
            }
            return(objID);
        }
コード例 #13
0
        public uint AdvanceCommonAttackSearchEnemy(PoolObjHandle <ActorRoot> InActor, int srchR)
        {
            uint      result      = 0u;
            SkillSlot skillSlot   = null;
            bool      flag        = false;
            Player    ownerPlayer = ActorHelper.GetOwnerPlayer(ref InActor);

            if (InActor.handle.SkillControl.TryGetSkillSlot(SkillSlotType.SLOT_SKILL_0, out skillSlot) && skillSlot.skillIndicator != null)
            {
                flag = skillSlot.skillIndicator.GetUseAdvanceMode();
            }
            if (flag)
            {
                if (skillSlot != null || skillSlot.skillIndicator != null)
                {
                    ActorRoot useSkillTargetDefaultAttackMode = skillSlot.skillIndicator.GetUseSkillTargetDefaultAttackMode();
                    if (useSkillTargetDefaultAttackMode != null)
                    {
                        result = useSkillTargetDefaultAttackMode.ObjID;
                    }
                }
                return(result);
            }
            SelectEnemyType selectEnemyType;

            if (ownerPlayer == null)
            {
                selectEnemyType = SelectEnemyType.SelectLowHp;
            }
            else
            {
                selectEnemyType = ownerPlayer.AttackTargetMode;
            }
            if (selectEnemyType == SelectEnemyType.SelectLowHp)
            {
                return(this.CommonAttackSearchLowestHpTarget(InActor.handle.ActorControl, srchR));
            }
            return(this.CommonAttackSearchNearestTarget(InActor.handle.ActorControl, srchR));
        }
コード例 #14
0
        private KillDetailInfo OnActorDeathd(ref DefaultGameEventParam prm)
        {
            KillDetailInfoType        type = KillDetailInfoType.Info_Type_None;
            KillDetailInfoType        heroMultiKillType = KillDetailInfoType.Info_Type_None;
            KillDetailInfoType        heroContiKillType = KillDetailInfoType.Info_Type_None;
            PoolObjHandle <ActorRoot> victim            = new PoolObjHandle <ActorRoot>();
            PoolObjHandle <ActorRoot> killer            = new PoolObjHandle <ActorRoot>();
            HeroWrapper actorControl = null;
            HeroWrapper wrapper2     = null;
            bool        flag         = false;
            bool        flag2        = false;
            bool        flag3        = false;
            bool        flag4        = false;
            bool        flag5        = false;
            bool        flag6        = false;
            Player      hostPlayer   = Singleton <GamePlayerCenter> .instance.GetHostPlayer();

            DebugHelper.Assert(hostPlayer != null, "Fatal error in OnActorDeadthd, HostPlayer is null!");
            if (hostPlayer != null)
            {
                DebugHelper.Assert((bool)hostPlayer.Captain, "Fatal error in OnActorDeadthd, Captain is null!");
            }
            bool bSelfCamp = hostPlayer.PlayerCamp == prm.orignalAtker.handle.TheActorMeta.ActorCamp;
            bool flag8     = false;
            uint objID     = hostPlayer.Captain.handle.ObjID;

            flag8 = (objID == prm.src.handle.ObjID) || (objID == prm.orignalAtker.handle.ObjID);
            flag  = prm.src.handle.TheActorMeta.ActorType == ActorTypeDef.Actor_Type_Hero;
            flag2 = prm.src.handle.TheActorMeta.ActorType == ActorTypeDef.Actor_Type_Organ;
            flag3 = (prm.src.handle.TheActorMeta.ActorType == ActorTypeDef.Actor_Type_Monster) && (prm.src.handle.TheActorMeta.ConfigId == Singleton <BattleLogic> .instance.DragonId);
            byte actorSubSoliderType = prm.src.handle.ActorControl.GetActorSubSoliderType();
            bool flag9  = false;
            bool flag10 = false;

            switch (actorSubSoliderType)
            {
            case 8:
                flag9 = true;
                flag3 = false;
                break;

            case 9:
                flag10 = true;
                flag3  = false;
                break;
            }
            victim = prm.src;
            killer = prm.orignalAtker;
            if (flag)
            {
                actorControl = prm.src.handle.ActorControl as HeroWrapper;
                wrapper2     = prm.orignalAtker.handle.ActorControl as HeroWrapper;
                if (prm.orignalAtker.handle.TheActorMeta.ActorType == ActorTypeDef.Actor_Type_Hero)
                {
                    if (prm.orignalAtker.handle.ObjID == objID)
                    {
                        flag8 = true;
                    }
                    flag4     = true;
                    bSelfCamp = hostPlayer.PlayerCamp == prm.orignalAtker.handle.TheActorMeta.ActorCamp;
                }
                else if (actorControl.IsKilledByHero())
                {
                    flag4    = true;
                    killer   = actorControl.LastHeroAtker;
                    wrapper2 = actorControl.LastHeroAtker.handle.ActorControl as HeroWrapper;
                    if (killer.handle.ObjID == objID)
                    {
                        flag8 = true;
                    }
                    bSelfCamp = hostPlayer.PlayerCamp == killer.handle.TheActorMeta.ActorCamp;
                }
                else if (prm.orignalAtker.handle.TheActorMeta.ActorType == ActorTypeDef.Actor_Type_Organ)
                {
                    flag5     = true;
                    flag4     = false;
                    bSelfCamp = hostPlayer.PlayerCamp == prm.orignalAtker.handle.TheActorMeta.ActorCamp;
                }
                else if (prm.orignalAtker.handle.TheActorMeta.ActorType == ActorTypeDef.Actor_Type_Monster)
                {
                    flag6     = true;
                    flag4     = false;
                    bSelfCamp = hostPlayer.PlayerCamp == prm.orignalAtker.handle.TheActorMeta.ActorCamp;
                }
                if (flag && flag4)
                {
                    wrapper2.ContiDeadNum = 0;
                    wrapper2.ContiKillNum++;
                    if (wrapper2.IsInMultiKill())
                    {
                        wrapper2.MultiKillNum++;
                    }
                    else
                    {
                        wrapper2.MultiKillNum = 1;
                    }
                    wrapper2.UpdateLastKillTime();
                }
            }
            if (flag && flag4)
            {
                bool flag11 = false;
                if (wrapper2.MultiKillNum == 2)
                {
                    flag11            = true;
                    heroMultiKillType = KillDetailInfoType.Info_Type_DoubleKill;
                    Singleton <GameEventSys> .GetInstance().SendEvent <DefaultGameEventParam>(GameEventDef.Event_DoubleKill, ref prm);
                }
                else if (wrapper2.MultiKillNum == 3)
                {
                    flag11            = true;
                    heroMultiKillType = KillDetailInfoType.Info_Type_TripleKill;
                    Singleton <GameEventSys> .GetInstance().SendEvent <DefaultGameEventParam>(GameEventDef.Event_TripleKill, ref prm);
                }
                else if (wrapper2.MultiKillNum == 4)
                {
                    flag11            = true;
                    heroMultiKillType = KillDetailInfoType.Info_Type_QuataryKill;
                    Singleton <GameEventSys> .GetInstance().SendEvent <DefaultGameEventParam>(GameEventDef.Event_QuataryKill, ref prm);
                }
                else if (wrapper2.MultiKillNum >= 5)
                {
                    flag11            = true;
                    heroMultiKillType = KillDetailInfoType.Info_Type_PentaKill;
                    Singleton <GameEventSys> .GetInstance().SendEvent <DefaultGameEventParam>(GameEventDef.Event_PentaKill, ref prm);
                }
                if (flag11)
                {
                    return(this._create(killer, victim, type, heroMultiKillType, type, bSelfCamp, false, flag8));
                }
            }
            if ((flag && flag4) && (actorControl.ContiKillNum >= 3))
            {
                if (actorControl.ContiKillNum >= 7)
                {
                    Singleton <GameEventSys> .GetInstance().SendEvent <DefaultGameEventParam>(GameEventDef.Event_OdysseyBeStopped, ref prm);
                }
                return(this._create(killer, victim, KillDetailInfoType.Info_Type_StopMultiKill, heroMultiKillType, type, bSelfCamp, false, flag8));
            }
            if ((flag && flag4) && !this.bFristBlood)
            {
                this.bFristBlood = true;
                return(this._create(killer, victim, KillDetailInfoType.Info_Type_First_Kill, heroMultiKillType, type, bSelfCamp, false, flag8));
            }
            if (flag2 && ((prm.src.handle.TheStaticData.TheOrganOnlyInfo.OrganType == 1) || (prm.src.handle.TheStaticData.TheOrganOnlyInfo.OrganType == 4)))
            {
                KillDetailInfo info = this._create(killer, victim, KillDetailInfoType.Info_Type_DestroyTower, type, type, bSelfCamp, false, flag8);
                if (prm.src.handle.TheStaticData.TheOrganOnlyInfo.DeadEnemySoldier > 0)
                {
                    Singleton <EventRouter> .instance.BroadCastEvent <KillDetailInfo>(EventID.AchievementRecorderEvent, info);

                    return(this._create(killer, victim, KillDetailInfoType.Info_Type_Soldier_Boosted, type, type, bSelfCamp, false, flag8));
                }
                return(info);
            }
            if (flag)
            {
                Player ownerPlayer = ActorHelper.GetOwnerPlayer(ref prm.src);
                if (((ownerPlayer != null) && (ownerPlayer.heroCount > 1)) && ownerPlayer.IsAllHeroesDead())
                {
                    return(this._create(killer, victim, type, type, type, bSelfCamp, true, flag8));
                }
            }
            if (flag && flag4)
            {
                bool flag12 = false;
                if (wrapper2.ContiKillNum == 3)
                {
                    flag12            = true;
                    heroContiKillType = KillDetailInfoType.Info_Type_MonsterKill;
                }
                else if (wrapper2.ContiKillNum == 4)
                {
                    flag12            = true;
                    heroContiKillType = KillDetailInfoType.Info_Type_DominateBattle;
                }
                else if (wrapper2.ContiKillNum == 5)
                {
                    flag12            = true;
                    heroContiKillType = KillDetailInfoType.Info_Type_Legendary;
                }
                else if (wrapper2.ContiKillNum == 6)
                {
                    flag12            = true;
                    heroContiKillType = KillDetailInfoType.Info_Type_TotalAnnihilat;
                }
                else if (wrapper2.ContiKillNum >= 7)
                {
                    flag12            = true;
                    heroContiKillType = KillDetailInfoType.Info_Type_Odyssey;
                    Singleton <GameEventSys> .GetInstance().SendEvent <DefaultGameEventParam>(GameEventDef.Event_Odyssey, ref prm);
                }
                if (flag12)
                {
                    return(this._create(killer, victim, type, type, heroContiKillType, bSelfCamp, false, flag8));
                }
            }
            if (flag && ((flag4 || flag5) || flag6))
            {
                return(this._create(killer, victim, KillDetailInfoType.Info_Type_Kill, type, type, bSelfCamp, false, flag8));
            }
            if (flag3)
            {
                return(this._create(killer, victim, KillDetailInfoType.Info_Type_KillDragon, type, type, bSelfCamp, false, flag8));
            }
            if (flag10)
            {
                return(this._create(killer, victim, KillDetailInfoType.Info_Type_KillBIGDRAGON, type, type, bSelfCamp, false, flag8));
            }
            if (flag9)
            {
                return(this._create(killer, victim, KillDetailInfoType.Info_Type_KillBARON, type, type, bSelfCamp, false, flag8));
            }
            return(null);
        }