Mana
Loading...
Searching...
No Matches
charserverhandler.h
Go to the documentation of this file.
1/*
2 * The Mana Client
3 * Copyright (C) 2004-2009 The Mana World Development Team
4 * Copyright (C) 2009-2012 The Mana Developers
5 *
6 * This file is part of The Mana Client.
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this program. If not, see <http://www.gnu.org/licenses/>.
20 */
21
22#pragma once
23
24#include "net/charhandler.h"
25
27
28class LoginData;
29
30namespace TmwAthena {
31
36{
37 public:
39
40 void handleMessage(MessageIn &msg) override;
41
42 void setCharSelectDialog(CharSelectDialog *window) override;
43
49 void setCharCreateDialog(CharCreateDialog *window) override;
50
51 void requestCharacters() override;
52
53 void chooseCharacter(Net::Character *character) override;
54
55 void newCharacter(const std::string &name, int slot, Gender gender,
56 int hairstyle, int hairColor,
57 const std::vector<int> &stats) override;
58
59 void deleteCharacter(Net::Character *character) override;
60
61 void switchCharacter() override;
62
63 unsigned int baseSprite() const override;
64
65 unsigned int hairSprite() const override;
66
67 unsigned int maxSprite() const override;
68
69 int getCharCreateMinHairColorId() const override;
70 int getCharCreateMaxHairColorId() const override;
71 int getCharCreateMaxHairStyleId() const override;
72
73 void connect();
74
75 private:
76 static void readPlayerData(MessageIn &msg, Net::Character *character);
77};
78
79} // namespace TmwAthena
Gender
Definition being.h:58
Character creation dialog.
Character selection dialog.
Deals with incoming messages from the character server.
int getCharCreateMaxHairStyleId() const override
Returns the max permitted hair style Id at character creation time, or 0 if no limit should be applie...
void deleteCharacter(Net::Character *character) override
unsigned int baseSprite() const override
static void readPlayerData(MessageIn &msg, Net::Character *character)
void setCharSelectDialog(CharSelectDialog *window) override
void newCharacter(const std::string &name, int slot, Gender gender, int hairstyle, int hairColor, const std::vector< int > &stats) override
int getCharCreateMaxHairColorId() const override
Returns the max permitted hair color Id at character creation time, or 0 if no limit should be applie...
unsigned int hairSprite() const override
void setCharCreateDialog(CharCreateDialog *window) override
Sets the character create dialog.
int getCharCreateMinHairColorId() const override
Returns the min permitted hair color Id at character creation time, or 0 if there is no minimum.
unsigned int maxSprite() const override
void chooseCharacter(Net::Character *character) override
void handleMessage(MessageIn &msg) override
Used for parsing an incoming message from eAthena.
Definition messagein.h:35
Warning: buffers and other variables are shared, so there can be only one connection active at a time...
A structure to hold information about a character.
Definition charhandler.h:38