当前位置: 首页>>代码示例>>C#>>正文


C# Character.FindRequiredRootSkill方法代码示例

本文整理汇总了C#中Saga.PrimaryTypes.Character.FindRequiredRootSkill方法的典型用法代码示例。如果您正苦于以下问题:C# Character.FindRequiredRootSkill方法的具体用法?C# Character.FindRequiredRootSkill怎么用?C# Character.FindRequiredRootSkill使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Saga.PrimaryTypes.Character的用法示例。


在下文中一共展示了Character.FindRequiredRootSkill方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: PostLoad

        public void PostLoad(Character character)
        {
            //Apply character configuration
            Singleton.CharacterConfiguration.ApplyConfiguration(character);

            //Update strength
            character._status.MaxPAttack += (ushort)(2 * character.stats.BASE.strength);
            character._status.MinPAttack += (ushort)(1 * character.stats.BASE.strength);
            character._status.MaxHP += (ushort)(10 * character.stats.BASE.strength);
            character._status.BasePHitrate += (ushort)(1 * character.stats.BASE.dexterity);
            character._status.BasePCritrate += (ushort)(1 * character.stats.BASE.dexterity);
            character._status.MaxMAttack += (ushort)(6 * character.stats.BASE.intelligence);
            character._status.MinMAttack += (ushort)(3 * character.stats.BASE.intelligence);
            character._status.BaseRHitrate += (ushort)(1 * character.stats.BASE.intelligence);
            character._status.MaxRAttack += (ushort)(4 * character.stats.BASE.concentration);
            character._status.MinRAttack += (ushort)(2 * character.stats.BASE.concentration);
            character._status.BasePHitrate += (ushort)(2 * character.stats.BASE.concentration);

            //Apply skill information
            for (int i = 0; i < 16; i++)
            {
                Skill skill = character.SpecialSkills[i];
                if (skill != null && skill.info != null)
                {
                    i += (skill.info.special - 1);
                    if (skill.info.skilltype == 2)
                        Singleton.Additions.ApplyAddition(skill.info.addition, character);
                }
            }

            //Apply weapon information
            int WeaponIndex = (character.weapons.ActiveWeaponIndex == 1) ? character.weapons.SeconairyWeaponIndex : character.weapons.PrimaryWeaponIndex;
            if (WeaponIndex < character.weapons.UnlockedWeaponSlots)
            {
                Weapon CurrentWeapon = character.weapons[WeaponIndex];

                if (CurrentWeapon != null)
                    if (character.FindRequiredRootSkill(CurrentWeapon.Info.weapon_skill))
                    {
                        //Default battle additions
                        character._status.MaxWMAttack += (ushort)CurrentWeapon.Info.max_magic_attack;
                        character._status.MinWMAttack += (ushort)CurrentWeapon.Info.min_magic_attack;
                        character._status.MaxWPAttack += (ushort)CurrentWeapon.Info.max_short_attack;
                        character._status.MinWPAttack += (ushort)CurrentWeapon.Info.min_short_attack;
                        character._status.MaxWRAttack += (ushort)CurrentWeapon.Info.max_range_attack;
                        character._status.MinWRAttack += (ushort)CurrentWeapon.Info.min_range_attack;

                        //Reapplies alterstone additions
                        for (int i = 0; i < 8; i++)
                        {
                            uint addition = CurrentWeapon.Slots[i];
                            if (addition > 0)
                            {
                                Singleton.Additions.ApplyAddition(addition, character);
                            }
                        }

                        CurrentWeapon._active = 1;
                    }
                    else
                    {
                        CurrentWeapon._active = 0;
                    }
            }

            Common.Internal.CharacterCheckCapacities(character);
        }
开发者ID:ELMASTERS,项目名称:SagaRevised,代码行数:67,代码来源:Managers.Database.cs

示例2: DoWeaponary

        /// <summary>
        /// Helper method that reappplies the weapon's effects.
        /// </summary>
        /// <remarks>
        /// Because this requires the skills to be loaded this
        /// method should be loaded after the character has finished
        /// loading.
        /// </remarks>
        /// <param name="character"></param>
        private void DoWeaponary(Character character)
        {
            int WeaponIndex = (character.weapons.ActiveWeaponIndex == 1) ? character.weapons.SeconairyWeaponIndex : character.weapons.PrimaryWeaponIndex;
            if (WeaponIndex < character.weapons.UnlockedWeaponSlots)
            {
                Weapon CurrentWeapon = character.weapons[WeaponIndex];
                if (character.FindRequiredRootSkill(CurrentWeapon.Info.weapon_skill))
                {
                    //Default battle additions
                    character._status.MaxWMAttack += (ushort)CurrentWeapon.Info.max_magic_attack;
                    character._status.MinWMAttack += (ushort)CurrentWeapon.Info.min_magic_attack;
                    character._status.MaxWPAttack += (ushort)CurrentWeapon.Info.max_short_attack;
                    character._status.MinWPAttack += (ushort)CurrentWeapon.Info.min_short_attack;
                    character._status.MaxWRAttack += (ushort)CurrentWeapon.Info.max_range_attack;
                    character._status.MinWRAttack += (ushort)CurrentWeapon.Info.min_range_attack;

                    //Reapplies alterstone additions
                    for (int i = 0; i < 8; i++)
                    {
                        uint addition = CurrentWeapon.Slots[i];
                        if (addition > 0)
                        {
                            Singleton.Additions.ApplyAddition(addition, character);
                        }
                    }

                    CurrentWeapon._active = 1;
                }
                else
                {
                    CurrentWeapon._active = 0;
                }
            }
        }
开发者ID:ELMASTERS,项目名称:SagaRevised,代码行数:43,代码来源:Managers.Database.cs


注:本文中的Saga.PrimaryTypes.Character.FindRequiredRootSkill方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。