private void OfflineGrow_Step2(MonsterData monsterData) { MonsterClientMaster monsterMaster = monsterData.GetMonsterMaster(); string modelId = monsterMaster.Group.modelId; string growStep = monsterMaster.Group.growStep; string userMonsterId = monsterData.GetMonster().userMonsterId; string monsterEvolutionRouteId = monsterData.GetMonster().monsterEvolutionRouteId; foreach (GameWebAPI.RespDataMA_GetMonsterEvolutionRouteM.MonsterEvolutionRouteM monsterEvolutionRouteM2 in MasterDataMng.Instance().RespDataMA_MonsterEvolutionRouteM.monsterEvolutionRouteM) { if (monsterEvolutionRouteId == monsterEvolutionRouteM2.monsterEvolutionRouteId) { monsterData = MonsterDataMng.Instance().CreateMonsterDataByMID(monsterEvolutionRouteM2.growthMonsterId); break; } } MonsterDataMng.Instance().GetMonsterDataList()[0].userMonster.growEndDate = string.Empty; monsterData.userMonster.ex = "0"; monsterData.userMonster.hpAbilityFlg = "0"; monsterData.userMonster.attackAbilityFlg = "0"; monsterData.userMonster.defenseAbilityFlg = "0"; monsterData.userMonster.spAttackAbilityFlg = "0"; monsterData.userMonster.spDefenseAbilityFlg = "0"; monsterData.userMonster.speedAbilityFlg = "0"; monsterData.userMonster.friendship = "0"; StatusValue statusValue = MonsterStatusData.GetStatusValue(monsterData.userMonster.monsterId, monsterData.userMonster.level); statusValue.luck = 1; monsterData.SetStatus(statusValue); monsterData.userMonster.userMonsterId = userMonsterId; ClassSingleton <MonsterUserDataMng> .Instance.UpdateUserMonsterData(monsterData.userMonster); ClassSingleton <GUIMonsterIconList> .Instance.RefreshList(MonsterDataMng.Instance().GetMonsterDataList()); monsterData = ClassSingleton <MonsterUserDataMng> .Instance.GetUserMonster(userMonsterId); monsterMaster = monsterData.GetMonsterMaster(); CutsceneDataEvolution cutsceneDataEvolution = new CutsceneDataEvolution(); cutsceneDataEvolution.path = "Cutscenes/Evolution"; cutsceneDataEvolution.beforeModelId = modelId; cutsceneDataEvolution.beforeGrowStep = growStep; cutsceneDataEvolution.afterModelId = monsterMaster.Group.modelId; cutsceneDataEvolution.afterGrowStep = monsterMaster.Group.growStep; cutsceneDataEvolution.endCallback = delegate() { FarmCameraControlForCMD.On(); CutSceneMain.FadeReqCutSceneEnd(); }; CutsceneDataEvolution cutsceneData = cutsceneDataEvolution; this.CallEvolutionCutScene(monsterData, cutsceneData); }
private void ExecGrow(MonsterData monsterData) { this.endDateTime = DateTime.Parse(monsterData.userMonster.growEndDate); double timeSpan = (double)((int)(this.endDateTime - ServerDateTime.Now).TotalSeconds); GameWebAPI.RequestMN_MonsterEvolutionInGarden requestMN_MonsterEvolutionInGarden = new GameWebAPI.RequestMN_MonsterEvolutionInGarden(); requestMN_MonsterEvolutionInGarden.SetSendData = delegate(GameWebAPI.MN_Req_Grow param) { param.userMonsterId = monsterData.userMonster.userMonsterId; param.shorteningFlg = ((timeSpan <= 0.0) ? 0 : 1); param.stone = DataMng.Instance().RespDataUS_PlayerInfo.playerInfo.point; }; requestMN_MonsterEvolutionInGarden.OnReceived = delegate(GameWebAPI.RespDataMN_GrowExec response) { ClassSingleton <MonsterUserDataMng> .Instance.UpdateUserMonsterData(response.userMonster); }; GameWebAPI.RequestMN_MonsterEvolutionInGarden request = requestMN_MonsterEvolutionInGarden; MonsterClientMaster monsterMaster = monsterData.GetMonsterMaster(); string beforeMonsterModelId = monsterMaster.Group.modelId; string beforeMonsterGrowStep = monsterMaster.Group.growStep; base.StartCoroutine(request.Run(delegate() { this.EndGrowSuccess(monsterData.GetMonster().userMonsterId, beforeMonsterModelId, beforeMonsterGrowStep); }, delegate(Exception noop) { RestrictionInput.EndLoad(); }, null)); }
public MonsterData(MonsterData source) : base(new GameWebAPI.RespDataUS_GetMonsterList.UserMonsterList(source.GetMonster())) { }
private void CreateDigimonThumbnail() { if (!this.isMulti) { int[] aliveInfo = DataMng.Instance().WD_ReqDngResult.aliveInfo; for (int i = 0; i < this.deckData.monsterList.Length; i++) { this.digimonInfos[i].DigimonNo = i; GameWebAPI.RespDataMN_GetDeckList.MonsterList monsterList = this.deckData.monsterList[i]; MonsterData userMonster = ClassSingleton <MonsterUserDataMng> .Instance.GetUserMonster(monsterList.userMonsterId); MonsterData monsterData = MonsterDataMng.Instance().CreateMonsterDataByMID(userMonster.GetMonster().monsterId); Transform iconLocator = this.digimonInfos[i].GetIconLocator(); GUIMonsterIcon guimonsterIcon = GUIMonsterIcon.MakePrefabByMonsterData(monsterData, iconLocator.localScale, iconLocator.localPosition, iconLocator.parent, true, false); guimonsterIcon.name = "DigimonIcon" + i; guimonsterIcon.activeCollider = false; int depth = guimonsterIcon.GetComponent <UIWidget>().depth; this.digimonInfos[i].SetDepth(depth); if (aliveInfo.Length > i && aliveInfo[i] == 0) { guimonsterIcon.SetGrayout(GUIMonsterIcon.DIMM_LEVEL.NOTACTIVE); } } } else { int[] aliveInfo2 = DataMng.Instance().WD_ReqDngResult.aliveInfo; GameWebAPI.RespData_WorldMultiStartInfo respData_WorldMultiStartInfo = DataMng.Instance().RespData_WorldMultiStartInfo; for (int j = 0; j < this.digimonInfos.Length; j++) { this.digimonInfos[j].DigimonNo = j; int partyIndex = DataMng.Instance().GetPartyIndex(j); int monsterIndex = DataMng.Instance().GetMonsterIndex(j); MonsterData monsterData2 = MonsterDataMng.Instance().CreateMonsterDataByMID(respData_WorldMultiStartInfo.party[partyIndex].userMonsters[monsterIndex].monsterId); Transform iconLocator2 = this.digimonInfos[j].GetIconLocator(); GUIMonsterIcon guimonsterIcon2 = GUIMonsterIcon.MakePrefabByMonsterData(monsterData2, iconLocator2.localScale, iconLocator2.localPosition, iconLocator2.parent, true, false); guimonsterIcon2.name = "DigimonIcon" + j; guimonsterIcon2.activeCollider = false; int depth2 = guimonsterIcon2.GetComponent <UIWidget>().depth; this.digimonInfos[j].SetDepth(depth2); guimonsterIcon2.SetPlayerIcon(partyIndex + 1); if (aliveInfo2.Length > j && aliveInfo2[j] == 0) { guimonsterIcon2.SetGrayout(GUIMonsterIcon.DIMM_LEVEL.NOTACTIVE); } } } foreach (BattleResultDigimonInfo battleResultDigimonInfo in this.digimonInfos) { NGUITools.SetActiveSelf(battleResultDigimonInfo.gameObject, false); } }