Skip to content

Commit

Permalink
merge & resolve conflict
Browse files Browse the repository at this point in the history
  • Loading branch information
samuraitruong committed Sep 5, 2016
1 parent a5d7e2d commit 30dd66f
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 14 deletions.
2 changes: 1 addition & 1 deletion PoGo.NecroBot.CLI/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ private static void Main(string[] args)
if (settings.TelegramConfig.UseTelegramAPI)
_session.Telegram = new TelegramService(settings.TelegramConfig.TelegramAPIKey, _session);

if (session.LogicSettings.UseSnipeLocationServer || session.LogicSettings.HumanWalkingSnipeUsePogoLocationFeeder)
if (_session.LogicSettings.UseSnipeLocationServer || _session.LogicSettings.HumanWalkingSnipeUsePogoLocationFeeder)
SnipePokemonTask.AsyncStart(_session);

settings.checkProxy(_session.Translation);
Expand Down
26 changes: 13 additions & 13 deletions PoGo.NecroBot.CLI/SniperEventListener.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,14 @@

using System;
using System.Diagnostics.CodeAnalysis;
using System.Globalization;
using PoGo.NecroBot.Logic.Common;
using PoGo.NecroBot.Logic.Event;
using PoGo.NecroBot.Logic.Logging;
using PoGo.NecroBot.Logic.State;
using PoGo.NecroBot.Logic.Tasks;

using POGOProtos.Enums;
using POGOProtos.Inventory.Item;
using POGOProtos.Networking.Responses;
#endregion

namespace PoGo.NecroBot.CLI
Expand All @@ -16,13 +20,13 @@ internal class SniperEventListener
private static void HandleEvent(PokemonCaptureEvent pokemonCaptureEvent, ISession session)
{
//remove pokemon from list
HumanWalkSnipeTask.UpdateCatchPokemon(pokemonCaptureEvent.Latitude, pokemonCaptureEvent.Longitude,
pokemonCaptureEvent.Id);
Logic.Tasks.HumanWalkSnipeTask.UpdateCatchPokemon(pokemonCaptureEvent.Latitude, pokemonCaptureEvent.Longitude, pokemonCaptureEvent.Id);
}

public static void HandleEvent(SnipePokemonFoundEvent ev, ISession session)
{
Logic.Tasks.HumanWalkSnipeTask.AddSnipePokemon("Local Feeder", ev.PokemonFound.Id,
Logic.Tasks.HumanWalkSnipeTask.AddSnipePokemon("Local Feeder",
ev.PokemonFound.Id,
ev.PokemonFound.Latitude,
ev.PokemonFound.Longitude,
ev.PokemonFound.ExpirationTimestamp,
Expand All @@ -35,13 +39,9 @@ internal void Listen(IEvent evt, ISession session)
dynamic eve = evt;

try
{
HandleEvent(eve, session);
}
catch (Exception)
{
// ignored
}
{ HandleEvent(eve, session); }
catch
{ }
}
}
}
}
5 changes: 5 additions & 0 deletions PoGo.NecroBot.Logic/Model/Settings/ItemRecycleConfig.cs
Original file line number Diff line number Diff line change
Expand Up @@ -45,5 +45,10 @@ public class ItemRecycleConfig
[Range(0, 999)]
[JsonProperty(Required = Required.DisallowNull, DefaultValueHandling = DefaultValueHandling.Populate, Order = 9)]
public int TotalAmountOfBerriesToKeep = 50;

[Range(0, 999)]
[DefaultValue(50)]
[JsonProperty(Required = Required.DisallowNull, DefaultValueHandling = DefaultValueHandling.Populate, Order = 9)]
public int MaxPokeballsToKeep = 50;
}
}

0 comments on commit 30dd66f

Please sign in to comment.