pub fn send_hello(&mut self, gid: i32, key: Vec<u8>, key_time: u32) {
        let mut hp = packets::client_packets::Hello::new();
        hp.build_version = self.config.game_version.clone();
        hp.game_id = gid;
        hp.guid = utils::encrypt_string(&self.base.email);
        hp.random1 = utils::rand_i32();
        hp.password = utils::encrypt_string(&self.base.password);
        hp.random2 = utils::rand_i32();
        // hp.secret = utils::encrypt_string(&String::new()); //if using steam/kongregate
        hp.secret = String::new();
        hp.key_time = key_time;
        hp.key = key;
        hp.map_json = String::new();
        hp.entry_tag = String::new();
        hp.game_net = String::from("rotmg");
        hp.game_net_user_id = String::new();
        hp.play_platform = String::from("rotmg");
        hp.platform_token = String::new();
        hp.user_token = String::new();
        hp.client_token = String::from("XTeP7hERdchV5jrBZEYNebAqDPU6tKU6");
        // println!("{:?}", hp); //debugging
        self.send(client_packets::ClientPackets::HelloPacket(hp).write());
    }
/// Wrapper for sending the hello packet and logging into the game world
Wrapper for sending the hello packet and logging into the game world
Wrapper for sending the hello packet and logging into the game world
pub fn send_hello(&mut self, gid: i32, key: Vec<u8>, key_time: u32) {
        let mut hp = packets::client_packets::Hello::new();
        hp.build_version = self.config.game_version.clone();
        hp.game_id = gid;
        hp.guid = utils::encrypt_string(&self.base.email);
        hp.random1 = utils::rand_i32();
        hp.password = utils::encrypt_string(&self.base.password);
        hp.random2 = utils::rand_i32();
        // hp.secret = utils::encrypt_string(&String::new()); //if using steam/kongregate
        hp.secret = String::new();
        hp.key_time = key_time;
        hp.key = key;
        hp.map_json = String::new();
        hp.entry_tag = String::new();
        hp.game_net = String::from("rotmg");
        hp.game_net_user_id = String::new();
        hp.play_platform = String::from("rotmg");
        hp.platform_token = String::new();
        hp.user_token = String::new();
        hp.client_token = String::from("XTeP7hERdchV5jrBZEYNebAqDPU6tKU6");
        // println!("{:?}", hp); //debugging
        self.send(client_packets::ClientPackets::HelloPacket(hp).write());
    }
pub fn send_hello ( & mut self , gid : i32 , key : Vec < u8 > , key_time : u32 ) { let mut hp = packets :: client_packets :: Hello :: new ( ) ; hp . build_version = self . config . game_version . clone ( ) ; hp . game_id = gid ; hp . guid = utils :: encrypt_string ( & self . base . email ) ; hp . random1 = utils :: rand_i32 ( ) ; hp . password = utils :: encrypt_string ( & self . base . password ) ; hp . random2 = utils :: rand_i32 ( ) ; // hp.secret = utils::encrypt_string(&String::new()); //if using steam/kongregate hp . secret = String :: new ( ) ; hp . key_time = key_time ; hp . key = key ; hp . map_json = String :: new ( ) ; hp . entry_tag = String :: new ( ) ; hp . game_net = String :: from ( " " ) ; hp . game_net_user_id = String :: new ( ) ; hp . play_platform = String :: from ( " " ) ; hp . platform_token = String :: new ( ) ; hp . user_token = String :: new ( ) ; hp . client_token = String :: from ( " " ) ; // println!("{:?}", hp); //debugging self . send ( client_packets :: ClientPackets :: HelloPacket ( hp ) . write ( ) ) ; }
Wrapper for sending the hello packet and logging into the game world
Wrapper for sending the hello packet and logging into the game world
&mut self
gid
i32
key
Vec<u8>
key_time
u32
&mut self
gid
i32
key
Vec<u8>
key_time
u32