2022-11-14 14:57:02 +00:00
|
|
|
// Fill out your copyright notice in the Description page of Project Settings.
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "CoreMinimal.h"
|
|
|
|
#include "UObject/Object.h"
|
|
|
|
#include "BaseItem.generated.h"
|
|
|
|
|
2022-11-14 17:42:26 +00:00
|
|
|
|
2022-11-14 14:57:02 +00:00
|
|
|
/**
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
UCLASS(Abstract, BlueprintType, Blueprintable, EditInlineNew, DefaultToInstanced)
|
|
|
|
class THE_TWILIGHT_ABYSS_API UBaseItem : public UObject
|
|
|
|
{
|
|
|
|
GENERATED_BODY()
|
|
|
|
|
|
|
|
public:
|
2022-11-14 16:52:57 +00:00
|
|
|
UBaseItem();
|
2022-11-14 17:42:26 +00:00
|
|
|
|
|
|
|
virtual class UWorld* GetWorld() const { return World; };
|
|
|
|
|
|
|
|
UPROPERTY(Transient)
|
|
|
|
class UWorld* World;
|
2023-05-01 04:23:43 +00:00
|
|
|
|
|
|
|
UPROPERTY(EditDefaultsOnly, BlueprintReadWrite, Category = "Item")
|
|
|
|
int ItemID;
|
|
|
|
|
2022-11-14 14:57:02 +00:00
|
|
|
//The text that will be displayed for using the item (Equip, Eat)
|
2022-11-14 17:42:26 +00:00
|
|
|
UPROPERTY(EditDefaultsOnly, BlueprintReadWrite, Category = "Item")
|
2022-11-14 14:57:02 +00:00
|
|
|
FText ItemUseAction;
|
|
|
|
|
|
|
|
//The actual mesh of the item
|
2022-11-14 17:42:26 +00:00
|
|
|
UPROPERTY(EditDefaultsOnly, BlueprintReadWrite, Category = "Item")
|
2022-11-14 14:57:02 +00:00
|
|
|
class UStaticMesh* ItemMesh;
|
|
|
|
|
|
|
|
//The picture of the item icon
|
2022-11-14 17:42:26 +00:00
|
|
|
UPROPERTY(EditDefaultsOnly, BlueprintReadWrite, Category = "Item")
|
2022-11-14 14:57:02 +00:00
|
|
|
class UTexture2D* ItemIcon;
|
|
|
|
|
|
|
|
//The name of the item
|
2022-11-14 17:42:26 +00:00
|
|
|
UPROPERTY(EditDefaultsOnly, BlueprintReadWrite, Category = "Item")
|
2022-11-14 14:57:02 +00:00
|
|
|
FText ItemDisplayName;
|
|
|
|
|
|
|
|
//The description of the item
|
2022-11-14 17:42:26 +00:00
|
|
|
UPROPERTY(EditDefaultsOnly, BlueprintReadWrite, Category = "Item")
|
2022-11-14 14:57:02 +00:00
|
|
|
FText ItemDescription;
|
|
|
|
|
2022-11-14 15:53:50 +00:00
|
|
|
//The cost of the item
|
2022-11-14 17:42:26 +00:00
|
|
|
UPROPERTY(EditDefaultsOnly, BlueprintReadWrite, Category = "Item")
|
2022-11-15 03:27:44 +00:00
|
|
|
int ItemCostPrice;
|
2022-11-23 00:51:00 +00:00
|
|
|
|
|
|
|
UPROPERTY(EditAnywhere, Category = "Item")
|
|
|
|
bool isHealingItem;
|
|
|
|
|
|
|
|
UPROPERTY(EditAnywhere, Category = "Item")
|
|
|
|
bool isDamageBuffItem;
|
2022-11-29 14:15:20 +00:00
|
|
|
|
2023-02-07 00:11:00 +00:00
|
|
|
UPROPERTY(EditAnywhere, Category = "Item")
|
2023-03-13 17:00:08 +00:00
|
|
|
bool isProbertiumType;
|
|
|
|
|
|
|
|
UPROPERTY(EditAnywhere, Category = "Item")
|
|
|
|
bool isEisType;
|
|
|
|
|
|
|
|
UPROPERTY(EditAnywhere, Category = "Item")
|
|
|
|
bool isAzosType;
|
|
|
|
|
|
|
|
UPROPERTY(EditAnywhere, Category = "Item")
|
|
|
|
bool isIroquoidType;
|
2023-02-07 00:11:00 +00:00
|
|
|
|
2023-01-12 13:56:30 +00:00
|
|
|
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Item")
|
2023-01-12 15:21:32 +00:00
|
|
|
int32 StackCount = 1;
|
2022-11-15 03:27:44 +00:00
|
|
|
|
2022-11-14 14:57:02 +00:00
|
|
|
//reference to the UInventoryComponent script
|
2023-01-12 13:56:30 +00:00
|
|
|
UPROPERTY(EditAnywhere, Category = "Item")
|
2022-11-14 14:57:02 +00:00
|
|
|
class UInventoryComponent* StoredItems;
|
2022-11-14 15:53:50 +00:00
|
|
|
|
|
|
|
//The buy class to purchase the item
|
2023-05-08 19:03:54 +00:00
|
|
|
virtual void Buy(class ATempCharacter* BuyItem) PURE_VIRTUAL(UBaseItem); // WILL SET THIS UP LATER
|
2022-11-14 15:53:50 +00:00
|
|
|
|
|
|
|
//The use Item class to use the item in the player Inventory
|
2022-11-14 20:28:34 +00:00
|
|
|
virtual void Use(class ATempCharacter* Character);
|
2022-11-14 19:22:50 +00:00
|
|
|
|
2022-11-14 16:52:57 +00:00
|
|
|
//This is the same as the use item class but its in BP instead
|
|
|
|
UFUNCTION(BlueprintImplementableEvent)
|
2022-11-14 17:42:26 +00:00
|
|
|
void OnUse(class ATempCharacter* Character);
|
2023-02-20 14:49:05 +00:00
|
|
|
|
2022-11-14 14:57:02 +00:00
|
|
|
};
|