Skip to content

Commit

Permalink
Revert "Add stubbing for abbreviations"
Browse files Browse the repository at this point in the history
This reverts commit 7d1a28b492b263aba2008a5984dc0f5e7348a068.

Add stubbing for abbreviations

Reward reputation always if possible
  • Loading branch information
EmosewaMC committed May 20, 2024
1 parent d8f079c commit daf8103
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions dGame/dMission/Mission.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -454,6 +454,16 @@ void Mission::YieldRewards() {
}
}

// Even with no repeatable column, reputation is repeatable
if (info.reward_reputation > 0) {
missionComponent->Progress(eMissionTaskType::EARN_REPUTATION, 0, LWOOBJID_EMPTY, "", info.reward_reputation);
auto* const character = entity->GetComponent<CharacterComponent>();
if (character) {
character->SetReputation(character->GetReputation() + info.reward_reputation);
GameMessages::SendUpdateReputation(entity->GetObjectID(), character->GetReputation(), entity->GetSystemAddress());
}
}

if (m_Completions > 0) {
std::vector<std::pair<LOT, uint32_t>> items;

Expand Down Expand Up @@ -532,15 +542,6 @@ void Mission::YieldRewards() {
modelInventory->SetSize(modelInventory->GetSize() + info.reward_bankinventory);
}

if (info.reward_reputation > 0) {
missionComponent->Progress(eMissionTaskType::EARN_REPUTATION, 0, 0L, "", info.reward_reputation);
auto character = entity->GetComponent<CharacterComponent>();
if (character) {
character->SetReputation(character->GetReputation() + info.reward_reputation);
GameMessages::SendUpdateReputation(entity->GetObjectID(), character->GetReputation(), entity->GetSystemAddress());
}
}

if (info.reward_maxhealth > 0) {
destroyableComponent->SetMaxHealth(destroyableComponent->GetMaxHealth() + static_cast<float>(info.reward_maxhealth), true);
}
Expand Down

0 comments on commit daf8103

Please sign in to comment.