summaryrefslogtreecommitdiff
path: root/src/net/charserverhandler.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/net/charserverhandler.cpp')
-rw-r--r--src/net/charserverhandler.cpp16
1 files changed, 14 insertions, 2 deletions
diff --git a/src/net/charserverhandler.cpp b/src/net/charserverhandler.cpp
index d3ad0d92..2af3fe07 100644
--- a/src/net/charserverhandler.cpp
+++ b/src/net/charserverhandler.cpp
@@ -32,10 +32,16 @@
#include "../log.h"
#include "../logindata.h"
#include "../main.h"
+#include "../extensions.h"
#include "../gui/ok_dialog.h"
#include "../gui/char_select.h"
+/*
+ * Yeah, this is a global. Get over it.
+ */
+struct EXTENSIONS extensions;
+
CharServerHandler::CharServerHandler():
mCharCreateDialog(0)
{
@@ -56,6 +62,7 @@ CharServerHandler::CharServerHandler():
void CharServerHandler::handleMessage(MessageIn *msg)
{
int slot;
+ int flags;
LocalPlayer *tempPlayer;
logger->log("CharServerHandler: Packet ID: %x, Length: %d",
@@ -63,8 +70,13 @@ void CharServerHandler::handleMessage(MessageIn *msg)
switch (msg->getId())
{
case 0x006b:
- // Skip length word and an additional mysterious 20 bytes
- msg->skip(2 + 20);
+ msg->skip(2); // Length word
+ flags = msg->readInt32(); // Aethyra extensions flags
+ logger->log("Server flags are: %x", flags);
+ extensions.aethyra_inventory = (bool)(flags & 0x01);
+ extensions.aethyra_spells = (bool)(flags & 0x02);
+ extensions.aethyra_misc = (bool)(flags & 0x04);
+ msg->skip(16); // Unused
// Derive number of characters from message length
n_character = (msg->getLength() - 24) / 106;