private void SetBatttleData(BattleRoundData round_data, List <LogicObject.DropBag> drop_bags) { m_BattleRoundData = round_data; if (m_BattleRoundData.isLastBattle) { m_RoundCounter = m_BattleRoundData.roundCount; int main_id = TableManager.GetCopydetailByID(m_BattleRoundData.missionID).Copyfather; MainCopy main_copy = new MainCopy(main_id); SubCopy sub_copy = new SubCopy(m_BattleRoundData.missionID); Obj_MyselfPlayer.GetMe().curMainCopy = main_copy; Obj_MyselfPlayer.GetMe().curSubcopy = sub_copy; string log = "setBattleData(), isLastBattle = true, roundCount = " + m_RoundCounter; log += ", main_copy = " + main_id; log += ", sub_copy = " + m_BattleRoundData.missionID; Debug.Log(log); InitCopys(); Obj_MyselfPlayer.GetMe().UpdateCopyList(CopyType.NORMAL); //记录当前小副本的大副本是否已经开启 by 王明磊 foreach (MainCopy main in Obj_MyselfPlayer.GetMe().normalMainCopys) { if (main.copyId == sub_copy.tblCopyDetail.Copyfather && main.copyState == CopyState.PASSED) { Debug.Log("Next Main Copy Already Opened"); Obj_MyselfPlayer.GetMe().isNextMainOpened = true; break; } } foreach (DropBag drop_bag in drop_bags) { if (drop_bag.type == DropType.CARD) { m_BattleTopUI.GetComponent <BattleTopUI>().AddCard(1); Debug.Log("Add card"); } else if (drop_bag.type == DropType.TIEM) { m_BattleTopUI.GetComponent <BattleTopUI>().AddItem(1); Debug.Log("Add AddItem"); } else if (drop_bag.type == DropType.MONEY) { m_BattleTopUI.GetComponent <BattleTopUI>().AddMoney(drop_bag.val); Debug.Log("Add AddMoney"); } } } }
public void OnSelectSubCopy(GameObject go) { switch (GuideManager.Instance.currentStep) { case GuideManager.GUIDE_STEP.COPY1_1: GuideCopy1_1.Instance.NextStep(); //新手战斗引导 SELECT_3 break; case GuideManager.GUIDE_STEP.COPY1_2: GuideCopy1_2.Instance.NextStep(); //新手战斗引导 SELECT_3 break; case GuideManager.GUIDE_STEP.COPY1_3: GuideCopy1_3.Instance.NextStep(); //新手战斗引导 SELECT_3 break; case GuideManager.GUIDE_STEP.COPY1_4: GuideCopy1_4.Instance.NextStep(); //新手战斗引导 SELECT_3 break; case GuideManager.GUIDE_STEP.COPY1_5: GuideCopy1_5.Instance.NextStep(); //新手战斗引导 SELECT_3 break; case GuideManager.GUIDE_STEP.COPY2_1: GuideCopy2_1.Instance.NextStep(); //新手战斗引导 SELECT_3 break; default: break; } Obj_MyselfPlayer.GetMe().isNextMainOpened = false; //初始化下一大副本是否开启的标志 by 王明磊 if (Obj_MyselfPlayer.GetMe().cardBagList.Count >= Obj_MyselfPlayer.GetMe().bagMax) { // BoxManager.showBagFullBox("您携带的侠士已经达到上限可以将侠士吸收、出售或者扩充您的背包."); BoxManager.showMessageByID((int)MessageIdEnum.Msg74); return; } //领导力 int nowLeaderShip = Obj_MyselfPlayer.GetMe().GetLeaderShipValue(); if (nowLeaderShip > Obj_MyselfPlayer.GetMe().leadership) { // BoxManager.showMessage("当前领导力不足"); BoxManager.showMessageByID((int)MessageIdEnum.Msg55); return; } SubCopy sub_copy = null; int id = int.Parse(go.name); foreach (SubCopy copy in mainCopy.subCopys) { if (copy.subCopyID == id) { sub_copy = copy; break; } } if (sub_copy != null) { if (sub_copy.tblCopyDetail.CostValue > TableManager.GetIdexperienceByID(Obj_MyselfPlayer.GetMe().level).IDPhysicalValue) { //上限判断 BoxManager.showMessageByID((int)MessageIdEnum.Msg134); return; } if (sub_copy.tblCopyDetail.CostValue > Obj_MyselfPlayer.GetMe().power) { // BuySth((int)MessageIdEnum.Msg72,2); //WML MARK NetworkSender.Instance().buyPower(BuySthDone); return; } Obj_MyselfPlayer.GetMe().curSubcopy = sub_copy; Debug.Log("curSubcopyID:" + sub_copy.subCopyID); //cb:因引导需要,必须在已经获得数据之后,才切换的助战好友界面,避免中断bug // logicTarget.SendMessage("OnSelectAssistWindow",gameObject,SendMessageOptions.DontRequireReceiver); //记录当前小副本的大副本是否已经开启 by 王明磊 foreach (MainCopy main in Obj_MyselfPlayer.GetMe().normalMainCopys) { if (main.copyId == sub_copy.tblCopyDetail.Copyfather && main.copyState == CopyState.PASSED) { Debug.Log("Next Main Copy Already Opened"); Obj_MyselfPlayer.GetMe().isNextMainOpened = true; break; } } OnSelectAssistWindow(); } else { Debug.LogError("cur selected subcopy is null !"); } }