Beispiel #1
0
        public static List <CombertBean> CreateCombartList()
        {
            dynamic list = ActHelper.GetCombatantList();

            List <CombertBean> CombertBeanList = new List <CombertBean>();

            foreach (dynamic item in list.ToArray())
            {
                if (item == null)
                {
                    continue;
                }

                var combatant = new Combatant();
                combatant.Name      = (string)item.Name;
                combatant.ID        = (uint)item.ID;
                combatant.Job       = (int)item.Job;
                combatant.IsCasting = (bool)item.IsCasting;
                combatant.OwnerID   = (uint)item.OwnerID;
                combatant.type      = (byte)item.type;
                combatant.Level     = (int)item.Level;
                combatant.CurrentHP = (int)item.CurrentHP;
                combatant.MaxHP     = (int)item.MaxHP;
                combatant.PosX      = (float)item.PosX;
                combatant.PosY      = (float)item.PosY;
                combatant.PosZ      = (float)item.PosZ;

                CombertBean combertBean = new CombertBean();
                combertBean.Name      = combatant.Name.ToString();
                combertBean.ID        = combatant.ID;
                combertBean.MaxHp     = combatant.MaxMP;
                combertBean.CurrentHP = combatant.CurrentHP;
                combertBean.Job       = combatant.Job;
                combertBean.IsCasting = combatant.IsCasting;
                combertBean.OwnerID   = combatant.OwnerID;
                combertBean.type      = combatant.type;
                combertBean.Level     = combatant.Level;
                combertBean.X         = combatant.PosX.ToString();
                combertBean.Y         = combatant.PosY.ToString();
                combertBean.Z         = combatant.PosZ.ToString();

                CombertBeanList.Add(combertBean);
            }
            return(CombertBeanList);
        }
Beispiel #2
0
        /// <summary>
        /// mobリストを作成する
        /// </summary>
        /// <returns></returns>
        public static List <string> CreatemobList()
        {
            dynamic list = ActHelper.GetCombatantList();

            List <string> createMobList = new List <string>();

            foreach (dynamic item in list.ToArray())
            {
                if (item == null)
                {
                    continue;
                }
                if ((byte)item.type == 2 && (uint)item.OwnerID == 0)
                {
                    // 重複しないようにする
                    if (!createMobList.Contains((string)item.Name))
                    {
                        createMobList.Add((string)item.Name);
                    }
                }
            }
            return(createMobList);
        }