Exemplo n.º 1
0
        public bool HasContain(HitNode node, long uid)
        {
            if (damageDic.ContainsKey(uid))
            {
                List <stMultiAttackDownMagicUserCmd_S> damageList = damageDic[uid];
                for (int i = 0; i < damageList.Count; i++)
                {
                    stMultiAttackDownMagicUserCmd_S cmd = damageList[i];
                    if (cmd.tmpid == node.m_uDamageID)
                    {
                        //RemoveDamage( cmd ,uid);
                        return(true);
                    }
                }
            }

            return(false);
        }
Exemplo n.º 2
0
 public stMultiAttackDownMagicUserCmd_S GetDamage(HitNode node, long uid)
 {
     if (damageDic.ContainsKey(uid))
     {
         List <stMultiAttackDownMagicUserCmd_S> damageList = damageDic[uid];
         foreach (var info in damageList)
         {
             if (info.tmpid == node.m_uDamageID && info.wdSkillID == node.skill_id)
             {
                 return(info);
             }
         }
         if (damageList.Count > 20)
         {
             damageList.Clear();
         }
         return(null);
     }
     return(null);
 }
Exemplo n.º 3
0
 //计算击中伤害
 public bool OnComputeHit(HitNode hit_node)
 {
     //GameCmd.stMultiAttackDownMagicUserCmd_S cmd = damagerManager.GetDamage(hit_node, m_Master.GetUID());
     //if (damagerManager.HasContain(hit_node, m_Master.GetUID()))
     //{
     //    if (cmd != null)
     //    {//飘字
     //        ShowDamage(cmd);
     //    }
     //}
     //else
     //{//记录伤害帧过后 伤害仍然没有值的节点
     //    if (!hitDic.ContainsKey(m_uDamageID))
     //    {
     //        hitDic.Add((uint)m_uDamageID, hit_node);
     //    }
     //    else
     //    {
     //       // Log.Trace("has contain key is {0}", m_uDamageID);
     //    }
     //}
     //return PlayDefenerAni(cmd);
     return(true);
 }
Exemplo n.º 4
0
 //计算击中伤害(发射类技能特效)
 public bool OnComputeHit(GameObject target, HitNode hit_node)
 {
     OnComputeHit(hit_node);
     return(true);
 }