mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2024-11-09 09:48:20 +00:00
Add reputation as a repeatable mission reward (#1590)
This reverts commit 7d1a28b492b263aba2008a5984dc0f5e7348a068. Add stubbing for abbreviations Reward reputation always if possible
This commit is contained in:
parent
dea10c6d56
commit
dc430d9758
@ -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) {
|
if (m_Completions > 0) {
|
||||||
std::vector<std::pair<LOT, uint32_t>> items;
|
std::vector<std::pair<LOT, uint32_t>> items;
|
||||||
|
|
||||||
@ -532,15 +542,6 @@ void Mission::YieldRewards() {
|
|||||||
modelInventory->SetSize(modelInventory->GetSize() + info.reward_bankinventory);
|
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) {
|
if (info.reward_maxhealth > 0) {
|
||||||
destroyableComponent->SetMaxHealth(destroyableComponent->GetMaxHealth() + static_cast<float>(info.reward_maxhealth), true);
|
destroyableComponent->SetMaxHealth(destroyableComponent->GetMaxHealth() + static_cast<float>(info.reward_maxhealth), true);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user