///////////////////////////////////////////////////////////////////////////////////////////////////// //bool EquipSkill(int, int) // //Equips the skill specified by id to the specified skill slot // //Returns false if the character does not know the skill or the skill is equipped in the other slot// ///////////////////////////////////////////////////////////////////////////////////////////////////// public bool EquipSkill(int id, int slot) { if (!actionSkills.Contains(SkillData.GetNode(id))) { return(false); } if (slot == 0) { if (skill2 != null && skill2.GetID() == id) { return(false); } skill1 = SkillData.GetNode(id); } else if (slot == 1) { if (skill1 != null && skill1.GetID() == id) { return(false); } skill2 = SkillData.GetNode(id); } return(true); }