summaryrefslogtreecommitdiff
path: root/src/net/tmwa/beinghandler.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/net/tmwa/beinghandler.cpp')
-rw-r--r--src/net/tmwa/beinghandler.cpp20
1 files changed, 13 insertions, 7 deletions
diff --git a/src/net/tmwa/beinghandler.cpp b/src/net/tmwa/beinghandler.cpp
index c5979e9f..d2fd4695 100644
--- a/src/net/tmwa/beinghandler.cpp
+++ b/src/net/tmwa/beinghandler.cpp
@@ -33,9 +33,9 @@
#include "playerrelations.h"
#include "net/net.h"
-#include "net/playerhandler.h"
#include "net/tmwa/messagein.h"
#include "net/tmwa/messageout.h"
+#include "net/tmwa/playerhandler.h"
#include "net/tmwa/protocol.h"
#include "resources/emotedb.h"
@@ -107,6 +107,12 @@ static Being *createBeing(int id, short job)
outMsg.writeInt32(id);
}
+ if (type == ActorSprite::NPC)
+ {
+ auto playerHandler = static_cast<TmwAthena::PlayerHandler*>(Net::getPlayerHandler());
+ playerHandler->applyQuestStatusEffects(being);
+ }
+
return being;
}
@@ -211,7 +217,8 @@ void BeingHandler::handleMessage(MessageIn &msg)
return;
int id;
- short job, gender;
+ short job;
+ SEX sex;
float speed;
Uint16 headTop, headMid, headBottom;
Uint16 shoes, gloves;
@@ -299,12 +306,11 @@ void BeingHandler::handleMessage(MessageIn &msg)
msg.readInt16(); // manner
opt3 = msg.readInt16();
msg.readInt8(); // karma
- gender = msg.readInt8();
+ sex = static_cast<SEX>(msg.readInt8());
if (dstBeing->getType() == ActorSprite::PLAYER)
{
- dstBeing->setGender(gender == 0 ? Gender::Female
- : Gender::Male);
+ dstBeing->setGender(sexToGender(sex));
// Set these after the gender, as the sprites may be gender-specific
dstBeing->setSprite(SPRITE_HAIR, hairStyle * -1,
hairDB.getHairColor(hairColor));
@@ -525,8 +531,8 @@ void BeingHandler::handleMessage(MessageIn &msg)
dstBeing->setSprite(SPRITE_MISC2, id);
break;
default:
- logger->log("SMSG_BEING_CHANGE_LOOKS2: unsupported type: "
- "%d, id: %d", static_cast<int>(type), id);
+ Log::info("SMSG_BEING_CHANGE_LOOKS2: unsupported type: "
+ "%d, id: %d", static_cast<int>(type), id);
break;
}
}