Consolidated if statement

Changed default variable to achievement and removed the else.
This commit is contained in:
EmosewaMC 2021-12-23 19:43:19 -08:00
parent e84811bdce
commit e95af79c8a

View File

@ -481,12 +481,10 @@ void Mission::YieldRewards() {
inventoryComponent->AddItem(pair.first, count); inventoryComponent->AddItem(pair.first, count);
} }
int32_t lootSource = LOOT_SOURCE_NONE; int32_t lootSource = LOOT_SOURCE_ACHIEVEMENT;
if (info->reward_currency > 0) { if (info->reward_currency > 0) {
if(info->isMission) { if(info->isMission) {
lootSource = LOOT_SOURCE_MISSION; lootSource = LOOT_SOURCE_MISSION;
} else {
lootSource = LOOT_SOURCE_ACHIEVEMENT;
} }
character->SetCoins(character->GetCoins() + info->reward_currency, lootSource); character->SetCoins(character->GetCoins() + info->reward_currency, lootSource);
} }