Exemplo n.º 1
0
        public static Buff CreatingBuff(string name, string tech, int value, int countdown)
        {
            ulong stId   = MainStorage.GetValueOf("LatestBuffId");
            ulong Id     = (ulong)Convert.ToInt32(stId) + 1;
            var   result = from i in buffs
                           where i.ID == Id
                           select i;
            var buf = result.FirstOrDefault();

            if (buf == null)
            {
                buf = CreateBuff(Id, name, tech, value, countdown);
            }
            return(buf);
        }
Exemplo n.º 2
0
        public static Item CreatingItem(string name, string type, bool active, int value, string rarity,
                                        int countdown, string description)
        {
            ulong stId   = MainStorage.GetValueOf("LatestItemId");
            ulong Id     = (ulong)Convert.ToInt32(stId) + 1;
            var   result = from i in items
                           where i.ID == Id
                           select i;
            var item = result.FirstOrDefault();

            name = name.Replace("-", " ");
            if (item == null)
            {
                item = CreateItem(Id, name, type, active, value, rarity, countdown, description);
            }
            return(item);
        }
Exemplo n.º 3
0
        public static Quiz CreatingQuiz(string type, string imageUrl, string fullImage, string diff, string correct)
        {
            ulong stId = MainStorage.GetValueOf("LatestQuizId");

            ulong Id     = (ulong)Convert.ToInt32(stId) + 1;
            var   result = from i in quizzes
                           where i.ID == Id
                           select i;
            var quiz = result.FirstOrDefault();

            if (quiz == null)
            {
                if (fullImage.Equals("x") || fullImage.Equals("X"))
                {
                    fullImage = "";
                }
                quiz = CreateQuiz(Id, type, imageUrl, fullImage, diff, correct);
            }
            return(quiz);
        }