| | |
| | | [SerializeField] Button cutBtn; |
| | | [SerializeField] Text cutText; |
| | | [SerializeField] Text timeText; |
| | | |
| | | [SerializeField] UIHeroController heroController; |
| | | |
| | | |
| | | |
| | |
| | | scroller.OnRefreshCell += OnRefreshCell; |
| | | GuildManager.Instance.UpdateZhenbaogeEvent += OnPlayerZBGEvent; |
| | | GlobalTimeEvent.Instance.secondEvent += OnSecondEvent; |
| | | GlobalTimeEvent.Instance.fiveSecondEvent += OnFiveSecondEvent; |
| | | |
| | | Display(); |
| | | CreateScroller(); |
| | |
| | | scroller.OnRefreshCell -= OnRefreshCell; |
| | | GuildManager.Instance.UpdateZhenbaogeEvent -= OnPlayerZBGEvent; |
| | | GlobalTimeEvent.Instance.secondEvent -= OnSecondEvent; |
| | | GlobalTimeEvent.Instance.fiveSecondEvent -= OnFiveSecondEvent; |
| | | } |
| | | |
| | | void OnSecondEvent() |
| | | { |
| | | timeText.text = Language.Get("Guild_74", TimeUtility.SecondsToShortDHMS((int)(TimeUtility.GetTodayEndTime() - TimeUtility.ServerNow).TotalSeconds)); |
| | | timeText.text = Language.Get("Guild_74", TimeUtility.SecondsToShortDHMS((int)(TimeUtility.GetCommTodayEndTime(GuildManager.Instance.zoneID) - |
| | | TimeUtility.GetCommServerNow(GuildManager.Instance.zoneID)).TotalSeconds)); |
| | | } |
| | | |
| | | int index = 0; |
| | | void OnFiveSecondEvent() |
| | | { |
| | | index++; |
| | | heroController.PlayAnimation(index % 2 == 0 ? "idle" : "hanhua", true); |
| | | } |
| | | void OnRefreshCell(ScrollerDataType type, CellView cell) |
| | | { |
| | | var _cell = cell as GuildHawkerCutCell; |
| | |
| | | |
| | | void OnCut() |
| | | { |
| | | //退盟的cd限制 |
| | | if (GuildManager.Instance.needCheckCutCD && (TimeUtility.AllSeconds - PlayerDatas.Instance.baseData.leaveFamilyTime) / 60 < GuildManager.Instance.zbgChangFamilyCD ) |
| | | //砍价的cd限制: 公会没有记录自己砍过价,但今天有砍价记录,且退出过公会 |
| | | if (GuildManager.Instance.zhenbaogeCutState == 0 && GuildManager.Instance.needCheckCutCD && (TimeUtility.GetCommServerTick(GuildManager.Instance.zoneID) - PlayerDatas.Instance.baseData.leaveFamilyTime) / 60 < GuildManager.Instance.zbgChangFamilyCD ) |
| | | { |
| | | SysNotifyMgr.Instance.ShowTip("ZhenbaogeCut1", GuildManager.Instance.zbgChangFamilyCD - (TimeUtility.AllSeconds - PlayerDatas.Instance.baseData.leaveFamilyTime) / 60); |
| | | SysNotifyMgr.Instance.ShowTip("ZhenbaogeCut1", GuildManager.Instance.zbgChangFamilyCD - (TimeUtility.GetCommServerTick(GuildManager.Instance.zoneID) - PlayerDatas.Instance.baseData.leaveFamilyTime) / 60); |
| | | return; |
| | | } |
| | | if (GuildManager.Instance.zhenbaogeCutState == 0) |
| | |
| | | return; |
| | | } |
| | | |
| | | if (GuildManager.Instance.familyZBGActions[1].Value3 == 0 && UIHelper.GetMoneyCnt(GuildManager.Instance.zbgPriceType) < GuildManager.Instance.familyZBGActions[1].Value2) |
| | | if (GuildManager.Instance.familyZBGActions[1].Value3 == 0 && |
| | | !UIHelper.CheckMoneyCount(GuildManager.Instance.zbgPriceType, GuildManager.Instance.familyZBGActions[1].Value2, 2)) |
| | | { |
| | | SysNotifyMgr.Instance.ShowTip("LackMoney", GuildManager.Instance.zbgPriceType); |
| | | // SysNotifyMgr.Instance.ShowTip("LackMoney", GuildManager.Instance.zbgPriceType); |
| | | return; |
| | | } |
| | | |
| | |
| | | |
| | | |
| | | ConfirmCancel.ShowPopConfirm(Language.Get("Mail101"), |
| | | Language.Get("L1135", GuildManager.Instance.zbgPriceType, cutPrice)+ Language.Get("Guild_71"), (bool isOK) => |
| | | Language.Get("L1135", UIHelper.GetIconNameWithMoneyType(GuildManager.Instance.zbgPriceType), cutPrice)+ Language.Get("Guild_71"), (bool isOK) => |
| | | { |
| | | if (isOK) |
| | | { |