From cb9c2bcb270e0372427d73d43182e4f88ee6726a Mon Sep 17 00:00:00 2001 From: MH261677 Date: Fri, 18 Nov 2022 19:25:10 +0000 Subject: [PATCH] Updated BaseItem, TempCharacter Removed more unused code to make the scripts more readable and optimized. --- Source/the_twilight_abyss/BaseItems/Items/BaseItem.h | 3 --- Source/the_twilight_abyss/PlayerTemp/TempCharacter.cpp | 8 -------- Source/the_twilight_abyss/PlayerTemp/TempCharacter.h | 3 --- 3 files changed, 14 deletions(-) diff --git a/Source/the_twilight_abyss/BaseItems/Items/BaseItem.h b/Source/the_twilight_abyss/BaseItems/Items/BaseItem.h index 1b18b3d..88665d9 100644 --- a/Source/the_twilight_abyss/BaseItems/Items/BaseItem.h +++ b/Source/the_twilight_abyss/BaseItems/Items/BaseItem.h @@ -60,7 +60,4 @@ public: //This is the same as the use item class but its in BP instead UFUNCTION(BlueprintImplementableEvent) void OnUse(class ATempCharacter* Character); - - UFUNCTION(BlueprintImplementableEvent) - void OnBuy(class ATempCharacter* PurchaseItem); }; diff --git a/Source/the_twilight_abyss/PlayerTemp/TempCharacter.cpp b/Source/the_twilight_abyss/PlayerTemp/TempCharacter.cpp index cab6df2..b5d77ed 100644 --- a/Source/the_twilight_abyss/PlayerTemp/TempCharacter.cpp +++ b/Source/the_twilight_abyss/PlayerTemp/TempCharacter.cpp @@ -110,11 +110,3 @@ void ATempCharacter::UseItem(class UBaseItem* Item) } } -void ATempCharacter::BuyItem(UBaseItem* BuyItem) -{ - if(BuyItem) - { - BuyItem->Buy(this); - BuyItem->OnBuy(this); - } -} diff --git a/Source/the_twilight_abyss/PlayerTemp/TempCharacter.h b/Source/the_twilight_abyss/PlayerTemp/TempCharacter.h index b3f30c7..a1cf05c 100644 --- a/Source/the_twilight_abyss/PlayerTemp/TempCharacter.h +++ b/Source/the_twilight_abyss/PlayerTemp/TempCharacter.h @@ -50,9 +50,6 @@ public: //Using the item in the inventory UFUNCTION(BlueprintCallable, Category= "Items") void UseItem(class UBaseItem* Item); // Overriding the BaseItem Class - - UFUNCTION(BlueprintCallable, Category= "Items") - void BuyItem(class UBaseItem* BuyItem); UPROPERTY(EditAnywhere, Category= "Items") UBaseItem* ItemToBuy;