예제 #1
0
        public static CommonDialog Create(string assetCategoryId, string assetValue)
        {
            CommonDialog result = null;
            int          assetCategoryId2;

            if (int.TryParse(assetCategoryId, out assetCategoryId2))
            {
                FactoryAssetCategoryDetailPopup.PopupCreator popCreator = FactoryAssetCategoryDetailPopup.GetPopCreator(assetCategoryId2);
                result = popCreator.func(assetCategoryId, assetValue);
            }
            return(result);
        }
예제 #2
0
        public static CommonDialog CreateForExchange(string assetCategoryId, string assetValue, string monsterFixedValueId, string maxExtraSlotNum, string eventExchangeId)
        {
            CommonDialog commonDialog = null;
            int          num;

            if (int.TryParse(assetCategoryId, out num))
            {
                FactoryAssetCategoryDetailPopup.PopupCreator popCreator = FactoryAssetCategoryDetailPopup.GetPopCreator(num);
                commonDialog = popCreator.func(assetCategoryId, assetValue);
                if (null != commonDialog && num == 1 && !string.IsNullOrEmpty(monsterFixedValueId))
                {
                    CMD_MonsterParamPop cmd_MonsterParamPop = commonDialog as CMD_MonsterParamPop;
                    if (null != cmd_MonsterParamPop)
                    {
                        MonsterFixedM monsterFixedMaster = MonsterFixedData.GetMonsterFixedMaster(monsterFixedValueId);
                        if (monsterFixedMaster != null)
                        {
                            MonsterData monsterData = MonsterDataMng.Instance().CreateMonsterDataByMID(assetValue);
                            GameWebAPI.RespDataMA_GetSkillM        respDataMA_SkillM = MasterDataMng.Instance().RespDataMA_SkillM;
                            GameWebAPI.RespDataMA_GetSkillM.SkillM skillM            = null;
                            foreach (GameWebAPI.RespDataMA_GetSkillM.SkillM skillM3 in respDataMA_SkillM.skillM)
                            {
                                if (skillM3.skillGroupId == monsterData.monsterM.skillGroupId && skillM3.skillGroupSubId == monsterFixedMaster.defaultSkillGroupSubId)
                                {
                                    skillM = skillM3;
                                    break;
                                }
                            }
                            if (int.Parse(monsterFixedMaster.level) > int.Parse(monsterData.monsterM.maxLevel))
                            {
                                monsterFixedMaster.level = monsterData.monsterM.maxLevel;
                            }
                            int lvMAXExperienceInfo = DataMng.Instance().GetLvMAXExperienceInfo(int.Parse(monsterFixedMaster.level));
                            DataMng.ExperienceInfo experienceInfo = DataMng.Instance().GetExperienceInfo(lvMAXExperienceInfo);
                            monsterData.userMonster.luck                   = monsterFixedMaster.luck;
                            monsterData.userMonster.friendship             = "0";
                            monsterData.userMonster.level                  = monsterFixedMaster.level;
                            monsterData.userMonster.hpAbility              = monsterFixedMaster.hpAbility;
                            monsterData.userMonster.hpAbilityFlg           = monsterFixedMaster.hpAbilityFlg.ToString();
                            monsterData.userMonster.attackAbility          = monsterFixedMaster.attackAbility;
                            monsterData.userMonster.attackAbilityFlg       = monsterFixedMaster.attackAbilityFlg.ToString();
                            monsterData.userMonster.defenseAbility         = monsterFixedMaster.defenseAbility;
                            monsterData.userMonster.defenseAbilityFlg      = monsterFixedMaster.defenseAbilityFlg.ToString();
                            monsterData.userMonster.spAttackAbility        = monsterFixedMaster.spAttackAbility;
                            monsterData.userMonster.spAttackAbilityFlg     = monsterFixedMaster.spAttackAbilityFlg.ToString();
                            monsterData.userMonster.spDefenseAbility       = monsterFixedMaster.spDefenseAbility;
                            monsterData.userMonster.spDefenseAbilityFlg    = monsterFixedMaster.spDefenseAbilityFlg.ToString();
                            monsterData.userMonster.speedAbility           = monsterFixedMaster.speedAbility;
                            monsterData.userMonster.speedAbilityFlg        = monsterFixedMaster.speedAbilityFlg.ToString();
                            monsterData.userMonster.commonSkillId          = monsterFixedMaster.commonSkillId;
                            monsterData.userMonster.leaderSkillId          = monsterFixedMaster.leaderSkillId;
                            monsterData.userMonster.defaultSkillGroupSubId = monsterFixedMaster.defaultSkillGroupSubId;
                            monsterData.userMonster.uniqueSkillId          = skillM.skillId;
                            monsterData.InitSkillInfo();
                            cmd_MonsterParamPop.MonsterDataSet(monsterData, experienceInfo, int.Parse(maxExtraSlotNum), eventExchangeId);
                        }
                    }
                }
            }
            return(commonDialog);
        }