protected void AddLogEntry(Character character, ContainerAccess access, int definition = 0, int quantity = 0) { if (!IsLogging()) { return; } ContainerLogger.AddLogEntry(character, access, definition, quantity); }
public override void OnSaveToDb() { if (_logger != null) { ContainerLogger.SaveToDb(); } base.OnSaveToDb(); }
public virtual void SetLogging(bool state, Character character, bool writeLog = false) { if (IsLogging() == state) { return; } DynamicProperties.Update(k.log, (state) ? 1 : 0); if (writeLog && character != Character.None) { ContainerLogger.AddLogEntry(character, state ? ContainerAccess.LogStart : ContainerAccess.LogStop); } }
public override void OnDeleteFromDb() { HasChildren.ThrowIfTrue(ErrorCodes.ContainerHasToBeEmpty); ContainerLogger.ClearLog(null); base.OnDeleteFromDb(); }