Browse Source

Merge branch 'testing_accounts' of jake/elseware into master

pbs
jake 5 years ago
committed by Gogs
parent
commit
8fa2e25ccc
  1. 65
      src/main.rs

65
src/main.rs

@ -65,7 +65,7 @@ fn main() {
id: 1,
username: "hi".to_string(),
password: bcrypt::hash("qwer", 5).unwrap(),
guildcard: None,
guildcard: Some(1),
team_id: None,
banned: false,
muted_until: SystemTime::now(),
@ -82,6 +82,69 @@ fn main() {
character.character.name = utf8_to_utf16_array!("Test Char 2", 0x10);
entity_gateway.set_character(&character);
let fake_user2 = UserAccount {
id: 2,
username: "hi2".to_string(),
password: bcrypt::hash("qwer", 5).unwrap(),
guildcard: Some(2),
team_id: None,
banned: false,
muted_until: SystemTime::now(),
created_at: SystemTime::now(),
flags: 0,
};
entity_gateway.set_user(&fake_user2);
entity_gateway.create_user_settings_by_user(&fake_user2);
let mut character = entity_gateway.new_character_by_user(&fake_user2);
character.character.name = utf8_to_utf16_array!("Test Char 3", 0x10);
entity_gateway.set_character(&character);
let mut character = entity_gateway.new_character_by_user(&fake_user2);
character.slot = 2;
character.character.name = utf8_to_utf16_array!("Test Char 4", 0x10);
entity_gateway.set_character(&character);
let fake_user3 = UserAccount {
id: 3,
username: "hi3".to_string(),
password: bcrypt::hash("qwer", 5).unwrap(),
guildcard: Some(3),
team_id: None,
banned: false,
muted_until: SystemTime::now(),
created_at: SystemTime::now(),
flags: 0,
};
entity_gateway.set_user(&fake_user3);
entity_gateway.create_user_settings_by_user(&fake_user3);
let mut character = entity_gateway.new_character_by_user(&fake_user3);
character.character.name = utf8_to_utf16_array!("Test Char 5", 0x10);
entity_gateway.set_character(&character);
let mut character = entity_gateway.new_character_by_user(&fake_user3);
character.slot = 2;
character.character.name = utf8_to_utf16_array!("Test Char 6", 0x10);
entity_gateway.set_character(&character);
let fake_user4 = UserAccount {
id: 4,
username: "hi4".to_string(),
password: bcrypt::hash("qwer", 5).unwrap(),
guildcard: Some(4),
team_id: None,
banned: false,
muted_until: SystemTime::now(),
created_at: SystemTime::now(),
flags: 0,
};
entity_gateway.set_user(&fake_user4);
entity_gateway.create_user_settings_by_user(&fake_user4);
let mut character = entity_gateway.new_character_by_user(&fake_user4);
character.character.name = utf8_to_utf16_array!("Test Char 7", 0x10);
entity_gateway.set_character(&character);
let mut character = entity_gateway.new_character_by_user(&fake_user4);
character.slot = 2;
character.character.name = utf8_to_utf16_array!("Test Char 8", 0x10);
entity_gateway.set_character(&character);
let patch_thread = thread::spawn(|| {
info!("[patch] starting server");
let patch_config = load_config();

Loading…
Cancel
Save