#include <abstractcharacterdata.hpp>
Inheritance diagram for AbstractCharacterData:

Public Member Functions | |
| virtual | ~AbstractCharacterData () |
| Empty virtual destructor. | |
| void | serialize (MessageOut &) const |
| Stores data into a outgoing message. | |
| void | deserialize (MessageIn &) |
| Restores data from a incomming message. | |
Protected Member Functions | |
| virtual int | getDatabaseID () const =0 |
| Gets the database id of the character. | |
| virtual void | setDatabaseID (int id)=0 |
| Sets the database id of the character. | |
| virtual std::string const & | getName () const =0 |
| Gets the name of the character. | |
| virtual void | setName (const std::string &name)=0 |
| Sets the name of the character. | |
| virtual int | getGender () const =0 |
| Gets the gender of the character (male or female). | |
| virtual void | setGender (int gender)=0 |
| Sets the gender of the character (male or female). | |
| virtual int | getHairStyle () const =0 |
| Gets the hairstyle of the character. | |
| virtual void | setHairStyle (int style)=0 |
| Sets the hairstyle of the character. | |
| virtual int | getHairColor () const =0 |
| Gets the haircolor of the character. | |
| virtual void | setHairColor (int color)=0 |
| Sets the haircolor of the character. | |
| virtual int | getLevel () const =0 |
| Gets the level of the character. | |
| virtual void | setLevel (int level)=0 |
| Sets the level of the character. | |
| virtual int | getMoney () const =0 |
| Gets the amount of money the character has. | |
| virtual void | setMoney (int amount)=0 |
| Sets the amount of money the character has. | |
| virtual unsigned short | getBaseAttribute (int attributeNumber) const =0 |
| Gets the value of a base attribute of the character. | |
| virtual void | setBaseAttribute (int attributeNumber, int value)=0 |
| Sets the value of a base attribute of the character. | |
| virtual int | getMapId () const =0 |
| Gets the Id of the map that the character is on. | |
| virtual void | setMapId (int mapId)=0 |
| Sets the Id of the map that the character is on. | |
| virtual Point const & | getPosition () const =0 |
| Gets the position of the character on the map. | |
| virtual void | setPosition (const Point &p)=0 |
| Sets the position of the character on the map. | |
| virtual int | getNumberOfInventoryItems () const =0 |
| Returns the number of inventory items. | |
| virtual InventoryItem const & | getInventoryItem (unsigned short slot) const =0 |
| Returns a reference to the item in inventory at slot. | |
| virtual void | clearInventory ()=0 |
| Clears the inventory, in preperation for an update. | |
| virtual void | addItemToInventory (const InventoryItem &item)=0 |
| Adds an inventory item to the inventory. | |
|
|
Empty virtual destructor.
Definition at line 67 of file abstractcharacterdata.hpp. |
|
|
Adds an inventory item to the inventory.
Implemented in CharacterData, and Character. |
|
|
Clears the inventory, in preperation for an update.
Implemented in CharacterData, and Character. |
|
|
Restores data from a incomming message. TODO: uncomment/redesign after Inventory is redesigned/improved TODO: Test and debug. byte = 1, short = 2 while (msg.getUnreadLength() >= 5) { InventoryItem tempItem; tempItem.itemClassId = msg.readShort(); tempItem.numberOfItemsInSlot = msg.readShort(); tempItem.isEquiped = (bool) msg.readByte(); addItemToInventory(tempItem); } Definition at line 62 of file abstractcharacterdata.cpp. |
|
|
Gets the value of a base attribute of the character.
Implemented in CharacterData, and Character. |
|
|
Gets the database id of the character.
Implemented in CharacterData, and Character. |
|
|
Gets the gender of the character (male or female).
Implemented in CharacterData, and Character. |
|
|
Gets the haircolor of the character.
Implemented in CharacterData, and Character. |
|
|
Gets the hairstyle of the character.
Implemented in CharacterData, and Character. |
|
|
Returns a reference to the item in inventory at slot.
Implemented in CharacterData, and Character. |
|
|
Gets the level of the character.
Implemented in CharacterData, and Character. |
|
|
Gets the Id of the map that the character is on.
Implemented in CharacterData, and Character. |
|
|
Gets the amount of money the character has.
Implemented in CharacterData, and Character. |
|
|
Gets the name of the character.
Implemented in CharacterData, and Character. |
|
|
Returns the number of inventory items.
Implemented in CharacterData, and Character. |
|
|
Gets the position of the character on the map.
Implemented in CharacterData, and Character. |
|
|
Stores data into a outgoing message. TODO: uncomment/redesign after Inventory is redesigned/improved TODO: Test and debug. for (int j = 0; j < getNumberOfInventoryItems(); ++j) { msg.writeShort(getInventoryItem(j).itemClassId); msg.writeShort(getInventoryItem(j).numberOfItemsInSlot); msg.writeByte((char)getInventoryItem(j).isEquiped); } Definition at line 30 of file abstractcharacterdata.cpp. |
|
||||||||||||
|
Sets the value of a base attribute of the character.
Implemented in CharacterData, and Character. |
|
|
Sets the database id of the character.
Implemented in CharacterData, and Character. |
|
|
Sets the gender of the character (male or female).
Implemented in CharacterData, and Character. |
|
|
Sets the haircolor of the character.
Implemented in CharacterData, and Character. |
|
|
Sets the hairstyle of the character.
Implemented in CharacterData, and Character. |
|
|
Sets the level of the character.
Implemented in CharacterData, and Character. |
|
|
Sets the Id of the map that the character is on.
Implemented in CharacterData, and Character. |
|
|
Sets the amount of money the character has.
Implemented in CharacterData, and Character. |
|
|
Sets the name of the character.
Implemented in CharacterData, and Character. |
|
|
Sets the position of the character on the map.
Implemented in CharacterData, and Character. |
1.3.9.1