summaryrefslogtreecommitdiff
path: root/src/map/script.c
diff options
context:
space:
mode:
authorHaru <haru@dotalux.com>2015-02-02 23:43:38 +0100
committerHaru <haru@dotalux.com>2015-04-25 19:10:13 +0200
commitcb3652004f979f2efd3ea3ad397e306165ada79b (patch)
tree69b580467d7717b7b224be19c66df9562cff2d0c /src/map/script.c
parent81942b7de445204ca2b197817298cc14b78cc00d (diff)
downloadhercules-cb3652004f979f2efd3ea3ad397e306165ada79b.tar.gz
hercules-cb3652004f979f2efd3ea3ad397e306165ada79b.tar.bz2
hercules-cb3652004f979f2efd3ea3ad397e306165ada79b.tar.xz
hercules-cb3652004f979f2efd3ea3ad397e306165ada79b.zip
Fixed @changesex issues on PACKETVERs that don't support per-character sex.
- Fixes bugreport:8504 http://hercules.ws/board/tracker/issue-8504-changesex/ - Existing database entries with an incorrect per-character sex will be fixed automatically when the character logs in to match the account's sex, if the PACKETVER doesn't support per-character sex. Signed-off-by: Haru <haru@dotalux.com>
Diffstat (limited to 'src/map/script.c')
-rw-r--r--src/map/script.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/src/map/script.c b/src/map/script.c
index ed9345678..b7fdf1596 100644
--- a/src/map/script.c
+++ b/src/map/script.c
@@ -11244,7 +11244,7 @@ BUILDIN(changesex)
TBL_PC *sd = prepareChangeSex(st);
if (sd == NULL)
return false;
- chrif->changesex(sd);
+ chrif->changesex(sd, true);
return true;
}
@@ -11256,12 +11256,7 @@ BUILDIN(changecharsex)
TBL_PC *sd = prepareChangeSex(st);
if (sd == NULL)
return false;
- if (sd->status.sex == 99)
- sd->status.sex = 0;
- sd->status.sex = sd->status.sex ? 0 : 1;
- chrif->save(sd, 0);
- if (sd->fd)
- clif->authfail_fd(sd->fd, 15);
+ chrif->changesex(sd, false);
return true;
}