// 技能结束时,缓存此次技能生成的战斗信息 [3/23/2015 Zmy] public void OnCacheSepllInfo() { FightInfo _info = new FightInfo(); bool bAttacker = m_pHolder.GetGroupType() == EM_OBJECT_TYPE.EM_OBJECT_TYPE_HERO ? true : false; _info.SetAttack(m_pHolder.GetTeamPos(), bAttacker); _info.m_SpellID = m_pSpellInfo.GetSpellID(); _info.m_nCount = (byte)m_TargetList.m_nCount; for (int i = 0; i < m_ValidImpact.Length; ++i) { if (m_ValidImpact[i] < 0) { continue; } //只记录有效的Impact [3/23/2015 Zmy] _info.m_Impact[i] = m_ValidImpact[i]; _info.m_nImpactCount++; } for (int n = 0; n < m_TargetList.m_nCount; ++n) { DefenceInfo _deInfo = new DefenceInfo(); bool _bAttacker = m_TargetList.m_pObjectList[n].m_pTargetObject.GetGroupType() == EM_OBJECT_TYPE.EM_OBJECT_TYPE_MONSTER ? true : false; _deInfo.SetDefencer(m_TargetList.m_pObjectList[n].m_pTargetObject.GetTeamPos(), _bAttacker); _deInfo.m_Hit = m_TargetList.m_pObjectList[n].m_bHit; for (int nIndex = 0; nIndex < m_TargetList.m_pObjectList[n].m_ValidImpact.Length; ++nIndex) { if (m_TargetList.m_pObjectList[n].m_ValidImpact[nIndex] < 0) { continue; } _deInfo.m_Impact[nIndex] = m_TargetList.m_pObjectList[n].m_ValidImpact[nIndex]; _deInfo.m_nImpactCount++; } _deInfo.m_RemainHP = m_TargetList.m_pObjectList[n].m_pTargetObject.GetHP(); _info.m_DefenceInfo[n].Copy(_deInfo); } SceneObjectManager.GetInstance()._CacheFightInfo(_info); }