Ejemplo n.º 1
0
        private AbstractLoadedMapleLife LoadLife(IMapleData life, string id, string type)
        {
            var myLife = MapleLifeFactory.GetLife(int.Parse(id), type);

            myLife.Cy = MapleDataTool.GetInt(life.GetChildByPath("cy"));
            var dF = life.GetChildByPath("f");

            if (dF != null)
            {
                myLife.F = MapleDataTool.GetInt(dF);
            }
            myLife.Fh  = MapleDataTool.GetInt(life.GetChildByPath("fh"));
            myLife.Rx0 = MapleDataTool.GetInt(life.GetChildByPath("rx0"));
            myLife.Rx1 = MapleDataTool.GetInt(life.GetChildByPath("rx1"));
            var x = MapleDataTool.GetInt(life.GetChildByPath("x"));
            var y = MapleDataTool.GetInt(life.GetChildByPath("y"));

            myLife.Position = new Point(x, y);

            var hide = MapleDataTool.GetInt("hide", life, 0);

            if (hide == 1)
            {
                myLife.IsHide = true;
            }
            else if (hide > 1)
            {
                Console.WriteLine("Hide > 1 ({0})", hide);
            }
            return(myLife);
        }
Ejemplo n.º 2
0
        private AbstractLoadedMapleLife LoadLife(int id, int f, bool hide, int fh, int cy, int rx0, int rx1, int x,
                                                 int y, string type)
        {
            var myLife = MapleLifeFactory.GetLife(id, type);

            myLife.Cy       = cy;
            myLife.F        = f;
            myLife.Fh       = fh;
            myLife.Rx0      = rx0;
            myLife.Rx1      = rx1;
            myLife.Position = new Point(x, y);
            myLife.IsHide   = hide;
            return(myLife);
        }