private boolean isWardDeath(CombatLogEntry e) { return e.getType().equals(DotaUserMessages.DOTA_COMBATLOG_TYPES.DOTA_COMBATLOG_DEATH) && WARDS_TARGET_NAMES.contains(e.getTargetName()); }
@OnCombatLogEntry public void onCombatLogEntry(Context ctx, CombatLogEntry entry) { if (!isWardDeath(entry)) return; String killer; if ((killer = entry.getDamageSourceName()) != null) { wardKillersByWardClass.get(entry.getTargetName()).add(killer); } }
@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; } }
private String getTargetNameCompiled(CombatLogEntry cle) { return compileName(cle.getTargetName(), cle.isTargetIllusion()); }
&& !cle.isAttackerIllusion()) { if (isDeny(cle.getTargetName())) { return null;
cle.getAbilityLevel(), cle.isAbilityToggleOn() ? " on" : cle.isAbilityToggleOff() ? " off" : "", cle.getTargetName() != null ? " on " + getTargetNameCompiled(cle) : "" ); break;
combatLogEntry.targetname = cle.getTargetName(); combatLogEntry.sourcename = cle.getDamageSourceName(); combatLogEntry.targetsourcename = cle.getTargetSourceName();