diff options
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | src/account.cpp | 4 | ||||
-rw-r--r-- | src/account.h | 6 | ||||
-rw-r--r-- | src/accounthandler.cpp | 2 | ||||
-rw-r--r-- | src/being.h | 6 | ||||
-rw-r--r-- | src/chathandler.cpp | 8 | ||||
-rw-r--r-- | src/dalstorage.cpp | 2 | ||||
-rw-r--r-- | src/defines.h | 4 |
8 files changed, 22 insertions, 16 deletions
@@ -1,3 +1,9 @@ +2006-08-19 Bjørn Lindeijer <bjorn@lindeijer.nl> + + * src/accounthandler.cpp, src/account.cpp, src/dalstorage.cpp, + src/account.h, src/defines.h, src/chathandler.cpp, src/being.h: + Renamed Genders to Gender and AccountLevels to AccountLevel. + 2006-08-15 Bjørn Lindeijer <bjorn@lindeijer.nl> * src/connectionhandler.h, src/messageout.cpp, src/messagein.h, diff --git a/src/account.cpp b/src/account.cpp index b81adfe8..2caf1af5 100644 --- a/src/account.cpp +++ b/src/account.cpp @@ -136,7 +136,7 @@ Account::getEmail(void) const * Set the account level. */ void -Account::setLevel(const AccountLevels level) +Account::setLevel(AccountLevel level) { mLevel = level; } @@ -145,7 +145,7 @@ Account::setLevel(const AccountLevels level) /** * Get the account level. */ -AccountLevels +AccountLevel Account::getLevel(void) const { return mLevel; diff --git a/src/account.h b/src/account.h index 7597fdea..2ae61baa 100644 --- a/src/account.h +++ b/src/account.h @@ -142,7 +142,7 @@ class Account * @param level the new level. */ void - setLevel(const AccountLevels level); + setLevel(AccountLevel level); /** @@ -150,7 +150,7 @@ class Account * * @return the account level. */ - AccountLevels + AccountLevel getLevel() const; @@ -222,7 +222,7 @@ class Account std::string mPassword; /**< user password (encrypted) */ std::string mEmail; /**< user email address */ Players mCharacters; /**< player data */ - AccountLevels mLevel; /**< account level */ + AccountLevel mLevel; /**< account level */ }; diff --git a/src/accounthandler.cpp b/src/accounthandler.cpp index a4e9c7ba..8c2e43f5 100644 --- a/src/accounthandler.cpp +++ b/src/accounthandler.cpp @@ -210,7 +210,7 @@ void AccountHandler::processMessage(NetComputer *comp, MessageIn &message) LOG_INFO(name << ": Character's hair Color is invalid.", 1); break; } - Genders gender = (Genders)message.readByte(); + Gender gender = (Gender) message.readByte(); if ((gender < 0) || (gender > (signed)MAX_GENDER_VALUE)) { result.writeByte(CREATE_INVALID_GENDER); diff --git a/src/being.h b/src/being.h index 6dec64d3..97c43d3e 100644 --- a/src/being.h +++ b/src/being.h @@ -156,7 +156,7 @@ class Player: public Being * * @param gender the new gender. */ - void setGender(Genders gender) + void setGender(Gender gender) { mGender = gender; } /** @@ -164,7 +164,7 @@ class Player: public Being * * @return the gender. */ - Genders getGender() const + Gender getGender() const { return mGender; } /** @@ -273,7 +273,7 @@ class Player: public Being Player &operator=(Player const &); std::string mName; /**< name of the being */ - Genders mGender; /**< gender of the being */ + Gender mGender; /**< gender of the being */ unsigned char mHairStyle;/**< Hair Style of the being */ unsigned char mHairColor;/**< Hair Color of the being */ unsigned char mLevel; /**< level of the being */ diff --git a/src/chathandler.cpp b/src/chathandler.cpp index 7e322654..e97d23e6 100644 --- a/src/chathandler.cpp +++ b/src/chathandler.cpp @@ -42,7 +42,7 @@ class ChatClient: public NetComputer ChatClient(ChatHandler *, ENetPeer *); std::string characterName; - AccountLevels accountLevel; + AccountLevel accountLevel; }; ChatClient::ChatClient(ChatHandler *handler, ENetPeer *peer): @@ -54,7 +54,7 @@ ChatClient::ChatClient(ChatHandler *handler, ENetPeer *peer): struct ChatPendingLogin { std::string character; - AccountLevels level; + AccountLevel level; int timeout; }; @@ -71,7 +71,7 @@ void registerChatClient(std::string const &token, std::string const &name, int l { ChatClient *computer = i->second; computer->characterName = name; - computer->accountLevel = (AccountLevels)level; + computer->accountLevel = (AccountLevel) level; pendingClients.erase(i); MessageOut result; result.writeShort(CPMSG_CONNECT_RESPONSE); @@ -82,7 +82,7 @@ void registerChatClient(std::string const &token, std::string const &name, int l { ChatPendingLogin p; p.character = name; - p.level = (AccountLevels)level; + p.level = (AccountLevel) level; p.timeout = 300; // world ticks pendingLogins.insert(std::make_pair(token, p)); } diff --git a/src/dalstorage.cpp b/src/dalstorage.cpp index c158fd53..5330e42f 100644 --- a/src/dalstorage.cpp +++ b/src/dalstorage.cpp @@ -255,7 +255,7 @@ DALStorage::getAccount(const std::string& userName) for (unsigned int k = 0; k < charRows; ++k) { PlayerPtr player(new Player(strCharInfo[k][2], toUint(strCharInfo[k][0]))); - player->setGender((Genders)toUshort(strCharInfo[k][3])); + player->setGender((Gender) toUshort(strCharInfo[k][3])); player->setHairStyle(toUshort(strCharInfo[k][4])); player->setHairColor(toUshort(strCharInfo[k][5])); player->setLevel(toUshort(strCharInfo[k][6])); diff --git a/src/defines.h b/src/defines.h index a9cd8a54..0d83b999 100644 --- a/src/defines.h +++ b/src/defines.h @@ -42,7 +42,7 @@ typedef enum { AL_GM, // User can perform a subset of administrator tasks AL_BANNED, // This user is currently banned AL_RESTRICTED // User rights have been restricted -} AccountLevels; +} AccountLevel; /** @@ -51,7 +51,7 @@ typedef enum { typedef enum { GENDER_MALE, GENDER_FEMALE -} Genders; +} Gender; // Network related const unsigned int MAX_CLIENTS = 1024, |