summaryrefslogtreecommitdiff
path: root/src/net/ea/beinghandler.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/net/ea/beinghandler.cpp')
-rw-r--r--src/net/ea/beinghandler.cpp19
1 files changed, 15 insertions, 4 deletions
diff --git a/src/net/ea/beinghandler.cpp b/src/net/ea/beinghandler.cpp
index 8803fafb..dbfc0f3b 100644
--- a/src/net/ea/beinghandler.cpp
+++ b/src/net/ea/beinghandler.cpp
@@ -25,6 +25,7 @@
#include "beingmanager.h"
#include "client.h"
#include "effectmanager.h"
+#include "guild.h"
#include "localplayer.h"
#include "log.h"
#include "npc.h"
@@ -106,7 +107,7 @@ void BeingHandler::handleMessage(Net::MessageIn &msg)
int param1;
int stunMode;
Uint32 statusEffects;
- int type;
+ int type, guild;
Uint16 status;
Being *srcBeing, *dstBeing;
Player *player;
@@ -179,9 +180,19 @@ void BeingHandler::handleMessage(Net::MessageIn &msg)
hairColor = msg.readInt16();
shoes = msg.readInt16(); // clothes color - "abused" as shoes
gloves = msg.readInt16(); // head dir - "abused" as gloves
- msg.readInt16(); // guild
- msg.readInt16(); // unknown
- msg.readInt16(); // unknown
+ guild = msg.readInt32(); // guild
+ if (player)
+ {
+ if (guild == 0)
+ {
+ player->clearGuilds();
+ }
+ else
+ {
+ player->addGuild(Guild::getGuild(guild));
+ }
+ }
+ msg.readInt16(); // guild emblem
msg.readInt16(); // manner
dstBeing->setStatusEffectBlock(32, msg.readInt16()); // opt3
msg.readInt8(); // karma