From 155a69a7f5a0c382bea9eb4cef9891a812ecd3f0 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Wed, 9 Feb 2011 02:15:27 +0200 Subject: Implement npc gender. --- src/net/tmwa/beinghandler.cpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'src/net/tmwa') 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) { -- cgit v1.2.3-70-g09d2