public bool Conform(IPlayer en) { if (en.IsDead()) { return(false); } if (!CommonCondition.IsTeam(en)) { if (en.IsHide()) { return(false); } } IPlayer player = EntitySystem.m_ClientGlobal.MainPlayer; ISkillPart m_skillPart = player.GetPart(Client.EntityPart.Skill) as ISkillPart; if (m_skillPart != null) { int error = 0; if (m_skillPart.CheckCanAttackTarget(en, out error)) { return(false); } else { float dis = EntityHelper.GetEntityDistance(player, en); if (dis <= m_nRange) { return(true); } } } return(false); }
public bool Conform(INPC en) { if (en.IsDead()) { return(false); } if (!en.IsCanAttackNPC()) { return(false); } if (!CommonCondition.IsNpcCanAttackByTable(en)) { return(false); } if (CommonCondition.IsPetAndSummon(en)) { return(false); } IPlayer player = EntitySystem.m_ClientGlobal.MainPlayer; IControllerSystem cs = EntitySystem.m_ClientGlobal.GetControllerSystem(); if (cs == null) { return(false); } IControllerHelper ch = cs.GetControllerHelper(); if (ch == null) { return(false); } if (ch.IsSameTeam(en)) { float dis = EntityHelper.GetEntityDistance(player, en); if (dis <= m_nRange) { return(true); } } return(false); }
public bool Conform(ICreature en) { if (en.IsDead()) { return(false); } if (CommonCondition.IsPetAndSummon(en)) { return(false); } if (!CommonCondition.IsNpcCanAttackByTable(en)) { return(false); } if (en.IsHide()) { return(false); } INPC npc = en as INPC; if (npc != null) { if (!npc.IsCanAttackNPC()) { return(false); } } if (CommonCondition.IsPetAndSummon(en)) { return(false); } IPlayer player = EntitySystem.m_ClientGlobal.MainPlayer; float dis = EntityHelper.GetEntityDistance(player, en); if (dis <= m_nRange) { return(true); } return(false); }
public bool Conform(INPC en) { if (en.IsDead()) { return(false); } if (!en.IsCanAttackNPC()) { return(false); } if (!CommonCondition.IsNpcCanAttackByTable(en)) { return(false); } if (CommonCondition.IsPetAndSummon(en)) {//通过判断主人能不能打判断 return(false); } IPlayer player = EntitySystem.m_ClientGlobal.MainPlayer; ISkillPart m_skillPart = player.GetPart(Client.EntityPart.Skill) as ISkillPart; if (m_skillPart != null) { int error = 0; if (!m_skillPart.CheckCanAttackTarget(en, out error)) { return(false); } else { float dis = EntityHelper.GetEntityDistance(player, en); if (dis <= m_nRange) { return(true); } } } return(false); }
public bool Conform(INPC en) { int error = 0; if (!CommonCondition.IsNpcCanAttackByTable(en)) { return(false); } if (en.IsPet() || en.IsSummon()) { int masterID = en.GetProp((int)NPCProp.Masterid); IEntitySystem es = EntitySystem.m_ClientGlobal.GetEntitySystem(); if (es != null) { IPlayer p = es.FindEntity <IPlayer>((uint)masterID); if (p != null) { if (EntitySystem.m_ClientGlobal.MainPlayer.GetUID() == p.GetUID()) { return(false); } } } } if (m_skillPart != null && m_skillPart.CheckCanAttackTarget(en, out error) == false) { return(false); } float fDis = Vector3.Distance(m_centerpos, en.GetPos()); if (fDis > m_rang) { return(false); } return(true); }