コード例 #1
0
        // Private Methods
        private void setDamageLogs(BossData bossData, List <CombatItem> combatList)
        {
            int time_start = bossData.getFirstAware();

            foreach (CombatItem c in combatList)
            {
                if (instid == c.getSrcInstid() || instid == c.getSrcMasterInstid())
                {
                    LuckLogsApp.Models.ParseEnums.StateChange state = c.isStateChange();
                    int time = c.getTime() - time_start;
                    if (bossData.getInstid() == c.getDstInstid() && c.getIFF().getEnum() == "FOE")
                    {
                        if (state.getEnum() == "NORMAL")
                        {
                            if (c.isBuff() == 1 && c.getBuffDmg() != 0)
                            {
                                damage_logs.Add(new DamageLog(time, c.getBuffDmg(), c.getSkillID(), c.isBuff(),
                                                              c.getResult(), c.isNinety(), c.isMoving(), c.isFlanking()));
                            }
                            else if (c.isBuff() == 0 && c.getValue() != 0)
                            {
                                damage_logs.Add(new DamageLog(time, c.getValue(), c.getSkillID(), c.isBuff(),
                                                              c.getResult(), c.isNinety(), c.isMoving(), c.isFlanking()));
                            }
                        }
                    }
                }
            }
        }
コード例 #2
0
        public void setBoonMap(BossData bossData, SkillData skillData, List <CombatItem> combatList)
        {
            // Initialize Boon Map with every Boon
            foreach (Boon boon in Boon.getList())
            {
                BoonMap map = new BoonMap(boon.getName(), new List <BoonLog>());
                boon_map.Add(map);
                // boon_map.put(boon.getName(), new ArrayList<BoonLog>());
            }

            // Fill in Boon Map
            int time_start     = bossData.getFirstAware();
            int fight_duration = bossData.getLastAware() - time_start;

            foreach (CombatItem c in combatList)
            {
                if (instid == c.getDstInstid())
                {
                    String skill_name = skillData.getName(c.getSkillID());
                    if (c.isBuff() == 1 && c.getValue() > 0)
                    {
                        int count = 0;
                        foreach (BoonMap bm in boon_map)
                        {
                            if (bm.getName() == skill_name)
                            {
                                int time = c.getTime() - time_start;
                                if (time < fight_duration)
                                {
                                    List <BoonLog> loglist = bm.getBoonLog();
                                    loglist.Add(new BoonLog(time, c.getValue()));
                                    bm.setBoonLog(loglist);
                                    boon_map[count] = bm;
                                }
                                else
                                {
                                    break;
                                }
                            }
                            count++;
                        }
                    }
                }
            }
        }