From 056aef958fb762526ba119379d46d5c2f1dd200c Mon Sep 17 00:00:00 2001 From: mekolat Date: Thu, 16 Apr 2015 11:09:09 -0400 Subject: change sex without disconnecting --- src/map/chrif.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src/map/chrif.cpp') diff --git a/src/map/chrif.cpp b/src/map/chrif.cpp index bf4ae4e..ec008b3 100644 --- a/src/map/chrif.cpp +++ b/src/map/chrif.cpp @@ -615,9 +615,7 @@ void chrif_changedsex(Session *, const Packet_Fixed<0x2b0d>& fixed) 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 -- cgit v1.2.3-70-g09d2 From f6bc49ce199bf3c60f2c319698f84d9064dd8616 Mon Sep 17 00:00:00 2001 From: mekolat Date: Fri, 17 Apr 2015 08:24:55 -0400 Subject: do not recalc all at once --- src/map/chrif.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/map/chrif.cpp') diff --git a/src/map/chrif.cpp b/src/map/chrif.cpp index ec008b3..fc60ca7 100644 --- a/src/map/chrif.cpp +++ b/src/map/chrif.cpp @@ -609,8 +609,9 @@ 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 -- cgit v1.2.3-70-g09d2