示例#1
0
        public override void Reflection(StringBuilder sb)
        {
            sb.AppendLine("<EntityDamageStatusPdu>");
            base.Reflection(sb);
            try
            {
                sb.AppendLine("<damagedEntityID>");
                this._damagedEntityID.Reflection(sb);
                sb.AppendLine("</damagedEntityID>");
                sb.AppendLine("<padding1 type=\"ushort\">" + this._padding1.ToString(CultureInfo.InvariantCulture) + "</padding1>");
                sb.AppendLine("<padding2 type=\"ushort\">" + this._padding2.ToString(CultureInfo.InvariantCulture) + "</padding2>");
                sb.AppendLine("<damageDescriptionRecords type=\"ushort\">" + this._damageDescriptionRecords.Count.ToString(CultureInfo.InvariantCulture) + "</damageDescriptionRecords>");
                for (int idx = 0; idx < this._damageDescriptionRecords.Count; idx++)
                {
                    sb.AppendLine("<damageDescriptionRecords" + idx.ToString(CultureInfo.InvariantCulture) + " type=\"DirectedEnergyDamage\">");
                    DirectedEnergyDamage aDirectedEnergyDamage = (DirectedEnergyDamage)this._damageDescriptionRecords[idx];
                    aDirectedEnergyDamage.Reflection(sb);
                    sb.AppendLine("</damageDescriptionRecords" + idx.ToString(CultureInfo.InvariantCulture) + ">");
                }

                sb.AppendLine("</EntityDamageStatusPdu>");
            }
            catch (Exception e)
            {
#if DEBUG
                Trace.WriteLine(e);
                Trace.Flush();
#endif
                this.OnException(e);
            }
        }