//能否弹劾 领袖 private bool GetIsImpeach() { bool isPower = GuildMainMediator.guildmainMediator.IsPowerEnough("13"); if (!isPower) { return(false); } int needTime = GuildBaseConfig.GetGuildBase(1).impeachTime; for (int i = 0; i < GuildMainMediator.mMyGuild.memberList.Count; i++) { GuildMemberInfo info = GuildMainMediator.mMyGuild.memberList[i]; if (info.power == 5 && info.onlineState > 1) { TimeSpan timeSpan = (DateTime.UtcNow - new DateTime(1970, 1, 1)); int cstName = (int)timeSpan.TotalSeconds; int leftTime = cstName - info.onlineState; if (leftTime >= needTime * 24 * 60 * 60) { return(true); } } } return(false); }
/// <summary> /// 限制简介字数 /// </summary> void IntroValueChanged() { int maxleng = GuildBaseConfig.GetGuildBase(1).noticeLen; if (panel.inputintro.value.Length >= maxleng) { GUIManager.SetJumpText(TextManager.GetSystemString("ui_system_31")); } }
void IntroValueChanged() { int introMAX = GuildBaseConfig.GetGuildBase(1).introductionLen; int noticeMAX = GuildBaseConfig.GetGuildBase(1).noticeLen; if (panel.inputintro.value.Length >= introMAX || panel.inputnotice.value.Length >= noticeMAX) { GUIManager.SetPromptInfo(TextManager.GetSystemString("ui_system_31"), null); } }
protected override void OnShow(INotification notification) { if (guildalternameMediator == null) { guildalternameMediator = Facade.RetrieveMediator("GuildAlterNoticeMediator") as GuildAlterNoticeMediator; } mGuildBase = GuildBaseConfig.GetGuildBase(1); InitNoticeInro(); }
protected override void OnShow(INotification notification) { if (guildcreatMediator == null) { guildcreatMediator = Facade.RetrieveMediator("GuildCreatMediator") as GuildCreatMediator; } mGuildBase = GuildBaseConfig.GetGuildBase(1); panel.inputname.characterLimit = mGuildBase.nameLenMax; panel.inputintro.characterLimit = mGuildBase.introductionLen; }
protected override void OnShow(INotification notification) { if (guildmainMediator == null) { guildmainMediator = Facade.RetrieveMediator("GuildMainMediator") as GuildMainMediator; } Facade.SendNotification(NotificationID.Gold_Hide); mGuildBaseInfo = GuildBaseConfig.GetGuildBase(1); mTimerKeyList.Clear(); SetBuild(); }
protected override void OnShow(INotification notification) { if (guildalternameMediator == null) { guildalternameMediator = Facade.RetrieveMediator("GuildAlterNameMediator") as GuildAlterNameMediator; } mGuildBase = GuildBaseConfig.GetGuildBase(1); panel.hint.gameObject.SetActive(true); panel.inputnewname.characterLimit = mGuildBase.nameLenMax; UILabel needLabel = panel.sure_btn.transform.FindChild("Label").GetComponent <UILabel>(); needLabel.text = mGuildBase.changeNameDiamond.ToString(); }
protected override void OnShow(INotification notification) { if (guildspeedMediator == null) { guildspeedMediator = Facade.RetrieveMediator("GuildSpeedMediator") as GuildSpeedMediator; } mGuildBuildInfo = notification.Body as GuildBuildInfo; mGuildBase = GuildBaseConfig.GetGuildBase(1); panel.buildname.text = TextManager.GetUIString("UIGuildBuild" + mGuildBuildInfo.id); SetUpgradeTime(); SetSpeedInfo(); }
//获取公会最大人数上限 public int GetGuildMaxMember() { int num = GuildBaseConfig.GetGuildBase(1).maxMemberNum; if (GuildBuildConfig.mGuildBuildDict.ContainsKey(1)) { GuildBuildInfo info = GuildBuildConfig.mGuildBuildDict[1]; GuildUpHall hallInfo = GuildUpHallConfig.GetGuildUpHall(info.level); num += hallInfo.addNum; } return(num); }
protected override void OnShow(INotification notification) { if (guildlistMediator == null) { guildlistMediator = Facade.RetrieveMediator("GuildListMediator") as GuildListMediator; } mGuildBaseInfo = GuildBaseConfig.GetGuildBase(1); panel.guildGrid.enabled = true; panel.guildGrid.BindCustomCallBack(UpdateGuildGrid); panel.guildGrid.StartCustom(); OnClientGuildList(); }
protected override void OnShow(INotification notification) { if (guilddonationMediator == null) { guilddonationMediator = Facade.RetrieveMediator("GuildDonationMediator") as GuildDonationMediator; } mBuildInfo = notification.Body as GuildBuildInfo; mGuildBase = GuildBaseConfig.GetGuildBase(1); panel.donationGrid.enabled = true; panel.donationGrid.BindCustomCallBack(UpdateDonationGridItem); panel.donationGrid.StartCustom(); if (GuildMainMediator.mMyGuild.memberList.Count <= 0) { OnClientGetGuildMember(); } SetDonationInfo(); SetDayDonateData(); }
public void SetProtectInfo() { panel.count_label.text = count.ToString(); panel.money_label.text = (count * GuildBaseConfig.GetGuildBase(1).protectconsume).ToString(); }
private void OnClick(GameObject go) { switch (go.transform.name) { case "offBtn": { Facade.SendNotification(NotificationID.GuildTactic_Hide); } break; case "immuneBtn": //免疫攻击界面 { panel.immunepanel.gameObject.SetActive(true); } break; case "incidentBtn": { //事件 } break; case "RankBtn": { Facade.SendNotification(NotificationID.Rank_Show); } break; case "off_btn": { panel.immunepanel.gameObject.SetActive(false); } break; case "sub_btn": { if (count == 1) { return; } count--; SetProtectInfo(); } break; case "add_btn": { if (count == 999) { return; } count++; SetProtectInfo(); } break; case "sure_btn": { int needDiamond = count * GuildBaseConfig.GetGuildBase(1).protectconsume; if (PlayerMediator.playerInfo.diamond < needDiamond) { GUIManager.SetJumpText(TextManager.GetSystemString("ui_system_40")); return; } ServerCustom.instance.SendClientMethods(GuildProxy.OnClientBuyGuildProtect, count); GUIManager.SetJumpText(TextManager.GetSystemString("ui_system_guild22")); panel.immunepanel.gameObject.SetActive(true); } break; default: return; } }