mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
fix #460 - /give_exp targeting wrong player
This commit is contained in:
parent
6424ca7947
commit
787e5a6e49
@ -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.
|
- Allow spawning individual pet species, not just generic body kinds.
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
|
|
||||||
- Brighter / higher contrast main-map
|
- Brighter / higher contrast main-map
|
||||||
- Removed highlighting of non-collectible sprites
|
- Removed highlighting of non-collectible sprites
|
||||||
|
- Fixed /give_exp ignoring player argument
|
||||||
|
|
||||||
### Removed
|
### Removed
|
||||||
|
|
||||||
|
@ -1027,8 +1027,8 @@ fn handle_exp(server: &mut Server, entity: EcsEntity, args: String, action: &Cha
|
|||||||
let mut error_msg = None;
|
let mut error_msg = None;
|
||||||
|
|
||||||
match opt_player {
|
match opt_player {
|
||||||
Some(_alias) => {
|
Some(player) => {
|
||||||
if let Some(stats) = ecs.write_storage::<comp::Stats>().get_mut(entity) {
|
if let Some(stats) = ecs.write_storage::<comp::Stats>().get_mut(player) {
|
||||||
stats.exp.change_by(exp);
|
stats.exp.change_by(exp);
|
||||||
} else {
|
} else {
|
||||||
error_msg = Some(ServerMsg::private(String::from("Player has no stats!")));
|
error_msg = Some(ServerMsg::private(String::from("Player has no stats!")));
|
||||||
|
Loading…
Reference in New Issue
Block a user