Ejemplo n.º 1
0
        public static void SetInventoryItem(this Entity entity, InventoryItem item, ItemSpec itemSpec = null)
        {
            StaticFloatingItemCache.Instance.RegisterItem(item, entity);

            if (itemSpec == null)
            {
                itemSpec = item.GetItemSpec();
            }

            entity.SetProperty(new EntityProperty((short)GameEntityPropertyEnum.ItemSpecId, itemSpec.Id));
            entity.SetNameplate(itemSpec.GetName());
            entity.SetModel(itemSpec.GetModelName());
            entity.SetNameplateColour(Colours.Yellow);
        }