ManaPlus
charserverrecv.cpp
Go to the documentation of this file.
1 /*
2  * The ManaPlus Client
3  * Copyright (C) 2004-2009 The Mana World Development Team
4  * Copyright (C) 2009-2010 The Mana Developers
5  * Copyright (C) 2011-2019 The ManaPlus Developers
6  *
7  * This file is part of The ManaPlus Client.
8  *
9  * This program is free software; you can redistribute it and/or modify
10  * it under the terms of the GNU General Public License as published by
11  * the Free Software Foundation; either version 2 of the License, or
12  * any later version.
13  *
14  * This program is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17  * GNU General Public License for more details.
18  *
19  * You should have received a copy of the GNU General Public License
20  * along with this program. If not, see <http://www.gnu.org/licenses/>.
21  */
22 
24 
25 #include "client.h"
26 #include "configuration.h"
27 #include "pincodemanager.h"
28 #include "settings.h"
29 
32 #include "gui/windows/okdialog.h"
33 
35 
36 #include "net/character.h"
37 #include "net/charserverhandler.h"
38 #include "net/playerhandler.h"
39 
40 #include "net/ea/token.h"
41 
44 #include "net/eathena/messageout.h"
45 #include "net/eathena/network.h"
47 #include "net/eathena/sprite.h"
48 
49 #include "resources/iteminfo.h"
50 
51 #include "resources/db/itemdb.h"
52 
53 #include "utils/dtor.h"
54 #include "utils/gettext.h"
55 
56 #include "debug.h"
57 
58 extern int packetVersion;
59 
60 namespace EAthena
61 {
62 
65 
66 namespace CharServerRecv
67 {
68  std::string mNewName;
70 } // namespace CharServerRecv
71 
72 // callers must count each packet size by self
74  Net::Character *const character)
75 {
76  if (character == nullptr)
77  return;
78 
79  const Token &token =
80  static_cast<LoginHandler*>(loginHandler)->getToken();
81 
82  LocalPlayer *const tempPlayer = new LocalPlayer(
83  msg.readBeingId("player id"), BeingTypeId_zero);
84  tempPlayer->setGender(token.sex);
85 
86  PlayerInfoBackend &data = character->data;
87  if (packetVersion >= 20170830)
88  data.mAttributes[Attributes::PLAYER_EXP] = msg.readInt64("exp");
89  else
90  data.mAttributes[Attributes::PLAYER_EXP] = msg.readInt32("exp");
91  data.mAttributes[Attributes::MONEY] = msg.readInt32("money");
92  if (packetVersion >= 20170830)
93  {
94  data.mAttributes[Attributes::PLAYER_JOB_EXP] =
95  msg.readInt64("job exp");
96  }
97  else
98  {
99  data.mAttributes[Attributes::PLAYER_JOB_EXP] =
100  msg.readInt32("job exp");
101  }
102  data.mAttributes[Attributes::PLAYER_JOB_LEVEL] =
103  msg.readInt32("job level");
104 
105  msg.readInt16("shoes?");
106  const int gloves = msg.readInt16("gloves");
107  const int cape = msg.readInt16("cape");
108  const int misc1 = msg.readInt16("misc1");
109 
110  msg.readInt32("option");
111  tempPlayer->setKarma(msg.readInt32("karma"));
112  tempPlayer->setManner(msg.readInt32("manner"));
113  msg.readInt16("left points");
114 
115  if (packetVersion >= 20081217)
116  {
117  data.mAttributes[Attributes::PLAYER_HP] = msg.readInt32("hp");
118  data.mAttributes[Attributes::PLAYER_MAX_HP] = msg.readInt32("max hp");
119  }
120  else
121  {
122  data.mAttributes[Attributes::PLAYER_HP] = msg.readInt16("hp");
123  data.mAttributes[Attributes::PLAYER_MAX_HP] = msg.readInt16("max hp");
124  }
125  data.mAttributes[Attributes::PLAYER_MP] = msg.readInt16("mp/sp");
126  data.mAttributes[Attributes::PLAYER_MAX_MP] = msg.readInt16("max mp/sp");
127 
128  msg.readInt16("speed");
129  const uint16_t race = msg.readInt16("class");
130 // tempPlayer->setSubtype(race, 0);
131  const int hairStyle = msg.readInt16("hair style");
132  if (packetVersion >= 20141022)
133  msg.readInt16("body");
134  const int option A_UNUSED = (msg.readInt16("weapon") | 1) ^ 1;
135  const int weapon = 0;
136 
137  tempPlayer->setSpriteId(SPRITE_BODY,
138  weapon);
139  tempPlayer->setWeaponId(weapon);
140 
141  data.mAttributes[Attributes::PLAYER_BASE_LEVEL] = msg.readInt16("level");
142 
143  msg.readInt16("skill points");
144  const int bottomClothes = msg.readInt16("head bottom");
145  const int shield = msg.readInt16("shild");
146  const int hat = msg.readInt16("head top");
147  const int topClothes = msg.readInt16("head mid");
148 
149  const ItemColor color = fromInt(msg.readInt16("hair color"), ItemColor);
150  tempPlayer->setHairColor(color);
151  if (hairStyle == 0)
152  {
153  tempPlayer->unSetSprite(SPRITE_HAIR_COLOR);
154  }
155  else
156  {
157  tempPlayer->setSpriteColor(SPRITE_HAIR_COLOR,
158  hairStyle * -1,
159  ItemDB::get(-hairStyle).getDyeColorsString(
160  color));
161  }
162 
163  const uint16_t look = msg.readInt16("clothes color");
164  tempPlayer->setSubtype(fromInt(race, BeingTypeId), look);
165  tempPlayer->setName(msg.readString(24, "name"));
166 
167  character->dummy = tempPlayer;
168 
169  character->data.mStats[Attributes::PLAYER_STR].base = msg.readUInt8("str");
170  character->data.mStats[Attributes::PLAYER_AGI].base = msg.readUInt8("agi");
171  character->data.mStats[Attributes::PLAYER_VIT].base = msg.readUInt8("vit");
172  character->data.mStats[Attributes::PLAYER_INT].base = msg.readUInt8("int");
173  character->data.mStats[Attributes::PLAYER_DEX].base = msg.readUInt8("dex");
174  character->data.mStats[Attributes::PLAYER_LUK].base = msg.readUInt8("luk");
175 
176  character->slot = msg.readInt16("character slot id");
177  if (packetVersion >= 20061023)
178  msg.readInt16("rename");
179  if (packetVersion >= 20100803)
180  {
181  msg.readString(16, "map name");
182  msg.readInt32("delete date");
183  }
184  int shoes = 0;
185  if (packetVersion >= 20110111)
186  shoes = msg.readInt32("robe");
187  if (serverVersion == 0)
188  {
189  tempPlayer->setSpriteId(SPRITE_HAIR,
190  shoes);
191  tempPlayer->setSpriteId(SPRITE_SHOES,
192  gloves);
193  tempPlayer->setSpriteId(SPRITE_SHIELD,
194  cape);
195  tempPlayer->setSpriteId(SPRITE_HEAD_TOP,
196  misc1);
197  tempPlayer->setSpriteId(SPRITE_WEAPON,
198  bottomClothes);
199  tempPlayer->setSpriteId(SPRITE_FLOOR,
200  shield);
201  tempPlayer->setSpriteId(SPRITE_CLOTHES_COLOR,
202  hat);
203  tempPlayer->setSpriteId(SPRITE_HEAD_BOTTOM,
204  topClothes);
205 // tempPlayer->setSprite(SPRITE_HEAD_MID, misc2);
206  }
207  if (packetVersion >= 20110928)
208  msg.readInt32("slot change");
209  if (packetVersion >= 20111025)
210  tempPlayer->setRename(msg.readInt32("rename (inverse)") != 0);
211  uint8_t gender = 99U;
212  if (packetVersion >= 20141016)
213  gender = CAST_U8(msg.readUInt8("gender"));
214  if (gender != 99)
215  tempPlayer->setGender(Being::intToGender(gender));
216 }
217 
219 {
220  msg.readInt16("packet len");
221  int slots = 9;
222  int offset = 0;
223  if (packetVersion >= 20100413)
224  {
225  slots = msg.readInt8("MAX_CHARS");
226  msg.readInt8("sd->char_slots");
227  msg.readInt8("MAX_CHARS");
228  offset = 3;
229  }
231 
232  msg.skip(20, "unused 0");
233 
236 
237  // Derive number of characters from message length
238  const int count = (msg.getLength() - 24 - offset)
239  / (106 + 4 + 2 + 16 + 4 + 4 + 4 + 4);
240 
241  for (int i = 0; i < count; ++i)
242  {
243  Net::Character *const character = new Net::Character;
244  readPlayerData(msg, character);
245  Net::CharServerHandler::mCharacters.push_back(character);
246  if (character->dummy != nullptr)
247  {
248  logger->log("CharServer: Player: %s (%d)",
249  character->dummy->getName().c_str(), character->slot);
250  }
251  }
252 
254 }
255 
257 {
258  // ignored
259  msg.readInt16("len");
260  msg.readUInt8("char slots");
261  msg.readUInt8("left slots");
262  msg.readUInt8("left slots");
263  msg.readUInt8("char slots");
264  msg.readUInt8("char slots");
265  msg.skip(20, "unused");
266 }
267 
269 {
270  Network *const network = Network::mInstance;
271  ServerInfo &server = mapServer;
272  BLOCK_START("CharServerRecv::processCharMapInfo")
273  PlayerInfo::setCharId(msg.readInt32("char id"));
274  GameHandler::setMap(msg.readString(16, "map name"));
275  if (config.getBoolValue("usePersistentIP") || settings.persistentIp)
276  {
277  msg.readInt32("map ip address");
278  server.hostname = settings.serverName;
279  }
280  else
281  {
282  server.hostname = ipToString(msg.readInt32("map ip address"));
283  }
284  server.port = msg.readInt16("map ip port");
285  if (msg.getVersion() >= 20170329)
286  {
287  for (int f = 0; f < 32; f ++)
288  msg.readInt32("unused");
289  }
290 
291  // Prevent the selected local player from being deleted
296  Notify_true);
297 
299 
302 
303  if (network != nullptr)
304  network->disconnect();
306  BLOCK_END("CharServerRecv::processCharMapInfo")
307 }
308 
310 {
311  Network *const network = Network::mInstance;
312  ServerInfo &server = mapServer;
313  BLOCK_START("CharServerRecv::processChangeMapServer")
314  if (network == nullptr)
315  {
316  BLOCK_END("CharServerRecv::processChangeMapServer")
317  return;
318  }
319  GameHandler::setMap(msg.readString(16, "map name"));
320  const int x = msg.readInt16("x");
321  const int y = msg.readInt16("y");
322  if (config.getBoolValue("usePersistentIP") || settings.persistentIp)
323  {
324  msg.readInt32("host");
325  server.hostname = settings.serverName;
326  }
327  else
328  {
329  server.hostname = ipToString(msg.readInt32("host"));
330  }
331  server.port = msg.readInt16("port");
332  if (msg.getVersion() >= 20170315)
333  {
334  for (int f = 0; f < 32; f ++)
335  msg.readInt32("unknown");
336  }
337 
338  network->disconnect();
340  if (localPlayer != nullptr)
341  {
343  localPlayer->setMap(nullptr);
344  }
345  BLOCK_END("CharServerRecv::processChangeMapServer")
346 }
347 
349 {
350  pincodeManager.setSeed(msg.readUInt32("pincode seed"));
351  pincodeManager.setAccountId(msg.readBeingId("account id"));
354  msg.readInt16("state"))) == false)
355  {
357  }
358 }
359 
361 {
362  pincodeManager.setSeed(msg.readUInt32("pincode seed"));
363  pincodeManager.setAccountId(msg.readBeingId("account id"));
364  const uint16_t state = CAST_U16(msg.readInt16("state"));
365  pincodeManager.setPincodeLockFlag(msg.readInt16("flag") == 0);
366  if (pincodeManager.processPincodeStatus(state) == false)
367  {
369  }
370 }
371 
373 {
374  // UNIMPLEMENTEDPACKET
375  msg.readInt16("state");
376  msg.readInt32("seed");
377 }
378 
380 {
381  // UNIMPLEMENTEDPACKET
382  msg.readInt16("state");
383  msg.readInt32("seed");
384 }
385 
387 {
388  BLOCK_START("CharServerRecv::processCharCreate")
389  Net::Character *const character = new Net::Character;
390  readPlayerData(msg, character);
391  Net::CharServerHandler::mCharacters.push_back(character);
392 
394 
395  // Close the character create dialog
398  BLOCK_END("CharServerRecv::processCharCreate")
399 }
400 
402 {
403  if (msg.readInt16("flag") != 0)
404  {
405  createOutPacket(CMSG_CHAR_RENAME);
406  outMsg.writeBeingId(mRenameId, "char id");
407  }
408  else
409  {
411  // TRANSLATORS: error header
412  _("Error"),
413  // TRANSLATORS: error message
414  _("Character rename error."),
415  // TRANSLATORS: ok dialog button
416  _("Error"),
418  Modal_true,
420  nullptr,
421  260);
422  }
423 }
424 
426 {
427  const int flag = msg.readInt16("flag");
428  if (flag == 0)
429  {
431  mRenameId,
432  mNewName);
434  // TRANSLATORS: info header
435  _("Info"),
436  // TRANSLATORS: info message
437  _("Character renamed."),
438  // TRANSLATORS: ok dialog button
439  _("OK"),
441  Modal_true,
443  nullptr,
444  260);
445  }
446  else
447  {
448  std::string message;
449  switch (flag)
450  {
451  case 1:
452  // TRANSLATORS: char rename error
453  message = _("Rename not allowed.");
454  break;
455  case 2:
456  // TRANSLATORS: char rename error
457  message = _("New name is not set.");
458  break;
459  case 3:
460  default:
461  // TRANSLATORS: char rename error
462  message = _("Character rename error.");
463  break;
464  case 4:
465  // TRANSLATORS: char rename error
466  message = _("Character not found.");
467  break;
468  }
470  // TRANSLATORS: info message
471  _("Info"),
472  message,
473  // TRANSLATORS: ok dialog button
474  _("OK"),
476  Modal_true,
478  nullptr,
479  260);
480  }
481 }
482 
484 {
486  msg.readInt16("len");
487  msg.readInt16("flag"); // 0 - ok, 1 - error
488  msg.readInt16("unused");
489 }
490 
492 {
493  BLOCK_START("CharServerRecv::processCharDeleteFailed")
495  msg.readUInt8("error");
497  // TRANSLATORS: error header
498  _("Error"),
499  // TRANSLATORS: error message
500  _("Failed to delete character."),
501  // TRANSLATORS: ok dialog button
502  _("OK"),
504  Modal_true,
506  nullptr,
507  260);
508  BLOCK_END("CharServerRecv::processCharDeleteFailed")
509 }
510 
512 {
514  msg.readInt16("5");
515  msg.readUInt8("1");
516 }
517 
519 {
521  msg.readInt32("char id");
522  msg.readInt32("result");
523  // for packets before 20130000, this is raw time
524  // in other case raw time - time(NULL)
525  msg.readInt32("time");
526 }
527 
529 {
531  msg.readInt32("char id");
532  msg.readInt32("result");
533 }
534 
536 {
538  msg.readInt32("char id");
539  msg.readInt32("result");
540 }
541 
543 {
544  msg.readInt16("packet len");
545 
548 
549  // Derive number of characters from message length
550  const int count = (msg.getLength() - 4)
551  / (106 + 4 + 2 + 16 + 4 + 4 + 4 + 4);
552 
553  for (int i = 0; i < count; ++i)
554  {
555  Net::Character *const character = new Net::Character;
556  readPlayerData(msg, character);
557  Net::CharServerHandler::mCharacters.push_back(character);
558  if (character->dummy != nullptr)
559  {
560  logger->log("CharServer: Player: %s (%d)",
561  character->dummy->getName().c_str(), character->slot);
562  }
563  }
564 
566 }
567 
569 {
571  const int count = (msg.readInt16("len") - 4) / 24;
572  for (int f = 0; f < count; f ++)
573  {
574  msg.readInt32("char id");
575  msg.readString(20, "unbun time");
576  }
577 }
578 
579 } // namespace EAthena
Attributes::PLAYER_MP
@ PLAYER_MP
Definition: attributes.h:33
Net::MessageIn
Definition: messagein.h:40
Ea::Network::disconnect
void disconnect()
Definition: network.cpp:138
EAthena::Network
Definition: network.h:37
serverVersion
int serverVersion
Definition: client.cpp:123
LocalPlayer::setRename
void setRename(const bool r)
Definition: localplayer.h:421
Attributes::PLAYER_JOB_EXP
@ PLAYER_JOB_EXP
Definition: attributes.h:65
playerhandler.h
PlayerInfoBackend::mStats
StatMap mStats
Definition: playerinfo.h:73
Settings::serverName
std::string serverName
Definition: settings.h:113
EAthena::CharServerRecv::processCharLogin
void processCharLogin(Net::MessageIn &msg)
Definition: charserverrecv.cpp:218
EAthena::CharServerRecv::processCharRename
void processCharRename(Net::MessageIn &msg)
Definition: charserverrecv.cpp:425
BeingId
int BeingId
Definition: beingid.h:29
LoginData::characterSlots
uint16_t characterSlots
Definition: logindata.h:76
EAthena
Definition: guildtab.cpp:40
Attributes::PLAYER_EXP
@ PLAYER_EXP
Definition: attributes.h:35
charserverrecv.h
Attributes::PLAYER_VIT
@ PLAYER_VIT
Definition: attributes.h:43
Being::unSetSprite
void unSetSprite(const unsigned int slot)
Definition: being.cpp:2858
settings.h
Window::scheduleDelete
virtual void scheduleDelete()
Definition: window.cpp:830
DialogType::ERROR
@ ERROR
Definition: dialogtype.h:33
EAthena::Network::mInstance
static Network * mInstance
Definition: network.h:56
loginData
LoginData loginData
Definition: client.cpp:184
Net::CharServerHandler::mCharacters
static Net::Characters mCharacters
Definition: charserverhandler.h:106
itemdb.h
SPRITE_SHIELD
@ SPRITE_SHIELD
Definition: sprite.h:36
UNIMPLEMENTEDPACKET
#define UNIMPLEMENTEDPACKET
Definition: logger.h:55
protocolout.h
State::CHAR_SELECT
@ CHAR_SELECT
Definition: state.h:46
ServerInfo::port
uint16_t port
Definition: serverinfo.h:57
BeingTypeId
int BeingTypeId
Definition: beingtypeid.h:29
Token
Definition: token.h:29
PlayerInfo::setBackend
void setBackend(const PlayerInfoBackend &backend)
Definition: playerinfo.cpp:375
settings
Settings settings
Definition: settings.cpp:31
Attributes::PLAYER_HP
@ PLAYER_HP
Definition: attributes.h:31
Actions::msg
bool msg(InputEvent &event)
Definition: chat.cpp:38
OkDialog
Definition: okdialog.h:43
EAthena::CharServerRecv::processChangeMapServer
void processChangeMapServer(Net::MessageIn &msg)
Definition: charserverrecv.cpp:309
Ea::GameHandler::setMap
static void setMap(const std::string &map)
Definition: gamehandler.cpp:45
charcreatedialog.h
charserverhandler.h
Attributes::PLAYER_MAX_HP
@ PLAYER_MAX_HP
Definition: attributes.h:32
Net::Character
Definition: character.h:39
Attributes::PLAYER_JOB_LEVEL
@ PLAYER_JOB_LEVEL
Definition: attributes.h:40
Being::intToGender
static GenderT intToGender(const uint8_t sex) A_CONST
Definition: being.h:942
playerHandler
Net::PlayerHandler * playerHandler
Definition: net.cpp:95
DialogType::OK
@ OK
Definition: dialogtype.h:32
SPRITE_WEAPON
@ SPRITE_WEAPON
Definition: sprite.h:30
EAthena::CharServerRecv::processCharDeleteFailed
void processCharDeleteFailed(Net::MessageIn &msg)
Definition: charserverrecv.cpp:491
EAthena::CharServerRecv::processCharChangeSlot
void processCharChangeSlot(Net::MessageIn &msg)
Definition: charserverrecv.cpp:483
A_UNUSED
#define A_UNUSED
Definition: localconsts.h:159
pincodeManager
PincodeManager pincodeManager
Definition: pincodemanager.cpp:41
PlayerInfo::setStatBase
void setStatBase(const AttributesT id, const int value, const Notify notify)
Definition: playerinfo.cpp:142
EAthena::CharServerRecv::processCharDelete2AcceptActual
void processCharDelete2AcceptActual(Net::MessageIn &msg)
Definition: charserverrecv.cpp:528
SPRITE_CLOTHES_COLOR
@ SPRITE_CLOTHES_COLOR
Definition: sprite.h:35
iteminfo.h
Attributes::PLAYER_INT
@ PLAYER_INT
Definition: attributes.h:44
Attributes::PLAYER_DEX
@ PLAYER_DEX
Definition: attributes.h:45
network.h
LocalPlayer::setTileCoords
void setTileCoords(const int x, const int y)
Definition: localplayer.cpp:2662
Net::CharServerHandler::mCharSelectDialog
static CharSelectDialog * mCharSelectDialog
Definition: charserverhandler.h:108
Being::setGender
virtual void setGender(const GenderT gender)
Definition: being.cpp:3578
ServerInfo::hostname
std::string hostname
Definition: serverinfo.h:44
logger
Logger * logger
Definition: logger.cpp:88
EAthena::CharServerRecv::processCharLogin2
void processCharLogin2(Net::MessageIn &msg)
Definition: charserverrecv.cpp:256
CAST_U8
#define CAST_U8
Definition: cast.h:26
Client::setState
void setState(const StateT state)
Definition: client.h:65
State::CONNECT_GAME
@ CONNECT_GAME
Definition: state.h:47
ipToString
const char * ipToString(const uint32_t address)
Definition: stringutils.cpp:85
localPlayer
LocalPlayer * localPlayer
Definition: localplayer.cpp:108
messageout.h
EAthena::CharServerRecv::processCharCheckRename
void processCharCheckRename(Net::MessageIn &msg)
Definition: charserverrecv.cpp:401
EAthena::CharServerRecv::processPincodeEditStatus
void processPincodeEditStatus(Net::MessageIn &msg)
Definition: charserverrecv.cpp:379
Being::getName
const std::string & getName() const
Definition: being.h:231
Net::CharServerHandler::unlockCharSelectDialog
static void unlockCharSelectDialog()
Definition: charserverhandler.cpp:42
pincodemanager.h
Being::setSpriteColor
void setSpriteColor(const unsigned int slot, const int id, const std::string &color)
Definition: being.cpp:2887
EAthena::mapServer
ServerInfo mapServer
Definition: charserverrecv.cpp:64
SPRITE_HAIR_COLOR
@ SPRITE_HAIR_COLOR
Definition: sprite.h:34
Notify_true
const bool Notify_true
Definition: notify.h:29
character.h
BeingTypeId_zero
const BeingTypeId BeingTypeId_zero
Definition: beingtypeid.h:29
Actions::hat
bool hat(InputEvent &event)
Definition: chat.cpp:61
data
uint32_t data
Definition: maptypeproperty2.h:3
SPRITE_HEAD_BOTTOM
@ SPRITE_HEAD_BOTTOM
Definition: sprite.h:31
Net::Character::slot
uint16_t slot
Definition: character.h:57
createwidget.h
gettext.h
Token::sex
GenderT sex
Definition: token.h:43
Being::setKarma
void setKarma(const int karma)
Definition: being.h:1034
Being::setSubtype
void setSubtype(const BeingTypeId subtype, const uint16_t look)
Definition: being.cpp:370
Attributes::PLAYER_STR
@ PLAYER_STR
Definition: attributes.h:41
x
x
Definition: graphics_calcImageRect.hpp:72
EAthena::CharServerRecv::processPincodeMakeStatus
void processPincodeMakeStatus(Net::MessageIn &msg)
Definition: charserverrecv.cpp:372
EAthena::CharServerRecv::processCharCaptchaNotSupported
void processCharCaptchaNotSupported(Net::MessageIn &msg)
Definition: charserverrecv.cpp:511
EAthena::CharServerRecv::processPincodeStatus2
void processPincodeStatus2(Net::MessageIn &msg)
Definition: charserverrecv.cpp:360
Attributes::PLAYER_BASE_LEVEL
@ PLAYER_BASE_LEVEL
Definition: attributes.h:30
PincodeManager::setPincodeLockFlag
void setPincodeLockFlag(const bool flag)
Definition: pincodemanager.h:63
LocalPlayer
Definition: localplayer.h:49
loginHandler
Net::LoginHandler * loginHandler
Definition: net.cpp:89
ItemColor
uint16_t ItemColor
Definition: itemcolor.h:29
Attributes::MONEY
@ MONEY
Definition: attributes.h:37
charselectdialog.h
CAST_U16
#define CAST_U16
Definition: cast.h:28
ItemDbType::SPRITE_HAIR
@ SPRITE_HAIR
Definition: itemdbtype.h:46
EAthena::CharServerRecv::processCharMapInfo
void processCharMapInfo(Net::MessageIn &msg)
Definition: charserverrecv.cpp:268
config
Configuration config
Definition: configuration.cpp:51
Being::setManner
void setManner(const int manner)
Definition: being.h:1040
ShowCenter_true
const bool ShowCenter_true
Definition: showcenter.h:29
createOutPacket
#define createOutPacket(name)
Definition: messageout.h:36
Attributes::PLAYER_MAX_MP
@ PLAYER_MAX_MP
Definition: attributes.h:34
delete_all
void delete_all(Container &c)
Definition: dtor.h:55
State::CHANGE_MAP
@ CHANGE_MAP
Definition: state.h:49
SPRITE_BODY
@ SPRITE_BODY
Definition: sprite.h:38
EAthena::CharServerRecv::processCharCreate
void processCharCreate(Net::MessageIn &msg)
Definition: charserverrecv.cpp:386
Attributes::PLAYER_WALK_SPEED
@ PLAYER_WALK_SPEED
Definition: attributes.h:52
SPRITE_SHOES
@ SPRITE_SHOES
Definition: sprite.h:37
charServerHandler
Net::CharServerHandler * charServerHandler
Definition: net.cpp:84
loginhandler.h
Being::setSpriteId
void setSpriteId(const unsigned int slot, const int id)
Definition: being.cpp:2786
EAthena::CharServerRecv::processCharDelete2CancelAck
void processCharDelete2CancelAck(Net::MessageIn &msg)
Definition: charserverrecv.cpp:535
Net::CharServerHandler::mSelectedCharacter
static Net::Character * mSelectedCharacter
Definition: charserverhandler.h:112
PincodeManager::setAccountId
void setAccountId(const BeingId id)
Definition: pincodemanager.h:57
configuration.h
PlayerInfoBackend
Definition: playerinfo.h:61
restrict
#define restrict
Definition: localconsts.h:164
client
Client * client
Definition: client.cpp:117
fromInt
#define fromInt(val, name)
Definition: intdefines.h:45
Being::setName
void setName(const std::string &name)
Definition: being.cpp:1135
Net::CharServerHandler::clear
virtual void clear() const =0
Modal_true
const bool Modal_true
Definition: modal.h:29
BLOCK_START
#define BLOCK_START(name)
Definition: perfomance.h:78
gamehandler.h
BLOCK_END
#define BLOCK_END(name)
Definition: perfomance.h:79
Net::CharServerHandler::mCharCreateDialog
static CharCreateDialog * mCharCreateDialog
Definition: charserverhandler.h:109
okdialog.h
packetVersion
int packetVersion
Definition: client.cpp:124
Net::Character::dummy
LocalPlayer * dummy
Definition: character.h:55
EAthena::CharServerRecv::mNewName
std::string mNewName
Definition: charserverrecv.cpp:68
EAthena::CharServerRecv::processPincodeStatus
void processPincodeStatus(Net::MessageIn &msg)
Definition: charserverrecv.cpp:348
PincodeManager::setSeed
void setSeed(const uint32_t seed)
Definition: pincodemanager.h:54
Net::PlayerHandler::getDefaultWalkSpeed
virtual int getDefaultWalkSpeed() const =0
ItemDB::get
const ItemInfo & get(const int id)
Definition: itemdb.cpp:792
EAthena::CharServerRecv::readPlayerData
void readPlayerData(Net::MessageIn &msg, Net::Character *const character)
Definition: charserverrecv.cpp:73
dtor.h
EAthena::CharServerRecv::processCharBanCharList
void processCharBanCharList(Net::MessageIn &msg)
Definition: charserverrecv.cpp:568
BeingId_zero
const BeingId BeingId_zero
Definition: beingid.h:29
_
#define _(s)
Definition: gettext.h:34
Net::CharServerHandler::updateCharSelectDialog
static void updateCharSelectDialog()
Definition: charserverhandler.cpp:36
Being::setHairColor
void setHairColor(const unsigned int slot, const ItemColor color)
Definition: being.cpp:3386
LocalPlayer::setMap
void setMap(Map *const map)
Definition: localplayer.cpp:1828
PincodeManager::processPincodeStatus
bool processPincodeStatus(const uint16_t state)
Definition: pincodemanager.cpp:267
ServerInfo
Definition: serverinfo.h:36
sprite.h
PlayerInfo::setCharId
void setCharId(const int charId)
Definition: playerinfo.cpp:380
EAthena::CharServerRecv::processCharDelete2Ack
void processCharDelete2Ack(Net::MessageIn &msg)
Definition: charserverrecv.cpp:518
token.h
Net::Character::data
PlayerInfoBackend data
Definition: character.h:56
SPRITE_FLOOR
@ SPRITE_FLOOR
Definition: sprite.h:39
y
y
Definition: graphics_calcImageRect.hpp:72
EAthena::LoginHandler
Definition: loginhandler.h:31
CharSelectDialog::setName
void setName(const BeingId id, const std::string &newName)
Definition: charselectdialog.cpp:658
client.h
Attributes::PLAYER_LUK
@ PLAYER_LUK
Definition: attributes.h:46
EAthena::CharServerRecv::processCharCharacters
void processCharCharacters(Net::MessageIn &msg)
Definition: charserverrecv.cpp:542
Being::setWeaponId
void setWeaponId(const int id)
Definition: being.cpp:3132
SPRITE_HEAD_TOP
@ SPRITE_HEAD_TOP
Definition: sprite.h:32
Logger::log
void log(const char *const log_text,...)
Definition: logger.cpp:268
debug.h
CREATEWIDGET
#define CREATEWIDGET(type,...)
Definition: createwidget.h:28
Settings::persistentIp
bool persistentIp
Definition: settings.h:152
Attributes::PLAYER_AGI
@ PLAYER_AGI
Definition: attributes.h:42
EAthena::charServer
ServerInfo charServer
Definition: charserverrecv.cpp:63
Configuration::getBoolValue
bool getBoolValue(const std::string &key) const
Definition: configuration.cpp:596
EAthena::CharServerRecv::mRenameId
BeingId mRenameId
Definition: charserverrecv.cpp:69