示例#1
0
    /// <summary>
    /// Adds a skill to the available skills list.
    /// </summary>
    /// <param name="skillIndex">Index of the skill to add</param>
    public void AcquireSkill(byte skillIndex)
    {
        // Try to give this character the skill
        Skill gottenSkill = _skillHoldRef.GiveSkill(this, skillIndex);

        // Make sure its a valid skill
        if (gottenSkill != null)
        {
            _availableSkills.Add(gottenSkill);
        }

        // Call the OnSkillGain event
        OnSkillGain?.Invoke();
    }
示例#2
0
 public static void InvokeOnSkillGain(Mobile mob, Skill skill, int gained)
 {
     OnSkillGain?.Invoke(mob, skill, gained);
 }