Exemplo n.º 1
0
 public void SetAblitiyIDs(Ablities abl)
 {
     m_AblityId.Clear();
     m_AblityId.AddRange(abl);
     ReflashBuffbyIds(m_AblityId, _SkEnity);
     UpdateCurablity();
     GetAblityInfos();
 }
Exemplo n.º 2
0
        public void ReflashBuffbyIds(Ablities ids, SkEntity target)
        {
            if ((target == null) || (ids == null))
            {
                return;
            }

            for (int i = 0; i < ids.Count; i++)
            {
                ReflashBuffById(ids[i], target);
            }
            return;
        }
Exemplo n.º 3
0
        public static List <NpcAbility> FindAblitysById(Ablities Ids)
        {
            if (Ids == null)
            {
                return(null);
            }

            List <NpcAbility> ablitys = new List <NpcAbility>();

            for (int i = 0; i < Ids.Count; i++)
            {
                ablitys.Add(FindNpcAblityById(Ids[i]));
            }
            return(ablitys);
        }
Exemplo n.º 4
0
        public static Ablities CompareSkillType(List <int> _ablityIds)
        {
            Ablities ablityIds = new Ablities(_ablityIds.Count);

            ablityIds.AddRange(_ablityIds);

            if (ablityIds.Count <= 1)
            {
                return(ablityIds);
            }

            if (ablityIds.Count == 2)
            {
                int        Id0     = ablityIds[0];
                int        Id1     = ablityIds[1];
                NpcAbility ablity1 = FindNpcAblityById(Id0);
                if (ablity1 == null)
                {
                    Debug.LogError("Random Ability error. no Ability!!!" + "   " + Id0);
                    return(ablityIds);
                }
                NpcAbility ablity2 = FindNpcAblityById(Id1);
                if (ablity1 == null)
                {
                    Debug.LogError("Random Ability error. no Ability!!!" + "   " + Id1);
                    return(ablityIds);
                }

                if (ablity1.Type == ablity2.Type)
                {
                    if (ablity1.level - ablity2.level > 0)
                    {
                        ablityIds.Remove(Id1);
                    }
                    else
                    {
                        ablityIds.Remove(Id0);
                    }
                }
            }

            return(ablityIds);
        }
Exemplo n.º 5
0
 public NpcAblitycmpt(SkEntity target)
 {
     _SkEnity   = target;
     m_AblityId = new Ablities(5);;
 }