コード例 #1
0
        private static DbItem ConvertToItem(DinoItem i, string parent_id, DbInventoryParentType parent_type, ObjectId server_id, int tribe_id, ulong revision_id, byte revision_index)
        {
            //Convert item
            DbItem item = new DbItem
            {
                classname     = Program.TrimArkClassname(i.classname),
                crafter_name  = "",
                crafter_tribe = "",
                is_blueprint  = i.blueprint,
                is_engram     = false,
                item_id       = Program.GetMultipartID(i.id1, i.id2),
                last_durability_decrease_time = -1,
                parent_id        = parent_id,
                parent_type      = parent_type,
                saved_durability = i.durability,
                server_id        = server_id,
                stack_size       = i.count,
                tribe_id         = tribe_id,
                revision_id      = revision_id,
                revision_type    = revision_index
            };

            return(item);
        }
コード例 #2
0
        public static void QueueInventoryItem(List <WriteModel <DbItem> > itemActions, DinoItem i, string parent_id, DbInventoryParentType parent_type, ObjectId server_id, int tribe_id, ulong revision_id, byte revision_index, string custom_data_name = null, string custom_data_value = null)
        {
            //Convert item
            DbItem item = ConvertToItem(i, parent_id, parent_type, server_id, tribe_id, revision_id, revision_index);

            //Add custom datas
            item.custom_data_name  = custom_data_name;
            item.custom_data_value = custom_data_value;

            //Add to queue
            AddItemToQueue(itemActions, item);
        }