| | |
| | |
|
| | | public byte[] donateCntList;
|
| | | public event Action DonateCntListEvent;
|
| | | public event Action<bool> EnterOrQuitGuildEvent; //进入或退出公会事件
|
| | | public event Action<bool> EnterOrQuitGuildEvent; //true进入或false退出公会事件
|
| | |
|
| | |
|
| | | public override void Init()
|
| | |
| | | void OnPlayerLoginOk()
|
| | | {
|
| | | UpdateDonateRedPoint();
|
| | |
|
| | | QueryZBGFamilyInfo();
|
| | | }
|
| | |
|
| | | void PlayerDataRefreshEvent(PlayerDataType type)
|
| | |
| | | EnterOrQuitGuildEvent?.Invoke(false);
|
| | | }
|
| | |
|
| | | //注意上线通知公会数据时也会触发
|
| | | //注意上线通知公会数据时也会触发; 但断线重连不会触发
|
| | | public async UniTask AfterEnterGuild()
|
| | | {
|
| | | //这里还没有公会数据, 后续的包会更新公会数据
|
| | |
| | | #region 公会自定义记录
|
| | | public void UpdateFamilyAction(HA513_tagMCFamilyActionInfo _package)
|
| | | {
|
| | | if (PlayerDatas.Instance.fairyData == null ||
|
| | | PlayerDatas.Instance.fairyData.fairy == null ||
|
| | | PlayerDatas.Instance.fairyData.fairy.FamilyID != _package.FamilyID)
|
| | | if (PlayerDatas.Instance.baseData.FamilyId != _package.FamilyID)
|
| | | {
|
| | | return;
|
| | | }
|
| | |
| | | return;
|
| | | }
|
| | | lastChangeMarkTime = Time.time;
|
| | | if (UIManager.Instance.IsOpened<GuildHallWin>())
|
| | | if ((netPack.Type == 1 || netPack.Type == 2) && UIManager.Instance.IsOpened<GuildBaseWin>())
|
| | | {
|
| | | RequestGuildData();
|
| | | }
|
| | |
| | | //登录后首次打开查询,换新仙盟查询
|
| | | public void QueryZBGFamilyInfo()
|
| | | {
|
| | | if (PlayerDatas.Instance.baseData.FamilyId == 0)
|
| | | {
|
| | | return;
|
| | | }
|
| | | if (isQueryZBGYet)
|
| | | return;
|
| | |
|
| | |
|
| | | QueryFamilyAction((int)PlayerDatas.Instance.baseData.FamilyId, ZBGFamilyActionType);
|
| | |
|
| | |
| | | return false;
|
| | | }
|
| | | bool restart = false;
|
| | | if (vNetData.FamilyActionList.Length == 1 && vNetData.FamilyActionList[0].Value1 == 1)
|
| | | |
| | | for (int i = 0; i < vNetData.FamilyActionList.Length; i++)
|
| | | {
|
| | | int playerID = (int)vNetData.FamilyActionList[i].Value1;
|
| | | if (playerID != 1)
|
| | | {
|
| | | continue;
|
| | | }
|
| | | if (familyZBGActions.ContainsKey(1) && familyZBGActions[1].Time != vNetData.FamilyActionList[0].Time)
|
| | | {
|
| | | familyZBGActions.Clear();
|
| | |
| | | }
|
| | | }
|
| | |
|
| | |
|
| | | for (int i = 0; i < vNetData.FamilyActionList.Length; i++)
|
| | | {
|
| | | int playerID = (int)vNetData.FamilyActionList[i].Value1;
|