Exemple #1
0
        private void on_do_1s(ZoneLayer layer)
        {
            layer.AddTimeDelayMS(bot.Random.Next(1000, 10000), (t) =>
            {
                if (Enable)
                {
                    client.GameSocket.playerHandler.battleEventNotify(null);
                    client.GameSocket.rankHandler.getRankInfoRequest((err, rsp) => { });
                }
            });

            {
                var req_type = CUtils.GetRandomInArray <Type>(all_request, bot.Random);
                var req      = ReflectionUtil.CreateInstance(req_type);
                fill_random(req);
                log.Info("request : " + req_type);
                bot.Client.GameSocket.request(req, (err, rsp) =>
                {
                    log.Info("response : rsp=" + rsp + " : err=" + err);
                });
            }
            {
                var ntf_type = CUtils.GetRandomInArray <Type>(all_notify, bot.Random);
                var ntf      = ReflectionUtil.CreateInstance(ntf_type);
                fill_random(ntf);
                log.Info("notify : " + ntf_type);
                bot.Client.GameSocket.notify(ntf);
            }
            {
                var battleMessage = random_bytes();
                client.GameSocket.playerHandler.battleEventNotify(battleMessage);
            }
            {
                var req_type = CUtils.GetRandomInArray <Type>(all_request, bot.Random);
                socket_start_send(EventTypes.GetRequestKey(req_type), (uint)bot.Random.Next());
            }
            {
                var ntf_type = CUtils.GetRandomInArray <Type>(all_notify, bot.Random);
                socket_start_send(EventTypes.GetNotifyKey(ntf_type));
            }
        }