summaryrefslogtreecommitdiff
path: root/src/map/clif.cpp
diff options
context:
space:
mode:
authormekolat <mekolat@users.noreply.github.com>2016-04-24 13:06:34 -0400
committermekolat <mekolat@users.noreply.github.com>2016-04-24 13:06:34 -0400
commitd007bb6c7b519137585c53373ec085b57528b17d (patch)
tree8a090167bec29d2eb85a330901f620f4e28d6b20 /src/map/clif.cpp
parent881e3c06581f566f626f0c7d4da7724ff7a6d6a4 (diff)
downloadtmwa-d007bb6c7b519137585c53373ec085b57528b17d.tar.gz
tmwa-d007bb6c7b519137585c53373ec085b57528b17d.tar.bz2
tmwa-d007bb6c7b519137585c53373ec085b57528b17d.tar.xz
tmwa-d007bb6c7b519137585c53373ec085b57528b17d.zip
fix npc gender for ManaPlus
Diffstat (limited to 'src/map/clif.cpp')
-rw-r--r--src/map/clif.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/map/clif.cpp b/src/map/clif.cpp
index 31ecaf8..81ae02f 100644
--- a/src/map/clif.cpp
+++ b/src/map/clif.cpp
@@ -913,7 +913,15 @@ void clif_npc0078(dumb_ptr<npc_data> nd, Buffer& buf)
fixed_78.pos.x = nd->bl_x;
fixed_78.pos.y = nd->bl_y;
fixed_78.pos.dir = nd->dir;
- fixed_78.sex = nd->sex;
+
+ // ManaPlus uses a different sex enum for npcs...
+ if (nd->sex == SEX::FEMALE)
+ fixed_78.sex = SEX::UNSPECIFIED;
+ else if (nd->sex == SEX::MALE)
+ fixed_78.sex = SEX::NEUTRAL;
+ else if (nd->sex == SEX::NEUTRAL)
+ fixed_78.sex = SEX::__OTHER;
+
buf = create_fpacket<0x0078, 54>(fixed_78);
}