Ejemplo n.º 1
0
        protected void AddLogEntry(Character character, ContainerAccess access, int definition = 0, int quantity = 0)
        {
            if (!IsLogging())
            {
                return;
            }

            ContainerLogger.AddLogEntry(character, access, definition, quantity);
        }
Ejemplo n.º 2
0
        public override void OnSaveToDb()
        {
            if (_logger != null)
            {
                ContainerLogger.SaveToDb();
            }

            base.OnSaveToDb();
        }
Ejemplo n.º 3
0
        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);
            }
        }
Ejemplo n.º 4
0
 public override void OnDeleteFromDb()
 {
     HasChildren.ThrowIfTrue(ErrorCodes.ContainerHasToBeEmpty);
     ContainerLogger.ClearLog(null);
     base.OnDeleteFromDb();
 }