diff options
author | Jared Adams <jaxad0127@gmail.com> | 2009-04-02 21:25:25 -0600 |
---|---|---|
committer | Jared Adams <jaxad0127@gmail.com> | 2009-04-02 21:25:25 -0600 |
commit | 4916370e6130bfee7eb9ae486f03391d2214ecf4 (patch) | |
tree | 69311c3f543b538f4cd8e619d367d3ef22f6e43c /src/gui/char_select.cpp | |
parent | 22f19d7a201abe8f6df69b82ebd6dce55c3b1655 (diff) | |
download | mana-4916370e6130bfee7eb9ae486f03391d2214ecf4.tar.gz mana-4916370e6130bfee7eb9ae486f03391d2214ecf4.tar.bz2 mana-4916370e6130bfee7eb9ae486f03391d2214ecf4.tar.xz mana-4916370e6130bfee7eb9ae486f03391d2214ecf4.zip |
Make eAthena's CharHandler
Also add ping to MapHandler and fill in eAthena's MapHandler's connect
method.
Diffstat (limited to 'src/gui/char_select.cpp')
-rw-r--r-- | src/gui/char_select.cpp | 35 |
1 files changed, 9 insertions, 26 deletions
diff --git a/src/gui/char_select.cpp b/src/gui/char_select.cpp index bf885de9..595d6043 100644 --- a/src/gui/char_select.cpp +++ b/src/gui/char_select.cpp @@ -43,6 +43,9 @@ #include "net/ea/charserverhandler.h" #endif +#include "net/charhandler.h" +#include "net/net.h" + #include "gui/widgets/layout.h" #include "game.h" @@ -342,25 +345,22 @@ void CharSelectDialog::updatePlayerInfo() void CharSelectDialog::attemptCharDelete() { + // Net::getCharHandler()->deleteCharacter(mCharInfo->getPos(), mCharInfo->getEntry()); #ifdef TMWSERV_SUPPORT Net::AccountServer::Account::deleteCharacter(mCharInfo->getPos()); #else - // Request character deletion - MessageOut outMsg(0x0068); - outMsg.writeInt32(mCharInfo->getEntry()->mCharId); - outMsg.writeString("a@a.com", 40); + charHandler->deleteCharacter(mCharInfo->getPos(), mCharInfo->getEntry()); #endif mCharInfo->lock(); } void CharSelectDialog::attemptCharSelect() { + // Net::getCharHandler()->chooseCharacter(mCharInfo->getPos(), mCharInfo->getEntry()); #ifdef TMWSERV_SUPPORT Net::AccountServer::Account::selectCharacter(mCharInfo->getPos()); #else - // Request character selection - MessageOut outMsg(0x0066); - outMsg.writeInt8(mCharInfo->getPos()); + charHandler->chooseCharacter(mCharInfo->getPos(), mCharInfo->getEntry()); #endif mCharInfo->lock(); } @@ -582,7 +582,8 @@ void CharCreateDialog::action(const gcn::ActionEvent &event) (int) mAttributeSlider[5]->getValue() // WILL ); #else - attemptCharCreate(); + charHandler->newCharacter(getName(), mSlot, false, + mPlayer->getHairStyle(), mPlayer->getHairColor()); #endif } else @@ -681,21 +682,3 @@ int CharCreateDialog::getDistributedPoints() return points; } #endif - -#ifndef TMWSERV_SUPPORT -void CharCreateDialog::attemptCharCreate() -{ - // Send character infos - MessageOut outMsg(0x0067); - outMsg.writeString(getName(), 24); - outMsg.writeInt8(5); - outMsg.writeInt8(5); - outMsg.writeInt8(5); - outMsg.writeInt8(5); - outMsg.writeInt8(5); - outMsg.writeInt8(5); - outMsg.writeInt8(mSlot); - outMsg.writeInt16(mPlayer->getHairColor()); - outMsg.writeInt16(mPlayer->getHairStyle()); -} -#endif |