示例#1
0
        public static GR5_Persona GetPersona(ClientInfo client)
        {
            List <List <string> > results = GetQueryResults("SELECT * FROM personas WHERE pid=" + client.PID);

            foreach (List <string> entry in results)
            {
                GR5_Persona p = new GR5_Persona();
                p.PersonaID             = client.PID;
                p.Name                  = client.name;
                p.PortraitID            = Convert.ToUInt32(entry[3]);
                p.DecoratorID           = Convert.ToUInt32(entry[4]);
                p.AvatarBackgroundColor = Convert.ToUInt32(entry[5]);
                p.GRCash                = Convert.ToUInt32(entry[6]);
                p.IGC = Convert.ToUInt32(entry[7]);
                p.AchievementPoints   = Convert.ToUInt32(entry[8]);
                p.LastUsedCharacterID = Convert.ToByte(entry[9]);
                p.MaxInventorySlot    = Convert.ToUInt32(entry[10]);
                p.MaxScrapYardSlot    = Convert.ToUInt32(entry[11]);
                p.GhostRank           = Convert.ToUInt32(entry[12]);
                p.Flag = Convert.ToUInt32(entry[13]);
                return(p);
            }
            return(null);
        }
 public RMCPacketResponsePlayerProfileService_LoadCharacterProfiles(ClientInfo client)
 {
     persona    = DBHelper.GetPersona(client);
     characters = DBHelper.GetCharacters(client.PID);
 }