示例#1
0
    private string GetPromptId(AchieveData attackData, AchieveData targetData, KillType killtype = KillType.Normal, EAchievementType arcType = EAchievementType.None)
    {
        Units player = PlayerControlMgr.Instance.GetPlayer();

        if (null == player)
        {
            return(string.Empty);
        }
        bool   flag   = targetData._heroTeam != (TeamType)player.teamType;
        string result = string.Empty;

        if (arcType == EAchievementType.TuanMie)
        {
            result = ((!flag) ? "1100" : "1099");
            if (Singleton <PvpManager> .Instance.IsObserver)
            {
                result = ((targetData._heroTeam != TeamType.BL) ? ((targetData._heroTeam != TeamType.LM) ? "1103" : "1102") : "1101");
            }
            return(result);
        }
        if (arcType == EAchievementType.KilledByMonster)
        {
            result = ((!flag) ? "1089" : "1088");
            if (Singleton <PvpManager> .Instance.IsObserver)
            {
                result = ((targetData._heroTeam != TeamType.BL) ? ((targetData._heroTeam != TeamType.LM) ? "1092" : "1091") : "1090");
            }
            return(result);
        }
        if (killtype == KillType.StopKill)
        {
            result = ((!flag) ? "1094" : "1093");
            if (Singleton <PvpManager> .Instance.IsObserver)
            {
                result = ((targetData._heroTeam != TeamType.BL) ? ((targetData._heroTeam != TeamType.LM) ? "1097" : "1096") : "1095");
            }
            return(result);
        }
        if (killtype == KillType.FirstBoold)
        {
            result = ((!flag) ? "1017" : "1016");
            if (Singleton <PvpManager> .Instance.IsObserver)
            {
                result = ((targetData._heroTeam != TeamType.BL) ? ((targetData._heroTeam != TeamType.LM) ? "1020" : "1019") : "1018");
            }
            return(result);
        }
        if (!LevelManager.Instance.IsPvpBattleType && GameManager.Instance.AchieveManager.AllHeroDeathNum == 1 && this.ContinusKillNoTime == 1)
        {
            result = ((!flag) ? "1017" : "1016");
            if (Singleton <PvpManager> .Instance.IsObserver)
            {
                result = ((targetData._heroTeam != TeamType.BL) ? ((targetData._heroTeam != TeamType.LM) ? "1020" : "1019") : "1018");
            }
        }
        else if (attackData.ContinusKillWithTime >= AchieveManager.DoubleKillCount && attackData.ContinusKillWithTime <= AchieveManager.HexaKillCount)
        {
            if (attackData.ContinusKillWithTime == AchieveManager.DoubleKillCount)
            {
                result = ((!flag) ? "1026" : "1021");
                if (Singleton <PvpManager> .Instance.IsObserver)
                {
                    result = ((targetData._heroTeam != TeamType.BL) ? ((targetData._heroTeam != TeamType.LM) ? "1041" : "1036") : "1031");
                }
            }
            else if (attackData.ContinusKillWithTime == AchieveManager.TripleKillCount)
            {
                result = ((!flag) ? "1027" : "1022");
                if (Singleton <PvpManager> .Instance.IsObserver)
                {
                    result = ((targetData._heroTeam != TeamType.BL) ? ((targetData._heroTeam != TeamType.LM) ? "1042" : "1037") : "1032");
                }
            }
            else if (attackData.ContinusKillWithTime == AchieveManager.FourthKillCount)
            {
                result = ((!flag) ? "1028" : "1023");
                if (Singleton <PvpManager> .Instance.IsObserver)
                {
                    result = ((targetData._heroTeam != TeamType.BL) ? ((targetData._heroTeam != TeamType.LM) ? "1043" : "1038") : "1033");
                }
            }
            else if (attackData.ContinusKillWithTime == AchieveManager.FifthKillCount)
            {
                result = ((!flag) ? "1029" : "1024");
                if (Singleton <PvpManager> .Instance.IsObserver)
                {
                    result = ((targetData._heroTeam != TeamType.BL) ? ((targetData._heroTeam != TeamType.LM) ? "1044" : "1039") : "1034");
                }
            }
            else if (attackData.ContinusKillWithTime == AchieveManager.HexaKillCount)
            {
                result = ((!flag) ? "1030" : "1025");
                if (Singleton <PvpManager> .Instance.IsObserver)
                {
                    result = ((targetData._heroTeam != TeamType.BL) ? ((targetData._heroTeam != TeamType.LM) ? "1045" : "1040") : "1035");
                }
            }
        }
        else if (targetData.ContinusKillNoTime >= AchieveManager.ZhongjieCount)
        {
            result = ((!flag) ? "1094" : "1093");
            if (Singleton <PvpManager> .Instance.IsObserver)
            {
                result = ((targetData._heroTeam != TeamType.BL) ? ((targetData._heroTeam != TeamType.LM) ? "1097" : "1096") : "1095");
            }
        }
        else if (attackData.ContinusKillNoTime >= AchieveManager.DashaKillCount)
        {
            if (attackData.ContinusKillNoTime < AchieveManager.BaozouKillCount)
            {
                result = ((!flag) ? "1052" : ((!attackData.HeroName.Equals(player.npc_id)) ? "1046" : "1058"));
                if (Singleton <PvpManager> .Instance.IsObserver)
                {
                    result = ((targetData._heroTeam != TeamType.BL) ? ((targetData._heroTeam != TeamType.LM) ? "1076" : "1070") : "1064");
                }
            }
            else if (attackData.ContinusKillNoTime < AchieveManager.WurenKillCount)
            {
                result = ((!flag) ? "1053" : ((!attackData.HeroName.Equals(player.npc_id)) ? "1047" : "1059"));
                if (Singleton <PvpManager> .Instance.IsObserver)
                {
                    result = ((targetData._heroTeam != TeamType.BL) ? ((targetData._heroTeam != TeamType.LM) ? "1077" : "1071") : "1065");
                }
            }
            else if (attackData.ContinusKillNoTime < AchieveManager.ZhuzaiKillCount)
            {
                result = ((!flag) ? "1054" : ((!attackData.HeroName.Equals(player.npc_id)) ? "1048" : "1060"));
                if (Singleton <PvpManager> .Instance.IsObserver)
                {
                    result = ((targetData._heroTeam != TeamType.BL) ? ((targetData._heroTeam != TeamType.LM) ? "1078" : "1072") : "1066");
                }
            }
            else if (attackData.ContinusKillNoTime < AchieveManager.GodlikeKillCount)
            {
                result = ((!flag) ? "1055" : ((!attackData.HeroName.Equals(player.npc_id)) ? "1049" : "1061"));
                if (Singleton <PvpManager> .Instance.IsObserver)
                {
                    result = ((targetData._heroTeam != TeamType.BL) ? ((targetData._heroTeam != TeamType.LM) ? "1079" : "1073") : "1067");
                }
            }
            else if (attackData.ContinusKillNoTime < AchieveManager.LegendaryKillCount)
            {
                result = ((!flag) ? "1056" : ((!attackData.HeroName.Equals(player.npc_id)) ? "1050" : "1062"));
                if (Singleton <PvpManager> .Instance.IsObserver)
                {
                    result = ((targetData._heroTeam != TeamType.BL) ? ((targetData._heroTeam != TeamType.LM) ? "1080" : "1074") : "1068");
                }
            }
            else
            {
                result = ((!flag) ? "1057" : ((!attackData.HeroName.Equals(player.npc_id)) ? "1051" : "1063"));
                if (Singleton <PvpManager> .Instance.IsObserver)
                {
                    result = ((targetData._heroTeam != TeamType.BL) ? ((targetData._heroTeam != TeamType.LM) ? "1081" : "1075") : "1069");
                }
            }
        }
        else if (attackData.ContinusKillNoTime < AchieveManager.DashaKillCount)
        {
            result = ((!flag) ? ((!targetData.HeroName.Equals(player.npc_id)) ? "1083" : "1098") : ((!attackData.HeroName.Equals(player.npc_id)) ? "1084" : "1082"));
            if (targetData.unittype.Equals("Building") || targetData.unittype.Equals("Monster"))
            {
                result = ((!flag) ? "1089" : "1088");
            }
            if (Singleton <PvpManager> .Instance.IsObserver)
            {
                result = ((targetData._heroTeam != TeamType.BL) ? ((targetData._heroTeam != TeamType.LM) ? "1087" : "1086") : "1085");
            }
        }
        targetData.UpdateKillingHeroData(targetData);
        return(result);
    }
示例#2
0
    private EAchievementType GetConditionResult(AchieveData attackData, AchieveData targetData, KillType killtype = KillType.Normal)
    {
        if (LevelManager.CurBattleType == 6)
        {
            return(EAchievementType.NormalKill);
        }
        EAchievementType result = EAchievementType.None;

        if (killtype == KillType.StopKill)
        {
            return(EAchievementType.ZhongJie);
        }
        if (killtype == KillType.FirstBoold)
        {
            return(EAchievementType.FirstBlood);
        }
        if (!LevelManager.Instance.IsPvpBattleType && GameManager.Instance.AchieveManager.AllHeroDeathNum == 1 && this.ContinusKillNoTime == 1)
        {
            result = EAchievementType.FirstBlood;
        }
        else if (attackData.ContinusKillWithTime >= AchieveManager.DoubleKillCount && attackData.ContinusKillWithTime <= AchieveManager.HexaKillCount)
        {
            if (attackData.ContinusKillWithTime == AchieveManager.DoubleKillCount)
            {
                result = EAchievementType.DoubleKill;
            }
            else if (attackData.ContinusKillWithTime == AchieveManager.TripleKillCount)
            {
                result = EAchievementType.TribleKill;
            }
            else if (attackData.ContinusKillWithTime == AchieveManager.FourthKillCount)
            {
                result = EAchievementType.FourKill;
            }
            else if (attackData.ContinusKillWithTime == AchieveManager.FifthKillCount)
            {
                result = EAchievementType.FiveKill;
            }
            else if (attackData.ContinusKillWithTime == AchieveManager.HexaKillCount)
            {
                result = EAchievementType.HexaKill;
            }
        }
        else if (targetData.ContinusKillNoTime >= AchieveManager.ZhongjieCount)
        {
            result = EAchievementType.ZhongJie;
        }
        else if (attackData.ContinusKillNoTime >= AchieveManager.DashaKillCount)
        {
            if (attackData.ContinusKillNoTime < AchieveManager.BaozouKillCount)
            {
                result = EAchievementType.DaShaTeSha;
            }
            else if (attackData.ContinusKillNoTime < AchieveManager.WurenKillCount)
            {
                result = EAchievementType.BaoZou;
            }
            else if (attackData.ContinusKillNoTime < AchieveManager.ZhuzaiKillCount)
            {
                result = EAchievementType.WuRenNengDang;
            }
            else if (attackData.ContinusKillNoTime < AchieveManager.GodlikeKillCount)
            {
                result = EAchievementType.ZhuZaiBiSai;
            }
            else if (attackData.ContinusKillNoTime < AchieveManager.LegendaryKillCount)
            {
                result = EAchievementType.GodLike;
            }
            else
            {
                result = EAchievementType.Legendary;
            }
        }
        else if (attackData.ContinusKillNoTime < AchieveManager.DashaKillCount)
        {
            result = EAchievementType.NormalKill;
        }
        targetData.UpdateKillingHeroData(targetData);
        return(result);
    }