示例#1
0
        private void setFilteredLogs(BossData bossData, List <CombatItem> combatList, AgentData agentData, int instidFilter)
        {
            List <DamageLog> filterDLog = new List <DamageLog>();
            int time_start = bossData.getFirstAware();

            foreach (CombatItem c in combatList)
            {
                if (instid == c.getSrcInstid() || instid == c.getSrcMasterInstid())//selecting player
                {
                    LuckParser.Models.ParseEnums.StateChange state = c.isStateChange();
                    int time = c.getTime() - time_start;
                    if (bossData.getInstid() == c.getDstInstid() && c.getIFF().getEnum() == "FOE")//selecting boss
                    {
                        if (state.getEnum() == "NORMAL" && c.isBuffremove().getID() == 0)
                        {
                            if (c.isBuff() == 1 && c.getBuffDmg() != 0)
                            {
                                filterDLog.Add(new DamageLog(time, c.getBuffDmg(), c.getSkillID(), c.isBuff(),
                                                             c.getResult(), c.isNinety(), c.isMoving(), c.isFlanking(), c.isActivation()));
                            }
                            else if (c.isBuff() == 0 && c.getValue() != 0)
                            {
                                if (time > 300000)
                                {
                                    int f**k = 0;
                                }
                                filterDLog.Add(new DamageLog(time, c.getValue(), c.getSkillID(), c.isBuff(),
                                                             c.getResult(), c.isNinety(), c.isMoving(), c.isFlanking(), c.isActivation()));
                            }
                        }
                    }
                }
            }
            damage_logsFiltered = filterDLog;
        }
示例#2
0
        public List <BoonMap> getboonGen(BossData bossData, SkillData skillData, List <CombatItem> combatList, AgentData agentData, List <int> trgtPID)
        {
            List <BoonMap> boonGen = new List <BoonMap>();
            int            time_start = bossData.getFirstAware();
            int            fight_duration = bossData.getLastAware() - time_start;
            int            here = 0, there = 0, everywhere = 0, huh = 0;

            // Initialize Boon Map with every Boon
            foreach (Boon boon in Boon.getList())
            {
                BoonMap map = new BoonMap(boon.getName(), new List <BoonLog>());
                boonGen.Add(map);
                // boon_map.put(boon.getName(), new ArrayList<BoonLog>());
            }

            foreach (CombatItem c in combatList)
            {
                LuckParser.Models.ParseEnums.StateChange state = c.isStateChange();
                int time = c.getTime() - time_start;
                if (instid == c.getSrcInstid() && state.getEnum() == "NORMAL" && time > 0 && time < fight_duration /*|| instid == c.getSrcMasterInstid()*/)//selecting player or minion as caster
                {
                    here++;
                    foreach (AgentItem item in agentData.getPlayerAgentList())
                    {                                                                                     //selecting all
                        if (item.getInstid() == c.getDstInstid() /*&& c.getIFF().getEnum() == "FRIEND"*/) //Make sure target is friendly existing Agent
                        {
                            there++;
                            foreach (int id in trgtPID)  //Make sure trgt is within paramaters
                            {
                                if (id == c.getDstInstid())
                                {
                                    everywhere++;
                                    if (c.isBuffremove().getID() == 0 && c.isBuff() > 0 && c.getBuffDmg() == 0 && c.getValue() > 0)      //Buff application
                                    {
                                        huh++;
                                        String skill_name = skillData.getName(c.getSkillID());
                                        int    count      = 0;

                                        foreach (BoonMap bm in boonGen.ToList())
                                        {
                                            if (skill_name.Contains(bm.getName()))
                                            {
                                                List <BoonLog> loglist = bm.getBoonLog();
                                                loglist.Add(new BoonLog(time, c.getValue(), c.getOverstackValue()));
                                                bm.setBoonLog(loglist);

                                                boonGen[count] = bm;
                                            }
                                            count++;
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            }
            return(boonGen);
        }
示例#3
0
        // Private Methods
        private void setDamageLogs(BossData bossData, List <CombatItem> combatList, AgentData agentData)
        {
            int  time_start  = bossData.getFirstAware();
            bool combatStart = false;
            bool combatEnd   = false;

            foreach (CombatItem c in combatList)
            {
                if (combatStart == false)
                {
                    if (bossData.getInstid() == c.getSrcInstid() && c.isStateChange().getID() == 1)
                    {//Make sure combat has started
                        combatStart = true;
                    }
                }
                if (combatEnd == false && combatStart == true)
                {
                    if (bossData.getInstid() == c.getSrcInstid() && c.isStateChange().getID() == 2)
                    {//Make sure combat had ended
                        combatEnd = true;
                    }
                }

                if (instid == c.getSrcInstid() || instid == c.getSrcMasterInstid())    //selecting player or minion as caster
                {
                    LuckParser.Models.ParseEnums.StateChange state = c.isStateChange();
                    int time = c.getTime() - time_start;
                    foreach (AgentItem item in agentData.getNPCAgentList())
                    {    //selecting all
                        if (item.getInstid() == c.getDstInstid())
                        {
                            if (c.getIFF().getEnum() == "FOE")
                            {
                                if (state.getID() == 0 && c.isBuffremove().getID() == 0)
                                {
                                    if (c.isBuff() == 1 && c.getBuffDmg() != 0)    //condi
                                    {
                                        damage_logs.Add(new DamageLog(time, (int)c.getSrcAgent(), c.getBuffDmg(), c.getSkillID(), c.isBuff(),
                                                                      c.getResult(), c.isNinety(), c.isMoving(), c.isFlanking(), c.isActivation()));
                                    }
                                    else if (c.isBuff() == 0 && c.getValue() != 0)    //power
                                    {
                                        damage_logs.Add(new DamageLog(time, (int)c.getSrcAgent(), c.getValue(), c.getSkillID(), c.isBuff(),
                                                                      c.getResult(), c.isNinety(), c.isMoving(), c.isFlanking(), c.isActivation()));
                                    }
                                    else if (c.getResult().getID() == 5 || c.getResult().getID() == 6 || c.getResult().getID() == 7)
                                    {    //Hits that where blinded, invulned, interupts
                                        damage_logs.Add(new DamageLog(time, (int)c.getSrcAgent(), c.getValue(), c.getSkillID(), c.isBuff(),
                                                                      c.getResult(), c.isNinety(), c.isMoving(), c.isFlanking(), c.isActivation()));
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
示例#4
0
        private void setCastLogs(BossData bossData, List <CombatItem> combatList, AgentData agentData)
        {
            int     time_start = bossData.getFirstAware();
            CastLog curCastLog = null;

            foreach (CombatItem c in combatList)
            {
                LuckParser.Models.ParseEnums.StateChange state = c.isStateChange();
                if (state.getID() == 0)
                {
                    if (instid == c.getSrcInstid())//selecting player as caster
                    {
                        if (c.isActivation().getID() > 0)
                        {
                            if (c.isActivation().getID() < 3)
                            {
                                int time = c.getTime() - time_start;
                                curCastLog = new CastLog(time, c.getSkillID(), c.getValue(), c.isActivation());
                            }
                            else
                            {
                                if (curCastLog != null)
                                {
                                    if (curCastLog.getID() == c.getSkillID())
                                    {
                                        curCastLog = new CastLog(curCastLog.getTime(), curCastLog.getID(), curCastLog.getExpDur(), curCastLog.startActivation(), c.getValue(), c.isActivation());
                                        cast_logs.Add(curCastLog);
                                        curCastLog = null;
                                    }
                                }
                            }
                        }
                    }
                }
                else if (state.getID() == 11)       //Weapon swap
                {
                    if (instid == c.getSrcInstid()) //selecting player as caster
                    {
                        if ((int)c.getDstAgent() == 4 || (int)c.getDstAgent() == 5)
                        {
                            int time = c.getTime() - time_start;
                            curCastLog = new CastLog(time, -2, (int)c.getDstAgent(), c.isActivation());
                            cast_logs.Add(curCastLog);
                            curCastLog = null;
                        }
                    }
                }
            }
        }
示例#5
0
        public void setDamagetaken(BossData bossData, List <CombatItem> combatList, AgentData agentData, MechanicData m_data)
        {
            int time_start = bossData.getFirstAware();


            foreach (CombatItem c in combatList)
            {
                if (instid == c.getDstInstid())  //selecting player as target
                {
                    LuckParser.Models.ParseEnums.StateChange state = c.isStateChange();
                    int time = c.getTime() - time_start;
                    foreach (AgentItem item in agentData.getNPCAgentList())
                    {//selecting all
                        if (item.getInstid() == c.getSrcInstid() && c.getIFF().getEnum() == "FOE")
                        {
                            if (state.getID() == 0)
                            {
                                if (c.isBuff() == 1 && c.getBuffDmg() != 0)
                                {
                                    //inco,ing condi dmg not working or just not present?
                                    // damagetaken.Add(c.getBuffDmg());
                                }
                                else if (c.isBuff() == 0 && c.getValue() != 0)
                                {
                                    damagetaken.Add(c.getValue());
                                    damageTaken_logs.Add(new DamageLog(time, c.getValue(), c.getSkillID(), c.isBuff(),
                                                                       c.getResult(), c.isNinety(), c.isMoving(), c.isFlanking(), c.isActivation(), c.isShields()));
                                }
                                else if (c.isBuff() == 0 && c.getValue() == 0)
                                {
                                    damageTaken_logs.Add(new DamageLog(time, c.getBuffDmg(), c.getSkillID(), c.isBuff(),
                                                                       c.getResult(), c.isNinety(), c.isMoving(), c.isFlanking(), c.isActivation(), c.isShields()));
                                }
                            }
                        }
                    }
                }
            }
        }