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); }
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); }); }
} // 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); } }
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; } } }
private static void OnEntryDeleted(GuildBankLogEntry obj) { obj.DeleteLater(); }
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 }