Beispiel #1
0
        public static string getPlayerName(OcPl __instance)
        {
            //acquire playername
            string   playername = null;
            OcPlMng  plmng      = OcPlMng.Inst;
            OcNetMng ntmng      = OcNetMng.Inst;

            if (plmng != null)
            {
                if (__instance.CharaMakeData != null)
                {
                    playername = __instance.CharaMakeData.Name;
                }
                if (playername == null || playername.Length == 0 || playername == "no name")
                {
                    int netid = plmng.getNetPlId(__instance);
                    if (netid != -1)
                    {
                        playername = ntmng.getPlName(netid);
                    }
                }
            }

            if (playername == null || playername == "no name")
            {
                UnityEngine.Debug.LogWarning("プレイヤー名の取得に失敗しました");
                return(null);
            }

            return(playername);
        }
Beispiel #2
0
        public static string getPlayerName(OcPl __instance)
        {
            //acquire playername
            string   playername = null;
            OcPlMng  plmng      = OcPlMng.Inst;
            OcNetMng ntmng      = OcNetMng.Inst;

            if (plmng != null)
            {
                if (__instance.CharaMakeData != null)
                {
                    playername = __instance.CharaMakeData.Name;
                }
                if (playername == null || playername.Length == 0)
                {
                    int netid = plmng.getNetPlId(__instance);
                    if (netid != -1)
                    {
                        playername = ntmng.getPlName(netid);
                    }
                }
            }
            return(playername);
        }