Пример #1
0
    private string KillTypeToString(KillType type)
    {
        string result = string.Empty;

        switch (type)
        {
        case KillType.TripleKill:
            result = "三杀";
            break;

        case KillType.QuadraKill:
            result = "四杀";
            break;

        case KillType.PentaKill:
            result = "五杀";
            break;

        default:
            if (type == KillType.GodLike)
            {
                result = "超神";
            }
            break;
        }
        return(result);
    }
Пример #2
0
 public KillEntityTask(Body entity, KillType type)
 {
     Mode         = type;
     Name         = "Kill Entity: " + entity.Name + " " + entity.GlobalID;
     EntityToKill = entity;
     Priority     = PriorityType.Urgent;
 }
Пример #3
0
        internal void UpdateKills(int userId, KillType type)
        {
            var query = string.Format("UPDATE Statistics SET {0}Kills = {0}Kills + 1 WHERE UserID = @0",
                                      type);

            Query(query, userId);
        }
Пример #4
0
 public KillEntityTask(Body entity, KillType type)
 {
     Mode = type;
     Name = "Kill Entity: " + entity.Name + " " + entity.GlobalID;
     EntityToKill = entity;
     Priority = PriorityType.Urgent;
 }
Пример #5
0
    public void KillBy(KillType killType)
    {
        if (respawner.IsRespawning)
        {
            return;
        }

        picker.OnPickerDie.Invoke();
        respawner.Register();

        Debug.Log($"{gameObject.name} was killed by {killType}");

        switch (killType)
        {
        case KillType.Cactus:
            break;

        case KillType.Hole:
            break;

        case KillType.Bomb:
            break;

        case KillType.Victim:
            break;

        default:
            throw new ArgumentOutOfRangeException(nameof(killType), killType, null);
        }
    }
Пример #6
0
    public void CreateKillFeed(string _killer, string _victim, KillType _killType)
    {
        KillFeedObjectBehaviour _temp = killFeedQueue.Dequeue();

        _temp.gameObject.SetActive(true);
        _temp.gameObject.transform.SetAsFirstSibling();
        _temp.ShowKillFeed(_killer, _victim, null);
        killFeedQueue.Enqueue(_temp);
    }
Пример #7
0
    public KillQuest(KillType type, int killAmount, string description, int goldReward, int expReward, Inventory itemReward) {
        this.type = type;
        this.killCount = killAmount;

        base.questID = GameConstants.getPlayerStats().questSystem.questID++;
        base.description = description;
        base.goldReward = goldReward;
        base.expReward = expReward;
        base.itemReward = itemReward;
    }
Пример #8
0
    public  void addNewKill(KillType type) {
        if(killDictionary == null) {
            initKillCounter();
        }
        killDictionary[type] += 1;

        foreach (KillType types in KillType.GetValues(typeof(KillType))) {
            Debug.Log("Killtype: " + types.ToString() + " - Kills: " + killDictionary[types]);
        }
    }
Пример #9
0
 public KillEntityTask(Body entity, KillType type)
 {
     MaxAssignable   = 3;
     Mode            = type;
     Name            = "Kill Entity: " + entity.Name + " " + entity.GlobalID;
     EntityToKill    = entity;
     Priority        = PriorityType.Urgent;
     AutoRetry       = true;
     Category        = TaskCategory.Attack;
     BoredomIncrease = -0.1f;
 }
Пример #10
0
 public KillEntityTask(Body entity, KillType type)
 {
     MaxAssignable   = 3;
     Mode            = type;
     Name            = "Kill Entity: " + entity.Name + " " + entity.GlobalID;
     EntityToKill    = entity;
     Priority        = PriorityType.Urgent;
     AutoRetry       = true;
     Category        = TaskCategory.Attack;
     BoredomIncrease = GameSettings.Default.Boredom_ExcitingTask;
     if (type == KillType.Auto)
     {
         ReassignOnDeath = false;
     }
 }
Пример #11
0
        public override bool CheckAchievementMatch(PlayerMobile pm, object o)
        {
            BaseCreature bc = o as BaseCreature;

            if (bc == null)
            {
                return(false);
            }

            if (Paragon && !bc.IsParagon)
            {
                return(false);
            }

            // typeof(BaseCreature) will pass true for any creature type
            if ((KillType.Length == 1 && KillType[0] == typeof(BaseCreature)) || KillType.Any(k => k == bc.GetType() || bc.GetType().IsSubclassOf(k)))
            {
                var master = bc.GetMaster();

                if (WildOnly)
                {
                    if (ControlledOnly && bc.Controlled && master is BaseCreature && ((BaseCreature)master).IsMonster)
                    {
                        return(true);
                    }

                    if (SummonedOnly && bc.Summoned && master is BaseCreature && ((BaseCreature)master).IsMonster)
                    {
                        return(true);
                    }

                    //Must be wild only since the other two properties failed
                    return(!bc.Controlled && !bc.Summoned && !ControlledOnly && !SummonedOnly);
                }

                if (ControlledOnly && bc.Controlled && master != pm && master is PlayerMobile)
                {
                    return(true);
                }

                if (SummonedOnly && bc.Summoned && master != pm && master is PlayerMobile)
                {
                    return(true);
                }
            }

            return(false);
        }
Пример #12
0
        public KillEntityTask(GameComponent entity, KillType type)
        {
            MaxAssignable   = 64;
            Mode            = type;
            Name            = "Kill Entity: " + entity.Name + " " + entity.GlobalID;
            EntityToKill    = entity;
            Priority        = TaskPriority.Urgent;
            AutoRetry       = true;
            Category        = TaskCategory.Attack;
            BoredomIncrease = GameSettings.Current.Boredom_ExcitingTask;
            EnergyDecrease  = GameSettings.Current.Energy_Arduous;

            if (type == KillType.Auto)
            {
                ReassignOnDeath = false;
            }
        }
Пример #13
0
 public KillEntityTask(Body entity, KillType type)
 {
     MaxAssignable = 3;
     Mode          = type;
     Name          = "Kill Entity: " + entity.Name + " " + entity.GlobalID;
     EntityToKill  = entity;
     Priority      = PriorityType.Urgent;
     AutoRetry     = true;
     if (type == KillType.Attack || type == KillType.Auto)
     {
         Category = TaskCategory.Attack;
     }
     else if (type == KillType.Chop)
     {
         Category = TaskCategory.Chop;
     }
 }
Пример #14
0
    public void refreshQuestSystem(KillType? killType, CollectType? collectType) {

        if(killType != null) {
            Debug.Log("Add Kill");
            killCounter.addNewKill((KillType)killType);
        }

        if(collectType != null) {
            Debug.Log("Add Collect");
            collectCounter.addNewCollect((CollectType)collectType);
        }

        foreach(Quest q in questList) {
            if (!q.isQuestSolved()) {
                q.onQuestRefresh();
            }
        }
    }
Пример #15
0
        public static void KillPlayer(Player killer, Player victim, KillType killtype)
        {
            if (victim.carryingFlag)
            {
                string col = victim.getTeam().teamColor;
                CTF.Message(col + victim.name + c.def + " dropped the " + killer.getTeam().teamColor + killer.getTeam().name + c.def + " flag.");
                victim.carryingFlag = false;
                victim.getTeam().hasFlag = false;
                killer.points         += 5;
                killer.money          += 5;
                killer.pointsThisGame += 10;
            }
            switch (killtype)
            {
            case KillType.Explode:

                Player.GlobalMessage(c.white + "- " + killer.getTeam().teamColor + killer.name + c.def + getDeathMessage() + killer.getTeam().teamColor + victim.name);
                killer.explodes++;
                break;

            case KillType.Mine:
                killer.mines++;
                Player.GlobalMessage(c.white + "- " + killer.getTeam().teamColor + killer.name + c.def + " mined " + killer.getTeam().teamColor + victim.name);
                break;

            case KillType.Tag:
                killer.tags++;
                Player.GlobalMessage(c.white + "- " + killer.getTeam().teamColor + killer.name + c.def + " tagged " + killer.getTeam().teamColor + victim.name);
                break;
            }
            killer.pointsThisGame += 5;
            if (!doublePoints)
            {
                killer.points += 5;
            }
            else
            {
                killer.points += 10;
            }

            killer.opponentTeam().spawnPlayer(victim, false);
        }
Пример #16
0
    //Quản lý việc giết con dơi ntn
    public void Kill(KillType flytype)
    {
        if (IsNotDead)
        {
            IsDead = true;
            switch (flytype)
            {
            case KillType.BINH_THUONG:
                Kill_BinhThuong();
                break;

            case KillType.SET_DANH:
                Kill_SetDanh();
                break;

            case KillType.BOM_NO:
                Kill_BomNo();
                break;

            case KillType.ANH_SANG:
                Kill_AnhSang();
                break;

            default:
                break;
            }
            //Đánh dấu đã chết

            //tăng điểm cho người chơi
            PlayerController.Instance.UpScore();

            //Sinh ra đồng xu
            if (type == 1)
            {
                StartCoroutine(SinhXu(2));
            }
            else if (Random.Range(0, 5) == 1)
            {
                Instantiate(coin, transform.position, Quaternion.identity);
            }
        }
    }
Пример #17
0
        private void OnGetMsg_LobbyCode(OperationResponse operationResponse)
        {
            if (operationResponse.Parameters.Count < 3)
            {
                return;
            }
            string   arg       = (string)operationResponse.Parameters[0];
            string   unikey    = (string)operationResponse.Parameters[1];
            int      num       = (int)operationResponse.Parameters[2];
            KillType killType  = (KillType)num;
            string   arg2      = string.Empty;
            KillType killType2 = killType;

            switch (killType2)
            {
            case KillType.TripleKill:
                arg2 = "[2EB1F7]三杀";
                break;

            case KillType.QuadraKill:
                arg2 = "[ECC16F]四杀";
                break;

            case KillType.PentaKill:
                arg2 = "[f81841]五杀";
                break;

            default:
                if (killType2 == KillType.GodLike)
                {
                    arg2 = "[C138F9]超神";
                }
                break;
            }
            SysBattleSceneVo dataById = BaseDataMgr.instance.GetDataById <SysBattleSceneVo>(unikey);

            this.data.otherMsgQueue.Enqueue(string.Format("杀神附体![e3905b]{0}[-]在{1}中获得{2}", arg, LanguageManager.Instance.GetStringById(dataById.scene_map_id), arg2));
        }
Пример #18
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);
    }
Пример #19
0
 private IEnumerator DelayBrocast(AchieveData invoker, AchieveData target, KillType killtype)
 {
     AchieveManager.< DelayBrocast > c__Iterator1A5 <DelayBrocast> c__Iterator1A = new AchieveManager.< DelayBrocast > c__Iterator1A5();
Пример #20
0
    public void BrocastAchievement(int attackId, int deathId, KillType killtype, List <int> helpers, int killWithTime, int killNoTime, string typeId)
    {
        Units units = null;

        if (attackId != 0)
        {
            units = MapManager.Instance.GetUnit(attackId);
        }
        Units unit = MapManager.Instance.GetUnit(deathId);

        if (unit == null)
        {
            ClientLogger.Error("Can't get units: " + deathId);
            return;
        }
        TeamType teamType  = (TeamType)unit.teamType;
        int      unique_id = unit.unique_id;
        string   npc_id    = unit.npc_id;
        bool     flag      = teamType != (TeamType)PlayerControlMgr.Instance.GetPlayer().teamType;

        if (attackId == 0)
        {
            SysMonsterMainVo monsterMainData = BaseDataMgr.instance.GetMonsterMainData(typeId);
            if (monsterMainData != null)
            {
                int        item_type    = monsterMainData.item_type;
                EntityType attackerType = EntityType.None;
                string     promptId     = (!flag) ? "1100" : "1099";
                if (Singleton <PvpManager> .Instance.IsObserver)
                {
                    promptId = ((teamType != TeamType.BL) ? ((teamType != TeamType.LM) ? "1103" : "1102") : "1101");
                }
                if (item_type == 1)
                {
                    attackerType = EntityType.Monster;
                }
                else if (item_type == 3 || item_type == this._bossType)
                {
                    attackerType = EntityType.Creep;
                }
                else if (item_type == 2 || item_type == 4)
                {
                    attackerType = EntityType.Tower;
                }
                UIMessageBox.ShowKillPrompt(promptId, monsterMainData.npc_id, npc_id, attackerType, EntityType.None, string.Empty, string.Empty, units.TeamType, unit.TeamType);
                return;
            }
            UnityEngine.Debug.LogError("can't get monster data with type id:" + typeId);
            return;
        }
        else
        {
            if (units == null)
            {
                ClientLogger.Error("Can't get units: " + attackId);
                return;
            }
            this.IncHeroDeath(teamType);
            TeamType    teamType2  = (TeamType)units.teamType;
            int         unique_id2 = units.unique_id;
            string      npc_id2    = units.npc_id;
            SysPromptVo dataById   = BaseDataMgr.instance.GetDataById <SysPromptVo>("201");
            if (dataById != null)
            {
                float icon_time = dataById.icon_time;
            }
            List <string> list = new List <string>();
            if (helpers != null)
            {
                foreach (int current in helpers)
                {
                    Units unit2 = MapManager.Instance.GetUnit(current);
                    if (unit2 != null)
                    {
                        list.Add(unit2.npc_id);
                    }
                    else
                    {
                        ClientLogger.Error("can't get hero with id:" + current);
                    }
                }
            }
            HUDModuleMsgTools.CallBattleMsg_SiderTipsModule_Kill(npc_id2, npc_id, flag, list, units.TeamType, unit.TeamType);
            AchieveData achieveData  = new AchieveData(attackId, units.npc_id, (TeamType)units.teamType);
            AchieveData achieveData2 = new AchieveData(deathId, unit.npc_id, (TeamType)unit.teamType);
            achieveData2.unittype = units.tag;
            if (killtype == KillType.StopKill)
            {
                achieveData.CheckAchievemtCondition(achieveData, achieveData2, KillType.StopKill);
                return;
            }
            if (killtype == KillType.FirstBoold)
            {
                achieveData.ContinusKillNoTime   = 1;
                achieveData.ContinusKillWithTime = 1;
            }
            else
            {
                achieveData.ContinusKillNoTime   = killNoTime;
                achieveData.ContinusKillWithTime = killWithTime;
            }
            achieveData.CheckAchievemtCondition(achieveData, achieveData2, killtype);
            return;
        }
    }
Пример #21
0
        public static void KillPlayer(Player killer, Player victim, KillType killtype)
        {
            if (victim.carryingFlag)
            {
                string col = victim.getTeam().teamColor;
                CTF.Message(col + victim.name + c.def + " dropped the " + killer.getTeam().teamColor + killer.getTeam().name + c.def + " flag.");
                victim.carryingFlag = false;
                victim.getTeam().hasFlag = false;
                killer.points += 5;
                killer.money += 5;
                killer.pointsThisGame += 10;
            }
            switch (killtype)
            {
                case KillType.Explode:

                    Player.GlobalMessage(c.white + "- " + killer.getTeam().teamColor + killer.name + c.def + getDeathMessage() + killer.getTeam().teamColor + victim.name);
                    killer.explodes++;
                    break;
                case KillType.Mine:
                    killer.mines++;
                    Player.GlobalMessage(c.white + "- " + killer.getTeam().teamColor + killer.name + c.def + " mined " + killer.getTeam().teamColor + victim.name);
                    break;
                case KillType.Tag:
                    killer.tags++;
                    Player.GlobalMessage(c.white + "- " + killer.getTeam().teamColor + killer.name + c.def + " tagged " + killer.getTeam().teamColor + victim.name);
                    break;
            }
            killer.pointsThisGame += 5;
            if (!doublePoints) { killer.points += 5; } else { killer.points += 10; }

            killer.opponentTeam().spawnPlayer(victim, false);



        }
Пример #22
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);
    }
Пример #23
0
 public  int getKillsforType(KillType type) {
     if (killDictionary == null) {
         initKillCounter();
     }
     return killDictionary[type]; 
 }
Пример #24
0
    public void CheckAchievemtCondition(AchieveData attackData, AchieveData targetData, KillType killtype = KillType.Normal)
    {
        EAchievementType conditionResult = this.GetConditionResult(attackData, targetData, killtype);
        string           promptId        = this.GetPromptId(attackData, targetData, killtype, conditionResult);

        if (conditionResult != EAchievementType.None)
        {
            if (LevelManager.Instance.IsPvpBattleType)
            {
                AchieveHelper.BrocastMsg(promptId, this.HeroName, targetData.HeroName, attackData._heroTeam, targetData._heroTeam, this.SummerName, targetData.SummerName);
            }
            else
            {
                AchieveHelper.BrocastMsg(promptId, this.HeroName, targetData.HeroName, attackData._heroTeam, targetData._heroTeam, string.Empty, string.Empty);
            }
        }
        else
        {
            Debug.LogError(string.Concat(new object[]
            {
                "Achievement is none, 连杀:",
                this.ContinusKillWithTime,
                " 累积杀:",
                this.ContinusKillNoTime
            }));
        }
        if ((targetData._heroTeam == TeamType.LM && MapManager.Instance.IsHeroAllDead(TeamType.LM) && GameManager.Instance.Spawner.GetPlayerNum(TeamType.LM) >= AchieveManager.TuanmieTotalCount) || (targetData._heroTeam == TeamType.BL && MapManager.Instance.IsHeroAllDead(TeamType.BL) && GameManager.Instance.Spawner.GetPlayerNum(TeamType.BL) >= AchieveManager.TuanmieTotalCount))
        {
            promptId = this.GetPromptId(attackData, targetData, killtype, EAchievementType.TuanMie);
            if (LevelManager.Instance.IsPvpBattleType)
            {
                AchieveHelper.BrocastMsg(promptId, this.HeroName, targetData.HeroName, attackData._heroTeam, targetData._heroTeam, this.SummerName, targetData.SummerName);
            }
            else
            {
                AchieveHelper.BrocastMsg(promptId, this.HeroName, targetData.HeroName, attackData._heroTeam, targetData._heroTeam, string.Empty, string.Empty);
            }
        }
    }
Пример #25
0
        internal void UpdateKills(int userId, KillType type)
        {
            var query = string.Format("UPDATE Statistics SET {0}Kills = {0}Kills + 1 WHERE UserID = @0",
                type);

            Query(query, userId);
        }