예제 #1
0
 public static Session GetInstance(LocalPlayer player, BotBase bot )
 {
     Session s = new Session();
     s.botBase = bot.Name;
     s.botDebug = "";
     s.map = player.CurrentMap.Name;
     s.id = 0;
     s.isEnd = 0;
     return s;
 }
예제 #2
0
        public WebMonitorApp(Guild g, Character c, Session s)
        {
            guild = g;
            character = c;
            session = s;

            TaskScheduler.UnobservedTaskException += (object sender, UnobservedTaskExceptionEventArgs excArgs) =>
            {

                Logging.WriteException(excArgs.Exception);
                excArgs.SetObserved();

            };
        }
예제 #3
0
        public void startSession()
        {
            try
            {

                Util.WriteLog("[DEBUG]sSession.getNewSession");

                string retorno;

                session.character = character;
                session.botDebug = "";
                retorno = sSession.getNewSession(conv.ConvertTOJson(session));

                session = (Session)conv.ConvertJSON<Session>(retorno);
                character = session.character;
                if (character.guild != null) { guild = character.guild; }

            }
            catch (AggregateException aex)
            {
                aex.Handle((ex) =>
                {

                    return true;
                });
            }
            catch (Exception ex)
            {

                throw ex;
            }
        }