コード例 #1
0
 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();
 }
コード例 #2
0
ファイル: SkillCollection.cs プロジェクト: uvbs/Asda2-Server
 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();
 }
コード例 #3
0
        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();
        }
コード例 #4
0
ファイル: SkillCollection.cs プロジェクト: primax/WCell
		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();
		}