public void ItemModified(NetCargo cargo) { if (dbChar != null) { dbChar.ApplyChanges(); } }
public void RemoveCargo(NetCargo slot, int amount) { slot.Count -= amount; if (slot.Count <= 0) { Items.Remove(slot); if (slot.DbItem != null) { dbChar.Character.Items.Remove(slot.DbItem); dbChar.ApplyChanges(); } } else if (slot.DbItem != null) { slot.DbItem.ItemCount = slot.Count; } }