Beispiel #1
0
 private static void HandleEvent(GymDetailInfoEvent ev, ISession session)
 {
     Logger.Write($"Visited  Gym : {ev.Name} | Team {ev.Team}  | Gym points {ev.Point}", LogLevel.Gym,
                  (ev.Team == TeamColor.Red)
             ? ConsoleColor.Red
             : (ev.Team == TeamColor.Yellow ? ConsoleColor.Yellow : ConsoleColor.Blue));
 }
        private static void HandleEvent(GymDetailInfoEvent ev, ISession session)
        {
            var GymDeployed = new GymDeployResponse();
            var Deployed    = GymDeployed.GymStatusAndDefenders.GymDefender.ToList();

            Logger.Write($"Visited Gym: {ev.Name} | Team: {ev.Team} | Gym Players: {ev.Players} | Free Spots: {6 - Deployed.Count}", LogLevel.Gym,
                         (ev.Team == TeamColor.Red)
                    ? ConsoleColor.Red
                    : (ev.Team == TeamColor.Yellow ? ConsoleColor.Yellow : ConsoleColor.Blue));
        }
        //TODO - move to string translation later.
        private static void HandleEvent(GymDeployEvent ev, ISession session)
        {
            var Info = new GymDetailInfoEvent();

            Logger.Write($"Great!!! Your {ev.PokemonId.ToString()} is now defending {ev.Name} GYM. | Gym Points: {UseGymBattleTask.GetGymLevel(Info.Point)}",
                         LogLevel.Gym, ConsoleColor.Green);

            if (session.LogicSettings.NotificationConfig.EnablePushBulletNotification == true)
            {
                PushNotificationClient.SendNotification(session, $"Gym Post", $"Great!!! Your {ev.PokemonId.ToString()} is now defending {ev.Name} GYM.\nGym Points: {UseGymBattleTask.GetGymLevel(Info.Point)}", true).ConfigureAwait(false);
            }
        }
        //TODO - move to string translation later.
        private static void HandleEvent(GymDeployEvent ev, ISession session)
        {
            var Info        = new GymDetailInfoEvent();
            var GymDeployed = new GymDeployResponse();
            var Deployed    = GymDeployed.GymStatusAndDefenders.GymDefender.ToList();

            Logger.Write($"Great!!! Your {ev.PokemonId.ToString()} is now defending {ev.Name} GYM. | Free Spots: {6 - Deployed.Count}",
                         LogLevel.Gym, ConsoleColor.Green);

            if (session.LogicSettings.NotificationConfig.EnablePushBulletNotification)
            {
                PushNotificationClient.SendNotification(session, $"Gym Post", $"Great!!! Your {ev.PokemonId.ToString()} is now defending {ev.Name} GYM.\nFree Spots: {6 - Deployed.Count}", true).ConfigureAwait(false);
            }
        }