Beispiel #1
0
        private bool AddNewBankTab(int tabId)
        {
            if (tabId < 0 || tabId >= GuildMgr.MAX_BANK_TABS)
            {
                return(false);
            }

            var bankTab = this[tabId];

            if (bankTab != null)
            {
                return(false);
            }

            Guild.PurchasedBankTabCount++;
            var tab = new GuildBankTab
            {
                Bank     = this,
                BankSlot = tabId,
                Icon     = "",
                Name     = "Slot " + (tabId + 1),
                Text     = ""
            };

            ArrayUtil.AddOnlyOne(ref bankTabs, tab);

            tab.CreateLater();

            return(true);
        }
Beispiel #2
0
        private bool AddNewBankTab(int tabId)
        {
            if (tabId < 0 || tabId >= 6 || this[tabId] != null)
            {
                return(false);
            }
            ++this.Guild.PurchasedBankTabCount;
            ServerApp <WCell.RealmServer.RealmServer> .IOQueue.AddMessage((Action)(() =>
            {
                GuildBankTab guildBankTab = new GuildBankTab()
                {
                    Bank = this,
                    BankSlot = tabId,
                    Icon = "",
                    Name = "Slot " + (object)(tabId + 1),
                    Text = ""
                };
                int num = (int)ArrayUtil.AddOnlyOne <GuildBankTab>(ref this.bankTabs, guildBankTab);
                guildBankTab.CreateLater();
            }));

            return(true);
        }
Beispiel #3
0
		private bool AddNewBankTab(int tabId)
		{
			if (tabId < 0 || tabId >= GuildMgr.MAX_BANK_TABS) return false;

			var bankTab = this[tabId];
			if (bankTab != null) return false;

			Guild.PurchasedBankTabCount++;
			var tab = new GuildBankTab
			{
				Bank = this,
				BankSlot = tabId,
                Icon = "",
                Name = "Slot " + (tabId + 1),
                Text = ""
			};
			ArrayUtil.AddOnlyOne(ref bankTabs, tab);

			tab.CreateLater();

			return true;
		}
Beispiel #4
0
		private bool AddNewBankTab(int tabId)
		{
			if (tabId < 0 || tabId >= GuildMgr.MAX_BANK_TABS) return false;
			if (BankTabs[tabId] != null) return false;

			Guild.PurchasedBankTabCount++;
			var tab = new GuildBankTab
			{
				Bank = this,
				BankSlot = tabId
			};
			BankTabs[tabId] = tab;

			tab.CreateLater();

			return true;
		}