private boolean isWardDeath(CombatLogEntry e) { return e.getType().equals(DotaUserMessages.DOTA_COMBATLOG_TYPES.DOTA_COMBATLOG_DEATH) && WARDS_TARGET_NAMES.contains(e.getTargetName()); }
@Override public TrackStatus visit(int time, CombatLogEntry cle) { if (cle.getType() == DOTA_COMBATLOG_TYPES.DOTA_COMBATLOG_MODIFIER_ADD && cle.getInflictorName().equals(BH_TRACK)) { trackStatus.put(cle.getTargetName(), new TrackStatus(cle.getAttackerName(), true)); } if (cle.getType() == DOTA_COMBATLOG_TYPES.DOTA_COMBATLOG_MODIFIER_REMOVE && cle.getInflictorName().equals(BH_TRACK)) { trackStatus.remove(cle.getTargetName()); } if (cle.getType() == DOTA_COMBATLOG_TYPES.DOTA_COMBATLOG_DEATH && trackStatus.getOrDefault(cle.getTargetName(), new TrackStatus()).tracked) { return trackStatus.get(cle.getTargetName()); } return null; } }
@Override public Integer visit(int time, CombatLogEntry cle) { if (cle.getType() == DOTA_COMBATLOG_TYPES.DOTA_COMBATLOG_MODIFIER_ADD && cle.getAttackerName().equals("npc_dota_hero_alchemist") && cle.getInflictorName().equals("modifier_alchemist_goblins_greed") && cle.getType() == DOTA_COMBATLOG_TYPES.DOTA_COMBATLOG_DEATH && cle.getAttackerName().equals("npc_dota_hero_alchemist") && !cle.isAttackerIllusion()) {
combatLogEntry.type = cle.getType().name(); if (cle.getType() == DOTA_COMBATLOG_TYPES.DOTA_COMBATLOG_PURCHASE) { combatLogEntry.valuename = cle.getValueName(); else if (cle.getType() == DOTA_COMBATLOG_TYPES.DOTA_COMBATLOG_GOLD) { combatLogEntry.gold_reason = cle.getGoldReason(); else if (cle.getType() == DOTA_COMBATLOG_TYPES.DOTA_COMBATLOG_XP) { combatLogEntry.xp_reason = cle.getXpReason(); if (cle.getType().ordinal() <= 19) { output(combatLogEntry);
@OnCombatLogEntry public void onCombatLogEntry(CombatLogEntry cle) { String time = "[" + GAMETIME_FORMATTER.print(Duration.millis((int) (1000.0f * cle.getTimestamp())).toPeriod()) + "]"; switch (cle.getType()) { case DOTA_COMBATLOG_DAMAGE: log.info("{} {} hits {}{} for {} damage{}", DotaUserMessages.DOTA_COMBATLOG_TYPES type = cle.getType(); log.info("\n{} ({}): {}\n", type.name(), type.ordinal(), cle); break;