示例#1
0
            /// <summary>
            /// Initializes a product data entry for use in XML.
            /// </summary>
            /// <param name="CurrencyType">Type of currency the item is sold for</param>
            /// <param name="Description">NFS: World Beta feature, still gonna keep it for MAYBE future-use</param>
            /// <param name="RentalDurationInMinutes">0 if not a rental, rental duration in minutes if else</param>
            /// <param name="Hash">Item hash value that is recognized by NFS: World</param>
            /// <param name="IconString">Item icon that is displayed somewhere around it's title</param>
            /// <param name="LevelLimit">0 if not level limited, minimum level value if else</param>
            /// <param name="TooltipDescription">NFS: World Beta feature, still gonna keep it for MAYBE future-use</param>
            /// <param name="Price">How much the item is sold for</param>
            /// <param name="PriorityNumber">Priority in the shopping list in-game, commonly used for new items or discounts</param>
            /// <param name="SType">Item type that the server can recognize, not the game</param>
            /// <param name="Id">Item index for the server</param>
            /// <param name="Title">Item title that is displayed in-game</param>
            /// <param name="GType">Item type that NFS: World can recognize, not the server</param>
            /// <param name="ExtraDetail">If there is one, a special condition for the item that is displayed in-game</param>
            /// <returns>An XElement wrapped around in ProductTrans tags.</returns>
            public static XElement GetProductTransactionEntry(Currency CurrencyType, String Description, Int32 RentalDurationInMinutes, Int64 Hash, String IconString, Int16 LevelLimit, String TooltipDescription, Int32 Price, Int16 PriorityNumber, ServerItemType SType, Int32 Id, String Title, GameItemType GType, Special ExtraDetail)
            {
                XElement ProductNode =
                    new XElement("ProductTrans",
                                 new XElement("BundleItems",
                                              new XAttribute(ServerAttributes.nilNS + "nil", "true")
                                              ),
                                 new XElement("CategoryId",
                                              new XAttribute(ServerAttributes.nilNS + "nil", "true")
                                              ),
                                 new XElement("Currency", CurrencyType.GetString()),
                                 new XElement("Description", Description),
                                 new XElement("DurationMinute", RentalDurationInMinutes.ToString()),
                                 new XElement("Hash", Hash.ToString()),
                                 new XElement("Icon", IconString),
                                 new XElement("Level", LevelLimit.ToString()),
                                 new XElement("LongDescription", TooltipDescription),
                                 new XElement("Price", Price.ToString()),
                                 new XElement("Priority", PriorityNumber.ToString()),
                                 new XElement("ProductId", String.Format("ItemEntry{0}-{1}", SType.GetString(), Id.ToString())),
                                 new XElement("ProductTitle", Title),
                                 new XElement("ProductType", GType.GetString()),
                                 new XElement("SecondaryIcon", ExtraDetail.GetString()),
                                 new XElement("UseCount", "1")
                                 );

                return(ProductNode);
            }
示例#2
0
        /// <summary>
        /// Initializes a product data entry for use in XML.
        /// </summary>
        /// <param name="currencyType">Type of currency the item is sold for</param>
        /// <param name="description">NFS: World Beta feature, still gonna keep it for MAYBE future-use</param>
        /// <param name="rentalDurationInMinutes">0 if not a rental, rental duration in minutes if else</param>
        /// <param name="hash">Item hash value that is recognized by NFS: World</param>
        /// <param name="iconString">Item icon that is displayed somewhere around its title</param>
        /// <param name="levelLimit">0 if not level limited, minimum level value if else</param>
        /// <param name="tooltipDescription">NFS: World Beta feature, still gonna keep it for MAYBE future-use</param>
        /// <param name="price">How much the item is sold for</param>
        /// <param name="priorityNumber">Priority in the shopping list in-game, commonly used for new items or discounts</param>
        /// <param name="id">Server product id</param>
        /// <param name="title">Item title that is displayed in-game</param>
        /// <param name="itemType">Item type that NFS: World can recognize</param>
        /// <param name="extraDetail">If there is one, a special condition for the item that is displayed in-game</param>
        /// <returns>An XElement wrapped around in ProductTrans tags.</returns>
        public static XElement getProductTransactionEntry(Currency currencyType, String description, Int32 rentalDurationInMinutes, Int64 hash, String iconString, Int16 levelLimit, String tooltipDescription, Int32 price, Int16 priorityNumber, String id, String title, GameItemType itemType, Special extraDetail = Special.None)
        {
            XElement ProductNode =
                new XElement("ProductTrans",
                             new XElement("Currency", currencyType.GetString()),
                             new XElement("Description", description),
                             new XElement("DurationMinute", rentalDurationInMinutes.ToString()),
                             new XElement("Hash", hash.ToString()),
                             new XElement("Icon", iconString),
                             new XElement("Level", levelLimit.ToString()),
                             new XElement("LongDescription", tooltipDescription),
                             new XElement("Price", price.ToString()),
                             new XElement("Priority", priorityNumber.ToString()),
                             new XElement("ProductId", id),
                             new XElement("ProductTitle", title),
                             new XElement("ProductType", itemType.GetString()),
                             new XElement("SecondaryIcon", extraDetail.GetString()),
                             new XElement("UseCount", "1")
                             );

            return(ProductNode);
        }
示例#3
0
 /// <summary>
 /// Initializes a product data entry for use in XML.
 /// </summary>
 /// <param name="currencyType">Type of currency the item is sold for</param>
 /// <param name="description">NFS: World Beta feature, still gonna keep it for MAYBE future-use</param>
 /// <param name="rentalDurationInMinutes">0 if not a rental, rental duration in minutes if else</param>
 /// <param name="hash">Item hash value that is recognized by NFS: World</param>
 /// <param name="iconString">Item icon that is displayed somewhere around its title</param>
 /// <param name="levelLimit">0 if not level limited, minimum level value if else</param>
 /// <param name="tooltipDescription">NFS: World Beta feature, still gonna keep it for MAYBE future-use</param>
 /// <param name="price">How much the item is sold for</param>
 /// <param name="priorityNumber">Priority in the shopping list in-game, commonly used for new items or discounts</param>
 /// <param name="id">Server product id</param>
 /// <param name="title">Item title that is displayed in-game</param>
 /// <param name="itemType">Item type that NFS: World can recognize</param>
 /// <param name="extraDetail">If there is one, a special condition for the item that is displayed in-game</param>
 /// <returns>An XElement wrapped around in ProductTrans tags.</returns>
 public static XElement getProductTransactionEntry(Currency currencyType, String description, Int32 rentalDurationInMinutes, Int64 hash, String iconString, Int16 levelLimit, String tooltipDescription, Int32 price, Int16 priorityNumber, String id, String title, GameItemType itemType, Special extraDetail = Special.None)
 {
     XElement ProductNode =
         new XElement("ProductTrans",
             new XElement("Currency", currencyType.GetString()),
             new XElement("Description", description),
             new XElement("DurationMinute", rentalDurationInMinutes.ToString()),
             new XElement("Hash", hash.ToString()),
             new XElement("Icon", iconString),
             new XElement("Level", levelLimit.ToString()),
             new XElement("LongDescription", tooltipDescription),
             new XElement("Price", price.ToString()),
             new XElement("Priority", priorityNumber.ToString()),
             new XElement("ProductId", id),
             new XElement("ProductTitle", title),
             new XElement("ProductType", itemType.GetString()),
             new XElement("SecondaryIcon", extraDetail.GetString()),
             new XElement("UseCount", "1")
         );
     return ProductNode;
 }
示例#4
0
 /// <summary>
 /// Initializes a product data entry for use in XML.
 /// </summary>
 /// <param name="CurrencyType">Type of currency the item is sold for</param>
 /// <param name="Description">NFS: World Beta feature, still gonna keep it for MAYBE future-use</param>
 /// <param name="RentalDurationInMinutes">0 if not a rental, rental duration in minutes if else</param>
 /// <param name="Hash">Item hash value that is recognized by NFS: World</param>
 /// <param name="IconString">Item icon that is displayed somewhere around it's title</param>
 /// <param name="LevelLimit">0 if not level limited, minimum level value if else</param>
 /// <param name="TooltipDescription">NFS: World Beta feature, still gonna keep it for MAYBE future-use</param>
 /// <param name="Price">How much the item is sold for</param>
 /// <param name="PriorityNumber">Priority in the shopping list in-game, commonly used for new items or discounts</param>
 /// <param name="SType">Item type that the server can recognize, not the game</param>
 /// <param name="Id">Item index for the server</param>
 /// <param name="Title">Item title that is displayed in-game</param>
 /// <param name="GType">Item type that NFS: World can recognize, not the server</param>
 /// <param name="ExtraDetail">If there is one, a special condition for the item that is displayed in-game</param>
 /// <returns>An XElement wrapped around in ProductTrans tags.</returns>
 public static XElement GetProductTransactionEntry(Currency CurrencyType, String Description, Int32 RentalDurationInMinutes, Int64 Hash, String IconString, Int16 LevelLimit, String TooltipDescription, Int32 Price, Int16 PriorityNumber, ServerItemType SType, Int32 Id, String Title, GameItemType GType, Special ExtraDetail)
 {
     XElement ProductNode = 
         new XElement("ProductTrans",
             new XElement("BundleItems",
                 new XAttribute(ServerAttributes.nilNS + "nil", "true")
             ),
             new XElement("CategoryId",
                 new XAttribute(ServerAttributes.nilNS + "nil", "true")
             ),
             new XElement("Currency", CurrencyType.GetString()),
             new XElement("Description", Description),
             new XElement("DurationMinute", RentalDurationInMinutes.ToString()),
             new XElement("Hash", Hash.ToString()),
             new XElement("Icon", IconString),
             new XElement("Level", LevelLimit.ToString()),
             new XElement("LongDescription", TooltipDescription),
             new XElement("Price", Price.ToString()),                   
             new XElement("Priority", PriorityNumber.ToString()),
             new XElement("ProductId", String.Format("ItemEntry{0}-{1}", SType.GetString(), Id.ToString())),
             new XElement("ProductTitle", Title),
             new XElement("ProductType", GType.GetString()),
             new XElement("SecondaryIcon", ExtraDetail.GetString()),
             new XElement("UseCount", "1")
         );
     return ProductNode;
 }