Ejemplo n.º 1
0
        /// <summary>
        /// </summary>
        /// <returns>
        /// </returns>
        internal AOAction Copy()
        {
            AOAction copy = new AOAction();

            copy.ActionType = this.ActionType;
            foreach (Requirement requirements in this.Requirements)
            {
                copy.Requirements.Add(requirements.Copy());
            }

            return(copy);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// The parse action set.
        /// </summary>
        /// <param name="actions">
        /// The actions.
        /// </param>
        /// <exception cref="Exception">
        /// </exception>
        private void ParseActionSet(List<AOAction> actions)
        {
            bool flag = this.br.ReadInt32() != 36;
            if (flag)
            {
                throw new Exception("Why am I here?");
            }

            int arg_3D_0 = 1;
            int num = this.br.Read3F1();
            int num2 = arg_3D_0;
            checked
            {
                while (true)
                {
                    int arg_160_0 = num2;
                    int num3 = num;
                    if (arg_160_0 > num3)
                    {
                        break;
                    }

                    int actionNum = this.br.ReadInt32();

                    AOAction aoa = new AOAction();
                    aoa.ActionType = (ActionType)Enum.ToObject(typeof(ActionType), actionNum);

                    int numreqs = this.br.Read3F1();
                    List<Requirement> cookedreqs = this.ReadReqs(numreqs);
                    foreach (Requirement REQ in cookedreqs)
                    {
                        aoa.Requirements.Add(REQ);
                    }

                    if (actions == null)
                    {
                        actions = new List<AOAction>();
                    }

                    actions.Add(aoa);
                    cookedreqs.Clear();
                    num2++;
                }
            }
        }
Ejemplo n.º 3
0
        /// <summary>
        /// </summary>
        /// <returns>
        /// </returns>
        internal AOAction Copy()
        {
            AOAction copy = new AOAction();
            copy.ActionType = this.ActionType;
            foreach (Requirement requirements in this.Requirements)
            {
                copy.Requirements.Add(requirements.Copy());
            }

            return copy;
        }