Example #1
0
 partial void oClock_Action(object sender, ElapsedEventArgs e)
 {
     ActData.AllCharactor = ActHelper.GetCombatantList();
     if (ActData.AllCharactor.Count > 0)
     {
     }
 }
Example #2
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);
        }