internal void OnRemove(Skill skill) { ByField.Remove(skill.PlayerField); if (skill.SkillLine.Category == SkillCategory.Profession && FreeProfessions < SkillHandler.MaxProfessionsPerChar) { ++FreeProfessions; } m_owner.SetUInt32(skill.PlayerField, 0U); m_owner.SetUInt32(skill.PlayerField + 1, 0U); m_owner.SetUInt32(skill.PlayerField + 2, 0U); if (SkillHandler.RemoveAbilitiesWithSkill) { skill.RemoveAllAbilities(); } skill.Record.DeleteLater(); }
internal void OnRemove(Skill skill) { this.ByField.Remove(skill.PlayerField); if (skill.SkillLine.Category == SkillCategory.Profession && this.FreeProfessions < SkillHandler.MaxProfessionsPerChar) { ++this.FreeProfessions; } this.m_owner.SetUInt32((UpdateFieldId)skill.PlayerField, 0U); this.m_owner.SetUInt32((UpdateFieldId)(skill.PlayerField + 1), 0U); this.m_owner.SetUInt32((UpdateFieldId)(skill.PlayerField + 2), 0U); if (SkillHandler.RemoveAbilitiesWithSkill) { skill.RemoveAllAbilities(); } skill.Record.DeleteLater(); }
internal void OnRemove(Skill skill) { ByField.Remove(skill.PlayerField); if (skill.SkillLine.Category == SkillCategory.Profession && FreeProfessions < SkillHandler.MaxProfessionsPerChar) { FreeProfessions++; } // reset the skill field m_owner.SetUInt32(skill.PlayerField, 0); m_owner.SetUInt32(skill.PlayerField + 1, 0); m_owner.SetUInt32(skill.PlayerField + 2, 0); // remove all skill-related spells if (SkillHandler.RemoveAbilitiesWithSkill) { skill.RemoveAllAbilities(); } skill.Record.DeleteLater(); }
internal void OnRemove(Skill skill) { ByField.Remove(skill.PlayerField); if (skill.SkillLine.Category == SkillCategory.Profession && FreeProfessions < SkillHandler.MaxProfessionsPerChar) { FreeProfessions++; } // reset the skill field m_owner.SetUInt32(skill.PlayerField, 0); m_owner.SetUInt32(skill.PlayerField + 1, 0); m_owner.SetUInt32(skill.PlayerField + 2, 0); // remove all skill-related spells if (SkillHandler.RemoveAbilitiesWithSkill) { skill.RemoveAllAbilities(); } skill.Record.DeleteAndFlush(); }