From fa2383b7cb1fb53c2411af6bd04c4dbda4c7d3cb Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sun, 4 Jan 2015 17:56:56 +0300 Subject: eathena: allow set race in char creation dialog. --- src/net/eathena/charserverhandler.cpp | 3 +++ src/net/eathena/serverfeatures.cpp | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) (limited to 'src/net') diff --git a/src/net/eathena/charserverhandler.cpp b/src/net/eathena/charserverhandler.cpp index 4bb2c6533..49cde4480 100644 --- a/src/net/eathena/charserverhandler.cpp +++ b/src/net/eathena/charserverhandler.cpp @@ -36,6 +36,7 @@ #include "net/character.h" #include "net/logindata.h" +#include "net/serverfeatures.h" #include "net/eathena/gamehandler.h" #include "net/eathena/loginhandler.h" @@ -280,6 +281,8 @@ void CharServerHandler::newCharacter(const std::string &name, const int slot, outMsg.writeInt8(static_cast(slot), "slot"); outMsg.writeInt16(static_cast(hairColor), "hair color"); outMsg.writeInt16(static_cast(hairstyle), "hair style"); + if (serverFeatures->haveRaceSelection()) + outMsg.writeInt16(static_cast(race), "race"); } void CharServerHandler::deleteCharacter(Net::Character *const character) diff --git a/src/net/eathena/serverfeatures.cpp b/src/net/eathena/serverfeatures.cpp index f787c638f..fca96cc4f 100644 --- a/src/net/eathena/serverfeatures.cpp +++ b/src/net/eathena/serverfeatures.cpp @@ -87,7 +87,7 @@ bool ServerFeatures::haveIncompleteChatMessages() const bool ServerFeatures::haveRaceSelection() const { - return false; + return serverVersion >= 4; } bool ServerFeatures::haveLookSelection() const -- cgit v1.2.3-70-g09d2