예제 #1
0
        private Goods loadGoodsFromXml(SecurityElement element)
        {
            Goods goods = new Goods {
                goodsId = StrParser.ParseHexInt(element.Attribute("GoodsId"), 0),
                weight  = StrParser.ParseDecInt(element.Attribute("Weight"), 0),
                quality = StrParser.ParseDecInt(element.Attribute("Quality"), 0),
                type    = TypeNameContainer <_RefreshType> .Parse(element.Attribute("Type"), 0)
            };

            if (element.Children != null)
            {
                foreach (SecurityElement element2 in element.Children)
                {
                    string tag = element2.Tag;
                    if (tag != null)
                    {
                        if (tag != "Cost")
                        {
                            if (tag == "DiscountCost")
                            {
                                goto Label_00C8;
                            }
                            if (tag == "Reward")
                            {
                                goto Label_00D6;
                            }
                        }
                        else
                        {
                            goods.cost = Cost.LoadFromXml(element2);
                        }
                    }
                    continue;
Label_00C8:
                    goods.discountCost = Cost.LoadFromXml(element2);
                    continue;
Label_00D6:
                    goods.reward = Reward.LoadFromXml(element2);
                }
            }
            return(goods);
        }
예제 #2
0
        private MeridianGroup LoadMeridianGroupFromXml(SecurityElement element)
        {
            MeridianGroup group = new MeridianGroup {
                type = TypeNameContainer <_MeridianType> .Parse(element.Attribute("Type"), 0)
            };

            if (element.Children != null)
            {
                foreach (SecurityElement element2 in element.Children)
                {
                    string str;
                    if (((str = element2.Tag) != null) && (str == "Meridian"))
                    {
                        Meridian item = this.LoadMeridianFromXml(element2);
                        group.meridians.Add(item);
                    }
                }
            }
            return(group);
        }
예제 #3
0
 private Dialogues LoadDialoguesFromXml(SecurityElement element, int dialogueIndex)
 {
     return(new Dialogues {
         dialogueIndex = dialogueIndex,
         dialogueCampType = TypeNameContainer <_CampType> .Parse(element.Attribute("DialogueCampType"), 0),
         positionType = TypeNameContainer <_PositionType> .Parse(element.Attribute("PositionType"), 0),
         portraitType = TypeNameContainer <_PortraitType> .Parse(element.Attribute("PortraitType"), 0),
         portraitDisplayType = TypeNameContainer <_PortraitDisplayType> .Parse(element.Attribute("PortraitDisplayType"), 0),
         avatarId = StrParser.ParseHexInt(element.Attribute("AvatarId"), 0),
         portraitAnimation = StrParser.ParseStr(element.Attribute("PortraitAnimation"), ""),
         portraitName = StrParser.ParseStr(element.Attribute("PortraitName"), "", true),
         npcId = StrParser.ParseHexInt(element.Attribute("NpcId"), 0),
         npcStageIndex = StrParser.ParseDecInt(element.Attribute("NpcStageIndex"), 0),
         npcTeamIndex = StrParser.ParseDecInt(element.Attribute("NpcTeamIndex"), 0),
         npcIndex = StrParser.ParseDecInt(element.Attribute("NpcIndex"), 0),
         avatarAnimation = StrParser.ParseStr(element.Attribute("AvatarAnimation"), ""),
         dialogueValue = StrParser.ParseStr(element.Attribute("DialogueValue"), "", true),
         portraitIconIndex = StrParser.ParseDecInt(element.Attribute("PortraitIconIndex"), 0)
     });
 }
예제 #4
0
        public static bool Initialize()
        {
            bool flag = false;

            flag &= TypeNameContainer <_TimeDurationType> .RegisterType("Era", 1);

            flag &= TypeNameContainer <_TimeDurationType> .RegisterType("Year", 2);

            flag &= TypeNameContainer <_TimeDurationType> .RegisterType("Month", 3);

            flag &= TypeNameContainer <_TimeDurationType> .RegisterType("Day", 4);

            flag &= TypeNameContainer <_TimeDurationType> .RegisterType("Hour", 5);

            flag &= TypeNameContainer <_TimeDurationType> .RegisterType("Minute", 6);

            flag &= TypeNameContainer <_TimeDurationType> .RegisterType("Second", 7);

            return(flag & TypeNameContainer <_TimeDurationType> .RegisterType("Week", 8));
        }
예제 #5
0
            public static bool Initialize()
            {
                bool flag = false;

                flag &= TypeNameContainer <CombatTurn._Type> .RegisterType("ActiveSkill", 1);

                flag &= TypeNameContainer <CombatTurn._Type> .RegisterType("NormalSkill", 2);

                flag &= TypeNameContainer <CombatTurn._Type> .RegisterType("EnterBattleSkill", 3);

                flag &= TypeNameContainer <CombatTurn._Type> .RegisterType("DeathSkill", 4);

                flag &= TypeNameContainer <CombatTurn._Type> .RegisterType("PassiveSkill", 5);

                flag &= TypeNameContainer <CombatTurn._Type> .RegisterType("DomineerSkill", 6);

                flag &= TypeNameContainer <CombatTurn._Type> .RegisterType("CompositeSkill", 7);

                return(flag & TypeNameContainer <CombatTurn._Type> .RegisterType("All", -1));
            }
예제 #6
0
            public static bool Initialize()
            {
                bool flag = false;

                flag &= TypeNameContainer <OperationConfig._OperationType> .RegisterType("UnKnown", 0);

                flag &= TypeNameContainer <OperationConfig._OperationType> .RegisterType("SinglePurchase", 1);

                flag &= TypeNameContainer <OperationConfig._OperationType> .RegisterType("TotalPurchase", 2);

                flag &= TypeNameContainer <OperationConfig._OperationType> .RegisterType("TotalConsume", 3);

                flag &= TypeNameContainer <OperationConfig._OperationType> .RegisterType("PveRankActivity", 4);

                flag &= TypeNameContainer <OperationConfig._OperationType> .RegisterType("MelaleucaFloorRankActivity", 5);

                flag &= TypeNameContainer <OperationConfig._OperationType> .RegisterType("EquipmentBreakThroughActivity", 6);

                return(flag & TypeNameContainer <OperationConfig._OperationType> .RegisterType("AvatarBreakThroughActivity", 7));
            }
예제 #7
0
            public static bool Initialize()
            {
                bool flag = false;

                flag &= TypeNameContainer <AvatarConfig._AvatarCountryType> .RegisterType("QunXiong", 1, "Country_QunXiong");

                flag &= TypeNameContainer <AvatarConfig._AvatarCountryType> .RegisterType("QinGuo", 2, "Country_QinGuo");

                flag &= TypeNameContainer <AvatarConfig._AvatarCountryType> .RegisterType("YanGuo", 4, "Country_YanGuo");

                flag &= TypeNameContainer <AvatarConfig._AvatarCountryType> .RegisterType("ChuGuo", 8, "Country_ChuGuo");

                flag &= TypeNameContainer <AvatarConfig._AvatarCountryType> .RegisterType("HanGuo", 0x10, "Country_HanGuo");

                flag &= TypeNameContainer <AvatarConfig._AvatarCountryType> .RegisterType("All", -1, "Country_All");

                flag &= TypeNameContainer <AvatarConfig._AvatarCountryType> .RegisterType("LiuGuo", 0x1d);

                return(flag & TypeNameContainer <AvatarConfig._AvatarCountryType> .RegisterType("NoCountry", 0x40000000, "Country_NoCountry"));
            }
예제 #8
0
파일: Buff.cs 프로젝트: fiskercui/TestUnity
            public static bool Initialize()
            {
                bool flag = false;

                flag &= TypeNameContainer <ClientServerCommon.Buff._BuffType> .RegisterType("Normal", 1);

                flag &= TypeNameContainer <ClientServerCommon.Buff._BuffType> .RegisterType("Beneficial", 2);

                flag &= TypeNameContainer <ClientServerCommon.Buff._BuffType> .RegisterType("Harmful", 4);

                flag &= TypeNameContainer <ClientServerCommon.Buff._BuffType> .RegisterType("Dot", 8);

                flag &= TypeNameContainer <ClientServerCommon.Buff._BuffType> .RegisterType("Hot", 0x10);

                flag &= TypeNameContainer <ClientServerCommon.Buff._BuffType> .RegisterType("Stun", 0x20);

                flag &= TypeNameContainer <ClientServerCommon.Buff._BuffType> .RegisterType("Domineer", 0x40);

                return(flag & TypeNameContainer <ClientServerCommon.Buff._BuffType> .RegisterType("All", -1));
            }
예제 #9
0
        private void LoadQuestFromXml(SecurityElement element)
        {
            Quest item = new Quest {
                questId             = StrParser.ParseHexInt(element.Attribute("QuestId"), 0),
                type                = TypeNameContainer <_Type> .Parse(element.Attribute("Type"), 0),
                gotoUI              = TypeNameContainer <_UIType> .Parse(element.Attribute("GoToUI"), 0),
                resetType           = TypeNameContainer <_TimeDurationType> .Parse(element.Attribute("ResetType"), 0),
                eventType           = TypeNameContainer <_EventType> .Parse(element.Attribute("EventType"), 0),
                totalStepCount      = StrParser.ParseDecInt(element.Attribute("TotalStepCount"), 0),
                loopEvent           = StrParser.ParseBool(element.Attribute("LoopEvent"), false),
                index               = StrParser.ParseDecInt(element.Attribute("Index"), 0),
                showFx              = StrParser.ParseBool(element.Attribute("ShowFx"), false),
                notHideWhenFinished = StrParser.ParseBool(element.Attribute("NotHideWhenFinished"), false)
            };

            if (element.Children != null)
            {
                foreach (SecurityElement element2 in element.Children)
                {
                    Reward reward;
                    string tag = element2.Tag;
                    if (tag != null)
                    {
                        if (tag == "Condition")
                        {
                            Condition condition = this.LoadConditionFromXml(element2);
                            item.conditions.Add(condition);
                        }
                        else if (tag == "Reward")
                        {
                            goto Label_0152;
                        }
                    }
                    continue;
Label_0152:
                    reward = Reward.LoadFromXml(element2);
                    item.rewards.Add(reward);
                }
            }
            this._quests.Add(item);
        }
예제 #10
0
        public Refresh LoadRefreshFromXml(SecurityElement element)
        {
            Refresh refresh = new Refresh {
                RefreshId   = StrParser.ParseHexInt(element.Attribute("RefreshId"), 0),
                OperateType = TypeNameContainer <_OperateType> .Parse(element.Attribute("OperateType"), 0),
                RefreshType = TypeNameContainer <_RefreshType> .Parse(element.Attribute("RefreshType"), 0),
                RefreshName = StrParser.ParseStr(element.Attribute("RefreshName"), "")
            };

            if (element.Children != null)
            {
                foreach (SecurityElement element2 in element.Children)
                {
                    Counter counter;
                    string  tag = element2.Tag;
                    if (tag != null)
                    {
                        if (tag == "Cost")
                        {
                            refresh.Cost = new Cost();
                            refresh.Cost = Cost.LoadFromXml(element2);
                        }
                        else if (tag == "Counter")
                        {
                            goto Label_00D9;
                        }
                    }
                    continue;
Label_00D9:
                    counter                      = new Counter();
                    counter.CounterId            = StrParser.ParseHexInt(element2.Attribute("CounterId"), 0);
                    counter.NeedRefreshTimes     = StrParser.ParseDecInt(element2.Attribute("NeedRefreshTimes"), 0);
                    counter.CloseActivatedTimes  = StrParser.ParseDecInt(element2.Attribute("CloseActivatedTimes"), 0);
                    counter.EffectiveProbability = StrParser.ParseDouble(element2.Attribute("EffectiveProbability"), 0.0);
                    counter.CardPackId           = StrParser.ParseHexInt(element2.Attribute("CardPackId"), 0);
                    counter.IsShowCounter        = StrParser.ParseBool(element2.Attribute("IsShowCounter"), false);
                    refresh.Counters.Add(counter);
                }
            }
            return(refresh);
        }
예제 #11
0
        public void LoadMysteryActivitysFromXml(SecurityElement element)
        {
            if (element.Children != null)
            {
                foreach (SecurityElement element2 in element.Children)
                {
                    string str;
                    if (((str = element2.Tag) != null) && (str == "MysteryActivity"))
                    {
                        MysteryActivity item = new MysteryActivity {
                            ActivityNum      = StrParser.ParseDecInt(element2.Attribute("ActivityNum"), 0),
                            FirstRefreshType = TypeNameContainer <_RefreshType> .Parse(element2.Attribute("FirstRefreshType"), 0),
                            IsDelItem        = StrParser.ParseBool(element2.Attribute("IsDelItem"), false),
                            ItemId           = StrParser.ParseHexInt(element2.Attribute("ItemId"), 0),
                            ShowCardId1      = StrParser.ParseHexInt(element2.Attribute("ShowCardId1"), 0),
                            ShowCardId2      = StrParser.ParseHexInt(element2.Attribute("ShowCardId2"), 0),
                            ShowCardId3      = StrParser.ParseHexInt(element2.Attribute("ShowCardId3"), 0)
                        };
                        foreach (SecurityElement element3 in element2.Children)
                        {
                            string tag = element3.Tag;
                            if (tag != null)
                            {
                                if (tag == "Refresh")
                                {
                                    item.Refreshs.Add(this.LoadRefreshFromXml(element3));
                                }
                                else if (tag == "TavernRewardInfo")
                                {
                                    goto Label_0147;
                                }
                            }
                            continue;
Label_0147:
                            item.TavernRewardInfos.Add(this.LoadTavernRewardInfoFromXml(element3));
                        }
                        this._mysteryActivitys.Add(item);
                    }
                }
            }
        }
예제 #12
0
        private Part LoadPartFromXml(SecurityElement element, Avatar avatar)
        {
            Part part = new Part {
                Avatar       = avatar,
                typeId       = StrParser.ParseHexInt(element.Attribute("TypeId"), 0),
                assembleType = TypeNameContainer <_AssembleType> .Parse(element.Attribute("AssembleType"), 0),
                mountMarker  = StrParser.ParseStr(element.Attribute("MountMarker"), "")
            };

            if (element.Children != null)
            {
                foreach (SecurityElement element2 in element.Children)
                {
                    if (element2.Tag == "Component")
                    {
                        part.components.Add(this.LoadComponentFromXml(element2, part));
                    }
                }
            }
            return(part);
        }
예제 #13
0
        private EmBattleAttribute LoadAdditionsFromXml(SecurityElement element)
        {
            EmBattleAttribute attribute = new EmBattleAttribute {
                type = TypeNameContainer <PositionConfig._EmBattleType> .Parse(element.Attribute("AffectType"), 0),
                name = StrParser.ParseStr(element.Attribute("Name"), null),
                desc = StrParser.ParseStr(element.Attribute("Desc"), null)
            };

            if (element.Children != null)
            {
                foreach (SecurityElement element2 in element.Children)
                {
                    if (element2.Tag == "PropertyModifier")
                    {
                        PropertyModifier item = PropertyModifier.LoadFromXml(element2);
                        attribute.modifiers.Add(item);
                    }
                }
            }
            return(attribute);
        }
예제 #14
0
        private PlayerLevel LoadPlayerLevelFromXml(SecurityElement element)
        {
            PlayerLevel level = new PlayerLevel {
                playerLevel  = StrParser.ParseDecInt(element.Attribute("PlayerLevel"), 0),
                levelUpDesc  = StrParser.ParseStr(element.Attribute("LevelUpDesc"), ""),
                linkedUIType = TypeNameContainer <_UIType> .Parse(element.Attribute("LinkedUIType"), 0)
            };

            if (element.Children != null)
            {
                foreach (SecurityElement element2 in element.Children)
                {
                    string str;
                    if (((str = element2.Tag) != null) && (str == "FunctionInfo"))
                    {
                        level.functionInfos.Add(this.LoadFunctionInfoFromXml(element2));
                    }
                }
            }
            return(level);
        }
예제 #15
0
        private EmBattleAttribute LoadEmBattleAttributeFromXml(SecurityElement element)
        {
            EmBattleAttribute attribute = new EmBattleAttribute {
                type = TypeNameContainer <_EmBattleType> .Parse(element.Attribute("Type"), 0),
                desc = StrParser.ParseStr(element.Attribute("Desc"), "", true)
            };

            if (element.Children != null)
            {
                foreach (SecurityElement element2 in element.Children)
                {
                    string str;
                    if (((str = element2.Tag) != null) && (str == "PropertyModifier"))
                    {
                        PropertyModifier item = PropertyModifier.LoadFromXml(element2);
                        attribute.modifiers.Add(item);
                    }
                }
            }
            return(attribute);
        }
예제 #16
0
        public static bool Initialize()
        {
            bool flag = false;

            flag &= TypeNameContainer <_PVEGridType> .RegisterType("Empty", 0);

            flag &= TypeNameContainer <_PVEGridType> .RegisterType("Battle", 1);

            flag &= TypeNameContainer <_PVEGridType> .RegisterType("Reward", 2);

            flag &= TypeNameContainer <_PVEGridType> .RegisterType("Guess", 3);

            flag &= TypeNameContainer <_PVEGridType> .RegisterType("StepTrap", 4);

            flag &= TypeNameContainer <_PVEGridType> .RegisterType("AttributeTrap", 5);

            flag &= TypeNameContainer <_PVEGridType> .RegisterType("StartPos", 6);

            flag &= TypeNameContainer <_PVEGridType> .RegisterType("EndPos", 7);

            return(flag & TypeNameContainer <_PVEGridType> .RegisterType("NoAccess", 8));
        }
예제 #17
0
        private RewardCounter LoadRewardCounterFromXml(SecurityElement element)
        {
            RewardCounter counter = new RewardCounter {
                NumberPositionType = TypeNameContainer <_NumberPositionType> .Parse(element.Attribute("NumberPositionType"), 0),
                FunctionOpen       = StrParser.ParseBool(element.Attribute("FunctionOpen"), false),
                CounterStartPoint  = StrParser.ParseDecInt(element.Attribute("CounterStartPoint"), 0),
                ActiveTimes        = StrParser.ParseDecInt(element.Attribute("ActiveTimes"), 0)
            };

            if (element.Children != null)
            {
                foreach (SecurityElement element2 in element.Children)
                {
                    string str;
                    if (((str = element2.Tag) != null) && (str == "NumberMapping"))
                    {
                        counter.NumberMappings.Add(this.LoadNumberMappingFromXml(element2));
                    }
                }
            }
            return(counter);
        }
예제 #18
0
 private void LoadDinerBagsFromXml(SecurityElement element)
 {
     if (element.Tag == "DinerBagCollection")
     {
         foreach (SecurityElement element2 in element.Children)
         {
             string str;
             if (((str = element2.Tag) != null) && (str == "DinerBag"))
             {
                 DinerBag item = new DinerBag {
                     BagId        = StrParser.ParseHexInt(element2.Attribute("BagId"), 0),
                     QualityType  = TypeNameContainer <_AvatarRarityType> .Parse(element2.Attribute("QualityType"), 0),
                     RefreshType  = TypeNameContainer <_DinerRefreshType> .Parse(element2.Attribute("RefreshType"), 0),
                     IconId       = StrParser.ParseHexInt(element2.Attribute("IconId"), 0),
                     BackGroundId = StrParser.ParseHexInt(element2.Attribute("BackGroundId"), 0)
                 };
                 item.DinerBagIds.AddRange(this.LoadDinerBagIdsFromXml(element2.SearchForChildByTag("DinerBagIdCollection")));
                 item.Costs.AddRange(this.LoadCostsFromXml(element2.SearchForChildByTag("CostCollection")));
                 this.DinerBags.Add(item);
             }
         }
     }
 }
예제 #19
0
        private void LoadFriendCombatInfoFromXml(SecurityElement element)
        {
            FriendCombatInfo info = new FriendCombatInfo {
                MaxGetCombatRewardCount = StrParser.ParseDecInt(element.Attribute("MaxGetCombatRewardCount"), 0),
                GetCombatRewardPercent  = StrParser.ParseFloat(element.Attribute("GetCombatRewardPercent"), 0f),
                MaxCombatRound          = StrParser.ParseDecInt(element.Attribute("MaxCombatRound"), 0),
                MaxRoundWhoWin          = TypeNameContainer <ClientServerCommon._CampType> .Parse(element.Attribute("MaxRoundWhoWin"), 0),
                SenceId = StrParser.ParseHexInt(element.Attribute("SenceId"), 0)
            };

            if (element.Children != null)
            {
                foreach (SecurityElement element2 in element.Children)
                {
                    string str;
                    if (((str = element2.Tag) != null) && (str == "FriendCombatReward"))
                    {
                        info.FriendCombatRewards.Add(this.LoadFriendCombatRewardFromXml(element2));
                    }
                }
            }
            this._friendCombat = info;
        }
예제 #20
0
        private void LoadGuideSetFromXml(SecurityElement element)
        {
            int num = TypeNameContainer <_GuideType> .Parse(element.Attribute("GuideType"), 0);

            if (element.Children != null)
            {
                foreach (SecurityElement element2 in element.Children)
                {
                    if (element2.Tag.Equals("MainType"))
                    {
                        switch (num)
                        {
                        case 1:
                            this._mainTypes.Add(this.LoadMainTypeFromXml(element2));
                            break;

                        case 2:
                            this._freshmanAdvises.Add(this.LoadMainTypeFromXml(element2));
                            break;
                        }
                    }
                }
            }
        }
예제 #21
0
            public static bool Initialize()
            {
                bool flag = false;

                flag &= TypeNameContainer <DanConfig._IntroduceType> .RegisterType("DanIntroduce", 1, "DanIntroduce");

                flag &= TypeNameContainer <DanConfig._IntroduceType> .RegisterType("DanFurnace", 2, "DanFurnace");

                flag &= TypeNameContainer <DanConfig._IntroduceType> .RegisterType("DanAttic", 3, "DanAttic");

                flag &= TypeNameContainer <DanConfig._IntroduceType> .RegisterType("DanDecompose", 4, "DanDecompose");

                flag &= TypeNameContainer <DanConfig._IntroduceType> .RegisterType("DanMaterial", 5, "DanMaterial");

                flag &= TypeNameContainer <DanConfig._IntroduceType> .RegisterType("DanEquip", 6, "DanEquip");

                flag &= TypeNameContainer <DanConfig._IntroduceType> .RegisterType("DanLevelUp", 7, "DanLevelUp");

                flag &= TypeNameContainer <DanConfig._IntroduceType> .RegisterType("DanBreakUp", 8, "DanBreakUp");

                flag &= TypeNameContainer <DanConfig._IntroduceType> .RegisterType("DanWish", 9, "DanWish");

                return(flag & TypeNameContainer <DanConfig._IntroduceType> .RegisterType("DanAttri", 10, "DanAttri"));
            }
예제 #22
0
            public static bool Initialize()
            {
                TypeNameContainer <DanConfig._DanFuncParam> .RegisterType("Damage", 1);

                TypeNameContainer <DanConfig._DanFuncParam> .RegisterType("CriticalDmg", 2);

                TypeNameContainer <DanConfig._DanFuncParam> .RegisterType("CounterDmg", 3);

                TypeNameContainer <DanConfig._DanFuncParam> .RegisterType("AllDmg", 4);

                TypeNameContainer <DanConfig._DanFuncParam> .RegisterType("CounterRate", 10);

                TypeNameContainer <DanConfig._DanFuncParam> .RegisterType("CtrlRate", 11);

                TypeNameContainer <DanConfig._DanFuncParam> .RegisterType("CompositeSkillRate", 12);

                TypeNameContainer <DanConfig._DanFuncParam> .RegisterType("DmgHealByDmg", 20);

                TypeNameContainer <DanConfig._DanFuncParam> .RegisterType("DmgHealByAP", 0x15);

                TypeNameContainer <DanConfig._DanFuncParam> .RegisterType("DmgHealByMaxHP", 0x16);

                return(false);
            }
예제 #23
0
        private AvatarAction LoadActionFromXml(SecurityElement element, int sourceTurnId)
        {
            AvatarAction action = new AvatarAction {
                sourceTurnId    = sourceTurnId,
                id              = StrParser.ParseHexInt(element.Attribute("Id"), 0),
                actionType      = TypeNameContainer <AvatarAction._Type> .Parse(element.Attribute("ActionType"), 0),
                weaponType      = TypeNameContainer <EquipmentConfig._WeaponType> .Parse(element.Attribute("WeaponType"), 0),
                combatStateType = TypeNameContainer <_CombatStateType> .Parse(element.Attribute("CombatStateType"), 0),
                loop            = StrParser.ParseBool(element.Attribute("Loop"), false),
                //sourceTurnId = sourceTurnId
            };

            if (element.Children != null)
            {
                foreach (SecurityElement element2 in element.Children)
                {
                    string tag = element2.Tag;
                    if (tag != null)
                    {
                        if (tag == "Event")
                        {
                            action.events.Add(this.LoadEventFromXml(element2, action.events.Count, sourceTurnId));
                        }
                        else if (tag == "Animation")
                        {
                            goto Label_00F2;
                        }
                    }
                    continue;
Label_00F2:
                    action.animations.Add(this.LoadAnimationFromXml(element2));
                }
                action.animations.Sort((Comparison <AvatarAction.Animation>)((a1, a2) => (a2.type - a1.type)));
            }
            return(action);
        }
예제 #24
0
        private NumberPosition LoadNumberPositionFromXml(SecurityElement element)
        {
            NumberPosition position = new NumberPosition {
                NumberPositionType = TypeNameContainer <_NumberPositionType> .Parse(element.Attribute("NumberPositionType"), 0),
                NeedLevel          = StrParser.ParseDecInt(element.Attribute("NeedLevel"), 0)
            };

            if (element.Children != null)
            {
                foreach (SecurityElement element2 in element.Children)
                {
                    string str;
                    if (((str = element2.Tag) != null) && (str == "NumberWeight"))
                    {
                        NumberWeight item = new NumberWeight {
                            Number = StrParser.ParseDecInt(element2.Attribute("Number"), 0),
                            Weight = StrParser.ParseDecInt(element2.Attribute("Weight"), 0)
                        };
                        position.NumberWeights.Add(item);
                    }
                }
            }
            return(position);
        }
예제 #25
0
        public static bool Initialize()
        {
            bool flag = false;

            flag &= TypeNameContainer <MonthCardType> .RegisterType("MONTH_CARD_TYPE_1", 1);

            flag &= TypeNameContainer <MonthCardType> .RegisterType("MONTH_CARD_TYPE_2", 2);

            flag &= TypeNameContainer <MonthCardType> .RegisterType("MONTH_CARD_TYPE_3", 3);

            flag &= TypeNameContainer <MonthCardType> .RegisterType("MONTH_CARD_TYPE_4", 4);

            flag &= TypeNameContainer <MonthCardType> .RegisterType("MONTH_CARD_TYPE_5", 5);

            flag &= TypeNameContainer <MonthCardType> .RegisterType("MONTH_CARD_TYPE_6", 6);

            flag &= TypeNameContainer <MonthCardType> .RegisterType("MONTH_CARD_TYPE_7", 7);

            flag &= TypeNameContainer <MonthCardType> .RegisterType("MONTH_CARD_TYPE_8", 8);

            flag &= TypeNameContainer <MonthCardType> .RegisterType("MONTH_CARD_TYPE_9", 9);

            return(flag & TypeNameContainer <MonthCardType> .RegisterType("MONTH_CARD_TYPE_10", 10));
        }
예제 #26
0
 public static int ParseAppGoodChannelType(string stageName, int defValue)
 {
     return(TypeNameContainer <_DeviceType> .Parse(stageName, defValue));
 }
예제 #27
0
        public static bool Initialize()
        {
            bool flag = false;

            TypeNameContainer <_AvatarAttributeType> .SetTextSectionName("Code_AvatarAttribute");

            flag &= TypeNameContainer <_AvatarAttributeType> .RegisterType("MaxHP", 1, "AvatarAttribute_MaxHP");

            flag &= TypeNameContainer <_AvatarAttributeType> .RegisterType("HP", 2, "AvatarAttribute_HP");

            flag &= TypeNameContainer <_AvatarAttributeType> .RegisterType("DHP", 3, "AvatarAttribute_DHP");

            flag &= TypeNameContainer <_AvatarAttributeType> .RegisterType("Speed", 4, "AvatarAttribute_Speed");

            flag &= TypeNameContainer <_AvatarAttributeType> .RegisterType("PAP", 5, "AvatarAttribute_PAP");

            flag &= TypeNameContainer <_AvatarAttributeType> .RegisterType("PDP", 6, "AvatarAttribute_PDP");

            flag &= TypeNameContainer <_AvatarAttributeType> .RegisterType("MAP", 7, "AvatarAttribute_MAP");

            flag &= TypeNameContainer <_AvatarAttributeType> .RegisterType("MDP", 8, "AvatarAttribute_MDP");

            flag &= TypeNameContainer <_AvatarAttributeType> .RegisterType("BSP", 9, "AvatarAttribute_BSP");

            flag &= TypeNameContainer <_AvatarAttributeType> .RegisterType("DSP", 0x10, "AvatarAttribute_DSP");

            flag &= TypeNameContainer <_AvatarAttributeType> .RegisterType("SP", 0x11, "AvatarAttribute_SP");

            flag &= TypeNameContainer <_AvatarAttributeType> .RegisterType("SPA", 0x12, "AvatarAttribute_SPA");

            flag &= TypeNameContainer <_AvatarAttributeType> .RegisterType("SPD", 0x13, "AvatarAttribute_SPD");

            flag &= TypeNameContainer <_AvatarAttributeType> .RegisterType("PAR", 0x21, "AvatarAttribute_PAR");

            flag &= TypeNameContainer <_AvatarAttributeType> .RegisterType("PDR", 0x22, "AvatarAttribute_PDR");

            flag &= TypeNameContainer <_AvatarAttributeType> .RegisterType("MAR", 0x23, "AvatarAttribute_MAR");

            flag &= TypeNameContainer <_AvatarAttributeType> .RegisterType("MDR", 0x24, "AvatarAttribute_MDR");

            flag &= TypeNameContainer <_AvatarAttributeType> .RegisterType("PMDR", 0x25, "AvatarAttribute_PMDR");

            flag &= TypeNameContainer <_AvatarAttributeType> .RegisterType("HR", 0x26, "AvatarAttribute_HR");

            flag &= TypeNameContainer <_AvatarAttributeType> .RegisterType("DgR", 0x27, "AvatarAttribute_DgR");

            flag &= TypeNameContainer <_AvatarAttributeType> .RegisterType("CSR", 40, "AvatarAttribute_CSR");

            flag &= TypeNameContainer <_AvatarAttributeType> .RegisterType("RR", 0x29, "AvatarAttribute_RR");

            flag &= TypeNameContainer <_AvatarAttributeType> .RegisterType("CR", 0x30, "AvatarAttribute_CR");

            flag &= TypeNameContainer <_AvatarAttributeType> .RegisterType("RCR", 0x31, "AvatarAttribute_RCR");

            flag &= TypeNameContainer <_AvatarAttributeType> .RegisterType("AR", 50, "AvatarAttribute_AR");

            flag &= TypeNameContainer <_AvatarAttributeType> .RegisterType("DR", 0x33, "AvatarAttribute_DR");

            flag &= TypeNameContainer <_AvatarAttributeType> .RegisterType("FAR", 0x34, "AvatarAttribute_FAR");

            flag &= TypeNameContainer <_AvatarAttributeType> .RegisterType("CSF", 0x35, "AvatarAttribute_CSF");

            flag &= TypeNameContainer <_AvatarAttributeType> .RegisterType("SPDR", 0x36, "AvatarAttribute_SPDR");

            flag &= TypeNameContainer <_AvatarAttributeType> .RegisterType("RD", 0x37, "AvatarAttribute_RD");

            flag &= TypeNameContainer <_AvatarAttributeType> .RegisterType("CTLR", 0x38, "AvatarAttribute_CTLR");

            flag &= TypeNameContainer <_AvatarAttributeType> .RegisterType("RCTL", 0x39, "AvatarAttribute_RCTL");

            flag &= TypeNameContainer <_AvatarAttributeType> .RegisterType("THGA", 0x3a, "AvatarAttribute_THGA");

            flag &= TypeNameContainer <_AvatarAttributeType> .RegisterType("ShiledNormal", 0x3b, "AvatarAttribute_ShiledNormal");

            flag &= TypeNameContainer <_AvatarAttributeType> .RegisterType("ShiledActive", 60, "AvatarAttribute_ShiledActive");

            flag &= TypeNameContainer <_AvatarAttributeType> .RegisterType("ShiledComposite", 0x3d, "AvatarAttribute_ShiledComposite");

            flag &= TypeNameContainer <_AvatarAttributeType> .RegisterType("THGA", 0x3a);

            flag &= TypeNameContainer <_AvatarAttributeType> .RegisterType("CrtDR", 80);

            flag &= TypeNameContainer <_AvatarAttributeType> .RegisterType("CntAR", 0x51);

            flag &= TypeNameContainer <_AvatarAttributeType> .RegisterType("CntDR", 0x52);

            flag &= TypeNameContainer <_AvatarAttributeType> .RegisterType("CmpTRA", 0x53);

            flag &= TypeNameContainer <_AvatarAttributeType> .RegisterType("DmgHealR", 0x54);

            flag &= TypeNameContainer <_AvatarAttributeType> .RegisterType("Dan_AR", 0x55);

            flag &= TypeNameContainer <_AvatarAttributeType> .RegisterType("Dan_DR", 0x56);

            flag &= TypeNameContainer <_AvatarAttributeType> .RegisterType("Dan_DmgHealByDmg", 0x57);

            flag &= TypeNameContainer <_AvatarAttributeType> .RegisterType("Dan_DmgHealByAP", 0x58);

            return(flag & TypeNameContainer <_AvatarAttributeType> .RegisterType("Dan_DmgHealByMaxHp", 0x59));
        }
예제 #28
0
            public static bool Initialize()
            {
                bool flag = false;

                flag &= TypeNameContainer <VipConfig._VipLimitType> .RegisterType("MaxStamina", 1);

                flag &= TypeNameContainer <VipConfig._VipLimitType> .RegisterType("DailyStaminaItemCount", 2);

                flag &= TypeNameContainer <VipConfig._VipLimitType> .RegisterType("MaxPvpStamina", 3);

                flag &= TypeNameContainer <VipConfig._VipLimitType> .RegisterType("DailyPvpStaminaItemCount", 4);

                flag &= TypeNameContainer <VipConfig._VipLimitType> .RegisterType("DailyArenaCombatCount", 5);

                flag &= TypeNameContainer <VipConfig._VipLimitType> .RegisterType("MaxFriendCount", 7);

                flag &= TypeNameContainer <VipConfig._VipLimitType> .RegisterType("PackageCapacity", 8);

                flag &= TypeNameContainer <VipConfig._VipLimitType> .RegisterType("ContinueCombatCDTime", 9);

                flag &= TypeNameContainer <VipConfig._VipLimitType> .RegisterType("DailyMysteryShopChangeCount", 10);

                flag &= TypeNameContainer <VipConfig._VipLimitType> .RegisterType("DinerNorRefreshAllCount", 11);

                flag &= TypeNameContainer <VipConfig._VipLimitType> .RegisterType("DinerNorRefreshSpecialCount", 12);

                flag &= TypeNameContainer <VipConfig._VipLimitType> .RegisterType("DinerEliRefreshAllCount", 13);

                flag &= TypeNameContainer <VipConfig._VipLimitType> .RegisterType("DinerEliRefreshSpecialCount", 14);

                flag &= TypeNameContainer <VipConfig._VipLimitType> .RegisterType("DinerRareRefreshAllCount", 15);

                flag &= TypeNameContainer <VipConfig._VipLimitType> .RegisterType("DinerRareRefreshSpecialCount", 0x10);

                flag &= TypeNameContainer <VipConfig._VipLimitType> .RegisterType("DinerHireNormalCount", 0x11);

                flag &= TypeNameContainer <VipConfig._VipLimitType> .RegisterType("DinerHireEliteCount", 0x12);

                flag &= TypeNameContainer <VipConfig._VipLimitType> .RegisterType("DinerHireRareCount", 0x13);

                flag &= TypeNameContainer <VipConfig._VipLimitType> .RegisterType("DailySignInRemedyCount", 20);

                flag &= TypeNameContainer <VipConfig._VipLimitType> .RegisterType("DungeonAddCommonResetCount", 0x15);

                flag &= TypeNameContainer <VipConfig._VipLimitType> .RegisterType("DungeonAddHardResetCount", 0x16);

                flag &= TypeNameContainer <VipConfig._VipLimitType> .RegisterType("DungeonAddNightmareResetCount", 0x17);

                flag &= TypeNameContainer <VipConfig._VipLimitType> .RegisterType("DungeonSecretAddCommonResetCount", 0x18);

                flag &= TypeNameContainer <VipConfig._VipLimitType> .RegisterType("DungeonSecretAddHardResetCount", 0x19);

                flag &= TypeNameContainer <VipConfig._VipLimitType> .RegisterType("DungeonSecretAddNightmareResetCount", 0x1a);

                flag &= TypeNameContainer <VipConfig._VipLimitType> .RegisterType("ThreeHangersEmploymentCount", 0x1b);

                flag &= TypeNameContainer <VipConfig._VipLimitType> .RegisterType("FourHangersEmploymentCount", 0x1c);

                flag &= TypeNameContainer <VipConfig._VipLimitType> .RegisterType("FiveHangersEmploymentCount", 0x1d);

                flag &= TypeNameContainer <VipConfig._VipLimitType> .RegisterType("MelaleucaFloorChallengeCount", 0x24);

                flag &= TypeNameContainer <VipConfig._VipLimitType> .RegisterType("WolfSmokeAddCanFaildCount", 30);

                flag &= TypeNameContainer <VipConfig._VipLimitType> .RegisterType("WolfSmokeAddResetCount", 0x1f);

                flag &= TypeNameContainer <VipConfig._VipLimitType> .RegisterType("BuyStaminaCount", 0x20);

                flag &= TypeNameContainer <VipConfig._VipLimitType> .RegisterType("BuyEnergyCount", 0x25);

                flag &= TypeNameContainer <VipConfig._VipLimitType> .RegisterType("MaxEnergy", 0x23);

                flag &= TypeNameContainer <VipConfig._VipLimitType> .RegisterType("FriendCampaignResetCount", 0x22);

                flag &= TypeNameContainer <VipConfig._VipLimitType> .RegisterType("DanDecomposeCount", 0x26);

                flag &= TypeNameContainer <VipConfig._VipLimitType> .RegisterType("DanItemDecomposeCount", 0x27);

                return(flag & TypeNameContainer <VipConfig._VipLimitType> .RegisterType("DanMaxCount", 40));
            }
예제 #29
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);
        }
예제 #30
0
        private Avatar LoadAvatarFromXml(SecurityElement element)
        {
            Avatar avatar = new Avatar {
                id        = StrParser.ParseHexInt(element.Attribute("Id"), 0),
                sortIndex = StrParser.ParseDecInt(element.Attribute("SortIndex"), 0)
            };

            avatar.qualityLevel = StrParser.ParseDecInt(element.Attribute("QualityLevel"), avatar.qualityLevel);
            avatar.gender       = TypeNameContainer <_AvatarGender> .Parse(element.Attribute("Gender"), 0);

            avatar.growthDesc  = StrParser.ParseStr(element.Attribute("GrowthDesc"), "", true);
            avatar.countryType = TypeNameContainer <_AvatarCountryType> .Parse(element.Attribute("CountryType"), 0);

            avatar.traitDesc = StrParser.ParseStr(element.Attribute("TraitDesc"), "", true);
            avatar.traitType = TypeNameContainer <_AvatarTraitType> .Parse(element.Attribute("TraitType"), 0);

            avatar.characterType = StrParser.ParseDecInt(element.Attribute("CharacterType"), 0);
            avatar.cardPicture   = StrParser.ParseStr(element.Attribute("CardPicture"), "");
            avatar.npcDesc       = StrParser.ParseStr(element.Attribute("NpcDesc"), "");
            avatar.smardCardRect = rect.LoadFromXml(element.Attribute("SmardCardRect"));
            if (element.Children != null)
            {
                foreach (SecurityElement element2 in element.Children)
                {
                    switch (element2.Tag)
                    {
                    case "Assemble":
                    {
                        int item = StrParser.ParseHexInt(element2.Attribute("Id"), 0);
                        if (item != 0)
                        {
                            avatar.assemableIds.Add(item);
                        }
                        break;
                    }

                    case "AvatarBreakthrough":
                        avatar.breakThroughs.Add(this.LoadAvatarBreakThoughFromXml(element2));
                        break;

                    case "AvatarDefaultSkillId":
                    {
                        int num2 = StrParser.ParseHexInt(element2.Attribute("Id"), 0);
                        if (num2 != 0)
                        {
                            avatar.avatarDefaultSkillIds.Add(num2);
                        }
                        break;
                    }

                    case "Voice":
                        avatar.voices.Add(StrParser.ParseStr(element2.Attribute("Name"), ""));
                        break;

                    case "GetWay":
                        avatar.getways.Add(GetWay.LoadFromXml(element2));
                        break;

                    case "WeaponAsset":
                        avatar.weaponAssets.Add(this.LoadWeaponAssetFromXml(element2));
                        break;

                    case "ShowWeaponAsset":
                        avatar.showWeaponAssets.Add(this.LoadWeaponAssetFromXml(element2));
                        break;

                    case "CompositeSkillId":
                        avatar.compositeSkillId = StrParser.ParseHexInt(element2.Text, 0);
                        break;
                    }
                }
            }
            return(avatar);
        }