10240 【越南】【砍树】古宝养成- 商店,任务一键领取
| | |
| | | public string JoinStartTime; // 参与开始时间点 mm:ss
|
| | | public string JoinEndTime; // 参与结束时间点 mm:ss
|
| | | public ushort LimitLV; // 限制等级
|
| | | public ushort ShopType; // 开放商店类型,可能为0不开放
|
| | | public byte PersonalBillCount;
|
| | | public tagMCActGubaoBillard[] PersonalBillboardInfoList; // 个人榜单奖励信息列表,如果没有代表本次活动没有该榜奖励
|
| | |
|
| | |
| | | TransBytes (out JoinStartTime, vBytes, NetDataType.Chars, 5);
|
| | | TransBytes (out JoinEndTime, vBytes, NetDataType.Chars, 5);
|
| | | TransBytes (out LimitLV, vBytes, NetDataType.WORD);
|
| | | TransBytes (out ShopType, vBytes, NetDataType.WORD);
|
| | | TransBytes (out PersonalBillCount, vBytes, NetDataType.BYTE);
|
| | | PersonalBillboardInfoList = new tagMCActGubaoBillard[PersonalBillCount];
|
| | | for (int i = 0; i < PersonalBillCount; i ++) {
|
| | |
| | | }
|
| | |
|
| | |
|
| | |
|
| | | //限制条件
|
| | | bool isCanBuy = m_storeModel.rankActStore_ActType == BossTrialModel.operaType ? bossTrialModel.submitAllCount >= storeConfig.LimitValue : true;
|
| | | buyConditionText.SetActive(!isCanBuy);
|
| | | moneyIcon.SetActive(isCanBuy);
|
| | |
| | | using UnityEngine.UI; |
| | | using System.Collections.Generic; |
| | | using System; |
| | | using System.Linq; |
| | | |
| | | |
| | | namespace vnxbqy.UI { |
| | |
| | | getGiftBtn.SetActive(state == 1); |
| | | getGiftBtn.SetListener(() =>
|
| | | { |
| | | model.SendGetAward(id); |
| | | GetAllAward(); |
| | | }); |
| | | gotYetImg.SetActive(state == 2); |
| | | |
| | | } |
| | | |
| | | //一键领取并且 提前展示奖励 |
| | | void GetAllAward()
|
| | | { |
| | | List<Item> items = new List<Item>();
|
| | | OperationMissionAct missionAct; |
| | | OperationTimeHepler.Instance.TryGetOperation(MissionActModel.operaType, out missionAct); |
| | | |
| | | |
| | | var keys = missionAct.missionInfo.Keys.ToList(); |
| | | foreach(var id in keys) |
| | | {
|
| | | var state = model.GetMissionAwardState(id);
|
| | | if (state == 1)
|
| | | {
|
| | | model.SendGetAward(id);
|
| | | var mission = missionAct.missionInfo[id];
|
| | | foreach (var item in mission.AwardItemList)
|
| | | {
|
| | | items.Add(new Item((int)item.ItemID, item.ItemCount));
|
| | | }
|
| | | }
|
| | | } |
| | | |
| | | ItemLogicUtility.Instance.ShowGetItem(items); |
| | | } |
| | | } |
| | | |
| | | } |
| | |
| | | public static Operation operaType = Operation.default30; |
| | | |
| | | public int actNum; //对应界面 |
| | | public event Action UpdateMissionEvent; |
| | | public event Action<bool> UpdateMissionEvent; |
| | | public Dictionary<int, int> missionJumpIDs = new Dictionary<int, int>(); |
| | | |
| | | public override void Init() |
| | |
| | | { |
| | | actNum = netPack.ActNum; |
| | | AwardRecordList = netPack.AwardRecordList; |
| | | roundNum = netPack.RoundNum; |
| | | UpdateMissionEvent?.Invoke(); |
| | | bool isNewRound = false; |
| | | if (roundNum != netPack.RoundNum)
|
| | | { |
| | | roundNum = netPack.RoundNum; |
| | | isNewRound = true; |
| | | } |
| | | UpdateMissionEvent?.Invoke(isNewRound); |
| | | |
| | | UpdateRedpoint(); |
| | | } |
| | |
| | | missionValueDict[netPack.TaskValueList[i].TaskType] = (int)netPack.TaskValueList[i].TaskValue;
|
| | | }
|
| | |
|
| | | UpdateMissionEvent?.Invoke(); |
| | | UpdateMissionEvent?.Invoke(false); |
| | | |
| | | UpdateRedpoint(); |
| | | } |
| | |
| | | |
| | | } |
| | | |
| | | void UpdateMissionEvent() |
| | | void UpdateMissionEvent(bool isNewRound) |
| | | {
|
| | | OperationMissionAct missionAct; |
| | | OperationTimeHepler.Instance.TryGetOperation(MissionActModel.operaType, out missionAct); |
| | | |
| | | m_Controller.m_Scorller.RefreshActiveCellViews(); |
| | | if (isNewRound)
|
| | | {
|
| | | DisplayScroll();
|
| | | } |
| | | else
|
| | | { |
| | | m_Controller.m_Scorller.RefreshActiveCellViews(); |
| | | } |
| | | |
| | | roundText.text = StringUtility.Contact(Language.Get("ActMission1"), model.roundNum, "/", missionAct.roundMax); |
| | | } |
| | | |
| | |
| | | public Dictionary<int, ActBillboardAwards> rankInfo = new Dictionary<int, ActBillboardAwards>(); //根据排名显示奖励 从1开始 本服个人榜
|
| | | public int maxRank; //根据奖励显示最大排名
|
| | |
|
| | |
|
| | | public int m_ShopType; // 开放商店类型,可能为0不开放
|
| | | public override void Reset()
|
| | | {
|
| | | base.Reset();
|
| | |
| | |
|
| | | public void ParseGubaoInfo(HAA81_tagMCActGubaoInfo netPack)
|
| | | {
|
| | |
|
| | | m_ShopType = netPack.ShopType;
|
| | | rankInfo.Clear();
|
| | | maxRank = 0;
|
| | | for (int i = 0; i < netPack.PersonalBillboardInfoList.Length; i++)
|
| | |
| | | {
|
| | | public class TreasurePavilionRankActWin : OneLevelWin
|
| | | {
|
| | | TreasurePavilionRankActModel model { get { return ModelCenter.Instance.GetModel<TreasurePavilionRankActModel>(); } }
|
| | | StoreModel storeModel { get { return ModelCenter.Instance.GetModel<StoreModel>(); } }
|
| | |
|
| | | protected override void AddListeners()
|
| | | {
|
| | |
| | | SetFunctionListener(2, OpenLogin);
|
| | | SetFunctionListener(3, OpenMission);
|
| | | SetFunctionListener(4, OpenGift);
|
| | | SetFunctionListener(5, OpenStore);
|
| | | }
|
| | |
|
| | |
|
| | |
| | | functionOrder = 0;
|
| | | }
|
| | |
|
| | | private void OpenStore()
|
| | | {
|
| | | CloseSubWindows();
|
| | |
|
| | | storeModel.rankActStore_ActType = TreasurePavilionRankActModel.operaType;
|
| | | storeModel.rankActStore_StoreType = model.operationAct.m_ShopType;
|
| | | storeModel.rankActStore_MoneyType = 46;
|
| | | WindowCenter.Instance.Open<ActStoreWin>(fixParentName: "TreasurePavilionRankActWin");
|
| | | functionOrder = 5;
|
| | | }
|
| | | }
|
| | | }
|