From 920e18c1b959780bbcea5d289c1c766239449776 Mon Sep 17 00:00:00 2001
From: mekolat <mekolat@gmail.com>
Date: Thu, 16 Apr 2015 18:50:36 -0400
Subject: deprecate builtin changesex

---
 src/map/pc.cpp         |  3 +--
 src/map/script-fun.cpp | 15 ---------------
 2 files changed, 1 insertion(+), 17 deletions(-)

diff --git a/src/map/pc.cpp b/src/map/pc.cpp
index 1e840ea..60f8da7 100644
--- a/src/map/pc.cpp
+++ b/src/map/pc.cpp
@@ -3520,8 +3520,7 @@ int pc_setparam(dumb_ptr<map_session_data> sd, SP type, int val)
             }
             break;
         case SP::SEX:
-            // this is a really bad idea
-            sd->sex = static_cast<SEX>(val);
+            chrif_char_ask_name(AccountId(), sd->status_key.name, 5, HumanTimeDiff());
             break;
         case SP::WEIGHT:
             sd->weight = val;
diff --git a/src/map/script-fun.cpp b/src/map/script-fun.cpp
index 3b814aa..65f8d2b 100644
--- a/src/map/script-fun.cpp
+++ b/src/map/script-fun.cpp
@@ -1986,20 +1986,6 @@ void builtin_resetstatus(ScriptState *st)
     pc_resetstate(sd);
 }
 
-/*==========================================
- * 性別変換
- *------------------------------------------
- */
-static
-void builtin_changesex(ScriptState *st)
-{
-    dumb_ptr<map_session_data> sd = nullptr;
-    sd = script_rid2sd(st);
-
-    chrif_char_ask_name(AccountId(), sd->status_key.name, 5, HumanTimeDiff()); // type: 5 - changesex
-    chrif_save(sd);
-}
-
 /*==========================================
  * RIDのアタッチ
  *------------------------------------------
@@ -3167,7 +3153,6 @@ BuiltinFunction builtin_functions[] =
     BUILTIN(sc_check, "i"_s, 'i'),
     BUILTIN(debugmes, "s"_s, '\0'),
     BUILTIN(resetstatus, ""_s, '\0'),
-    BUILTIN(changesex, ""_s, '\0'),
     BUILTIN(attachrid, "i"_s, 'i'),
     BUILTIN(detachrid, ""_s, '\0'),
     BUILTIN(isloggedin, "i"_s, 'i'),
-- 
cgit v1.2.3-70-g09d2