diff options
author | Andrei Karas <akaras@inbox.ru> | 2011-02-09 02:15:27 +0200 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2011-02-09 02:15:27 +0200 |
commit | 155a69a7f5a0c382bea9eb4cef9891a812ecd3f0 (patch) | |
tree | 21659b2e21504a630f2f92f3d957988377000668 /src | |
parent | 720de33be616d2fad06ec627b309f253c544f6c1 (diff) | |
download | manaplus-155a69a7f5a0c382bea9eb4cef9891a812ecd3f0.tar.gz manaplus-155a69a7f5a0c382bea9eb4cef9891a812ecd3f0.tar.bz2 manaplus-155a69a7f5a0c382bea9eb4cef9891a812ecd3f0.tar.xz manaplus-155a69a7f5a0c382bea9eb4cef9891a812ecd3f0.zip |
Implement npc gender.
Diffstat (limited to 'src')
-rw-r--r-- | src/net/tmwa/beinghandler.cpp | 15 |
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) { |