本文整理汇总了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);
}
示例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;
}
}
}