Exemplo n.º 1
0
        public void Load(UXMLElement element)
        {
            id         = element.GetString("id");
            nameId     = element.GetString("name");
            iosStoreId = element.GetString("ios_store_id");
            price      = new PriceData(element);
            bonus      = element.GetInt("bonus");
            realPrice  = element.GetString("real_price");
            isBest     = element.GetBool("is_best");
            isPopular  = element.GetBool("is_popular");
            isBank     = element.GetBool("is_bank");

            discountData = new DiscountData();
            var discountElement = element.Element("discount_info");

            if (discountElement != null)
            {
                discountData.Load(discountElement);
            }

            rewards = new List <DropItem>();
            var rewardsElement = element.Element("rewards");

            if (rewardsElement != null)
            {
                foreach (UXMLElement rewardElement in rewardsElement.Elements("reward"))
                {
                    DropItem dropItem = new DropItem(rewardElement);
                    rewards.Add(dropItem);
                }
            }
        }
Exemplo n.º 2
0
 public override void Load(UXMLElement element)
 {
     base.Load(element);
     price        = new PriceData(element);
     prob         = element.GetFloat("prob");
     invitationId = element.GetString("invitation");
 }
Exemplo n.º 3
0
        public override void Load(UXMLElement element)
        {
            base.Load(element);
            price = new PriceData(element);

            Value        = element.GetInt("value");
            SpecialValue = element.GetInt("special");
        }
Exemplo n.º 4
0
 public override void Load(UXMLElement element)
 {
     base.Load(element);
     price = new PriceData(element);
     prob  = element.GetFloat("prob");
     rooms.Clear();
     foreach (string roomId in element.GetString("drop_rooms").Split(new char[] { ',' }, System.StringSplitOptions.RemoveEmptyEntries))
     {
         rooms.Add(roomId);
     }
     bonusId = element.GetString("bonus_id");
 }
Exemplo n.º 5
0
        public override void Load(UXMLElement element)
        {
            base.Load(element);
            price       = new PriceData(element);
            ingredients = new Dictionary <string, int>();
            value       = element.GetFloat("value");
            interval    = element.GetInt("time");
            bonusType   = element.GetEnum <BonusType>("type");

            element.Element("formula").Elements("ingredient").ForEach(ingredientElement => {
                string ingredientId       = ingredientElement.GetString("id");
                int count                 = ingredientElement.GetInt("count");
                ingredients[ingredientId] = count;
            });
        }
Exemplo n.º 6
0
 public override void Load(UXMLElement element)
 {
     base.Load(element);
     price       = new PriceData(element);
     storeItemId = element.GetString("store_item_id");
 }
Exemplo n.º 7
0
 public override void Load(UXMLElement element)
 {
     base.Load(element);
     price = new PriceData(element);
     prob  = element.GetFloat("prob");
 }
Exemplo n.º 8
0
 public override void Load(UXMLElement element)
 {
     base.Load(element);
     price = new PriceData(element);
 }