/// <summary> /// クエスト情報更新 /// </summary> /// <param name="data"></param> private void updateQuestInfo(ChallengeSelect.EventData data) { MasterDataParamChara bossMaster = MasterFinder <MasterDataParamChara> .Instance.Find((int)data.questMaster.boss_chara_id); //ボスアイコン UnitIconImageProvider.Instance.Get( data.questMaster.boss_chara_id, (sprite) => { m_ChallengeSelect.IconImage = sprite; }); //ボス属性 if (bossMaster != null) { m_ChallengeSelect.ElementImage = MainMenuUtil.GetElementCircleSprite(bossMaster.element); } //イベント名 m_ChallengeSelect.Title = data.eventMaster.title; //ボス名 if (bossMaster != null) { m_ChallengeQuestInfo.BossName = bossMaster.name; } //レベル if (data.bSkip) { m_ChallengeSelect.Level = string.Format("{0}", data.SkipLevel); } else { m_ChallengeSelect.Level = string.Format("{0}", data.info.challenge_level); } //経験値 uint exp = (uint)data.questMaster.clear_exp; string expFormat = GameTextUtil.GetText("value_colorset"); if (m_AreaAmendParam.m_QuestSelectAreaAmendEXP != 100) { // エリア補正時 exp = (uint)((float)exp * (m_AreaAmendParam.m_QuestSelectAreaAmendEXP / 100.0f)); expFormat = GameTextUtil.GetText("stmina_bahutext"); } //コイン uint coin = (uint)data.questMaster.clear_money; string coinFormat = GameTextUtil.GetText("value_colorset"); if (m_AreaAmendParam.m_QuestSelectAreaAmendCoin != 100) { // エリア補正時 coin = (uint)((float)coin * (m_AreaAmendParam.m_QuestSelectAreaAmendCoin / 100.0f)); coinFormat = GameTextUtil.GetText("stmina_bahutext"); } //消費スタミナ uint stamina = 0; string staminaFormat = GameTextUtil.GetText("value_colorset"); MainMenuParam.m_QuestStamina = 0; switch (data.questMaster.consume_type) { case 1: //スタミナ m_ChallengeQuestInfo.StaminaLabel = GameTextUtil.GetText("growth_boss_09");; stamina = (uint)data.questMaster.consume_value; break; case 2: //Key //m_ChallengeQuestInfo.StaminaLabel = "KEY"; //MainMenuParam.m_QuestKey = (uint)data.questMaster.consume_type; break; case 3: //Ticket //m_ChallengeQuestInfo.StaminaLabel = "TICKET"; //MainMenuParam.m_QuestTicket = (uint)data.questMaster.consume_type; break; } if (m_AreaAmendParam.m_QuestSelectAreaAmendStamina != 100 && stamina != 0) { // エリア補正時 stamina = (uint)((float)stamina * ((float)m_AreaAmendParam.m_QuestSelectAreaAmendStamina / 100.0f)); staminaFormat = GameTextUtil.GetText("stmina_bahutext"); //最少スタミナチェック if (stamina <= DISP_MIN_STAMINA) { stamina = DISP_MIN_STAMINA; } } MainMenuParam.m_QuestStamina = stamina; //消費チケット(成長ボスではスキップにチケットを使用する) MainMenuParam.m_QuestTicket = (data.bSkip == true ? (uint)data.UseTicket : 0); //消費キー(成長ボスではキー消費はいまのところなし) MainMenuParam.m_QuestKey = 0; //スコア情報 uint score = 0; string scoreFormat = GameTextUtil.GetText("value_colorset"); MasterDataRenewQuestScore scoreMaster = MasterFinder <MasterDataRenewQuestScore> .Instance.Find((int)data.questMaster.quest_score_id); if (scoreMaster != null) { score = (uint)scoreMaster.base_score; } if (m_AreaAmendParam.m_QuestSelectAreaAmendScore != 100) { // エリア補正時 score = (uint)((float)score * (m_AreaAmendParam.m_QuestSelectAreaAmendScore / 100.0f)); scoreFormat = GameTextUtil.GetText("stmina_bahutext"); } m_ChallengeQuestInfo.CountValue = string.Format(GameTextUtil.GetText("value_colorset"), data.questMaster.battle_count); m_ChallengeQuestInfo.ExpValue = string.Format(expFormat, exp); m_ChallengeQuestInfo.CoinValue = string.Format(coinFormat, coin); m_ChallengeQuestInfo.StaminaValue = string.Format(staminaFormat, stamina); m_ChallengeQuestInfo.ScoreValue = string.Format(scoreFormat, score); }
public static void QuestInitialize(SceneModeContinuousBattle continuous_battle) { if (SceneGoesParam.HasInstance && SceneGoesParam.Instance.m_SceneGoesParamToQuest2Build != null && SceneGoesParam.Instance.m_SceneGoesParamToQuest2Build.m_QuestBuild != null) { m_QuestBuild = SceneGoesParam.Instance.m_SceneGoesParamToQuest2Build.m_QuestBuild; } loadBattlePrefab(); m_AchievementTotalingInBattle = new AchievementTotalingInBattle(); m_AchievementTotalingInBattle.initQuset(); initBattleParam(continuous_battle); for (int idx = 0; idx < m_PlayerParty.getPartyMemberMaxCount(); idx++) { CharaOnce chara_once = m_PlayerParty.getPartyMember((GlobalDefine.PartyCharaIndex)idx, CharaParty.CharaCondition.EXIST); if (chara_once != null) { chara_once.m_PartyCharaIndex = (GlobalDefine.PartyCharaIndex)idx; } } // プレイスコア m_PlayScoreInfo = new ServerDataDefine.PlayScoreInfo(); #if false //v5.1.0ではプレイスコアの機能を無効にする { // クエストスコア補正値 int quest_base_score = 0; int quest_play_score_rate = 0; MasterDataQuest2 master_data_quest = MasterDataUtil.GetQuest2ParamFromID(continuous_battle.m_QuestMissionID); // プレイスコア計算対象クエストかどうかを調べる if (master_data_quest != null) { uint quest_score_fix_id = master_data_quest.quest_score_id; MasterDataRenewQuestScore master_data_quest_score = MasterFinder <MasterDataRenewQuestScore> .Instance.Find((int)quest_score_fix_id); if (master_data_quest_score != null) { quest_base_score = master_data_quest_score.base_score; quest_play_score_rate = master_data_quest_score.play_score_rate; } if (quest_play_score_rate > 0) { if (master_data_quest.consume_type == 1) { if (master_data_quest.consume_value > 0) { m_PlayScoreInfo.setPlayScoreQuestFlag(true); } } } } // 中断復帰していない時だけ有効(なので中断復帰用のローカル保存もしていない) if (getRestoreData() == null && m_PlayScoreInfo.isPlayScoreQuest() ) { // プレイスコア設定値取得 MasterDataPlayScore[] master_data_play_score_array = MasterFinder <MasterDataPlayScore> .Instance.GetAll(); if (master_data_play_score_array.IsNullOrEmpty() == false && quest_base_score > 0 && quest_play_score_rate > 0 ) { m_PlayScoreInfo.init(master_data_play_score_array, quest_base_score, quest_play_score_rate); } } } #endif BattleParam.m_MasterDataCache.CachePlayerMasterData(BattleParam.m_PlayerParty); BattleSceneManager.Instance.setShowHandAreaAlways(true); BattleSceneManager.Instance.PRIVATE_FIELD.QuestInitialize(); return; }