summaryrefslogtreecommitdiff
path: root/src/account-server
diff options
context:
space:
mode:
authorErik Schilling <ablu.erikschilling@googlemail.com>2013-06-08 18:31:30 +0200
committerErik Schilling <ablu.erikschilling@googlemail.com>2013-08-26 22:56:47 +0200
commit1e5a15c0a5e24fb4b358fff75a7082d65496e1f9 (patch)
tree741756128a3587768fa02dbbdd9ba64820afe6cb /src/account-server
parent44ee071d7ece5a2023f79307f36e8a244c9e7b3a (diff)
downloadmanaserv-1e5a15c0a5e24fb4b358fff75a7082d65496e1f9.tar.gz
manaserv-1e5a15c0a5e24fb4b358fff75a7082d65496e1f9.tar.bz2
manaserv-1e5a15c0a5e24fb4b358fff75a7082d65496e1f9.tar.xz
manaserv-1e5a15c0a5e24fb4b358fff75a7082d65496e1f9.zip
Readded level handling
Things done: Wrote a entity:give_experience function (lua side only). Renamed characterpoints to attributepoints (no db update. Did not want to do one for a simple rename). Temponary introduced a ATTR_LEVEL constant. TODO: dehardcode this. Script binds for settings the correction and attribute points.
Diffstat (limited to 'src/account-server')
-rw-r--r--src/account-server/accounthandler.cpp2
-rw-r--r--src/account-server/character.cpp2
-rw-r--r--src/account-server/character.h10
-rw-r--r--src/account-server/storage.cpp6
4 files changed, 10 insertions, 10 deletions
diff --git a/src/account-server/accounthandler.cpp b/src/account-server/accounthandler.cpp
index 87cb2b46..9271c0ab 100644
--- a/src/account-server/accounthandler.cpp
+++ b/src/account-server/accounthandler.cpp
@@ -280,7 +280,7 @@ void AccountHandler::sendCharacterData(AccountClient &client,
charInfo.writeInt8(ch.getGender());
charInfo.writeInt8(ch.getHairStyle());
charInfo.writeInt8(ch.getHairColor());
- charInfo.writeInt16(ch.getCharacterPoints());
+ charInfo.writeInt16(ch.getAttributePoints());
charInfo.writeInt16(ch.getCorrectionPoints());
for (AttributeMap::const_iterator it = ch.mAttributes.begin(),
diff --git a/src/account-server/character.cpp b/src/account-server/character.cpp
index 3fc3ed19..9c371f54 100644
--- a/src/account-server/character.cpp
+++ b/src/account-server/character.cpp
@@ -32,7 +32,7 @@ CharacterData::CharacterData(const std::string &name, int id):
mGender(0),
mHairStyle(0),
mHairColor(0),
- mCharacterPoints(0),
+ mAttributePoints(0),
mCorrectionPoints(0),
mAccountLevel(0)
{
diff --git a/src/account-server/character.h b/src/account-server/character.h
index 58e32dad..1fa0e975 100644
--- a/src/account-server/character.h
+++ b/src/account-server/character.h
@@ -245,11 +245,11 @@ class CharacterData
Possessions &getPossessions()
{ return mPossessions; }
- void setCharacterPoints(int points)
- { mCharacterPoints = points; }
+ void setAttributePoints(int points)
+ { mAttributePoints = points; }
- int getCharacterPoints() const
- { return mCharacterPoints; }
+ int getAttributePoints() const
+ { return mAttributePoints; }
void setCorrectionPoints(int points)
{ mCorrectionPoints = points; }
@@ -283,7 +283,7 @@ class CharacterData
unsigned char mGender; //!< Gender of the being.
unsigned char mHairStyle; //!< Hair style of the being.
unsigned char mHairColor; //!< Hair color of the being.
- short mCharacterPoints; //!< Unused character points.
+ short mAttributePoints; //!< Unused character points.
short mCorrectionPoints; //!< Unused correction points.
unsigned char mAccountLevel; //!< Level of the associated account.
diff --git a/src/account-server/storage.cpp b/src/account-server/storage.cpp
index 2ddb2e08..c2af965b 100644
--- a/src/account-server/storage.cpp
+++ b/src/account-server/storage.cpp
@@ -362,7 +362,7 @@ CharacterData *Storage::getCharacterBySQL(Account *owner)
character->setGender(toUshort(charInfo(0, 3)));
character->setHairStyle(toUshort(charInfo(0, 4)));
character->setHairColor(toUshort(charInfo(0, 5)));
- character->setCharacterPoints(toUshort(charInfo(0, 6)));
+ character->setAttributePoints(toUshort(charInfo(0, 6)));
character->setCorrectionPoints(toUshort(charInfo(0, 7)));
Point pos(toInt(charInfo(0, 8)), toInt(charInfo(0, 9)));
character->setPosition(pos);
@@ -702,7 +702,7 @@ bool Storage::updateCharacter(CharacterData *character)
<< "gender = '" << character->getGender() << "', "
<< "hair_style = '" << character->getHairStyle() << "', "
<< "hair_color = '" << character->getHairColor() << "', "
- << "char_pts = '" << character->getCharacterPoints() << "', "
+ << "char_pts = '" << character->getAttributePoints() << "', "
<< "correct_pts = '"<< character->getCorrectionPoints() << "', "
<< "x = '" << character->getPosition().x << "', "
<< "y = '" << character->getPosition().y << "', "
@@ -990,7 +990,7 @@ void Storage::flush(Account *account)
<< character->getGender() << ", "
<< (int)character->getHairStyle() << ", "
<< (int)character->getHairColor() << ", "
- << (int)character->getCharacterPoints() << ", "
+ << (int)character->getAttributePoints() << ", "
<< (int)character->getCorrectionPoints() << ", "
<< character->getPosition().x << ", "
<< character->getPosition().y << ", "