Beispiel #1
0
        public MazeItem(int id, int level)
        {
            mlevel = level;
            this.Id = id;
            MazeItemConfig = ConfigData.GetMazeItemConfig(id);
            type = MazeItemConfig.Type;
            infos = new int[MazeItemConfig.Info.Length];
            Array.Copy(MazeItemConfig.Info, infos, infos.Length);

            if (type == "ritem")
            {
                type = "item";
                infos[0] = HItemBook.GetRandRareMid(infos[0]);
            }
            else if (type == "rmon")
            {
                type = "mon";
                infos[0] = infos[NarlonLib.Math.MathTool.GetRandom(0, infos.Length)];
                infos[1] = 0;
            }
            else if (type == "rresource")
            {
                type = "resource";
                infos[0] = NarlonLib.Math.MathTool.GetRandom(2, 8);
            }
        }
Beispiel #2
0
        public MazeItem(int id, int level)
        {
            mlevel         = level;
            this.Id        = id;
            MazeItemConfig = ConfigData.GetMazeItemConfig(id);
            type           = MazeItemConfig.Type;
            infos          = new int[MazeItemConfig.Info.Length];
            Array.Copy(MazeItemConfig.Info, infos, infos.Length);

            if (type == "ritem")
            {
                type     = "item";
                infos[0] = HItemBook.GetRandRareItemId(HItemRandomGroups.Fight, infos[0]);
            }
            else if (type == "rmon")
            {
                type     = "mon";
                infos[0] = infos[NarlonLib.Math.MathTool.GetRandom(0, infos.Length)];
                infos[1] = 0;
            }
            else if (type == "rresource")
            {
                type     = "resource";
                infos[0] = NarlonLib.Math.MathTool.GetRandom(2, 8);
            }
        }