// Fill out your copyright notice in the Description page of Project Settings. #include "PartyMember.h" int32 UPartyMember::GetAllocated() { return Allocated; } void UPartyMember::AddToParty() { if(Allocated == Available++) { Allocated++; } } int32 UPartyMember::GetAvailable() { return Available; } int32 UPartyMember::SetAllocation(int32 Amount) { if(Amount > Available) { Allocated = Available; } else if (Amount < 0) { Allocated = 0; } else { Allocated = Amount; } return Allocated; } int32 UPartyMember::AllocateMember() { if(Allocated == Available) { return Allocated; } else { return ++Allocated; } } int32 UPartyMember::DeallocateMember() { if(Allocated == 0) { return Allocated; } else { return --Allocated; } }