diff options
author | Wushin <pasekei@gmail.com> | 2015-04-29 22:42:04 -0500 |
---|---|---|
committer | Wushin <pasekei@gmail.com> | 2015-04-29 22:42:04 -0500 |
commit | f3c12939d5ba0dcbc4dcca4bb0384a55d776b2c8 (patch) | |
tree | aff755e961e1a0fbcc9d7f1d0bde2d93b4800dc0 /src/map/chrif.cpp | |
parent | c7f0a0dbb9fe0cb42b0516ae1d4d60f72bd4ebb5 (diff) | |
parent | f6bc49ce199bf3c60f2c319698f84d9064dd8616 (diff) | |
download | tmwa-f3c12939d5ba0dcbc4dcca4bb0384a55d776b2c8.tar.gz tmwa-f3c12939d5ba0dcbc4dcca4bb0384a55d776b2c8.tar.bz2 tmwa-f3c12939d5ba0dcbc4dcca4bb0384a55d776b2c8.tar.xz tmwa-f3c12939d5ba0dcbc4dcca4bb0384a55d776b2c8.zip |
Merge pull request #58 from mekolat/changesex
change sex without disconnecting
Diffstat (limited to 'src/map/chrif.cpp')
-rw-r--r-- | src/map/chrif.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/map/chrif.cpp b/src/map/chrif.cpp index 24369ed..3ffeaf2 100644 --- a/src/map/chrif.cpp +++ b/src/map/chrif.cpp @@ -568,15 +568,14 @@ void chrif_changedsex(Session *, const Packet_Fixed<0x2b0d>& fixed) { if (sd->status.inventory[i].nameid && bool(sd->status.inventory[i].equip)) - pc_unequipitem(sd, i, CalcStatus::NOW); + pc_unequipitem(sd, i, CalcStatus::LATER); } + pc_calcstatus(sd, 0); // save character chrif_save(sd); sd->login_id1++; // change identify, because if player come back in char within the 5 seconds, he can change its characters // do same modify in login-server for the account, but no in char-server (it ask again login_id1 to login, and don't remember it) - clif_displaymessage(sd->sess, - "Your sex has been changed (need disconexion by the server)..."_s); - clif_setwaitclose(sd->sess); // forced to disconnect for the change + clif_fixpcpos(sd); // use clif_set0078_main_1d8 to send new sex to the client } } else |