示例#1
0
 /// <summary>
 /// Save the object's XML to the XmlWriter.
 /// </summary>
 /// <param name="objWriter">XmlTextWriter to write with.</param>
 public void Save(XmlTextWriter objWriter)
 {
     objWriter.WriteStartElement("lifestylequality");
     objWriter.WriteElementString("id", _SourceGuid.ToString());
     objWriter.WriteElementString("guid", _guiID.ToString());
     objWriter.WriteElementString("name", _strName);
     objWriter.WriteElementString("extra", _strExtra);
     objWriter.WriteElementString("cost", _strCost);
     objWriter.WriteElementString("multiplier", _intMultiplier.ToString(CultureInfo.InvariantCulture));
     objWriter.WriteElementString("basemultiplier", _intBaseMultiplier.ToString(CultureInfo.InvariantCulture));
     objWriter.WriteElementString("lp", _intLP.ToString());
     objWriter.WriteElementString("contributetolimit", _blnContributeToLimit.ToString());
     objWriter.WriteElementString("print", _blnPrint.ToString());
     objWriter.WriteElementString("lifestylequalitytype", _objLifestyleQualityType.ToString());
     objWriter.WriteElementString("lifestylequalitysource", _objLifestyleQualitySource.ToString());
     objWriter.WriteElementString("source", _strSource);
     objWriter.WriteElementString("page", _strPage);
     objWriter.WriteElementString("allowed", string.Join(",", _lstAllowedFreeLifestyles));
     if (_nodBonus != null)
     {
         objWriter.WriteRaw("<bonus>" + _nodBonus.InnerXml + "</bonus>");
     }
     else
     {
         objWriter.WriteElementString("bonus", string.Empty);
     }
     objWriter.WriteElementString("notes", _strNotes);
     objWriter.WriteEndElement();
     _objCharacter.SourceProcess(_strSource);
 }
示例#2
0
 /// <summary>
 /// Save the object's XML to the XmlWriter.
 /// </summary>
 /// <param name="objWriter">XmlTextWriter to write with.</param>
 public void Save(XmlTextWriter objWriter)
 {
     objWriter.WriteStartElement("lifestylequality");
     objWriter.WriteElementString("guid", _guiID.ToString());
     objWriter.WriteElementString("name", _strName);
     objWriter.WriteElementString("extra", _strExtra);
     objWriter.WriteElementString("cost", _intCost.ToString());
     objWriter.WriteElementString("multiplier", _intMultiplier.ToString());
     objWriter.WriteElementString("lp", _intLP.ToString());
     objWriter.WriteElementString("contributetolimit", _blnContributeToLimit.ToString());
     objWriter.WriteElementString("print", _blnPrint.ToString());
     objWriter.WriteElementString("lifestylequalitytype", _objLifestyleQualityType.ToString());
     objWriter.WriteElementString("lifestylequalitysource", _objLifestyleQualitySource.ToString());
     objWriter.WriteElementString("source", _strSource);
     objWriter.WriteElementString("page", _strPage);
     if (_nodBonus != null)
     {
         objWriter.WriteRaw("<bonus>" + _nodBonus.InnerXml + "</bonus>");
     }
     else
     {
         objWriter.WriteElementString("bonus", "");
     }
     objWriter.WriteElementString("notes", _strNotes);
     objWriter.WriteEndElement();
     _objCharacter.SourceProcess(_strSource);
 }
示例#3
0
        /// <summary>
        /// Save the object's XML to the XmlWriter.
        /// </summary>
        /// <param name="objWriter">XmlTextWriter to write with.</param>
        public void Save(XmlTextWriter objWriter)
        {
            objWriter.WriteStartElement("lifestylequality");
            objWriter.WriteElementString("sourceid", SourceIDString);
            objWriter.WriteElementString("guid", InternalId);
            objWriter.WriteElementString("name", _strName);
            objWriter.WriteElementString("category", _strCategory);
            objWriter.WriteElementString("extra", _strExtra);
            objWriter.WriteElementString("cost", _strCost);
            objWriter.WriteElementString("multiplier", _intMultiplier.ToString(GlobalOptions.InvariantCultureInfo));
            objWriter.WriteElementString("basemultiplier", _intBaseMultiplier.ToString(GlobalOptions.InvariantCultureInfo));
            objWriter.WriteElementString("lp", _intLP.ToString());
            objWriter.WriteElementString("contributetolimit", _blnContributeToLP.ToString());
            objWriter.WriteElementString("print", _blnPrint.ToString());
            objWriter.WriteElementString("lifestylequalitytype", _objLifestyleQualityType.ToString());
            objWriter.WriteElementString("lifestylequalitysource", _objLifestyleQualitySource.ToString());
            objWriter.WriteElementString("source", _strSource);
            objWriter.WriteElementString("page", _strPage);
            objWriter.WriteElementString("allowed", string.Join(",", _lstAllowedFreeLifestyles));
            if (_nodBonus != null)
            {
                objWriter.WriteRaw("<bonus>" + _nodBonus.InnerXml + "</bonus>");
            }
            else
            {
                objWriter.WriteElementString("bonus", string.Empty);
            }
            objWriter.WriteElementString("notes", _strNotes);
            objWriter.WriteEndElement();

            if (OriginSource != QualitySource.BuiltIn)
            {
                _objCharacter.SourceProcess(_strSource);
            }
        }
        /// <summary>
        /// Save the object's XML to the XmlWriter.
        /// </summary>
        /// <param name="objWriter">XmlTextWriter to write with.</param>
        public void Save(XmlTextWriter objWriter)
        {
            objWriter.WriteStartElement("quality");
            objWriter.WriteElementString("guid", _guiID.ToString("D"));
            objWriter.WriteElementString("name", _strName);
            objWriter.WriteElementString("extra", _strExtra);
            objWriter.WriteElementString("bp", _intBP.ToString(GlobalOptions.InvariantCultureInfo));
            objWriter.WriteElementString("implemented", _blnImplemented.ToString());
            objWriter.WriteElementString("contributetolimit", _blnContributeToLimit.ToString());
            objWriter.WriteElementString("doublecareer", _blnDoubleCostCareer.ToString());
            objWriter.WriteElementString("canbuywithspellpoints", _blnCanBuyWithSpellPoints.ToString());
            objWriter.WriteElementString("metagenetic", _blnMetagenetic.ToString());
            objWriter.WriteElementString("print", _blnPrint.ToString());
            objWriter.WriteElementString("qualitytype", _eQualityType.ToString());
            objWriter.WriteElementString("qualitysource", _eQualitySource.ToString());
            objWriter.WriteElementString("mutant", _blnMutant.ToString());
            objWriter.WriteElementString("source", _strSource);
            objWriter.WriteElementString("page", _strPage);
            objWriter.WriteElementString("sourcename", _strSourceName);
            if (_nodBonus != null)
            {
                objWriter.WriteRaw("<bonus>" + _nodBonus.InnerXml + "</bonus>");
            }
            else
            {
                objWriter.WriteElementString("bonus", string.Empty);
            }
            if (_nodFirstLevelBonus != null)
            {
                objWriter.WriteRaw("<firstlevelbonus>" + _nodFirstLevelBonus.InnerXml + "</firstlevelbonus>");
            }
            else
            {
                objWriter.WriteElementString("firstlevelbonus", string.Empty);
            }
            if (_guiWeaponID != Guid.Empty)
            {
                objWriter.WriteElementString("weaponguid", _guiWeaponID.ToString("D"));
            }
            if (_nodDiscounts != null)
            {
                objWriter.WriteRaw("<costdiscount>" + _nodDiscounts.InnerXml + "</costdiscount>");
            }
            objWriter.WriteElementString("notes", _strNotes);
            if (_eQualityType == QualityType.LifeModule)
            {
                objWriter.WriteElementString("stage", _strStage);
            }

            if (!_guiQualityId.Equals(Guid.Empty))
            {
                objWriter.WriteElementString("id", _guiQualityId.ToString("D"));
            }

            objWriter.WriteEndElement();
            _objCharacter.SourceProcess(_strSource);
        }