Ejemplo n.º 1
0
        public void SetBankTabText(Character chr, byte tabId, string newText)
        {
            GuildMember guildMember = chr.GuildMember;

            if (guildMember == null)
            {
                return;
            }
            GuildRank rank = guildMember.Rank;

            if (rank == null || tabId < (byte)0 ||
                (tabId >= (byte)6 || (int)tabId > this.Guild.PurchasedBankTabCount))
            {
                return;
            }
            GuildBankTab record = this[(int)tabId];

            if (record == null || !rank.BankTabRights[(int)tabId].Privileges
                .HasFlag((Enum)GuildBankTabPrivileges.UpdateText))
            {
                return;
            }
            record.Text = newText.Length < 501 ? newText : newText.Substring(0, 500);
            record.UpdateLater();
            this.Guild.Broadcast(GuildHandler.CreateBankTabTextPacket(tabId, newText));
        }
Ejemplo n.º 2
0
        public void ModifyTabInfo(Character chr, GameObject bank, byte tabId, string newName, string newIcon)
        {
            if (!GuildBank.CheckBankObj(chr, bank))
            {
                return;
            }
            GuildMember guildMember = chr.GuildMember;

            if (guildMember == null || !guildMember.IsLeader ||
                (tabId < (byte)0 || (int)tabId > this.Guild.PurchasedBankTabCount))
            {
                return;
            }
            GuildBankTab record = this[(int)tabId];

            if (record == null)
            {
                return;
            }
            record.Name = newName;
            record.Icon = newIcon;
            record.UpdateLater();
            GuildHandler.SendGuildBankTabNames(chr, bank);
            GuildHandler.SendGuildBankTabContents(chr, bank, tabId);
        }