summaryrefslogtreecommitdiff
path: root/src/game-server/character.hpp
diff options
context:
space:
mode:
authorPhilipp Sehmisch <tmw@crushnet.org>2007-03-15 23:47:13 +0000
committerPhilipp Sehmisch <tmw@crushnet.org>2007-03-15 23:47:13 +0000
commit7e1011ccea542f4bc972c0a9c03eaca4a718566b (patch)
tree4ebdde458b132ddb12c737a338e39711eed72534 /src/game-server/character.hpp
parent16faa1f2ead902fd5f883dab487fc4ef4762c45f (diff)
downloadmanaserv-7e1011ccea542f4bc972c0a9c03eaca4a718566b.tar.gz
manaserv-7e1011ccea542f4bc972c0a9c03eaca4a718566b.tar.bz2
manaserv-7e1011ccea542f4bc972c0a9c03eaca4a718566b.tar.xz
manaserv-7e1011ccea542f4bc972c0a9c03eaca4a718566b.zip
Set the default map position of new characters to a value that makes more sense. Implemented new basic attribute system on account server. Removed attribute modifiers, unified basic and derived attributes, storing attributes in a vector, renamed some attribute identifiers, removed identifiers for derived attributes that aren't needed yet.
Diffstat (limited to 'src/game-server/character.hpp')
-rw-r--r--src/game-server/character.hpp20
1 files changed, 13 insertions, 7 deletions
diff --git a/src/game-server/character.hpp b/src/game-server/character.hpp
index 42736a79..b1c31f1b 100644
--- a/src/game-server/character.hpp
+++ b/src/game-server/character.hpp
@@ -48,11 +48,6 @@ class Character : public Being, public AbstractCharacterData
public:
/**
- * Basic constructor
- */
- Character();
-
- /**
* Utility constructor for creating a Character from a received
* characterdata message.
*/
@@ -165,7 +160,7 @@ class Character : public Being, public AbstractCharacterData
*/
unsigned short
getBaseAttribute(int attributeNumber) const
- { return Being::getBaseAttribute(attributeNumber); }
+ { return Being::getAttribute(attributeNumber); }
/**
* Sets the value of an attribute of the character.
@@ -174,7 +169,7 @@ class Character : public Being, public AbstractCharacterData
*/
void
setBaseAttribute(int attributeNumber, int value)
- { Being::setBaseAttribute(attributeNumber, value); }
+ { Being::setAttribute(attributeNumber, value); }
/**
* Gets the Id of the map that the character is on.
@@ -242,6 +237,17 @@ class Character : public Being, public AbstractCharacterData
void
addItemToInventory(const InventoryItem& item);
+ protected:
+ /**
+ * Calculates all derived attributes
+ */
+ void calculateDerivedAttributes();
+
+ /**
+ * Gets the stats of the currently equipped weapon that are relevant
+ * for damage calculation
+ */
+ virtual WeaponStats getWeaponStats();
private:
Character(Character const &);