summaryrefslogtreecommitdiff
path: root/src/net
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2011-02-09 02:15:27 +0200
committerAndrei Karas <akaras@inbox.ru>2011-02-09 02:15:27 +0200
commit155a69a7f5a0c382bea9eb4cef9891a812ecd3f0 (patch)
tree21659b2e21504a630f2f92f3d957988377000668 /src/net
parent720de33be616d2fad06ec627b309f253c544f6c1 (diff)
downloadmv-155a69a7f5a0c382bea9eb4cef9891a812ecd3f0.tar.gz
mv-155a69a7f5a0c382bea9eb4cef9891a812ecd3f0.tar.bz2
mv-155a69a7f5a0c382bea9eb4cef9891a812ecd3f0.tar.xz
mv-155a69a7f5a0c382bea9eb4cef9891a812ecd3f0.zip
Implement npc gender.
Diffstat (limited to 'src/net')
-rw-r--r--src/net/tmwa/beinghandler.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/net/tmwa/beinghandler.cpp b/src/net/tmwa/beinghandler.cpp
index 9c75689a4..f1d31a145 100644
--- a/src/net/tmwa/beinghandler.cpp
+++ b/src/net/tmwa/beinghandler.cpp
@@ -297,6 +297,21 @@ void BeingHandler::handleMessage(Net::MessageIn &msg)
if (!config.getBoolValue("hideShield"))
dstBeing->setSprite(SPRITE_SHIELD, shield);
}
+ else if (dstBeing->getType() == ActorSprite::NPC)
+ {
+ switch (gender)
+ {
+ case 2:
+ dstBeing->setGender(GENDER_FEMALE);
+ break;
+ case 3:
+ dstBeing->setGender(GENDER_MALE);
+ break;
+ default:
+ dstBeing->setGender(GENDER_UNSPECIFIED);
+ break;
+ }
+ }
if (msg.getId() == SMSG_BEING_MOVE)
{