summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog17
-rw-r--r--src/abstractcharacterdata.hpp9
-rw-r--r--src/account-server/accountclient.cpp4
-rw-r--r--src/account-server/accounthandler.cpp4
-rw-r--r--src/configuration.cpp3
-rw-r--r--src/game-server/being.cpp2
-rw-r--r--src/game-server/character.cpp2
-rw-r--r--src/game-server/character.hpp14
-rw-r--r--src/point.h14
-rw-r--r--src/utils/stringfilter.cpp2
10 files changed, 46 insertions, 25 deletions
diff --git a/ChangeLog b/ChangeLog
index dbebb812..7d50fb5b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,11 +1,20 @@
+2007-03-23 Bjørn Lindeijer <bjorn@lindeijer.nl>
+
+ * src/point.h, src/configuration.cpp,
+ src/account-server/accounthandler.cpp,
+ src/account-server/accountclient.cpp, src/utils/stringfilter.cpp,
+ src/abstractcharacterdata.hpp, src/game-server/being.cpp,
+ src/game-server/character.cpp, src/game-server/character.hpp: Mostly
+ fixed some compilation issues.
+
2007-03-23 Philipp Sehmisch <tmw@crushnet.org>
* src/account-server/accounthandler.cpp, src/defines.h,
src/game-server/character.cpp, src/game-server/character.hpp
- src/game-server/state.cpp: Implemented communication of attribute changes
- from server to client.
- * src/game-server/itemmanager.cpp: Another case of inconsistent order of
- attributes.
+ src/game-server/state.cpp: Implemented communication of attribute
+ changes from server to client.
+ * src/game-server/itemmanager.cpp: Another case of inconsistent order
+ of attributes.
2007-03-22 Philipp Sehmisch <tmw@crushnet.org>
diff --git a/src/abstractcharacterdata.hpp b/src/abstractcharacterdata.hpp
index fd98c7e8..b3a4a908 100644
--- a/src/abstractcharacterdata.hpp
+++ b/src/abstractcharacterdata.hpp
@@ -62,6 +62,11 @@ class AbstractCharacterData
{
public:
/**
+ * Empty virtual destructor.
+ */
+ virtual ~AbstractCharacterData() {}
+
+ /**
* Stores data into a outgoing message.
*/
void serialize(MessageOut &) const;
@@ -72,7 +77,7 @@ class AbstractCharacterData
void deserialize(MessageIn &);
protected:
- /**
+ /*
* Get and set methods
*/
@@ -156,7 +161,7 @@ class AbstractCharacterData
virtual void
setPosition(const Point &p) = 0;
- /**
+ /*
* The access functions for inventory
*/
diff --git a/src/account-server/accountclient.cpp b/src/account-server/accountclient.cpp
index c17e95a8..383a809d 100644
--- a/src/account-server/accountclient.cpp
+++ b/src/account-server/accountclient.cpp
@@ -29,9 +29,9 @@
AccountClient::AccountClient(ENetPeer *peer):
NetComputer(peer),
+ status(CLIENT_LOGIN),
mAccountPtr(NULL),
- mCharacterPtr(NULL),
- status(CLIENT_LOGIN)
+ mCharacterPtr(NULL)
{
}
diff --git a/src/account-server/accounthandler.cpp b/src/account-server/accounthandler.cpp
index 9d9949f3..52ea2b33 100644
--- a/src/account-server/accounthandler.cpp
+++ b/src/account-server/accounthandler.cpp
@@ -267,7 +267,7 @@ handleReconnectMessage(AccountClient &computer, MessageIn &msg)
{
if (computer.status != CLIENT_LOGIN)
{
- LOG_DEBUG("Account tried to reconnect, but was allready logged in "
+ LOG_DEBUG("Account tried to reconnect, but was already logged in "
<< "or queued.");
return;
}
@@ -563,8 +563,6 @@ AccountHandler::handleCharacterCreateMessage(AccountClient &computer,
for (int i = 0; i < NB_BASE_ATTRIBUTES; ++i)
attributes[i] = msg.readShort();
- // We see if the difference between the lowest stat and the highest
- // isn't too big.
unsigned int totalAttributes = 0;
bool validNonZeroAttributes = true;
for (int i = 0; i < NB_BASE_ATTRIBUTES; ++i)
diff --git a/src/configuration.cpp b/src/configuration.cpp
index 819334f4..251d63a1 100644
--- a/src/configuration.cpp
+++ b/src/configuration.cpp
@@ -108,9 +108,6 @@ void Configuration::write()
for (iter = options.begin(); iter != options.end(); iter++)
{
- // logger->log("Configuration::write(%s, \"%s\")",
- // iter->first.c_str(), iter->second.c_str());
-
xmlTextWriterStartElement(writer, BAD_CAST "option");
xmlTextWriterWriteAttribute(writer,
BAD_CAST "name", BAD_CAST iter->first.c_str());
diff --git a/src/game-server/being.cpp b/src/game-server/being.cpp
index d3c151e7..87bcb0a3 100644
--- a/src/game-server/being.cpp
+++ b/src/game-server/being.cpp
@@ -206,4 +206,4 @@ WeaponStats Being::getWeaponStats()
weaponStats.skill = 0;
return weaponStats;
-};
+}
diff --git a/src/game-server/character.cpp b/src/game-server/character.cpp
index 4e09d791..e2d45666 100644
--- a/src/game-server/character.cpp
+++ b/src/game-server/character.cpp
@@ -124,7 +124,7 @@ Character::getWeaponStats()
weaponStats.skill = CHAR_SKILL_WEAPON_UNARMED;
return weaponStats;
-};
+}
void
Character::writeAttributeUpdateMessage(MessageOut &msg)
diff --git a/src/game-server/character.hpp b/src/game-server/character.hpp
index db93e5e7..4931624c 100644
--- a/src/game-server/character.hpp
+++ b/src/game-server/character.hpp
@@ -51,7 +51,7 @@ class Character : public Being, public AbstractCharacterData
* Utility constructor for creating a Character from a received
* characterdata message.
*/
- Character(MessageIn & msg);
+ Character(MessageIn &msg);
/**
* Updates the internal status.
@@ -78,7 +78,7 @@ class Character : public Being, public AbstractCharacterData
{ return mPossessions; }
- /**
+ /*
* Character data:
* Get and set methods
*/
@@ -262,8 +262,14 @@ class Character : public Being, public AbstractCharacterData
GameClient *mClient; /**< Client computer. */
- std::vector<unsigned short> mOldAttributes; /**< Atributes as the client should currently know them */
- bool attributesChanged; /**< true when one or more attributes might have changed since the client has been updated about them. */
+ /** Atributes as the client should currently know them. */
+ std::vector<unsigned short> mOldAttributes;
+
+ /**
+ * true when one or more attributes might have changed since the
+ * client has been updated about them.
+ */
+ bool mAttributesChanged;
int mDatabaseID; /**< Character's database ID. */
std::string mName; /**< Name of the character. */
diff --git a/src/point.h b/src/point.h
index 6b694ef2..ddeffaae 100644
--- a/src/point.h
+++ b/src/point.h
@@ -31,8 +31,14 @@
class Point
{
public:
- Point() { x = 0; y = 0; }
- Point(unsigned short X, unsigned short Y) {x = X; y = Y; }
+ Point():
+ x(0), y(0)
+ {}
+
+ Point(unsigned short X, unsigned short Y):
+ x(X), y(Y)
+ {}
+
unsigned short x; /**< x coordinate */
unsigned short y; /**< y coordinate */
@@ -57,9 +63,9 @@ class Point
};
/**
- * A rectangle in positive space. Usually represents a pixel-based zone on a map.
+ * A rectangle in positive space. Usually represents a pixel-based zone on a
+ * map.
*/
-
class Rectangle
{
public:
diff --git a/src/utils/stringfilter.cpp b/src/utils/stringfilter.cpp
index c08a9942..ba1f1b99 100644
--- a/src/utils/stringfilter.cpp
+++ b/src/utils/stringfilter.cpp
@@ -71,7 +71,7 @@ void StringFilter::writeSlangFilterList()
++i;
if (i != mSlangs.end()) slangsList += ",";
}
- // mConfig->setValue("SlangsList", slangsList);
+ //mConfig->setValue("SlangsList", slangsList);
}
bool StringFilter::filterContent(const std::string& text)