コード例 #1
0
        /// <summary>
        /// Takes old level and new level to handle .modify level
        /// </summary>
        /// <param name="oldLevel"></param>
        /// <param name="newLevel"></param>
        public void OnPlayerLeveled(byte oldLevel, byte newLevel)
        {
            List <AbilityInfo> newAbilities = AbilityMgr.GetAvailableCareerAbilities(((Player)_unitOwner).Info.CareerLine, oldLevel + 1, newLevel);

            _abilities.AddRange(newAbilities);

            foreach (AbilityInfo ab in newAbilities)
            {
                _abilitySet.Add(ab.Entry);
            }

            SendMasteryPointsUpdate();
            SendAbilityLevels();
        }
コード例 #2
0
        private void LoadCareerAbilities()
        {
            _abilities = AbilityMgr.GetAvailableCareerAbilities(_playerOwner.Info.CareerLine, 0, _playerOwner.Level);

            foreach (AbilityInfo ab in _abilities)
            {
                _abilitySet.Add(ab.Entry);
            }

            List <AbilityInfo> masteryAbilities = AbilityMgr.GetMasteryAbilities(_playerOwner.Info.CareerLine);

            foreach (AbilityInfo ab in masteryAbilities)
            {
                byte entry = (byte)((ab.ConstantInfo.PointCost - 1) / 2 - 1);
                _masteryAbilities[ab.ConstantInfo.MasteryTree - 1, entry] = ab;

                if (_activeSkillsInTree[ab.ConstantInfo.MasteryTree - 1, entry] == 1)
                {
                    _abilities.Add(ab);
                    _abilitySet.Add(ab.Entry);
                }
            }
        }