public void SetPowerGridDate() { panel.duty.text = TextManager.GetUIString("UIGuildPower" + mInfo.power); List <object> listObj = new List <object>(); PowerInfo info; for (int i = 4; i > 0; i--) { info = new PowerInfo(); info.power = i; info.count = GetGuildPowerNum(i); info.totalNum = GuildOfficialConfig.GetGuildOfficial(i).num; listObj.Add(info); } panel.powerGrid.AddCustomDataList(listObj); }
//判断是否拥有改权限 public bool IsPowerEnough(string power) { GuildOfficial guildOfficial = GuildOfficialConfig.GetGuildOfficial(PlayerMediator.playerInfo.guildPower); if (guildOfficial == null || string.IsNullOrEmpty(guildOfficial.powerOpen)) { return(false); } string powerStr = guildOfficial.powerOpen; string[] powerStrArr = powerStr.Split(','); List <string> listPower = new List <string>(powerStrArr); int indexPower = listPower.IndexOf(power); if (indexPower == -1) { return(false); } return(true); }