summaryrefslogtreecommitdiffstats
path: root/source/Entities/Player.h
diff options
context:
space:
mode:
authorDaniel O'Brien <marmot.daniel@gmail.com>2013-11-15 12:42:09 +0100
committerDaniel O'Brien <marmot.daniel@gmail.com>2013-11-15 12:42:09 +0100
commit1b2e6e74736f975386879aa5eb064df5b2f88dac (patch)
tree4ae0a0e6af71b9b0827ed2858feba251f8d065b3 /source/Entities/Player.h
parentMerge remote-tracking branch 'upstream/master' into playerxp (diff)
downloadcuberite-1b2e6e74736f975386879aa5eb064df5b2f88dac.tar
cuberite-1b2e6e74736f975386879aa5eb064df5b2f88dac.tar.gz
cuberite-1b2e6e74736f975386879aa5eb064df5b2f88dac.tar.bz2
cuberite-1b2e6e74736f975386879aa5eb064df5b2f88dac.tar.lz
cuberite-1b2e6e74736f975386879aa5eb064df5b2f88dac.tar.xz
cuberite-1b2e6e74736f975386879aa5eb064df5b2f88dac.tar.zst
cuberite-1b2e6e74736f975386879aa5eb064df5b2f88dac.zip
Diffstat (limited to '')
-rw-r--r--source/Entities/Player.h14
1 files changed, 7 insertions, 7 deletions
diff --git a/source/Entities/Player.h b/source/Entities/Player.h
index ab2f94d4c..1e43dd954 100644
--- a/source/Entities/Player.h
+++ b/source/Entities/Player.h
@@ -71,18 +71,18 @@ public:
Returns true on success
"should" really only be called at init or player death, plugins excepted
*/
- bool SetExperience(int a_XpTotal);
+ bool SetExperience(short a_XpTotal);
/* Adds Xp, "should" not inc more than MAX_EXPERIENCE_ORB_SIZE unless you're a plugin being funny, *cough* cheating
Returns the new total experience, -1 on error
*/
- int AddExperience(int a_Xp_delta);
+ short AddExperience(short a_Xp_delta);
/// Gets the experience total - XpTotal
- inline int XpGetTotal(void) { return m_XpTotal; }
+ inline short XpGetTotal(void) { return m_XpTotal; }
/// Gets the current level - XpLevel
- int XpGetLevel(void);
+ short XpGetLevel(void);
/// Gets the experience bar percentage - XpP
float XpGetPercentage(void);
@@ -413,13 +413,13 @@ protected:
Int64 m_EatingFinishTick;
/// Player Xp level
- int m_XpTotal;
+ short int m_XpTotal;
/// Caculates the Xp needed for a given level, ref: http://minecraft.gamepedia.com/XP
- static int XpForLevel(int a_Level);
+ static short XpForLevel(short int a_Level);
/// inverse of XpAtLevel, ref: http://minecraft.gamepedia.com/XP values are as per this with pre-calculations
- static int CalcLevelFromXp(int a_XpTotal);
+ static short CalcLevelFromXp(short int a_XpTotal);
bool m_IsChargingBow;
int m_BowCharge;