IsCombatNpc() public method

public IsCombatNpc ( ) : bool
return bool
示例#1
0
 private void DestroyEntity(EntityInfo ni)
 {
     ni.GetSkillStateInfo().RemoveAllImpact();
     OnDestroyEntity(ni);
     if (ni.IsCombatNpc())
     {
         ni.DeadTime = 0;
     }
     DestroyEntityById(ni.GetId());
 }
示例#2
0
 private void DestroyEntity(EntityInfo ni)
 {
     GfxSkillSystem.Instance.StopAllSkill(ni.GetId(), true, true, true);
     ni.GetSkillStateInfo().RemoveAllImpact();
     OnDestroyEntity(ni);
     if (ni.IsCombatNpc())
     {
         ni.DeadTime = 0;
     }
     EntityViewModelManager.Instance.DestroyEntityView(ni.GetId());
     DestroyEntityById(ni.GetId());
 }
示例#3
0
        internal int GetDyingBattleNpcCount(int campId)
        {
            int ct = 0;

            for (LinkedListNode <EntityInfo> linkNode = m_EntityManager.Entities.FirstValue; null != linkNode; linkNode = linkNode.Next)
            {
                EntityInfo info = linkNode.Value;
                if (null != info && info.IsDead() && info.DeadTime != 0 && info.IsCombatNpc() && info.GetCampId() == campId)
                {
                    ++ct;
                }
            }
            return(ct);
        }
示例#4
0
        internal int GetBattleNpcCount()
        {
            int ct = 0;

            for (LinkedListNode <EntityInfo> linkNode = m_EntityManager.Entities.FirstValue; null != linkNode; linkNode = linkNode.Next)
            {
                EntityInfo info = linkNode.Value;
                if (null != info && !info.IsDead() && info.IsCombatNpc())
                {
                    ++ct;
                }
            }
            return(ct);
        }
示例#5
0
        internal int GetBattleNpcCount(int campId, CharacterRelation relation)
        {
            int ct = 0;

            for (LinkedListNode <EntityInfo> linkNode = m_EntityManager.Entities.FirstValue; null != linkNode; linkNode = linkNode.Next)
            {
                EntityInfo info = linkNode.Value;
                if (null != info && !info.IsDead() && info.IsCombatNpc() && EntityInfo.GetRelation(campId, info.GetCampId()) == relation)
                {
                    ++ct;
                }
            }
            return(ct);
        }
示例#6
0
        public int GetBattleNpcCount(int campId)
        {
            int ct = 0;

            for (LinkedListNode <EntityInfo> linkNode = m_EntityMgr.Entities.FirstNode; null != linkNode; linkNode = linkNode.Next)
            {
                EntityInfo info = linkNode.Value;
                if (null != info && !info.IsDead() && info.IsCombatNpc() && info.GetCampId() == campId)
                {
                    ++ct;
                }
            }
            return(ct);
        }
示例#7
0
        public int GetBattleNpcCount(EntityInfo src, CharacterRelation relation)
        {
            int ct = 0;

            for (LinkedListNode <EntityInfo> linkNode = m_EntityMgr.Entities.FirstNode; null != linkNode; linkNode = linkNode.Next)
            {
                EntityInfo info = linkNode.Value;
                if (null != info && !info.IsDead() && info.IsCombatNpc() && EntityInfo.GetRelation(src, info) == relation)
                {
                    ++ct;
                }
            }
            return(ct);
        }
示例#8
0
        public bool HasCombatNpcAlive()
        {
            bool result = false;

            for (LinkedListNode <EntityInfo> linkNode = m_Entities.FirstValue; null != linkNode; linkNode = linkNode.Next)
            {
                EntityInfo entity = linkNode.Value;
                if (null != entity && entity.IsCombatNpc() && !entity.IsDead())
                {
                    result = true;
                    break;
                }
            }
            return(result);
        }
示例#9
0
        public EntityInfo GetNearest(ScriptRuntime.Vector3 pos, ref float minPowDist)
        {
            EntityInfo result  = null;
            float      powDist = 0.0f;

            for (LinkedListNode <EntityInfo> linkNode = m_Entities.FirstValue; null != linkNode; linkNode = linkNode.Next)
            {
                EntityInfo entity = linkNode.Value;
                if (null != entity && entity.IsCombatNpc())
                {
                    powDist = Geometry.DistanceSquare(pos, entity.GetMovementStateInfo().GetPosition3D());
                    if (minPowDist > powDist)
                    {
                        result     = entity;
                        minPowDist = powDist;
                    }
                }
            }
            return(result);
        }
示例#10
0
 private void DestroyEntity(EntityInfo ni)
 {
     m_SkillSystem.StopAllSkill(ni.GetId(), true, true, true);
     ni.GetSkillStateInfo().RemoveAllImpact();
     OnDestroyEntity(ni);
     if (ni.IsCombatNpc()) {
         ni.DeadTime = 0;
     }
     DestroyEntityById(ni.GetId());
 }