Exemplo n.º 1
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()));
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
Exemplo n.º 2
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;
        }