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; } } } } }
// 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())); } } } } } } } }
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())); } } } } } } }