summaryrefslogtreecommitdiff
path: root/src/game-server/character.hpp
diff options
context:
space:
mode:
authorPhilipp Sehmisch <crush@themanaworld.org>2009-10-26 21:27:26 +0100
committerPhilipp Sehmisch <crush@themanaworld.org>2009-10-26 21:28:18 +0100
commitb7481331c65a08d54d5e2ae286923627195076ce (patch)
tree62e9a7391f074913652d8d2dedc1cdc28cb53124 /src/game-server/character.hpp
parentecefeb60244e6ad9c5d043f8bdf086ac89889b9e (diff)
downloadmanaserv-b7481331c65a08d54d5e2ae286923627195076ce.tar.gz
manaserv-b7481331c65a08d54d5e2ae286923627195076ce.tar.bz2
manaserv-b7481331c65a08d54d5e2ae286923627195076ce.tar.xz
manaserv-b7481331c65a08d54d5e2ae286923627195076ce.zip
Added optional optimal level mechanic which reduces exp gain of certain sources after a certain skill level.
Diffstat (limited to 'src/game-server/character.hpp')
-rw-r--r--src/game-server/character.hpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/game-server/character.hpp b/src/game-server/character.hpp
index 15d81323..78e96616 100644
--- a/src/game-server/character.hpp
+++ b/src/game-server/character.hpp
@@ -267,7 +267,7 @@ class Character : public Being
* Gives a skill a specific amount of exp and checks if a levelup
* occured.
*/
- void receiveExperience(int skill, int experience);
+ void receiveExperience(int skill, int experience, int optimalLevel);
int getSkillSize() const
{ return mExperience.size(); }
@@ -300,7 +300,7 @@ class Character : public Being
* Sets total accumulated exp for skill
*/
void setExperience(int skill, int value)
- { mExperience[skill] = 0; receiveExperience(skill, value); }
+ { mExperience[skill] = 0; receiveExperience(skill, value, 0); }
/**
* Shortcut to get being's health
@@ -355,6 +355,7 @@ class Character : public Being
static const float EXPCURVE_EXPONENT;
static const float EXPCURVE_FACTOR;
static const float LEVEL_SKILL_PRECEDENCE_FACTOR; // I am taking suggestions for a better name
+ static const float EXP_LEVEL_FLEXIBILITY;
static const int CHARPOINTS_PER_LEVELUP = 5;
static const int CORRECTIONPOINTS_PER_LEVELUP = 2;
static const int CORRECTIONPOINTS_MAX = 10;