public static void Add(long uid, SkillBase creature) { m_dicSkill[uid] = creature; }
public CSkillInfo(CCreature creature, int index, int skillId, int lv, bool subSkill = false, CSkillInfo mainSkill = null) { m_creature = creature; m_skillId = skillId; m_skillIndex = index; SkillCsv skill = CsvManager.Inst.GetCsv <SkillCsv>((int)eAllCSV.eAC_Skill); m_skillInfo = skill.GetData(skillId); m_skillLv = lv; int skillDataId = skill.GetSkillDataIdByLv(skillId, lv); SkillDataCsv dataCsv = CsvManager.Inst.GetCsv <SkillDataCsv>((int)eAllCSV.eAC_SkillData); m_skillDataInfo = dataCsv.GetData(skillDataId); if (m_skillDataInfo == null) { return; } if (GetCDType() == (int)eSkillCdType.Time) { m_curCdTime = m_skillDataInfo.cd; } // 技能附加击中BUFF for (int i = 0; i < m_skillDataInfo.atkBuffList.Length; i++) { if (m_skillDataInfo.atkBuffList[i] == 0) { continue; } BuffBase buff = SkillBase.AddBuff(m_creature, m_creature, m_skillDataInfo.atkBuffList[i], Vector2d.zero, Vector2d.zero, Vector2d.zero, index); if (buff != null) { buff.m_dieDestroy = false; m_buffList.Add(buff); } } // 技能附加受击BUFF for (int i = 0; i < m_skillDataInfo.hitBuffList.Length; i++) { if (m_skillDataInfo.hitBuffList[i] == 0) { continue; } BuffBase buff = SkillBase.AddBuff(m_creature, m_creature, m_skillDataInfo.hitBuffList[i], Vector2d.zero, Vector2d.zero, Vector2d.zero, index); if (buff != null) { buff.m_dieDestroy = false; m_buffList.Add(buff); } } #region 包含子技能的部分 m_mainSkill = mainSkill; if (subSkill) { return; } if (m_skillInfo.subSkill != null && m_skillInfo.subSkill.Length > 0 && m_skillInfo.subSkill[0] != 0) { m_bCondiSubSkill = true; m_nearCommon = new CSkillInfo[m_skillInfo.subSkill.Length]; for (int i = 0; i < m_skillInfo.subSkill.Length; i++) { int sSkillId = m_skillInfo.subSkill[i]; CSkillInfo info = new CSkillInfo(m_creature, index, sSkillId, 1, true, this); m_nearCommon[i] = info; } } #endregion }