Ejemplo n.º 1
0
        public float GetOneEquipmentBasePower(int equipmentId, int level, int breakthrough)
        {
            Equipment equipmentById = this.GetEquipmentById(equipmentId);

            if (equipmentById == null)
            {
                Logger.Warn("Invalid Equipment Id : {0:X}", new object[] { equipmentId });
                return(0f);
            }
            EquipBreakthrough breakthroughByTimes = equipmentById.GetBreakthroughByTimes(breakthrough);

            if (breakthroughByTimes == null)
            {
                Logger.Warn("Invalid Equipment Breakthrough : {0:X}", new object[] { breakthrough });
                return(0f);
            }
            PowerAttribute powerAttributes = breakthroughByTimes.powerAttributes;

            if (powerAttributes == null)
            {
                Logger.Warn("Invalid Equipment Breakthrough PowerBuffer is Not Find!", new object[0]);
                return(0f);
            }
            return(powerAttributes.GetValue(level));
        }
Ejemplo n.º 2
0
        public float GetOneSkillBasePower(int skillId, int level)
        {
            Skill skillById = this.GetSkillById(skillId);

            if (skillById == null)
            {
                Logger.Warn("Invalid Skill Id :{0:X}", new object[] { skillId });
                return(0f);
            }
            PowerAttribute powerAttributes = skillById.powerAttributes;

            if (powerAttributes == null)
            {
                Logger.Warn("Skill PowerBuffer is Not Find!", new object[0]);
                return(0f);
            }
            return(powerAttributes.GetValue(level));
        }
Ejemplo n.º 3
0
        private Skill LoadSkillFromXml(SecurityElement element)
        {
            Skill skill = new Skill {
                id           = StrParser.ParseHexInt(element.Attribute("Id"), 0),
                type         = TypeNameContainer <CombatTurn._Type> .Parse(element.Attribute("Type"), 0),
                sortIndex    = StrParser.ParseDecInt(element.Attribute("SortIndex"), 0),
                qualityLevel = StrParser.ParseDecInt(element.Attribute("QualityLevel"), 0)
            };

            skill.uiPfxName = StrParser.ParseStr(element.Attribute("UIPfxName"), skill.uiPfxName);
            skill.needSkillScrollToRobShow = StrParser.ParseBool(element.Attribute("NeedSkillScrollToRobShow"), false);
            skill.activeableAssembleDesc   = StrParser.ParseStr(element.Attribute("ActiveableAssembleDesc"), string.Empty);
            skill.isSuperSkill             = StrParser.ParseBool(element.Attribute("IsSuperSkill"), false);
            skill.roleVoiceName            = element.Attribute("RoleVoiceName");
            if (element.Children != null)
            {
                foreach (SecurityElement element2 in element.Children)
                {
                    string tag = element2.Tag;
                    if (tag != null)
                    {
                        if (tag != "LevelDesc")
                        {
                            if (tag == "LevelModiferSets")
                            {
                                goto Label_0163;
                            }
                            if (tag == "GetWay")
                            {
                                goto Label_0176;
                            }
                            if (tag == "SkillUnlockDesc")
                            {
                                goto Label_0189;
                            }
                            if (tag == "PowerAttribute")
                            {
                                goto Label_019D;
                            }
                        }
                        else
                        {
                            skill.levelDescs.Add(IncreaseString.LoadFromXml(element2));
                        }
                    }
                    continue;
Label_0163:
                    skill.levelModiferSets.Add(PropertyModifierSet.LoadFromXml(element2));
                    continue;
Label_0176:
                    skill.getways.Add(GetWay.LoadFromXml(element2));
                    continue;
Label_0189:
                    skill.skillUnlockDescs.Add(this.LoadSkillUnlockDescFromXml(element2));
                    continue;
Label_019D:
                    skill.powerAttributes = PowerAttribute.LoadFromXml(element2);
                }
            }
            return(skill);
        }
Ejemplo n.º 4
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);
        }
Ejemplo n.º 5
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);
        }