Changed exp type from f64 to u32 and altered exp calculations and function signatures to adhere to the new types

Signed-off-by: Yashas Lokesh <yashas.lokesh@gmail.com>
This commit is contained in:
yashaslokesh
2019-08-27 22:33:14 +00:00
committed by Joshua Barretto
parent 1bd3f0ab28
commit be71aea20b
5 changed files with 25 additions and 24 deletions

View File

@ -315,8 +315,9 @@ impl Server {
if let Some(attacker_stats) = stats.get_mut(attacker) {
// TODO: Discuss whether we should give EXP by Player Killing or not.
attacker_stats.exp.change_by(
entity_stats.health.maximum() as f64 / 10.0
+ entity_stats.level.level() as f64 * 10.0,
(entity_stats.health.maximum() as f64 / 10.0
+ entity_stats.level.level() as f64 * 10.0)
as i64,
);
}
});