예제 #1
0
        private void LogItemEvent(GuildBankLogEntryType type, Character actor, ItemRecord record, int amount,
                                  GuildBankTab intoTab)
        {
            GuildBankLogEntry guildBankLogEntry = new GuildBankLogEntry(Bank.Guild.Id)
            {
                Type           = type,
                Actor          = actor,
                BankLog        = this,
                DestinationTab = intoTab,
                ItemEntryId    = (int)record.EntryId,
                ItemStackCount = amount,
                Created        = DateTime.Now
            };

            lock (moneyLogEntries)
                moneyLogEntries.Insert(guildBankLogEntry);
        }
예제 #2
0
 private void LogMoneyEvent(GuildBankLogEntryType type, Character actor, uint money)
 {
     ServerApp <RealmServer> .IOQueue.AddMessage(() =>
     {
         GuildBankLogEntry record = new GuildBankLogEntry(Bank.Guild.Id)
         {
             Type    = type,
             Actor   = actor,
             BankLog = this,
             Money   = (int)money,
             Created = DateTime.Now
         };
         record.CreateLater();
         lock (itemLogEntries)
             itemLogEntries.Insert(record);
     });
 }
예제 #3
0
        }         // end method

        private void LogMoneyEvent(GuildBankLogEntryType type, Character actor, uint money)
        {
            var entry = new GuildBankLogEntry(Bank.Guild.Id)
            {
                Type    = type,
                Actor   = actor,
                BankLog = this,
                Money   = (int)money,
                Created = DateTime.Now
            };

            entry.CreateLater();

            lock (itemLogEntries)
            {
                itemLogEntries.Insert(entry);
            }
        }
예제 #4
0
        internal void LoadLogs()
        {
            foreach (GuildBankLogEntry guildBankLogEntry in GuildBankLogEntry.LoadAll(Bank.Guild.Id))
            {
                switch (guildBankLogEntry.Type)
                {
                case GuildBankLogEntryType.DepositItem:
                    itemLogEntries.Insert(guildBankLogEntry);
                    break;

                case GuildBankLogEntryType.WithdrawItem:
                    itemLogEntries.Insert(guildBankLogEntry);
                    break;

                case GuildBankLogEntryType.MoveItem:
                    itemLogEntries.Insert(guildBankLogEntry);
                    break;

                case GuildBankLogEntryType.DepositMoney:
                    moneyLogEntries.Insert(guildBankLogEntry);
                    break;

                case GuildBankLogEntryType.WithdrawMoney:
                    moneyLogEntries.Insert(guildBankLogEntry);
                    break;

                case GuildBankLogEntryType.MoneyUsedForRepairs:
                    moneyLogEntries.Insert(guildBankLogEntry);
                    break;

                case GuildBankLogEntryType.MoveItem_2:
                    itemLogEntries.Insert(guildBankLogEntry);
                    break;
                }
            }
        }
예제 #5
0
 private static void OnEntryDeleted(GuildBankLogEntry obj)
 {
     obj.DeleteLater();
 }
예제 #6
0
        internal void LoadLogs()
        {
            var logEntries = GuildBankLogEntry.LoadAll(Bank.Guild.Id);

            foreach (var entry in logEntries)
            {
                switch (entry.Type)
                {
                case GuildBankLogEntryType.None:
                {
                    break;
                }

                case GuildBankLogEntryType.DepositItem:
                {
                    itemLogEntries.Insert(entry);
                    break;
                }

                case GuildBankLogEntryType.WithdrawItem:
                {
                    itemLogEntries.Insert(entry);
                    break;
                }

                case GuildBankLogEntryType.MoveItem:
                {
                    itemLogEntries.Insert(entry);
                    break;
                }

                case GuildBankLogEntryType.DepositMoney:
                {
                    moneyLogEntries.Insert(entry);
                    break;
                }

                case GuildBankLogEntryType.WithdrawMoney:
                {
                    moneyLogEntries.Insert(entry);
                    break;
                }

                case GuildBankLogEntryType.MoneyUsedForRepairs:
                {
                    moneyLogEntries.Insert(entry);
                    break;
                }

                case GuildBankLogEntryType.MoveItem_2:
                {
                    itemLogEntries.Insert(entry);
                    break;
                }

                case GuildBankLogEntryType.Unknown1:
                {
                    break;
                }

                case GuildBankLogEntryType.Unknown2:
                {
                    break;
                }

                default:
                {
                    break;
                }
                }         // end switch
            }             // end foreach
        }