From 404378ee889d6f7b64d5ad6c3eecdbc586310532 Mon Sep 17 00:00:00 2001 From: ntr Date: Mon, 25 Feb 2019 15:28:19 +1100 Subject: [PATCH] demo fix --- server/WORKLOG.md | 1 + server/src/rpc.rs | 12 +++--------- 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/server/WORKLOG.md b/server/WORKLOG.md index 85b0c07b..e73c203b 100644 --- a/server/WORKLOG.md +++ b/server/WORKLOG.md @@ -12,6 +12,7 @@ cost system for items design / implement specs combo specs +randomise skill speed round system for games add cryps to player find opponent or do pve diff --git a/server/src/rpc.rs b/server/src/rpc.rs index d10635d9..c0926bde 100644 --- a/server/src/rpc.rs +++ b/server/src/rpc.rs @@ -189,27 +189,21 @@ impl Rpc { let name: String = iter::repeat(()).map(|()| rng.sample(Alphanumeric)).take(8).collect(); let cryp = cryp_spawn(CrypSpawnParams { name }, tx, &account)?; - cryp_learn(CrypLearnParams { id: cryp.id, skill: Skill::Block }, tx, &account)?; - cryp_learn(CrypLearnParams { id: cryp.id, skill: Skill::Stun }, tx, &account)?; - cryp_learn(CrypLearnParams { id: cryp.id, skill: Skill::Throw }, tx, &account)?; let name: String = iter::repeat(()).map(|()| rng.sample(Alphanumeric)).take(8).collect(); let cryp = cryp_spawn(CrypSpawnParams { name }, tx, &account)?; - cryp_learn(CrypLearnParams { id: cryp.id, skill: Skill::Decay }, tx, &account)?; - cryp_learn(CrypLearnParams { id: cryp.id, skill: Skill::Blast }, tx, &account)?; - cryp_learn(CrypLearnParams { id: cryp.id, skill: Skill::Siphon }, tx, &account)?; let name: String = iter::repeat(()).map(|()| rng.sample(Alphanumeric)).take(8).collect(); let cryp = cryp_spawn(CrypSpawnParams { name }, tx, &account)?; - cryp_learn(CrypLearnParams { id: cryp.id, skill: Skill::Triage }, tx, &account)?; - cryp_learn(CrypLearnParams { id: cryp.id, skill: Skill::Heal }, tx, &account)?; - cryp_learn(CrypLearnParams { id: cryp.id, skill: Skill::Purify }, tx, &account)?; let res = RpcResponse { method: "account_create".to_string(), params: RpcResult::Account(account), }; + let player = Player::new(account.id, Uuid::nil(), vec![]); + player_create(tx, &player, &account)?; + return Ok(res); }