You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
67 lines
775 B
67 lines
775 B
// 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;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
|