Пример #1
0
        public MobGroup(MonsterGenerator.RoomType roomType, int id, int minLevel, int maxLevel, int minWorld, int maxWorld, int frequency, MonsterGenerator.RegionSize minRegionSize, MonsterGenerator.RegionSize maxRegionSize)
        {
            this.roomType = roomType;

            this.id            = id;
            this.minLevel      = minLevel;
            this.maxLevel      = maxLevel;
            this.minWorld      = minWorld;
            this.maxWorld      = maxWorld;
            this.frequency     = frequency;
            this.minRegionSize = minRegionSize;
            this.maxRegionSize = maxRegionSize;
        }
Пример #2
0
        public MobData(int mobId, int idParent, string monsterType, int count, int level, int chance, string location, string roomSize, bool exclude, MonsterGenerator.RegionSize minSize)
        {
            this.mobId    = mobId;
            this.idParent = idParent;
            this.count    = count;
            this.level    = level;
            this.chance   = chance;
            this.exclude  = exclude;
            this.minSize  = minSize;

            this.monsterTypeName = monsterType;

            /*try
             * {
             *      this.type = (MonsterId)Enum.Parse(typeof(MonsterId), monsterType);
             * }
             * catch (Exception)
             * {
             *      throw new Exception("neznamy typ moba " + monsterType);
             * }*/

            this.roomSize = (MapRoom.RoomType)Enum.Parse(typeof(MapRoom.RoomType), roomSize.ToUpper());

            switch (location)
            {
            case "center":
                this.location = MapRoom.DIRECTION_CENTER;
                break;

            case "left":
                this.location = MapRoom.DIRECTION_LEFT;
                break;

            case "right":
                this.location = MapRoom.DIRECTION_RIGHT;
                break;

            case "up":
                this.location = MapRoom.DIRECTION_UP;
                break;

            case "down":
                this.location = MapRoom.DIRECTION_DOWN;
                break;

            case "largest":
                this.location = MapRoom.DIRECTION_LARGEST_ROOM;
                break;
            }
        }