mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2024-11-12 19:28:21 +00:00
Added Player Rewards for Solo Racing (#1150)
* Added Player Rewards for Solo Racing * Fixed Dual PlayersRating multiplication * Checking for solo player fixed * Another change to fix issues
This commit is contained in:
parent
11b0097488
commit
342da56678
@ -374,8 +374,12 @@ void RacingControlComponent::HandleMessageBoxResponse(Entity* player, int32_t bu
|
||||
data->collectedRewards = true;
|
||||
|
||||
// Calculate the score, different loot depending on player count
|
||||
const auto score = m_LoadedPlayers * 10 + data->finished;
|
||||
auto playersRating = m_LoadedPlayers;
|
||||
if(m_LoadedPlayers == 1 && m_SoloRacing) {
|
||||
playersRating *= 2;
|
||||
}
|
||||
|
||||
const auto score = playersRating * 10 + data->finished;
|
||||
LootGenerator::Instance().GiveActivityLoot(player, m_Parent, m_ActivityID, score);
|
||||
|
||||
// Giving rewards
|
||||
|
Loading…
Reference in New Issue
Block a user