00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #include "account-server/character.hpp"
00022
00023 #include "account-server/account.hpp"
00024
00025 Character::Character(const std::string &name, int id):
00026 mName(name),
00027 mDatabaseID(id),
00028 mAccountID(-1),
00029 mAccount(NULL),
00030 mMapId(0),
00031 mGender(0),
00032 mHairStyle(0),
00033 mHairColor(0),
00034 mLevel(0),
00035 mCharacterPoints(0),
00036 mCorrectionPoints(0),
00037 mAccountLevel(0)
00038 {
00039 for (int i = 0; i < CHAR_ATTR_NB; ++i)
00040 {
00041 mAttributes[i] = 0;
00042 }
00043 for (int i = 0; i < CHAR_SKILL_NB; ++i)
00044 {
00045 mExperience[i] = 0;
00046 }
00047 }
00048
00049 void Character::setAccount(Account *acc)
00050 {
00051 mAccount = acc;
00052 mAccountID = acc->getID();
00053 mAccountLevel = acc->getLevel();
00054 }