IsCombatNpc() public method

public IsCombatNpc ( ) : bool
return bool
Exemplo n.º 1
0
 private void DestroyEntity(EntityInfo ni)
 {
     ni.GetSkillStateInfo().RemoveAllImpact();
     OnDestroyEntity(ni);
     if (ni.IsCombatNpc())
     {
         ni.DeadTime = 0;
     }
     DestroyEntityById(ni.GetId());
 }
Exemplo n.º 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());
 }
Exemplo n.º 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);
        }
Exemplo n.º 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);
        }
Exemplo n.º 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);
        }
Exemplo n.º 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);
        }
Exemplo n.º 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);
        }
Exemplo n.º 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);
        }
Exemplo n.º 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);
        }
Exemplo n.º 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());
 }