Beispiel #1
0
        public static Breakthrough LoadFromXml(SecurityElement element)
        {
            Breakthrough breakthrough = new Breakthrough {
                fromTimes = StrParser.ParseDecInt(element.Attribute("FromTimes"), 0),
                sameCardDeductItemCount = StrParser.ParseDecInt(element.Attribute("SameCardDeductItemCount"), 0),
                itemCostItemId          = StrParser.ParseHexInt(element.Attribute("ItemCostItemId"), 0),
                itemCostItemCount       = StrParser.ParseDecInt(element.Attribute("ItemCostItemCount"), 0),
                powerUpLevelLimit       = StrParser.ParseDecInt(element.Attribute("PowerUpLevelLimit"), 0),
                isCostSameCardItem      = StrParser.ParseBool(element.Attribute("IsCostSameCardItem"), false)
            };

            if (element.Children != null)
            {
                foreach (SecurityElement element2 in element.Children)
                {
                    string tag = element2.Tag;
                    if (tag != null)
                    {
                        if (tag == "Attribute")
                        {
                            GrowthAttribute item = GrowthAttribute.LoadFromXml(element2);
                            if (item.baseValue != 0f)
                            {
                                breakthrough.growthAttributes.Add(item);
                            }
                        }
                        else if (tag == "OtherCost")
                        {
                            goto Label_0100;
                        }
                    }
                    goto Label_0111;
Label_0100:
                    breakthrough.otherCosts.Add(Cost.LoadFromXml(element2));
Label_0111:
                    bool flag1 = element2.Tag != "Attribute";
                }
            }
            return(breakthrough);
        }
Beispiel #2
0
        private AvatarBreakthrough LoadAvatarBreakThoughFromXml(SecurityElement element)
        {
            AvatarBreakthrough breakthrough = new AvatarBreakthrough {
                assetId      = StrParser.ParseHexInt(element.Attribute("AvatarAssetId"), 0),
                highAssetId  = StrParser.ParseHexInt(element.Attribute("HighAvatarAssetId"), 0),
                particleName = StrParser.ParseStr(element.Attribute("ParticleName"), string.Empty),
                canGetSellItemGeneralRewards = StrParser.ParseBool(element.Attribute("CanGetSellItemGeneralRewards"), false),
                leastSameCardCount           = StrParser.ParseDecInt(element.Attribute("LeastSameCardCount"), 0),
                compositeSkillLevel          = StrParser.ParseDecInt(element.Attribute("CompositeSkillLevel"), 0)
            };

            if (element.Children != null)
            {
                foreach (SecurityElement element2 in element.Children)
                {
                    string tag = element2.Tag;
                    if (tag != null)
                    {
                        if (tag != "Breakthrough")
                        {
                            if (tag == "SellReward")
                            {
                                goto Label_011D;
                            }
                            if (tag == "BaseAttributes")
                            {
                                goto Label_0133;
                            }
                            if (tag == "PowerAttribute")
                            {
                                goto Label_01C3;
                            }
                        }
                        else
                        {
                            breakthrough.breakThrough = Breakthrough.LoadFromXml(element2);
                        }
                    }
                    continue;
Label_011D:
                    breakthrough.sellRewards.Add(Reward.LoadFromXml(element2));
                    continue;
Label_0133:
                    if ((element2.Children != null) && (element2.Children.Count != 0))
                    {
                        foreach (SecurityElement element3 in element2.Children)
                        {
                            string str2;
                            if (((str2 = element3.Tag) != null) && (str2 == "Attribute"))
                            {
                                GrowthAttribute item = GrowthAttribute.LoadFromXml(element3);
                                if (item.baseValue != 0f)
                                {
                                    breakthrough.baseGrowthAttributes.Add(item);
                                }
                            }
                        }
                    }
                    continue;
Label_01C3:
                    breakthrough.powerAttributes = PowerAttribute.LoadFromXml(element2);
                }
            }
            return(breakthrough);
        }
Beispiel #3
0
        private EquipBreakthrough LoadEquipmentBreakthroughFromXml(SecurityElement element)
        {
            EquipBreakthrough breakthrough = new EquipBreakthrough {
                canGetSellItemGeneralRewards = StrParser.ParseBool(element.Attribute("CanGetSellItemGeneralRewards"), false)
            };

            if (element.Children != null)
            {
                foreach (SecurityElement element2 in element.Children)
                {
                    string tag = element2.Tag;
                    if (tag != null)
                    {
                        if (tag != "UpgradeRequirementAddtionalCost")
                        {
                            if (tag == "Breakthrough")
                            {
                                goto Label_00B4;
                            }
                            if (tag == "SellReward")
                            {
                                goto Label_00C5;
                            }
                            if (tag == "BaseAttributes")
                            {
                                goto Label_00DB;
                            }
                            if (tag == "PowerAttribute")
                            {
                                goto Label_016B;
                            }
                        }
                        else
                        {
                            breakthrough.upgradeRequirementAddtionalCost = Cost.LoadFromXml(element2);
                        }
                    }
                    continue;
Label_00B4:
                    breakthrough.breakThrough = Breakthrough.LoadFromXml(element2);
                    continue;
Label_00C5:
                    breakthrough.sellRewards.Add(Reward.LoadFromXml(element2));
                    continue;
Label_00DB:
                    if ((element2.Children != null) && (element2.Children.Count != 0))
                    {
                        foreach (SecurityElement element3 in element2.Children)
                        {
                            string str2;
                            if (((str2 = element3.Tag) != null) && (str2 == "Attribute"))
                            {
                                GrowthAttribute item = GrowthAttribute.LoadFromXml(element3);
                                if (item.baseValue != 0f)
                                {
                                    breakthrough.baseGrowthAttributes.Add(item);
                                }
                            }
                        }
                    }
                    continue;
Label_016B:
                    breakthrough.powerAttributes = PowerAttribute.LoadFromXml(element2);
                }
            }
            return(breakthrough);
        }