Exemplo n.º 1
0
        internal string DisplayRaceInfo(CharacterEnums.CharacterRace charRace)
        {
            BsonDocument  doc = GrabFromDatabase("Characters", "General", "_id", "RaceInfo");
            StringBuilder sb  = DisplayInfo(doc, charRace.ToString());

            sb.AppendLine(DisplayConfirmSelection());

            return(sb.ToString());
        }
Exemplo n.º 2
0
        internal string AskForHeight(CharacterEnums.CharacterRace race)
        {
            //will probably want to do some logic for the weight ranges and calculate them on the fly based on build, height and race?
            BsonDocument doc = _generalCollection.FindOneAs <BsonDocument>(Query.EQ("_id", "Heights")).AsBsonDocument;
            BsonArray    arr = doc["Types"].AsBsonArray;
            double       min = 0.0d, max = 0.0d;

            foreach (BsonDocument height in arr)
            {
                if (height["Name"] == race.ToString().ToUpper())
                {
                    min = height["Min"].AsDouble; //these need to be converted to doubles in DB
                    max = height["Max"].AsDouble;
                    break;
                }
            }

            return("Enter your height (inches)(range:" + min + "-" + max + ")");
        }