Updated EatableItems.cpp
Made it so when the players health is above 100 they cant heal anymore. (Removed healing stacking)
This commit is contained in:
parent
5364f92edb
commit
81d926ffb3
@ -18,11 +18,17 @@ void UEatableItems::Use(ATempCharacter* Character)
|
||||
{
|
||||
if(isHealingItem == true)
|
||||
{
|
||||
Character->Health += 10;
|
||||
UE_LOG(LogTemp, Display, TEXT("Healed"));
|
||||
//delete itself
|
||||
Character->Inventory->RemoveItem(this);
|
||||
|
||||
if (Character->Health < 100)
|
||||
{
|
||||
Character->Health += 10;
|
||||
UE_LOG(LogTemp, Display, TEXT("Healed"));
|
||||
//delete itself
|
||||
Character->Inventory->RemoveItem(this);
|
||||
}
|
||||
else if (Character->Health >= 100)
|
||||
{
|
||||
UE_LOG(LogTemp, Display, TEXT("Health is full"));
|
||||
}
|
||||
}
|
||||
if(isDamageBuffItem == true)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user