Exemplo n.º 1
0
        public void ParseETC(string inp)
        {
            int pipe = 0, oldpipe = 0;

            //ID
            pipe    = inp.IndexOf('|', oldpipe);
            ID      = Util.GetUInt32(inp.Substring(oldpipe, pipe - oldpipe));
            oldpipe = pipe + 1;
            //Drop Mesh 1
            pipe = inp.IndexOf('|', oldpipe);
            string mesh = inp.Substring(oldpipe, pipe - oldpipe);

            oldpipe = pipe + 1;
            if (mesh.Length > 0)
            {
                Has_Mesh = true;
            }
            else
            {
                Has_Mesh = false;
            }
            //Icon 0
            pipe    = inp.IndexOf('|', oldpipe);
            Icon    = inp.Substring(oldpipe, pipe - oldpipe);
            oldpipe = pipe + 1;
            //Durability
            pipe       = inp.IndexOf('|', oldpipe);
            Durability = Util.GetInt64(inp.Substring(oldpipe, pipe - oldpipe));
            oldpipe    = pipe + 1;
            //Weight
            pipe    = inp.IndexOf('|', oldpipe);
            Weight  = Util.GetUInt32(inp.Substring(oldpipe, pipe - oldpipe));
            oldpipe = pipe + 1;
            //Material
            pipe     = inp.IndexOf('|', oldpipe);
            Material = Util.GetUInt32(inp.Substring(oldpipe, pipe - oldpipe));
            oldpipe  = pipe + 1;
            //Crystallizable
            pipe           = inp.IndexOf('|', oldpipe);
            Crystallizable = Util.GetUInt32(inp.Substring(oldpipe, pipe - oldpipe));
            oldpipe        = pipe + 1;
            //Stackable
            pipe      = inp.IndexOf('|', oldpipe);
            Stackable = Util.GetUInt32(inp.Substring(oldpipe, pipe - oldpipe));
            oldpipe   = pipe + 1;
            //Family
            pipe    = inp.IndexOf('|', oldpipe);
            Family  = Util.GetUInt32(inp.Substring(oldpipe, pipe - oldpipe));
            oldpipe = pipe + 1;
            //Grade
            Grade = Util.GetUInt32(inp.Substring(oldpipe, inp.Length - oldpipe));
        }
Exemplo n.º 2
0
        public void ParseArmor(string inp)
        {
            int pipe = 0, oldpipe = 0;

            //ID
            pipe    = inp.IndexOf('|');
            ID      = Util.GetUInt32(inp.Substring(0, pipe));
            oldpipe = pipe + 1;
            //Drop Mesh 1
            pipe = inp.IndexOf('|', oldpipe);
            string mesh = inp.Substring(oldpipe, pipe - oldpipe);

            oldpipe = pipe + 1;
            if (mesh.Length > 0)
            {
                Has_Mesh = true;
            }
            else
            {
                Has_Mesh = false;
            }
            //Icon 0
            pipe    = inp.IndexOf('|', oldpipe);
            Icon    = inp.Substring(oldpipe, pipe - oldpipe);
            oldpipe = pipe + 1;
            //Durability
            pipe       = inp.IndexOf('|', oldpipe);
            Durability = Util.GetInt64(inp.Substring(oldpipe, pipe - oldpipe));
            oldpipe    = pipe + 1;
            //Weight
            pipe    = inp.IndexOf('|', oldpipe);
            Weight  = Util.GetUInt32(inp.Substring(oldpipe, pipe - oldpipe));
            oldpipe = pipe + 1;
            //Material
            pipe     = inp.IndexOf('|', oldpipe);
            Material = Util.GetUInt32(inp.Substring(oldpipe, pipe - oldpipe));
            oldpipe  = pipe + 1;
            //Crystallizable
            pipe           = inp.IndexOf('|', oldpipe);
            Crystallizable = Util.GetUInt32(inp.Substring(oldpipe, pipe - oldpipe));
            oldpipe        = pipe + 1;
            //Body_Part
            pipe      = inp.IndexOf('|', oldpipe);
            Body_Part = Util.GetUInt32(inp.Substring(oldpipe, pipe - oldpipe));
            oldpipe   = pipe + 1;
            //Armor_Type
            pipe       = inp.IndexOf('|', oldpipe);
            Armor_Type = Util.GetUInt32(inp.Substring(oldpipe, pipe - oldpipe));
            oldpipe    = pipe + 1;
            //Crystal_Type
            pipe         = inp.IndexOf('|', oldpipe);
            Crystal_Type = Util.GetUInt32(inp.Substring(oldpipe, pipe - oldpipe));
            oldpipe      = pipe + 1;
            //Avoid_Mod
            pipe      = inp.IndexOf('|', oldpipe);
            Avoid_Mod = Util.GetInt32(inp.Substring(oldpipe, inp.Length - oldpipe));

            /*
             * oldpipe = pipe + 1;
             * //Pdef
             * pipe = inp.IndexOf('|', oldpipe);
             * Pdef = Util.GetUInt32(inp.Substring(oldpipe, pipe - oldpipe));
             * oldpipe = pipe + 1;
             * //Mdef
             * pipe = inp.IndexOf('|', oldpipe);
             * Mdef = Util.GetUInt32(inp.Substring(oldpipe, pipe - oldpipe));
             * oldpipe = pipe + 1;
             * //MPbonus
             * MPbonus = Util.GetUInt32(inp.Substring(oldpipe, inp.Length - oldpipe));*/
        }
Exemplo n.º 3
0
        public void ParseWeapon(string inp)
        {
            int pipe = 0, oldpipe = 0;

            //ID
            pipe    = inp.IndexOf('|', oldpipe);
            ID      = Util.GetUInt32(inp.Substring(oldpipe, pipe - oldpipe));
            oldpipe = pipe + 1;
            //Drop Mesh 1
            pipe = inp.IndexOf('|', oldpipe);
            string mesh = inp.Substring(oldpipe, pipe - oldpipe);

            oldpipe = pipe + 1;
            if (mesh.Length > 0)
            {
                Has_Mesh = true;
            }
            else
            {
                Has_Mesh = false;
            }
            //Icon 0
            pipe    = inp.IndexOf('|', oldpipe);
            Icon    = inp.Substring(oldpipe, pipe - oldpipe);
            oldpipe = pipe + 1;
            //Durability
            pipe       = inp.IndexOf('|', oldpipe);
            Durability = Util.GetInt64(inp.Substring(oldpipe, pipe - oldpipe));
            oldpipe    = pipe + 1;
            //Weight
            pipe    = inp.IndexOf('|', oldpipe);
            Weight  = Util.GetUInt32(inp.Substring(oldpipe, pipe - oldpipe));
            oldpipe = pipe + 1;
            //Material
            pipe     = inp.IndexOf('|', oldpipe);
            Material = Util.GetUInt32(inp.Substring(oldpipe, pipe - oldpipe));
            oldpipe  = pipe + 1;
            //Crystallizable
            pipe           = inp.IndexOf('|', oldpipe);
            Crystallizable = Util.GetUInt32(inp.Substring(oldpipe, pipe - oldpipe));
            oldpipe        = pipe + 1;
            //Body_Part
            pipe      = inp.IndexOf('|', oldpipe);
            Body_Part = Util.GetUInt32(inp.Substring(oldpipe, pipe - oldpipe));
            oldpipe   = pipe + 1;
            //Hardness
            pipe     = inp.IndexOf('|', oldpipe);
            Hardness = Util.GetUInt32(inp.Substring(oldpipe, pipe - oldpipe));
            oldpipe  = pipe + 1;
            //Random_Damage
            pipe          = inp.IndexOf('|', oldpipe);
            Random_Damage = Util.GetUInt32(inp.Substring(oldpipe, pipe - oldpipe));
            oldpipe       = pipe + 1;
            //PAtt

            /*
             * pipe = inp.IndexOf('|', oldpipe);
             * PAtt = Util.GetUInt32(inp.Substring(oldpipe, pipe - oldpipe));
             * oldpipe = pipe + 1;
             * //MAtt
             * pipe = inp.IndexOf('|', oldpipe);
             * MAtt = Util.GetUInt32(inp.Substring(oldpipe, pipe - oldpipe));
             * oldpipe = pipe + 1;
             */
            //Weapon_Type
            pipe        = inp.IndexOf('|', oldpipe);
            Weapon_Type = Util.GetUInt32(inp.Substring(oldpipe, pipe - oldpipe));
            oldpipe     = pipe + 1;
            //Crystal_Type
            pipe         = inp.IndexOf('|', oldpipe);
            Crystal_Type = Util.GetUInt32(inp.Substring(oldpipe, pipe - oldpipe));
            oldpipe      = pipe + 1;

            /*
             * //Critical
             * pipe = inp.IndexOf('|', oldpipe);
             * Critical = Util.GetUInt32(inp.Substring(oldpipe, pipe - oldpipe));
             * oldpipe = pipe + 1;
             * //Hit_Mod
             * pipe = inp.IndexOf('|', oldpipe);
             * Hit_Mod = Util.GetInt32(inp.Substring(oldpipe, pipe - oldpipe));
             * oldpipe = pipe + 1;
             * //Avoid_Mod
             * pipe = inp.IndexOf('|', oldpipe);
             * Avoid_Mod = Util.GetInt32(inp.Substring(oldpipe, pipe - oldpipe));
             * oldpipe = pipe + 1;
             * //Shield_Pdef
             * pipe = inp.IndexOf('|', oldpipe);
             * Shield_Pdef = Util.GetUInt32(inp.Substring(oldpipe, pipe - oldpipe));
             * oldpipe = pipe + 1;
             * //Shield_Rate
             * pipe = inp.IndexOf('|', oldpipe);
             * Shield_Rate = Util.GetUInt32(inp.Substring(oldpipe, pipe - oldpipe));
             * oldpipe = pipe + 1;
             * //Speed
             * pipe = inp.IndexOf('|', oldpipe);
             * Speed = Util.GetUInt32(inp.Substring(oldpipe, pipe - oldpipe));
             * oldpipe = pipe + 1;
             */
            //MP_Consume
            pipe       = inp.IndexOf('|', oldpipe);
            MP_Consume = Util.GetUInt32(inp.Substring(oldpipe, pipe - oldpipe));
            oldpipe    = pipe + 1;
            //SS
            pipe    = inp.IndexOf('|', oldpipe);
            SS      = Util.GetUInt32(inp.Substring(oldpipe, pipe - oldpipe));
            oldpipe = pipe + 1;
            //SPS
            pipe    = inp.IndexOf('|', oldpipe);
            SPS     = Util.GetUInt32(inp.Substring(oldpipe, pipe - oldpipe));
            oldpipe = pipe + 1;
            //Curvature
            pipe      = inp.IndexOf('|', oldpipe);
            Curvature = Util.GetUInt32(inp.Substring(oldpipe, pipe - oldpipe));
            oldpipe   = pipe + 1;
            //isHero
            isHero = Util.GetInt32(inp.Substring(oldpipe, inp.Length - oldpipe));
        }