Exemple #1
0
        private void OnLuanDouNotify(ref KillDetailInfo InKillInfoRef)
        {
            Player hostPlayer = Singleton <GamePlayerCenter> .get_instance().GetHostPlayer();

            if (hostPlayer != null && hostPlayer.Captain && InKillInfoRef.Killer)
            {
                if (InKillInfoRef.Type == KillDetailInfoType.Info_Type_DestroyTower)
                {
                    this.PlayBattleEvent("Set_Theme");
                }
                else if (InKillInfoRef.Type == KillDetailInfoType.Info_Type_QuataryKill)
                {
                    if (InKillInfoRef.Killer.get_handle().IsSelfCamp(hostPlayer.Captain))
                    {
                        this.PlayBattleEvent("Trigger_FourKill");
                    }
                    else
                    {
                        this.PlayBattleEvent("Trigger_BeFiveKill");
                    }
                }
                else if (InKillInfoRef.Type == KillDetailInfoType.Info_Type_PentaKill)
                {
                    if (InKillInfoRef.Killer.get_handle().IsSelfCamp(hostPlayer.Captain))
                    {
                        this.PlayBattleEvent("Trigger_FiveKill");
                    }
                    else
                    {
                        this.PlayBattleEvent("Trigger_BeFiveKill");
                    }
                }
            }
        }
Exemple #2
0
 public void AddKillInfo(KillDetailInfo info)
 {
     if (!MonoSingleton <Reconnection> .instance.isProcessingRelayRecover)
     {
         this.AddKillInfo(KillNotifyUT.Convert_DetailInfo_KillInfo(info));
     }
 }
Exemple #3
0
 private void OnAchievementEvent(KillDetailInfo DetailInfo)
 {
     if (this.bIsLuandouPlayMode)
     {
         this.OnLuanDouNotify(ref DetailInfo);
     }
 }
Exemple #4
0
        private void OnNextSpawnGroups(ref NextSpawnGroupsParam prm)
        {
            if (prm.OldGroup == null)
            {
                return;
            }
            for (int i = 0; i < this.node_ary.Count; i++)
            {
                DragonIcon.DragonNode dragonNode = this.node_ary[i];
                if (dragonNode != null && dragonNode.spawnGroup == prm.OldGroup)
                {
                    dragonNode.spawnGroup = prm.NextGroups[0];
                }
            }
            ActorMeta         actorMeta = prm.OldGroup.TheActorsMeta[0];
            ResMonsterCfgInfo dataCfgInfoByCurLevelDiff = MonsterDataHelper.GetDataCfgInfoByCurLevelDiff(actorMeta.ConfigId);

            if (dataCfgInfoByCurLevelDiff == null)
            {
                return;
            }
            if (dataCfgInfoByCurLevelDiff.bSoldierType == 9)
            {
                KillDetailInfo killDetailInfo = new KillDetailInfo();
                killDetailInfo.bSelfCamp = true;
                killDetailInfo.Type      = KillDetailInfoType.Info_Type_5V5SmallDragon_Suicide;
                Singleton <EventRouter> .instance.BroadCastEvent <KillDetailInfo>(EventID.AchievementRecorderEvent, killDetailInfo);

                KillDetailInfo killDetailInfo2 = new KillDetailInfo();
                killDetailInfo2.bSelfCamp = true;
                killDetailInfo2.Type      = KillDetailInfoType.Info_Type_5V5SmallDragon_Enter;
                Singleton <EventRouter> .instance.BroadCastEvent <KillDetailInfo>(EventID.AchievementRecorderEvent, killDetailInfo2);
            }
        }
Exemple #5
0
        public void _broadcast(bool bSelfCamp_Notify, KillDetailInfoType type)
        {
            KillDetailInfo killDetailInfo = new KillDetailInfo();

            killDetailInfo.bSelfCamp = bSelfCamp_Notify;
            killDetailInfo.Type      = type;
            Singleton <EventRouter> .get_instance().BroadCastEvent <KillDetailInfo>(EventID.AchievementRecorderEvent, killDetailInfo);
        }
Exemple #6
0
        private void OnAchievementEvent(KillDetailInfo DetailInfo)
        {
            SLevelContext curLvelContext = Singleton <BattleLogic> .instance.GetCurLvelContext();

            if ((curLvelContext != null) && curLvelContext.IsMobaMode())
            {
                this.AddKillInfo(DetailInfo);
            }
        }
        public void _broadcast(bool bSelfCamp_Notify, KillDetailInfoType type)
        {
            KillDetailInfo info = new KillDetailInfo {
                bSelfCamp = bSelfCamp_Notify,
                Type      = type
            };

            Singleton <EventRouter> .instance.BroadCastEvent <KillDetailInfo>(EventID.AchievementRecorderEvent, info);
        }
Exemple #8
0
        private void OnAchievementEvent(KillDetailInfo DetailInfo)
        {
            SLevelContext curLvelContext = Singleton <BattleLogic> .get_instance().GetCurLvelContext();

            if (curLvelContext == null || !curLvelContext.IsMobaMode())
            {
                return;
            }
            this.AddKillInfo(DetailInfo);
        }
Exemple #9
0
        public void AddKillInfo(KillDetailInfo info)
        {
            if (MonoSingleton <Reconnection> .get_instance().isProcessingRelayRecover)
            {
                return;
            }
            KillInfo killInfo = KillNotifyUT.Convert_DetailInfo_KillInfo(info);

            this.AddKillInfo(ref killInfo);
        }
 private void OnAchievementEvent(KillDetailInfo DetailInfo)
 {
     if (!this.ForwardCheck())
     {
         return;
     }
     if (DetailInfo.Killer && DetailInfo.Killer.handle.TheActorMeta.ConfigId == base.groupID && this.achievementType == (int)DetailInfo.Type)
     {
         this.TryTrigger(ref DetailInfo.Killer, ref DetailInfo.Victim, ref DetailInfo.Killer);
     }
 }
Exemple #11
0
        public static KillInfo Convert_DetailInfo_KillInfo(KillDetailInfo detail)
        {
            KillDetailInfoType        killDetailInfoType = KillDetailInfoType.Info_Type_None;
            PoolObjHandle <ActorRoot> killer             = detail.Killer;
            PoolObjHandle <ActorRoot> victim             = detail.Victim;
            bool flag  = false;
            bool flag2 = false;
            bool flag3 = false;

            if (killer)
            {
                flag  = (killer.get_handle().TheActorMeta.ActorType == ActorTypeDef.Actor_Type_Organ);
                flag2 = (killer.get_handle().TheActorMeta.ActorType == ActorTypeDef.Actor_Type_Monster);
                flag3 = (killer.get_handle().TheActorMeta.ActorType == ActorTypeDef.Actor_Type_Hero);
            }
            KillInfo result = default(KillInfo);

            result.KillerImgSrc             = (result.VictimImgSrc = string.Empty);
            result.MsgType                  = detail.Type;
            result.bPlayerSelf_KillOrKilled = detail.bPlayerSelf_KillOrKilled;
            result.actorType                = ((!killer) ? ActorTypeDef.Invalid : killer.get_handle().TheActorMeta.ActorType);
            result.bSrcAllies               = detail.bSelfCamp;
            result.assistImgSrc             = new string[4];
            if (flag2)
            {
                result.KillerImgSrc = KillNotify.monster_icon;
            }
            if (flag)
            {
                result.KillerImgSrc = KillNotify.building_icon;
            }
            if (flag3)
            {
                result.KillerImgSrc = KillNotifyUT.GetHero_Icon(detail.Killer, false);
            }
            if (killer)
            {
                if (killer.get_handle().TheActorMeta.ActorType == ActorTypeDef.Actor_Type_Organ)
                {
                    result.KillerImgSrc = KillNotify.building_icon;
                }
                if (killer.get_handle().TheActorMeta.ActorType == ActorTypeDef.Actor_Type_Monster)
                {
                    MonsterWrapper monsterWrapper = killer.get_handle().AsMonster();
                    if (killer.get_handle().TheActorMeta.ConfigId == Singleton <BattleLogic> .get_instance().DragonId)
                    {
                        result.KillerImgSrc = KillNotify.dragon_icon;
                    }
                    else if (monsterWrapper.cfgInfo != null && monsterWrapper.cfgInfo.bMonsterType == 2)
                    {
                        result.KillerImgSrc = KillNotify.yeguai_icon;
                    }
                    else
                    {
                        result.KillerImgSrc = KillNotify.monster_icon;
                    }
                }
                if (killer.get_handle().TheActorMeta.ActorType == ActorTypeDef.Actor_Type_Hero)
                {
                    result.KillerImgSrc = KillNotifyUT.GetHero_Icon(killer, false);
                }
            }
            if (victim)
            {
                if (victim.get_handle().TheActorMeta.ActorType == ActorTypeDef.Actor_Type_Hero)
                {
                    result.VictimImgSrc = KillNotifyUT.GetHero_Icon(victim, false);
                }
                if (victim.get_handle().TheActorMeta.ActorType == ActorTypeDef.Actor_Type_Organ)
                {
                    result.VictimImgSrc = KillNotify.building_icon;
                }
                if (victim.get_handle().TheActorMeta.ActorType == ActorTypeDef.Actor_Type_Monster && victim.get_handle().TheActorMeta.ConfigId == Singleton <BattleLogic> .get_instance().DragonId)
                {
                    result.VictimImgSrc = KillNotify.dragon_icon;
                }
            }
            if (detail.assistList != null && result.assistImgSrc != null)
            {
                for (int i = 0; i < detail.assistList.get_Count(); i++)
                {
                    uint num = detail.assistList.get_Item(i);
                    for (int j = 0; j < Singleton <GameObjMgr> .get_instance().HeroActors.get_Count(); j++)
                    {
                        if (num == Singleton <GameObjMgr> .get_instance().HeroActors.get_Item(j).get_handle().ObjID)
                        {
                            result.assistImgSrc[i] = KillNotifyUT.GetHero_Icon(Singleton <GameObjMgr> .get_instance().HeroActors.get_Item(j), false);
                        }
                    }
                }
            }
            if (detail.Type == KillDetailInfoType.Info_Type_Soldier_Boosted)
            {
                result.KillerImgSrc = ((!detail.bSelfCamp) ? KillNotify.red_soldier_icon : KillNotify.blue_soldier_icon);
                return(result);
            }
            if (detail.Type == KillDetailInfoType.Info_Type_Reconnect || detail.Type == KillDetailInfoType.Info_Type_RunningMan)
            {
                result.VictimImgSrc = string.Empty;
                return(result);
            }
            if (detail.HeroMultiKillType != killDetailInfoType)
            {
                result.MsgType = detail.HeroMultiKillType;
                return(result);
            }
            if (detail.Type == KillDetailInfoType.Info_Type_StopMultiKill)
            {
                return(result);
            }
            if (detail.Type == KillDetailInfoType.Info_Type_First_Kill)
            {
                return(result);
            }
            if (detail.Type == KillDetailInfoType.Info_Type_DestroyTower)
            {
                return(result);
            }
            if (detail.Type == KillDetailInfoType.Info_Type_Kill_3V3_Dragon || detail.Type == KillDetailInfoType.Info_Type_Kill_5V5_SmallDragon || detail.Type == KillDetailInfoType.Info_Type_Kill_5V5_BigDragon)
            {
                if (flag2)
                {
                    result.KillerImgSrc = KillNotify.monster_icon;
                }
                if (flag)
                {
                    result.KillerImgSrc = KillNotify.building_icon;
                }
                if (flag3)
                {
                    result.KillerImgSrc = KillNotifyUT.GetHero_Icon(detail.Killer, false);
                }
                result.bSrcAllies = detail.bSelfCamp;
                return(result);
            }
            if (detail.bAllDead)
            {
                result.MsgType = KillDetailInfoType.Info_Type_AllDead;
                return(result);
            }
            if (detail.HeroContiKillType != killDetailInfoType)
            {
                result.MsgType = detail.HeroContiKillType;
                return(result);
            }
            if (detail.Type == KillDetailInfoType.Info_Type_Kill)
            {
                return(result);
            }
            return(result);
        }
Exemple #12
0
        public static KillInfo Convert_DetailInfo_KillInfo(KillDetailInfo detail)
        {
            KillInfo                  info;
            KillDetailInfoType        type   = KillDetailInfoType.Info_Type_None;
            PoolObjHandle <ActorRoot> killer = detail.Killer;
            PoolObjHandle <ActorRoot> victim = detail.Victim;
            bool flag  = false;
            bool flag2 = false;
            bool flag3 = false;

            if (killer != 0)
            {
                flag  = killer.handle.TheActorMeta.ActorType == ActorTypeDef.Actor_Type_Organ;
                flag2 = killer.handle.TheActorMeta.ActorType == ActorTypeDef.Actor_Type_Monster;
                flag3 = killer.handle.TheActorMeta.ActorType == ActorTypeDef.Actor_Type_Hero;
            }
            info = new KillInfo {
                KillerImgSrc             = info.VictimImgSrc = string.Empty,
                MsgType                  = detail.Type,
                bPlayerSelf_KillOrKilled = detail.bPlayerSelf_KillOrKilled,
                actorType                = (killer == 0) ? ActorTypeDef.Invalid : killer.handle.TheActorMeta.ActorType,
                bSrcAllies               = detail.bSelfCamp
            };
            if (flag2)
            {
                info.KillerImgSrc = KillNotify.monster_icon;
            }
            if (flag)
            {
                info.KillerImgSrc = KillNotify.building_icon;
            }
            if (flag3)
            {
                info.KillerImgSrc = GetHero_Icon(detail.Killer);
            }
            if (killer != 0)
            {
                if (killer.handle.TheActorMeta.ActorType == ActorTypeDef.Actor_Type_Organ)
                {
                    info.KillerImgSrc = KillNotify.building_icon;
                }
                if (killer.handle.TheActorMeta.ActorType == ActorTypeDef.Actor_Type_Monster)
                {
                    MonsterWrapper wrapper = killer.handle.AsMonster();
                    if (killer.handle.TheActorMeta.ConfigId == Singleton <BattleLogic> .instance.DragonId)
                    {
                        info.KillerImgSrc = KillNotify.dragon_icon;
                    }
                    else if ((wrapper.cfgInfo != null) && (wrapper.cfgInfo.bMonsterType == 2))
                    {
                        info.KillerImgSrc = KillNotify.yeguai_icon;
                    }
                    else
                    {
                        info.KillerImgSrc = KillNotify.monster_icon;
                    }
                }
                if (killer.handle.TheActorMeta.ActorType == ActorTypeDef.Actor_Type_Hero)
                {
                    info.KillerImgSrc = GetHero_Icon(killer);
                }
            }
            if (victim != 0)
            {
                if (victim.handle.TheActorMeta.ActorType == ActorTypeDef.Actor_Type_Hero)
                {
                    info.VictimImgSrc = GetHero_Icon(victim);
                }
                if (victim.handle.TheActorMeta.ActorType == ActorTypeDef.Actor_Type_Organ)
                {
                    info.VictimImgSrc = KillNotify.building_icon;
                }
                if ((victim.handle.TheActorMeta.ActorType == ActorTypeDef.Actor_Type_Monster) && (victim.handle.TheActorMeta.ConfigId == Singleton <BattleLogic> .instance.DragonId))
                {
                    info.VictimImgSrc = KillNotify.dragon_icon;
                }
            }
            if (detail.Type == KillDetailInfoType.Info_Type_Soldier_Boosted)
            {
                info.KillerImgSrc = !detail.bSelfCamp ? KillNotify.red_soldier_icon : KillNotify.blue_soldier_icon;
                return(info);
            }
            if ((detail.Type == KillDetailInfoType.Info_Type_Reconnect) || (detail.Type == KillDetailInfoType.Info_Type_RunningMan))
            {
                info.VictimImgSrc = string.Empty;
                return(info);
            }
            if (detail.HeroMultiKillType != type)
            {
                info.MsgType = detail.HeroMultiKillType;
                return(info);
            }
            if (detail.Type != KillDetailInfoType.Info_Type_StopMultiKill)
            {
                if (detail.Type == KillDetailInfoType.Info_Type_First_Kill)
                {
                    return(info);
                }
                if (detail.Type == KillDetailInfoType.Info_Type_DestroyTower)
                {
                    return(info);
                }
                if (detail.Type == KillDetailInfoType.Info_Type_KillDragon)
                {
                    if (flag2)
                    {
                        info.KillerImgSrc = KillNotify.monster_icon;
                    }
                    if (flag)
                    {
                        info.KillerImgSrc = KillNotify.building_icon;
                    }
                    if (flag3)
                    {
                        info.KillerImgSrc = GetHero_Icon(detail.Killer);
                    }
                    info.bSrcAllies = detail.bSelfCamp;
                    return(info);
                }
                if (detail.bAllDead)
                {
                    info.MsgType = KillDetailInfoType.Info_Type_AllDead;
                    return(info);
                }
                if (detail.HeroContiKillType != type)
                {
                    info.MsgType = detail.HeroContiKillType;
                    return(info);
                }
                if (detail.Type == KillDetailInfoType.Info_Type_Kill)
                {
                    return(info);
                }
            }
            return(info);
        }