Beispiel #1
0
        public void WriteXml(System.Xml.XmlWriter writer)
        {
            if (HasChanged)
            {
                writer.WriteStartElement(GetType().Name);
                writer.WriteAttributeString("name", Name);

                DigestGenerator.WriteDigestEntry(writer, "Tile1", Default.Items[0], Items[0]);
                DigestGenerator.WriteDigestEntry(writer, "Tile2", Default.Items[1], Items[1]);
                DigestGenerator.WriteDigestEntry(writer, "Tile3", Default.Items[2], Items[2]);
                DigestGenerator.WriteDigestEntry(writer, "Tile4", Default.Items[3], Items[3]);

                writer.WriteEndElement();
            }
        }
Beispiel #2
0
        public void WriteXml(XmlWriter writer)
        {
            if (HasChanged)
            {
                writer.WriteStartElement(GetType().Name);

                writer.WriteAttributeString("value", Offset.ToString("X4"));
                writer.WriteAttributeString("name", Name);
                DigestGenerator.WriteXmlDigest(this, writer, false, false);
                DigestGenerator.WriteXmlDigest(AIFlags, writer, true, true);

                if (IsNormal)
                {
                    DigestGenerator.WriteDigestEntry(writer, "Effect", Default.Effect, Effect);
                    DigestGenerator.WriteXmlDigest(Attributes, writer, true, true);
                    if (Attributes.Formula.Value == 0x02 &&
                        (Attributes.Formula.Value != Attributes.Default.Formula.Value || Attributes.InflictStatus != Attributes.Default.InflictStatus))
                    {
                        writer.WriteStartElement("CastSpell");
                        writer.WriteAttributeString("default", AllAbilities.Names[Attributes.Default.InflictStatus]);
                        writer.WriteAttributeString("value", AllAbilities.Names[Attributes.InflictStatus]);
                        writer.WriteEndElement();
                    }
                    else if (Attributes.InflictStatus != Attributes.Default.InflictStatus)
                    {
                        writer.WriteStartElement("InflictStatusDescription");
                        writer.WriteAttributeString("default", FFTPatch.InflictStatuses.InflictStatuses[Attributes.Default.InflictStatus].Statuses.ToString());
                        writer.WriteAttributeString("value", FFTPatch.InflictStatuses.InflictStatuses[Attributes.InflictStatus].Statuses.ToString());
                        writer.WriteEndElement();
                    }
                }
                else if (IsItem)
                {
                    DigestGenerator.WriteDigestEntry(writer, "ItemOffset", Default.ItemOffset, ItemOffset, "0x{0:X2}");
                }
                else if (IsThrowing)
                {
                    DigestGenerator.WriteDigestEntry(writer, "Throwing", Default.Throwing, Throwing);
                }
                else if (IsJumping)
                {
                    DigestGenerator.WriteDigestEntry(writer, "JumpHorizontal", Default.JumpHorizontal, JumpHorizontal);
                    DigestGenerator.WriteDigestEntry(writer, "JumpVertical", Default.JumpVertical, JumpVertical);
                }
                else if (IsCharging)
                {
                    DigestGenerator.WriteDigestEntry(writer, "ChargeCT", Default.ChargeCT, ChargeCT);
                    DigestGenerator.WriteDigestEntry(writer, "ChargeBonus", Default.ChargeBonus, ChargeBonus);
                }
                else if (IsArithmetick)
                {
                    DigestGenerator.WriteDigestEntry(writer, "ArithmetickSkill", Default.ArithmetickSkill, ArithmetickSkill, "0x{0:X2}");
                }
                else if (IsOther)
                {
                    DigestGenerator.WriteDigestEntry(writer, "OtherID", Default.OtherID, OtherID, "0x{0:X2}");
                }

                writer.WriteEndElement();
            }
        }