IsCombatNpc() публичный Метод

public IsCombatNpc ( ) : bool
Результат 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());
 }