예제 #1
0
        public PcTemplate(ClassId classId, StatsSet set) : base(set)
        {
            ClassId = classId;

            BaseSwimSpd = set.GetInt("swimSpd", 1);

            FallingHeight = set.GetInt("falling_height", 333);

            CollisionRadiusFemale = set.GetDouble("radiusFemale");
            CollisionHeightFemale = set.GetDouble("heightFemale");

            SpawnX = set.GetInt("spawnX");
            SpawnY = set.GetInt("spawnY");
            SpawnZ = set.GetInt("spawnZ");

            ClassBaseLevel = set.GetInt("baseLvl");

            string[] hpTable = set.GetString("hpTable").Split(';');

            HpTable = new double[hpTable.Length];

            for (int i = 0; i < hpTable.Length; i++)
            {
                HpTable[i] = double.Parse(hpTable[i]);
            }

            string[] mpTable = set.GetString("mpTable").Split(';');

            MpTable = new double[mpTable.Length];
            for (int i = 0; i < mpTable.Length; i++)
            {
                MpTable[i] = double.Parse(mpTable[i]);
            }

            string[] cpTable = set.GetString("cpTable").Split(';');

            CpTable = new double[cpTable.Length];
            for (int i = 0; i < cpTable.Length; i++)
            {
                CpTable[i] = double.Parse(cpTable[i]);
            }
        }
예제 #2
0
        public PcTemplate(ClassId classId, StatsSet set) : base(set)
        {
            DefaultInventory = set.GetString("items")?.Split(';').Select(int.Parse).ToList() ?? new List <int>();
            ClassId          = classId;

            BaseSwimSpeed = set.GetInt("swimSpd", 1);

            FallingHeight = set.GetInt("falling_height", 333);

            CollisionRadiusFemale = set.GetDouble("radiusFemale");
            CollisionHeightFemale = set.GetDouble("heightFemale");

            SpawnX = set.GetInt("spawnX");
            SpawnY = set.GetInt("spawnY");
            SpawnZ = set.GetInt("spawnZ");

            BaseLevel = set.GetInt("baseLvl");

            HpTable = set.GetString("hpTable").Split(';').Select(double.Parse).ToArray();
            MpTable = set.GetString("mpTable").Split(';').Select(double.Parse).ToArray();
            CpTable = set.GetString("cpTable").Split(';').Select(double.Parse).ToArray();
        }
예제 #3
0
파일: StatsSet.cs 프로젝트: LFBRxD/L2dotNET
 public StatsSet(StatsSet set) : base(set)
 {
 }
예제 #4
0
        //private Dictionary<int, L2Skill> _skills = new Dictionary<>();
        //private Dictionary<EventType, List<Quest>> _questEvents = new Dictionary<>();

        public NpcTemplate(StatsSet set) : base(set)
        {
            NpcId                 = set.GetInt("id");
            IdTemplate            = set.GetInt("idTemplate", NpcId);
            Type                  = set.GetString("type");
            Name                  = set.GetString("name");
            Title                 = set.GetString("title", string.Empty);
            CantBeChampionMonster = Title.EqualsIgnoreCase("Quest Monster");
            Level                 = set.GetByte("level", 1);
            Exp           = set.GetInt("exp");
            Sp            = set.GetInt("sp");
            RHand         = set.GetInt("rHand");
            LHand         = set.GetInt("lHand");
            EnchantEffect = set.GetInt("enchant");
            CorpseTime    = set.GetInt("corpseTime", 7);
            Hp            = set.GetDouble("hp");
            Mp            = set.GetDouble("mp");

            DropHerbGroup = set.GetInt("dropHerbGroup");
            //if (_dropHerbGroup > 0 && HerbDropTable.getInstance().getHerbDroplist(_dropHerbGroup) == null)
            //{
            //    _log.warning($"Missing dropHerbGroup information for npcId: {_npcId}, dropHerbGroup: {_dropHerbGroup});
            //    _dropHerbGroup = 0;
            //}

            if (set.ContainsKey("raceId"))
            {
                race = (Race)set.GetInt("raceId");
            }

            //_aiType = set.GetEnumerator(new "aiType", AIType.DEFAULT);

            SsCount    = set.GetInt("ssCount");
            SsRate     = set.GetInt("ssRate");
            SpsCount   = set.GetInt("spsCount");
            SpsRate    = set.GetInt("spsRate");
            AggroRange = set.GetInt("aggro");

            if (set.ContainsKey("clan"))
            {
                Clans     = set.GetStringArray("clan");
                ClanRange = set.GetInt("clanRange");

                if (set.ContainsKey("ignoredIds"))
                {
                    IgnoredIds = set.GetIntegerArray("ignoredIds");
                }
            }

            CanMove    = set.GetBool("canMove", true);
            IsSeedable = set.GetBool("seedable");

            // _categories = set.getList("drops");
            // _minions = set.getList("minions");

            //if (set.containsKey("teachTo"))
            //{
            // for (int classId : set.getIntegerArray("teachTo"))

            //addTeachInfo(ClassId.Values.classId]);
            //}

            //addSkills(set.getList("skills"));
        }