diff options
author | Jared Adams <jaxad0127@gmail.com> | 2010-06-13 13:16:16 -0600 |
---|---|---|
committer | Jared Adams <jaxad0127@gmail.com> | 2010-06-13 13:16:16 -0600 |
commit | e8bea8a6edf69e824a922adeb5e697111ceabe90 (patch) | |
tree | db1937956bc585b300f2a2c8312af4ad5bf924de /src/net/manaserv/charhandler.cpp | |
parent | 593fd2b831304c8e421589aab0fb158e4b7e9c35 (diff) | |
parent | 0b15a3ad32838134384524ce4af95d65b0b4e5da (diff) | |
download | mana-e8bea8a6edf69e824a922adeb5e697111ceabe90.tar.gz mana-e8bea8a6edf69e824a922adeb5e697111ceabe90.tar.bz2 mana-e8bea8a6edf69e824a922adeb5e697111ceabe90.tar.xz mana-e8bea8a6edf69e824a922adeb5e697111ceabe90.zip |
Merge remote branch '1.0/1.0'
Conflicts:
data/graphics/CMakeLists.txt
data/graphics/Makefile.am
src/client.cpp
Diffstat (limited to 'src/net/manaserv/charhandler.cpp')
-rw-r--r-- | src/net/manaserv/charhandler.cpp | 21 |
1 files changed, 6 insertions, 15 deletions
diff --git a/src/net/manaserv/charhandler.cpp b/src/net/manaserv/charhandler.cpp index 721780d2..e2c67f35 100644 --- a/src/net/manaserv/charhandler.cpp +++ b/src/net/manaserv/charhandler.cpp @@ -37,6 +37,7 @@ #include "net/manaserv/messagein.h" #include "net/manaserv/messageout.h" #include "net/manaserv/protocol.h" +#include "net/manaserv/stats.h" #include "resources/colordb.h" @@ -258,15 +259,7 @@ void CharHandler::setCharCreateDialog(CharCreateDialog *window) if (!mCharCreateDialog) return; - std::vector<std::string> attributes; - attributes.push_back(_("Strength:")); - attributes.push_back(_("Agility:")); - attributes.push_back(_("Dexterity:")); - attributes.push_back(_("Vitality:")); - attributes.push_back(_("Intelligence:")); - attributes.push_back(_("Willpower:")); - - mCharCreateDialog->setAttributes(attributes, 60, 1, 20); + mCharCreateDialog->setAttributes(Stats::getLabelVector(), 60, 1, 20); } void CharHandler::requestCharacters() @@ -304,12 +297,10 @@ void CharHandler::newCharacter(const std::string &name, msg.writeInt8(hairstyle); msg.writeInt8(hairColor); msg.writeInt8(gender); - msg.writeInt16(stats[0]); - msg.writeInt16(stats[1]); - msg.writeInt16(stats[2]); - msg.writeInt16(stats[3]); - msg.writeInt16(stats[4]); - msg.writeInt16(stats[5]); + + std::vector<int>::const_iterator it, it_end; + for (it = stats.begin(), it_end = stats.end(); it != it_end; it++) + msg.writeInt16((*it)); accountServerConnection->send(msg); } |