diff options
author | gumi <git@gumi.ca> | 2020-07-30 13:43:48 -0400 |
---|---|---|
committer | gumi <git@gumi.ca> | 2020-07-30 13:43:48 -0400 |
commit | 0f3d3493e5442728b42a27b89150c7aaa5c7e884 (patch) | |
tree | 9ded3358c865db1731d7357007e45b178824a9d7 /src | |
parent | 6d131f828e155ab0ed56d582cee1130291ab4a60 (diff) | |
download | plugin-0f3d3493e5442728b42a27b89150c7aaa5c7e884.tar.gz plugin-0f3d3493e5442728b42a27b89150c7aaa5c7e884.tar.bz2 plugin-0f3d3493e5442728b42a27b89150c7aaa5c7e884.tar.xz plugin-0f3d3493e5442728b42a27b89150c7aaa5c7e884.zip |
allow servers to not use sex/gender
Diffstat (limited to 'src')
-rw-r--r-- | src/emap/script.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/emap/script.c b/src/emap/script.c index eec0df3..d2a64e4 100644 --- a/src/emap/script.c +++ b/src/emap/script.c @@ -97,6 +97,12 @@ void escript_hardcoded_constants_pre(void) script->set_constant("GENDER_MALE", GENDER_MALE, false, false); script->set_constant("GENDER_HIDDEN", GENDER_HIDDEN, false, false); + // for servers that do not use sex/gender + script->set_constant("BodyType", SP_SEX, true, false); + script->set_constant("BODYTYPE_1", GENDER_HIDDEN, false, false); + script->set_constant("BODYTYPE_2", GENDER_FEMALE, false, false); + script->set_constant("BODYTYPE_3", GENDER_MALE, false, false); + // npc subtypes script->set_constant("NPCSUBTYPE_WARP", WARP, false, false); script->set_constant("NPCSUBTYPE_SHOP", SHOP, false, false); @@ -165,6 +171,14 @@ void eset_reg_npcscope_num_pre(struct script_state **stPtr, clif->spawn(&nd->bl); hookStop(); } + else if (!strcmp(name, ".bodytype")) + { + getExt1(); + clif->clearunit_area(&nd->bl, CLR_OUTSIGHT); + nd->vd.sex = *val; + clif->spawn(&nd->bl); + hookStop(); + } else if (!strcmp(name, ".distance")) { getExt1(); @@ -276,6 +290,12 @@ int eget_val_npcscope_num_pre(struct script_state **stPtr, hookStop(); return nd->vd.sex; } + else if (!strcmp(name, ".bodytype")) + { + getExt1Return(0); + hookStop(); + return nd->vd.sex; + } else if (!strcmp(name, ".distance")) { getExt1Return(0); |