From 787e5a6e4975da8499317f8dc68155b91b8d8eb7 Mon Sep 17 00:00:00 2001 From: Marvin Altemeier Date: Mon, 10 Feb 2020 10:38:45 +0100 Subject: [PATCH] fix #460 - /give_exp targeting wrong player --- CHANGELOG.md | 2 ++ server/src/cmd.rs | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 26d7c26394..9148aa2723 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,8 +16,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Allow spawning individual pet species, not just generic body kinds. ### Changed + - Brighter / higher contrast main-map - Removed highlighting of non-collectible sprites +- Fixed /give_exp ignoring player argument ### Removed diff --git a/server/src/cmd.rs b/server/src/cmd.rs index eaa3d5e39c..8251e401b9 100644 --- a/server/src/cmd.rs +++ b/server/src/cmd.rs @@ -1027,8 +1027,8 @@ fn handle_exp(server: &mut Server, entity: EcsEntity, args: String, action: &Cha let mut error_msg = None; match opt_player { - Some(_alias) => { - if let Some(stats) = ecs.write_storage::().get_mut(entity) { + Some(player) => { + if let Some(stats) = ecs.write_storage::().get_mut(player) { stats.exp.change_by(exp); } else { error_msg = Some(ServerMsg::private(String::from("Player has no stats!")));