private bool LoadItemElement(SecurityElement element, out Publish_NpcObj itemElement) { itemElement = new Publish_NpcObj(); string attribute = element.Attribute("Publish_ID"); if (attribute != null) { itemElement.Publish_ID = StrParser.ParseDecInt(attribute, 0); } attribute = element.Attribute("Type"); if (attribute != null) { itemElement.Type = StrParser.ParseDecInt(attribute, 0); } attribute = element.Attribute("Score"); if (attribute != null) { itemElement.Score = StrParser.ParseDecInt(attribute, 0); } attribute = element.Attribute("Name"); if (attribute != null) { itemElement.Name = StrParser.ParseStr(attribute, ""); } attribute = element.Attribute("Actors"); if (attribute != null) { itemElement.Actors = StrParser.ParseStr(attribute, ""); } return(true); }
public bool GetPublish_NpcObject(int publishID, out Publish_NpcObj publish_NpcObject) { publish_NpcObject = null; if (!_mPublish_NpcDic.TryGetValue(publishID, out publish_NpcObject)) { return(false); } return(true); }