コード例 #1
0
        //---------------------------------------------------------------------
        // 根据玩家Guid获取指定玩家信息
        async Task <PlayerInfoOther> ICellPlayerService.getPlayerInfoOther(string et_player_guid)
        {
            string query = string.Format(@"SELECT {0}, {1}, {2}, {3}, {4}, {5}, {6}, {7}, {8}, {9}, {10}, {11}, {12} FROM Fishing as PlayerInfoOther
               WHERE entity_type='EtPlayer' and {13}=$1 LIMIT 1;"
                                         , "entity_guid"
                                         , "list_component[0].def_propset.ActorId"
                                         , "list_component[0].def_propset.NickName"
                                         , "list_component[0].def_propset.Icon"
                                         , "list_component[0].def_propset.Level"
                                         , "list_component[0].def_propset.Experience"
                                         , "list_component[0].def_propset.Chip"
                                         , "list_component[0].def_propset.Gold"
                                         , "list_component[0].def_propset.IndividualSignature"
                                         , "list_component[0].def_propset.ProfileSkinTableId"
                                         , "list_component[0].def_propset.IpAddress"
                                         , "list_component[0].def_propset.IsVIP"
                                         , "list_component[0].def_propset.VIPPoint"
                                         , "entity_guid");

            var query_request = QueryRequest.Create(query)
                                .ScanConsistency(ScanConsistency.RequestPlus)
                                .AddPositionalParameter(et_player_guid);
            var result = await DbClientCouchbase.Instance.Bucket.QueryAsync <PlayerInfoOther>(query_request);

            if (result.Success && result.Rows.Count > 0)
            {
                PlayerInfoOther q = result.Rows[0];
                if (q != null && !string.IsNullOrEmpty(q.player_etguid))
                {
                    if (string.IsNullOrEmpty(q.nick_name))
                    {
                        q.nick_name = EbTool.jsonDeserialize <string>(q.nick_name);
                    }

                    if (string.IsNullOrEmpty(q.icon))
                    {
                        q.icon = EbTool.jsonDeserialize <string>(q.icon);
                    }

                    if (string.IsNullOrEmpty(q.ip_address))
                    {
                        q.ip_address = EbTool.jsonDeserialize <string>(q.ip_address);
                    }

                    if (string.IsNullOrEmpty(q.individual_signature))
                    {
                        q.individual_signature = EbTool.jsonDeserialize <string>(q.individual_signature);
                    }

                    return(q);
                }
            }

            PlayerInfoOther player_info = new PlayerInfoOther();

            return(player_info);
        }
コード例 #2
0
        //-------------------------------------------------------------------------
        void _createPlayerInfoUi(PlayerInfoOther player_info)
        {
            if (player_info == null)
            {
                EbLog.Note("PlayerInfo Is Null");
                return;
            }

            var tb_profile = EbDataMgr.Instance.getData <TbDataPlayerProfileSkin>(player_info.profileskin_tableid);

            if (tb_profile != null)
            {
                //UiMbPlayerProfileOther ui_profileother = UiMgr.Instance.createUi<UiMbPlayerProfileOther>(
                //_eUiLayer.MessgeBox, true, null, null, tb_profile.ProfileSkinPrefabName);
                //ui_profileother.setPlayerInfo(player_info);
            }
        }