Skip to content

Commit

Permalink
fix exp boost
Browse files Browse the repository at this point in the history
  • Loading branch information
sorokya committed Oct 11, 2023
1 parent 221a168 commit 2932320
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/map/map/give_experience.rs
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
use eo::data::{EOInt, EOShort};

use crate::SETTINGS;

use super::Map;

impl Map {
pub fn give_experience(&mut self, player_id: EOShort, experience: EOInt) -> (bool, EOInt) {
match self.characters.get_mut(&player_id) {
Some(character) => {
let leveled_up = character.add_experience(experience);
let leveled_up =
character.add_experience(experience * SETTINGS.world.exp_multiplier);
(leveled_up, character.experience)
}
None => (false, 0),
Expand Down

0 comments on commit 2932320

Please sign in to comment.