public override void OnCloseReadyPopup() { base.OnCloseReadyPopup(); if (CurGameMode == GAME_MODE.RAID || CurGameMode == GAME_MODE.MULTI_RAID) { ViewObjs[0].SetActive(false); ViewObjs[1].SetActive(true); ViewObjs[2].SetActive(false); if (IsInvite) { if (0 < DungeonId) { DungeonTable.MultyBossRaidInfo multyRaid = _LowDataMgr.instance.GetLowDataMultyBossInfo(DungeonId); CurSubMode = multyRaid.Type; CurLevelDifficulty = multyRaid.level; RaidLvGroup.CoercionTab(CurLevelDifficulty - 1); } } } else if (CurGameMode == GAME_MODE.SPECIAL_GOLD || CurGameMode == GAME_MODE.SPECIAL_EXP) { Show(false, (uint)0, CurGameMode, 0); //ViewObjs[0].SetActive(false); //ViewObjs[1].SetActive(false); //ViewObjs[2].SetActive(true); SetMaterialReadyPopup(); } else { ViewObjs[0].SetActive(true); ViewObjs[1].SetActive(false); } IsInvite = false; }
public override void GotoInGame() { base.GotoInGame(); if (CurGameMode == GAME_MODE.SPECIAL_GOLD)//골드 스테이지로 들어감 { uiMgr.CloseReadyPopup(); OnCloseReadyPopup(); //uint level = NetData.instance.UserLevel; //byte dungeonId = 1; //while (true) //{ // DungeonTable.EquipInfo materialData = _LowDataMgr.instance.GetLowDataEquipBattle(dungeonId); // if (materialData != null) // { // if (materialData.MinenterLv < level) // break; // } // ++dungeonId; //} //if (dungeonId == 0)//혹시 모를 경우를 대비해 이렇게 막아놓는다. //{ // DungeonTable.EquipInfo mData = _LowDataMgr.instance.GetLowDataEquipBattle(1); // string msg = _LowDataMgr.instance.GetStringCommon(699); // msg = string.Format(msg, mData.MinenterLv); // SceneManager.instance.SetNoticePanel(NoticeType.Message, 0, msg); // return; //} //OnGoldGameStart(dungeonId); //NetworkClient.instance.SendPMsgCoinBattleStartC(dungeonId); } else if (CurGameMode == GAME_MODE.SPECIAL_EXP)//경험치 스테이지로 들어감 { uiMgr.CloseReadyPopup(); OnCloseReadyPopup(); //uint level = NetData.instance.UserLevel; //byte dungeonId = 1; //while (true) //{ // DungeonTable.SkillInfo skillData = _LowDataMgr.instance.GetLowDataSkillBattle(dungeonId); // if (skillData != null) // { // if (skillData.MinenterLv <= level) // break; // } // ++dungeonId; //} //if (dungeonId == 0)//혹시 모를 경우를 대비해 이렇게 막아놓는다. //{ // DungeonTable.SkillInfo skillData = _LowDataMgr.instance.GetLowDataSkillBattle(1); // string msg = _LowDataMgr.instance.GetStringCommon(699); // msg = string.Format(msg, skillData.MinenterLv); // SceneManager.instance.SetNoticePanel(NoticeType.Message, 0, msg); // return; //} //OnExpGameStart(dungeonId); //NetworkClient.instance.SendPMsgCoinBattleStartC(dungeonId); } else if (CurGameMode == GAME_MODE.RAID)//레이드 스테이지로 들어감 { List <DungeonTable.SingleBossRaidInfo> raidLowList = _LowDataMgr.instance.GetLowDataBossRaidList(); int count = raidLowList.Count; for (int i = 0; i < count; i++) { DungeonTable.SingleBossRaidInfo raidLow = raidLowList[i]; if (raidLow.Type != CurSubMode || raidLow.level != CurLevelDifficulty) { continue; } NetworkClient.instance.SendPMsgBossBattleStartC(raidLow.raidId); break; } } else if (CurGameMode == GAME_MODE.MULTI_RAID) { List <DungeonTable.MultyBossRaidInfo> raidLowList = _LowDataMgr.instance.GetLowDataMultyBossInfoList((byte)CurSubMode); int count = raidLowList.Count; for (int i = 0; i < count; i++) { DungeonTable.MultyBossRaidInfo raidLow = raidLowList[i]; if (raidLow.level != CurLevelDifficulty) { continue; } NetworkClient.instance.SendPMsgMultiBossStartC(raidLow.raidId); break; } } }
void OnClickRaid(bool isMulty, int groupId) { ViewObjs[0].SetActive(false); ViewObjs[1].SetActive(true); ViewObjs[2].SetActive(false); CurGameMode = isMulty ? GAME_MODE.MULTI_RAID : GAME_MODE.RAID; CurSubMode = groupId; uint bossIdx = 0; List <string> rewardList = null; List <string> itemList = null; if (!isMulty) { List <DungeonTable.SingleBossRaidInfo> raidLowList = _LowDataMgr.instance.GetLowDataBossRaidList(); int count = raidLowList.Count; for (int i = 0; i < count; i++) { DungeonTable.SingleBossRaidInfo raidLow = raidLowList[i]; if (raidLow.Type != groupId || raidLow.level != CurLevelDifficulty) { continue; } rewardList = raidLowList[i].RewardId.list; bossIdx = raidLowList[i].BossIdx; itemList = raidLowList[i].ItemId.list; RaidDesc.text = _LowDataMgr.instance.GetStringStageData(raidLowList[i].stageDesc); break; } } else { List <DungeonTable.MultyBossRaidInfo> raidLowList = _LowDataMgr.instance.GetLowDataMultyBossInfoList((byte)groupId); int count = raidLowList.Count; for (int i = 0; i < count; i++) { DungeonTable.MultyBossRaidInfo raidLow = raidLowList[i]; if (raidLow.level != CurLevelDifficulty) { continue; } rewardList = raidLowList[i].RewardId.list; bossIdx = raidLow.BossIdx; itemList = raidLow.ItemId.list; RaidDesc.text = _LowDataMgr.instance.GetStringStageData(raidLow.stageDesc); break; } } if (bossIdx <= 0) { Debug.LogError("not found boss Index Error " + CurSubMode); return; } UIHelper.CreateMonsterUIModel(RotationTargetList[0].transform, bossIdx, false, false, true, "DungeonPanel"); //드랍 아이템 셋 //드랍아이템은 나의 클래스에맞춰서 표시해준다 //장비아이템의경우 가장 등급이 높은것으로 int myClass = UIHelper.GetClassType(NetData.instance.GetUserInfo().GetCharIdx()); _LowDataMgr lowMgr = _LowDataMgr.instance; int dropIconCount = RaidDropItem.Length; for (int i = 0; i < dropIconCount; i++) { if (rewardList.Count <= i) { RaidDropItem[i].gameObject.SetActive(false); continue; } //uint rewardItemId = uint.Parse(rewardList[i]); uint itemId = uint.Parse(itemList[i]); RaidDropItem[i].gameObject.SetActive(true); InvenItemSlotObject slot = RaidDropItem[i].GetChild(0).GetComponent <InvenItemSlotObject>(); slot.SetLowDataItemSlot(itemId, 0, delegate(ulong key) { //UIMgr.OpenClickPopup(itemId, slot.transform.position); UIMgr.OpenDetailPopup(this, itemId); }); } RaidDropItem[0].parent.GetComponent <UIGrid>().Reposition(); UIScrollView scroll = RaidDropItem[0].parent.parent.GetComponent <UIScrollView>(); if (scroll != null) { scroll.ResetPosition(); scroll.enabled = rewardList.Count <= 5 ? false : true; } }
public override void Init() { SceneManager.instance.sw.Reset(); SceneManager.instance.sw.Start(); SceneManager.instance.showStopWatchTimer("Dungeon panel, Init() start"); base.Init(); ViewObjs[0].SetActive(true); ViewObjs[1].SetActive(false); ViewObjs[2].SetActive(false); CharInven = NetData.instance.GetUserInfo(); UIHelper.CreateEffectInGame(PnTouchEff[0].transform, "Fx_UI_partner_select_01"); UIHelper.CreateEffectInGame(PnTouchEff[1].transform, "Fx_UI_partner_select_01"); SetMaterialReadyPopup(); //컨텐츠 입장레벨 byte[] enterTypes = new byte[] { (byte)ContentType.TOWER, 0, (byte)ContentType.EQUIP_DUNGEON, (byte)ContentType.SKILL_DUNGEON, (byte)ContentType.BOSS_RAID, }; uint myLv = NetData.instance.GetUserInfo()._Level; uint myAttack = NetData.instance.GetUserInfo()._TotalAttack; for (int i = 0; i < EnterLock.Length; i++) { Transform tf = EnterLock[i].gameObject.transform; uint openCondition = 0; uint stringIdx = 1023; //{0}렙에열림(1023), {0}전투력에열림(1024) if (enterTypes[i] != 0) { DungeonTable.ContentsOpenInfo content = _LowDataMgr.instance.GetFirstContentsOpenInfo(enterTypes[i]); if (content.OpenType == 1)//업데이트 컨텐츠 { UILabel enterLvLabel = tf.FindChild("Txt").GetComponent <UILabel>(); enterLvLabel.text = string.Format(_LowDataMgr.instance.GetStringCommon(1307)); EnterLock[i].SetActive(true); continue; } openCondition = content.ConditionValue1; if (content.ConditionType1 == 2) { stringIdx = 1024; } } else//차관은 etc에엮여있어서따로뺏음 { openCondition = _LowDataMgr.instance.GetEtcTableValue <uint>(EtcID.PvpEnterLv); } uint flagValue = stringIdx == 1023 ? myLv : myAttack; if (flagValue < openCondition) //입장렙 or 전투력이 안대 { UILabel enterLvLabel = tf.FindChild("Txt").GetComponent <UILabel>(); enterLvLabel.text = string.Format(_LowDataMgr.instance.GetStringCommon(stringIdx), openCondition); EnterLock[i].SetActive(true); continue; } EnterLock[i].SetActive(false); } Transform listTf = transform.FindChild("List"); EventDelegate.Set(listTf.FindChild("Gold").GetComponent <UIEventTrigger>().onClick, delegate() { if (!CheckEnterCondition(ContentType.EQUIP_DUNGEON)) { return; } CurGameMode = GAME_MODE.SPECIAL_GOLD; EquipLvGroup.CoercionTab(0); transform.FindChild("Background/bg").gameObject.SetActive(false); //NetworkClient.instance.SendPMsgCoinBattleQueryC(); }); EventDelegate.Set(listTf.FindChild("Exp").GetComponent <UIEventTrigger>().onClick, delegate() { if (!CheckEnterCondition(ContentType.SKILL_DUNGEON)) { return; } CurGameMode = GAME_MODE.SPECIAL_EXP; SkillLvGroup.CoercionTab(0); transform.FindChild("Background/bg").gameObject.SetActive(false); // NetworkClient.instance.SendPMsgExpBattleQueryC(); }); /* * EventDelegate.Set(listTf.FindChild("Raid_0").GetComponent<UIEventTrigger>().onClick, delegate () { * * if (!CheckEnterCondition(ContentType.BOSS_RAID_1)) * return; * * //CheckOpenTutorial(OpenTutorialType.BOSS_RAID); * * CurGameMode = GAME_MODE.RAID; * CurSubMode = 1; * RaidLvGroup.CoercionTab(0); * }); * * EventDelegate.Set(listTf.FindChild("Raid_1").GetComponent<UIEventTrigger>().onClick, delegate () { * * if (!CheckEnterCondition(ContentType.BOSS_RAID_2) ) * return; * * //CheckOpenTutorial(OpenTutorialType.BOSS_RAID); * CurGameMode = GAME_MODE.RAID; * CurSubMode = 2; * RaidLvGroup.CoercionTab(0); * }); * * EventDelegate.Set(listTf.FindChild("Raid_2").GetComponent<UIEventTrigger>().onClick, delegate () { * * if (!CheckEnterCondition(ContentType.BOSS_RAID_3) ) * return; * * //CheckOpenTutorial(OpenTutorialType.BOSS_RAID); * CurGameMode = GAME_MODE.RAID; * CurSubMode = 3; * RaidLvGroup.CoercionTab(0); * }); * * EventDelegate.Set(listTf.FindChild("MultyRaid_0").GetComponent<UIEventTrigger>().onClick, delegate () { * * if (!CheckEnterCondition(ContentType.MULTY_BOSS_RAID_1)) * return; * * CurGameMode = GAME_MODE.MULTI_RAID; * CurSubMode = 1; * RaidLvGroup.CoercionTab(0); * }); */ EventDelegate.Set(listTf.FindChild("MultyRaid_1").GetComponent <UIEventTrigger>().onClick, delegate() { SceneManager.instance.SetNoticePanel(NoticeType.Message, 0, _LowDataMgr.instance.GetStringCommon(174)); }); EventDelegate.Set(listTf.FindChild("MultyRaid_2").GetComponent <UIEventTrigger>().onClick, delegate() { SceneManager.instance.SetNoticePanel(NoticeType.Message, 0, _LowDataMgr.instance.GetStringCommon(174)); }); EventDelegate.Set(listTf.FindChild("Pvp").GetComponent <UIEventTrigger>().onClick, delegate() { if (!CheckEnterCondition(ContentType.ARENA)) { return; } base.Hide(); UIMgr.OpenArenaPanel(); }); EventDelegate.Set(listTf.FindChild("Tower").GetComponent <UIEventTrigger>().onClick, delegate() { if (!CheckEnterCondition(ContentType.TOWER)) { return; } base.Hide(); UIMgr.OpenTowerPanel(); }); /* * EventDelegate.Set(listTf.FindChild("Colosseum").GetComponent<UIEventTrigger>().onClick, delegate () { * * if (!CheckEnterCondition(ContentType.COLOSSEUM) ) * return; * * base.Hide(); * UIMgr.OpenColosseumPanel(0); * }); */ EventDelegate.Set(ViewObjs[1].transform.FindChild("BtnReady").GetComponent <UIButton>().onClick, delegate() { uint limitLevel = 0, dungeonId = 0; if (CurGameMode == GAME_MODE.RAID) { List <DungeonTable.SingleBossRaidInfo> raidLowList = _LowDataMgr.instance.GetLowDataBossRaidList(); int count = raidLowList.Count; for (int i = 0; i < count; i++) { DungeonTable.SingleBossRaidInfo raidLow = raidLowList[i]; if (CurSubMode != raidLow.Type || raidLow.level != CurLevelDifficulty) { continue; } limitLevel = raidLow.levelLimit; break; } } else { List <DungeonTable.MultyBossRaidInfo> raidLowList = _LowDataMgr.instance.GetLowDataMultyBossInfoList((byte)CurSubMode); int count = raidLowList.Count; for (int i = 0; i < count; i++) { DungeonTable.MultyBossRaidInfo raidLow = raidLowList[i]; if (raidLow.level != CurLevelDifficulty) { continue; } dungeonId = raidLow.raidId; limitLevel = raidLow.EnterLevel; break; } } if (NetData.instance.UserLevel < limitLevel)//레벨 부족 무시한다 { string msg = string.Format(_LowDataMgr.instance.GetStringCommon(699), limitLevel); SceneManager.instance.SetNoticePanel(NoticeType.Message, 0, msg); return; } if (CurGameMode == GAME_MODE.RAID) { NetworkClient.instance.SendPMsgBossBattleQueryC(CurSubMode); } else { int now = 0, max = 0; NetData.instance.GetUserInfo().GetCompleteCount(EtcID.MultyBossRaid1Count, ref now, ref max); if (max <= now) { uiMgr.AddErrorPopup((int)ErrorCode.ER_MultiBossCreateRoomS_DailyTime_Error); return; } NetworkClient.instance.SendPMsgMultiBossCreateRoomC(dungeonId); } }); RaidLvGroup.Initialize(delegate(int arr) { CurLevelDifficulty = arr + 1; for (int i = 0; i < EffRaidSelect.childCount; i++) { EffRaidSelect.GetChild(i).gameObject.SetActive(i == arr); SelectBoss[i].SetActive(i == arr); } OnClickRaid(CurGameMode == GAME_MODE.MULTI_RAID, CurSubMode); }); EventDelegate.Set(ViewObjs[2].transform.FindChild("Character/CharView/BtnPartnerSlot_0").GetComponent <UIEventTrigger>().onClick, delegate() { if (PartnerModelRoot[0].gameObject.activeSelf) { return; } base.Hide(); UIMgr.OpenReadyPopup(CurGameMode, this, 0, 0); }); EventDelegate.Set(ViewObjs[2].transform.FindChild("Character/CharView/BtnPartnerSlot_1").GetComponent <UIEventTrigger>().onClick, delegate() { if (PartnerModelRoot[1].gameObject.activeSelf) { return; } base.Hide(); UIMgr.OpenReadyPopup(CurGameMode, this, 0, 0); }); EventDelegate.Set(ViewObjs[2].transform.FindChild("Character/BtnStartGame").GetComponent <UIButton>().onClick, delegate() {//준비창으로 변경 base.Hide(); //PvpReadyPopup.SetActive(false); UIMgr.OpenReadyPopup(GAME_MODE.ARENA, this, 0, 0); }); EquipLvGroup.Initialize(delegate(int arr) { if (EquipLvGroup.transform.GetChild(arr).FindChild("Lvguide").gameObject.activeSelf) { SceneManager.instance.SetNoticePanel(NoticeType.Message, 171); return; } MaterialDungeonLevelDifficulty = arr + 1; for (int i = 0; i < EquipLvGroup.transform.childCount; i++) { GameObject select = EquipLvGroup.transform.GetChild(i).transform.FindChild("cover").gameObject; select.SetActive(i == arr); } OnClickEquipAndSkillDungeon(true); }); SkillLvGroup.Initialize(delegate(int arr) { if (SkillLvGroup.transform.GetChild(arr).FindChild("Lvguide").gameObject.activeSelf) { SceneManager.instance.SetNoticePanel(NoticeType.Message, 171); return; } MaterialDungeonLevelDifficulty = arr + 1; for (int i = 0; i < SkillLvGroup.transform.childCount; i++) { GameObject select = SkillLvGroup.transform.GetChild(i).transform.FindChild("cover").gameObject; select.SetActive(i == arr); } OnClickEquipAndSkillDungeon(false); }); EffRaidSelect = UIHelper.CreateEffectInGame(RaidLvGroup.transform, "Fx_UI_Raid_select_set").transform; int length = EffRaidSelect.childCount; for (int i = 0; i < length; i++) { EffRaidSelect.GetChild(i).localPosition = RaidLvGroup.TabList[i].transform.localPosition; } for (int i = 0; i < RaidDropItem.Length; i++) { UIHelper.CreateInvenSlot(RaidDropItem[i]); } for (int i = 0; i < MaterialDungetnDropItem.Length; i++) { UIHelper.CreateInvenSlot(MaterialDungetnDropItem[i]); } MaterialDungeonInit(); SceneManager.instance.showStopWatchTimer("Dungeon panel, Init() finish"); }
/// <summary> 콜로세움, 멀티보스레이드 </summary> void InitNetworkDungeon(string startBtnLbl) { NetInfoTf.FindChild("BtnStart/need_food").GetComponent <UILabel>().text = startBtnLbl; uint stageId = (uint)parameters[4]; uint limitPower = 0; if (GameMode == GAME_MODE.COLOSSEUM) { DungeonTable.ColosseumInfo coloInfo = _LowDataMgr.instance.GetLowDataColosseumInfo(stageId); limitPower = coloInfo.FightingPower; } else { DungeonTable.MultyBossRaidInfo multyInfo = _LowDataMgr.instance.GetLowDataMultyBossInfo(stageId); limitPower = multyInfo.FightingPower; } NetInfoTf.FindChild("BattlePoint/my").GetComponent <UILabel>().text = string.Format("{0} : {1}", _LowDataMgr.instance.GetStringCommon(725), CharInven._TotalAttack); NetInfoTf.FindChild("BattlePoint/limit").GetComponent <UILabel>().text = string.Format("{0} : {1}", _LowDataMgr.instance.GetStringCommon(724), limitPower); Transform parBtnTf = transform.FindChild("Character/CharView"); //if (NetData.instance.GameRoomData.OwnerId == CharInven.GetCharUUID() )//내가 방장 NetData.RoomData roomData = NetData.instance.GameRoomData; if (roomData.IsLeader) //내가 방장 { EventDelegate.Set(NetInfoTf.FindChild("BtnStart").GetComponent <UIButton>().onClick, OnClickStartGame); EventDelegate.Set(NetInfoTf.FindChild("BtnTown").GetComponent <UIButton>().onClick, OnInviteTown); EventDelegate.Set(NetInfoTf.FindChild("BtnInvite").GetComponent <UIButton>().onClick, () => { //IsTownInvite = false; UIMgr.OpenInvitePopup(GameMode); //Hide(); }); //캐릭터 닉네임, 레벨 셋팅 string nickName = NetData.instance.Nickname; string lvStr = string.Format(_LowDataMgr.instance.GetStringCommon(453), NetData.instance.UserLevel); transform.FindChild("Character/CharView/CharSlot/player_name").GetComponent <UILabel>().text = string.Format("{0} {1}", lvStr, nickName); //플레이어 생성 NetData._CostumeData equipCostumeData = CharInven.GetEquipCostume(); uint weaponId = 0, clothId = 0, headId = 0; if (CharInven.isHideCostum) { NetData._ItemData head = CharInven.GetEquipParts(ePartType.HELMET); NetData._ItemData cloth = CharInven.GetEquipParts(ePartType.CLOTH); NetData._ItemData weapon = CharInven.GetEquipParts(ePartType.WEAPON); if (head != null) { headId = head._equipitemDataIndex; } if (cloth != null) { clothId = cloth._equipitemDataIndex; } if (weapon != null) { weaponId = weapon._equipitemDataIndex; } } UIHelper.CreatePcUIModel("ReadyPopup" , PlayCharRoot , CharInven.GetCharIdx() , headId , equipCostumeData._costmeDataIndex , clothId , weaponId , CharInven.GetEquipSKillSet().SkillSetId , 3 , CharInven.isHideCostum , false); EventDelegate.Set(parBtnTf.FindChild("BtnPartnerSlot_0").GetComponent <UIEventTrigger>().onClick, delegate() { OnClickUserSlot(0); }); EventDelegate.Set(parBtnTf.FindChild("BtnPartnerSlot_1").GetComponent <UIEventTrigger>().onClick, delegate() { OnClickUserSlot(1); }); PnTouchObj[0].SetActive(true); PnTouchObj[1].SetActive(true); } else//파티 참가자 { NetInfoTf.FindChild("BtnStart").collider.enabled = false; NetInfoTf.FindChild("BtnTown").collider.enabled = false; NetInfoTf.FindChild("BtnInvite").collider.enabled = false; parBtnTf.FindChild("BtnPartnerSlot_0").collider.enabled = false; parBtnTf.FindChild("BtnPartnerSlot_1").collider.enabled = false; PnTouchObj[0].SetActive(false); PnTouchObj[1].SetActive(false); //캐릭터 닉네임, 레벨 셋팅 //방장 셋팅 string lvStr = string.Format(_LowDataMgr.instance.GetStringCommon(453), roomData.Owner.Lv); transform.FindChild("Character/CharView/CharSlot/player_name").GetComponent <UILabel>().text = string.Format("{0} {1}", lvStr, roomData.Owner.Name); NetworkClient.instance.SendPMsgQueryRoleInfoC((long)roomData.Owner.Id); for (int i = 0; i < roomData.UserList.Count; i++)//파티원들 셋팅 { int arr = roomData.UserList[i].Slot; string lv = string.Format(_LowDataMgr.instance.GetStringCommon(453), roomData.UserList[i].Lv); TakeParNames[arr].text = string.Format("{0} {1}", lv, roomData.UserList[i].Name); if (roomData.UserList[i].Id == CharInven.GetCharUUID())//나 { //플레이어 생성 NetData._CostumeData equipCostumeData = CharInven.GetEquipCostume(); uint weaponId = 0, clothId = 0, headId = 0; if (CharInven.isHideCostum) { NetData._ItemData head = CharInven.GetEquipParts(ePartType.HELMET); NetData._ItemData cloth = CharInven.GetEquipParts(ePartType.CLOTH); NetData._ItemData weapon = CharInven.GetEquipParts(ePartType.WEAPON); if (head != null) { headId = head._equipitemDataIndex; } if (cloth != null) { clothId = cloth._equipitemDataIndex; } if (weapon != null) { weaponId = weapon._equipitemDataIndex; } } UIHelper.CreatePcUIModel("ReadyPopup" , PartnerModelRoot[arr] , CharInven.GetCharIdx() , headId , equipCostumeData._costmeDataIndex , clothId , weaponId , CharInven.GetEquipSKillSet().SkillSetId , 3 , CharInven.isHideCostum , false); } else { NetworkClient.instance.SendPMsgQueryRoleInfoC((long)roomData.UserList[i].Id); } } } }
void OnClickContentsLink(Item.ContentsListInfo info) { if (info.ContentsLinkType == 1)//재료조합 { } else if (info.ContentsLinkType == 2)//바로가기(던전) { if (!CheckContentsLink(info, true)) { return; } bool isBasePanelHide = true; switch (info.ContentsType) { case 1: //조합 break; case 11: //차관 UIMgr.OpenArenaPanel(); break; case 12: //난투장 UIMgr.OpenDogFight(); break; case 2: //모험 일반 case 3: //모험 어려움 if (BasePanel != null && BasePanel is ChapterPanel) { isBasePanelHide = false; (BasePanel as ChapterPanel).SetStageInfoPopup(info.ContentsIdx); } if (isBasePanelHide) { UIMgr.OpenChapter(null, info.ContentsIdx); } break; case 4: //마계의탑 UIMgr.OpenTowerPanel(info.ContentsIdx); break; case 5: //보스레이드 DungeonTable.SingleBossRaidInfo bossRaid = _LowDataMgr.instance.GetSingleBossRaidLimitLevel(info.ContentsIdx); UIMgr.OpenDungeonPanel(false, 0, GAME_MODE.RAID, bossRaid.Type); break; case 6: //멀티 보스레이드 DungeonTable.MultyBossRaidInfo multyBossRaid = _LowDataMgr.instance.GetLowDataMultyBossInfo(info.ContentsIdx); UIMgr.OpenDungeonPanel(false, 0, GAME_MODE.MULTI_RAID, multyBossRaid.Type); break; case 7: //콜로세움 UIMgr.OpenColosseumPanel(0); break; case 8: //골드 던전 UIMgr.OpenDungeonPanel(false, 0, GAME_MODE.SPECIAL_GOLD, 0); break; case 9: //경험치 던전 UIMgr.OpenDungeonPanel(false, 0, GAME_MODE.SPECIAL_EXP, 0); break; case 10: //길드 UIMgr.OpenGuildPanel(); break; } if (isBasePanelHide && BasePanel != null) { BasePanel.ObjectHide(); } Hide(); } }
/// <summary> 조건 체크. </summary> bool CheckContentsLink(Item.ContentsListInfo info, bool isClick) { bool isEnter = false; switch (info.ContentsType) { case 1: //조합 break; case 11: //차관 if (_LowDataMgr.instance.GetEtcTableValue <uint>(EtcID.PvpEnterLv) <= NetData.instance.UserLevel) { isEnter = true; } break; case 12: //난투장 List <DungeonTable.FreefightTableInfo> freeList = _LowDataMgr.instance.GetLowDataFreeFightList(); for (int i = 0; i < freeList.Count; i++) { if (NetData.instance.UserLevel < freeList[i].MinenterLv || freeList[i].MaxenterLv < NetData.instance.UserLevel) { continue; } isEnter = true; break; } break; case 2: //모험 일반 case 3: //모험 어려움 uint require = 0; NetData.ClearSingleStageData stageData = null; if (!NetData.instance.GetUserInfo().ClearSingleStageDic.TryGetValue(info.ContentsIdx, out stageData)) { DungeonTable.StageInfo stageInfo = _LowDataMgr.instance.GetStageInfo(info.ContentsIdx); if (stageInfo != null && stageInfo.RequireStageId != null && 0 < stageInfo.RequireStageId.list.Count) { List <string> conList = stageInfo.RequireStageId.list; for (int i = 0; i < conList.Count; i++) { uint conIdx = uint.Parse(conList[i]); if (NetData.instance.GetUserInfo().ClearSingleStageDic.TryGetValue(conIdx, out stageData)) //이전 스테이지 클리어해야함. { continue; } require = 1; //진행 불가능 break; } } } if (require <= 0) { isEnter = true; } break; case 5: //보스레이드 DungeonTable.SingleBossRaidInfo bossRaid = _LowDataMgr.instance.GetSingleBossRaidLimitLevel(info.ContentsIdx); if (bossRaid.levelLimit <= NetData.instance.UserLevel) { isEnter = true; } break; case 6: //멀티 보스레이드 DungeonTable.MultyBossRaidInfo multyBossRaid = _LowDataMgr.instance.GetLowDataMultyBossInfo(info.ContentsIdx); if (multyBossRaid.levelLimit <= NetData.instance.UserLevel) { isEnter = true; } break; case 10: //길드 if (0 < NetData.instance.GetUserInfo()._GuildId) { isEnter = true; } break; case 4: //마계의탑 case 7: //콜로세움 case 8: //골드 던전 case 9: //경험치 던전 byte idx = 0; if (info.ContentsType == 4) { idx = (byte)9; } else if (info.ContentsType == 7) { idx = (byte)1; } else if (info.ContentsType == 8) { idx = (byte)3; } else if (info.ContentsType == 9) { idx = (byte)2; } DungeonTable.ContentsOpenInfo content = _LowDataMgr.instance.GetFirstContentsOpenInfo(idx); if (content.ConditionType1 == 2 && content.ConditionValue1 <= NetData.instance.GetUserInfo()._TotalAttack) { isEnter = true; } else if (content.ConditionType1 == 1 && content.ConditionValue1 <= NetData.instance.UserLevel) { isEnter = true; } break; } if (!isEnter) { if (isClick) { SceneManager.instance.SetNoticePanel(NoticeType.Message, 0, _LowDataMgr.instance.GetStringCommon(712)); } return(false); } return(true); }