Exemple #1
0
        public string relogin(string unionid, string token, string openid, string client_uuid)
        {
            playerproxy _proxy = get_player_unionid(unionid);

            if (_proxy != null)
            {
                string old_uuid = _proxy.relogin(client_uuid, token);

                if (!_proxy.player_info.ContainsKey("openid"))
                {
                    _proxy.player_info["openid"] = openid;
                    _proxy.update_player_to_db(new List <string> {
                        "openid"
                    });
                }

                if (players_uuid.ContainsKey(old_uuid))
                {
                    players_uuid.Remove(old_uuid);
                }

                players_uuid.Add(client_uuid, _proxy);

                return(old_uuid);
            }

            return("");
        }
Exemple #2
0
        public string relogin(string token, string client_uuid)
        {
            playerproxy _proxy = get_player_token(token);

            if (_proxy != null)
            {
                string old_uuid = _proxy.relogin(client_uuid);

                if (players_uuid.ContainsKey(old_uuid))
                {
                    players_uuid.Remove(old_uuid);
                }
                else
                {
                    Console.WriteLine("relogin:error player register info");
                }

                players_uuid.Add(client_uuid, _proxy);

                return(old_uuid);
            }

            return("");
        }