tibia-client/src/protocollogin.h

33 lines
704 B
C
Raw Normal View History

2011-04-20 08:40:31 +02:00
#ifndef PROTOCOLLOGIN_H
#define PROTOCOLLOGIN_H
#include <net/protocol.h>
class ProtocolLogin : public Protocol
{
public:
ProtocolLogin();
2011-07-17 08:56:57 +02:00
~ProtocolLogin();
2011-04-20 08:40:31 +02:00
2011-05-30 05:11:12 +02:00
void login(const std::string& accountName, const std::string& accountPassword);
2011-04-20 08:40:31 +02:00
void onConnect();
void sendPacket();
2011-05-30 05:11:12 +02:00
void onRecv(InputMessage *inputMessage);
2011-04-20 08:40:31 +02:00
2011-07-17 02:13:53 +02:00
const char *getScriptObjectType() const { return "ProtocolLogin"; }
2011-05-31 03:55:34 +02:00
2011-04-20 08:40:31 +02:00
private:
2011-05-30 05:11:12 +02:00
void parseError(InputMessage *inputMessage);
void parseMOTD(InputMessage *inputMessage);
void parseCharacterList(InputMessage *inputMessage);
std::string m_accountName, m_accountPassword;
2011-04-20 08:40:31 +02:00
};
typedef boost::shared_ptr<ProtocolLogin> ProtocolLoginPtr;
#endif