// Project Lab - NHTV Igad #pragma once #include "GameFramework/Actor.h" #include "ItemBase.generated.h" UENUM(BlueprintType) enum class EItemTypeEnum : uint8 { Hat UMETA(DisplayName = "Hat") , MainWeapon UMETA(DisplayName = "Main Weapon") , OffWeapon UMETA(DisplayName = "Off Weapon") , Chest UMETA(DisplayName = "Chest"), Ammo UMETA(DisplayName = "Ammo"), Feet UMETA(DisplayName = "Feet"), }; UCLASS() class UNREALPROJECT_API AItemBase : public AActor { GENERATED_BODY() friend class ACharacterBase; public: AItemBase(); // Creating an item using a Skill Object's data. static void CreateItemsFromSkill(UWorld* world, class UBaseSkillObject* skillObject, class ACharacterBase* character); // Returns the item currently equiped in a given slot static AItemBase* CheckSlotOccupied(EItemTypeEnum slotType, class ACharacterBase* character); virtual void Destroyed() override; void SetMesh(class USkeletalMesh* newMesh); // Attaches this item to a character. bool AttachItemToCharacter(class ACharacterBase* networkCharacter); // Type of the item. This variable also correlates to the socket the item attaches to. UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = Item) EItemTypeEnum type; UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = Components) class USkeletalMeshComponent* Mesh; class UBaseSkillObject* skillObject; };