Skip to content

Commit

Permalink
Merge pull request #3991 from NzV/master
Browse files Browse the repository at this point in the history
Sniper Optimisation + PokeWatchers Support
  • Loading branch information
GrimmGringo committed Aug 9, 2016
2 parents bec9092 + 63385f5 commit 5b5abd1
Show file tree
Hide file tree
Showing 4 changed files with 247 additions and 131 deletions.
3 changes: 2 additions & 1 deletion PoGo.NecroBot.CLI/ConsoleEventListener.cs
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ private static void HandleEvent(FortFailedEvent fortFailedEvent, ISession sessio

private static void HandleEvent(FortTargetEvent fortTargetEvent, ISession session)
{

int intTimeForArrival = (int) ( fortTargetEvent.Distance / ( session.LogicSettings.WalkingSpeedInKilometerPerHour * 0.8 ) );

Logger.Write(
Expand Down Expand Up @@ -241,7 +242,7 @@ private static void HandleEvent(SnipeEvent snipeEvent, ISession session)
private static void HandleEvent(SnipeScanEvent snipeScanEvent, ISession session)
{
Logger.Write(snipeScanEvent.PokemonId == PokemonId.Missingno
? session.Translation.GetTranslation(TranslationString.SnipeScan,
? ((snipeScanEvent.Source != null) ? "(" + snipeScanEvent.Source + ") " : null) + session.Translation.GetTranslation(TranslationString.SnipeScan,
$"{snipeScanEvent.Bounds.Latitude},{snipeScanEvent.Bounds.Longitude}")
: ((snipeScanEvent.Source != null) ? "(" + snipeScanEvent.Source + ") " : null) + session.Translation.GetTranslation(TranslationString.SnipeScanEx, session.Translation.GetPokemonTranslation(snipeScanEvent.PokemonId),
snipeScanEvent.Iv > 0 ? snipeScanEvent.Iv.ToString(CultureInfo.InvariantCulture) : session.Translation.GetTranslation(TranslationString.CommonWordUnknown),
Expand Down
2 changes: 2 additions & 0 deletions PoGo.NecroBot.Logic/ILogicSettings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,8 @@ public interface ILogicSettings
bool GetSniperInfoFromPokezz { get; }
bool GetOnlyVerifiedSniperInfoFromPokezz { get; }
bool GetSniperInfoFromPokeSnipers { get; }
bool GetSniperInfoFromPokeWatchers { get; }
bool SnipeWithSkiplagged { get; }
bool UseSnipeLocationServer { get; }
bool UseTransferIvForSnipe { get; }
bool SnipeIgnoreUnknownIv { get; }
Expand Down
6 changes: 6 additions & 0 deletions PoGo.NecroBot.Logic/Settings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -386,6 +386,10 @@ public class GlobalSettings
public bool GetOnlyVerifiedSniperInfoFromPokezz;
[DefaultValue(true)]
public bool GetSniperInfoFromPokeSnipers;
[DefaultValue(true)]
public bool GetSniperInfoFromPokeWatchers;
[DefaultValue(true)]
public bool SnipeWithSkiplagged;
[DefaultValue(20)]
public int MinPokeballsToSnipe;
[DefaultValue(0)]
Expand Down Expand Up @@ -1315,6 +1319,8 @@ public LogicSettings(GlobalSettings settings)
public bool GetSniperInfoFromPokezz => _settings.GetSniperInfoFromPokezz;
public bool GetOnlyVerifiedSniperInfoFromPokezz => _settings.GetOnlyVerifiedSniperInfoFromPokezz;
public bool GetSniperInfoFromPokeSnipers => _settings.GetSniperInfoFromPokeSnipers;
public bool GetSniperInfoFromPokeWatchers => _settings.GetSniperInfoFromPokeWatchers;
public bool SnipeWithSkiplagged => _settings.SnipeWithSkiplagged;
public bool UseSnipeLocationServer => _settings.UseSnipeLocationServer;
public bool UseTransferIvForSnipe => _settings.UseTransferIvForSnipe;
public bool SnipeIgnoreUnknownIv => _settings.SnipeIgnoreUnknownIv;
Expand Down

0 comments on commit 5b5abd1

Please sign in to comment.