Exemple #1
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);
        }
Exemple #2
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);
        }