public void OnLogsChanged(JSEvents.LogEvent e) { foreach (var log in e.logs) { if (current_boss_ == null) { foreach (var boss in fights_) { foreach (var str in boss.start_strings) { if (log.IndexOf(str, StringComparison.Ordinal) >= 0) { StartFight(boss); } } } } else { foreach (var str in current_boss_.end_strings) { if (log.IndexOf(str, StringComparison.Ordinal) >= 0) { EndFight(); } } } } }
public void OnLogsChanged(JSEvents.LogEvent e) { if (zone_listener_ != null) { zone_listener_.OnLogsChanged(e); } }
public void OnLogsChanged(JSEvents.LogEvent e) { if (player_name_ == null) { return; } foreach (var log in e.logs) { // TODO: this should support other languages. if (log.IndexOf(player_gains_weakness_, StringComparison.Ordinal) != -1 || log.IndexOf(player_gains_brink_, StringComparison.Ordinal) != -1) { // Players come back to life before weakness is applied. // Players do gain 9999.00 seconds of Weakness when they die a second time, // but this happens even before the defeated message occurs. So, this next // case will only occur when the player has been brought back to life. if (!player_dead_ && last_revived_time_.HasValue) { // This is a raise of some sort, and not a wipe. last_revived_time_ = null; } } else if (log.IndexOf("cactbot wipe", StringComparison.Ordinal) != -1) { // FIXME: only allow echos to do this vs jerks saying this in chat. WipeIt(); } else { // This happens prior to the player's health becoming non-zero, so record when it happens. // Lazy regex for :Healer LB3:.*:Player Name: int healer_lb3 = Math.Max( log.IndexOf(":Pulse Of Life:", StringComparison.Ordinal), Math.Max(log.IndexOf(":Angel Feathers:", StringComparison.Ordinal), Math.Max(log.IndexOf(":Astral Stasis:", StringComparison.Ordinal), log.IndexOf(":Flames Of Rebirth:", StringComparison.Ordinal)))); if (healer_lb3 >= 0) { if (log.IndexOf(player_name_with_colons_, StringComparison.Ordinal) > healer_lb3) { last_lb3_time_ = DateTime.Now; } } } // TODO: maybe do something for steps of faith too, where you can // return mid-fight and res without weakness. <_< } }
public void OnLogsChanged(JSEvents.LogEvent e) { foreach (var log in e.logs) { if (log.IndexOf(" 00:0038:cactbot wipe", StringComparison.Ordinal) != -1) { WipeIt(); } if (wipe_regex_.IsMatch(log)) { WipeIt(); } } }
public void OnLogsChanged(JSEvents.LogEvent e) { if (player_name_ == null) { return; } foreach (var log in e.logs) { // TODO: this should support other languages. if (log.IndexOf("You suffer the effect of Weakness", StringComparison.Ordinal) != -1) { // Players come back to life before weakness is applied. if (!player_dead_ && last_revived_time_.HasValue) { // This is a raise of some sort, and not a wipe. last_revived_time_ = null; } } else if (log.IndexOf("cactbot wipe", StringComparison.Ordinal) != -1) { // FIXME: only allow echos to do this vs jerks saying this in chat. WipeIt(); } else { // TODO: Remove debugging info once it's clear whether pulse of life happens before or after // player hp becomes non-zero. If it's before, then a timer will need to be added (similar // to the weakness timer. If after, then this can just clear the weakness timer simply. // Lazy regex for :Healer LB3:.*:Player Name: int healer_lb3 = Math.Max( log.IndexOf(":Pulse Of Life:", StringComparison.Ordinal), Math.Max(log.IndexOf(":Angel Feathers:", StringComparison.Ordinal), log.IndexOf(":Astral Stasis:", StringComparison.Ordinal))); if (healer_lb3 >= 0) { if (log.IndexOf(player_name_with_colons_, StringComparison.Ordinal) > healer_lb3) { last_lb3_time_ = DateTime.Now; } } } // TODO: maybe do something for steps of faith too, where you can // return mid-fight and res without weakness. <_< } }
public void OnLogsChanged(JSEvents.LogEvent e) { foreach (var log in e.logs) { if (log.IndexOf(kBeginPhaseLog, StringComparison.Ordinal) >= 0 || log.IndexOf(kTestBeginPhaseLog, StringComparison.Ordinal) >= 0) { if (current_boss_ != null) { // Already fighting a boss? This shouldn't happen. tracker_.OnPhaseEnd(current_boss_); } boss_idx_++; current_boss_ = "B" + boss_idx_; tracker_.OnPhaseStart(current_boss_); } else if (log.IndexOf(kEndPhaseLog, StringComparison.Ordinal) >= 0 || log.IndexOf(kTestEndPhaseLog, StringComparison.Ordinal) >= 0) { tracker_.OnPhaseEnd(current_boss_); current_boss_ = null; } } }