using System.Collections.Generic; using MoleMole.Config; using UnityEngine; using UnityEngine.UI; using proto; namespace MoleMole { public class VentureDispatchPageContext : BasePageContext { private const int MAX_TEAM_MEMBER_NUM = 3; private VentureDataItem _ventureData; private bool _isConditionMatch; public VentureDispatchPageContext(VentureDataItem ventureData) { config = new ContextPattern { contextName = "VentureDispatchPageContext", viewPrefabPath = "UI/Menus/Page/Island/VentureDispatchPage" }; _ventureData = ventureData; } public override bool OnPacket(NetPacketV1 pkt) { ushort cmdId = pkt.getCmdId(); if (cmdId == 174) { return OnDispatchIslandVentureRsp(pkt.getData()); } return false; } public override bool OnNotify(Notify ntf) { if (ntf.type == NotifyTypes.DispatchAvatarChanged) { SetupMyTeam(); SetupVentureConditaions(); return false; } if (ntf.type == NotifyTypes.ShowStaminaExchangeInfo2) { return ShowStaminaExchangeDialog(); } return false; } public bool ShowStaminaExchangeDialog() { Singleton.Instance.ShowDialog(new StaminaExchangeDialogContext("Menu_Desc_StaminaExchange2")); return false; } protected override void BindViewCallbacks() { BindViewCallback(base.view.transform.Find("Btn").GetComponent