mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2025-08-04 09:44:10 +00:00
Use only ints
This commit is contained in:
@@ -87,7 +87,7 @@ void ActivityManager::SaveScore(Entity* self, LWOOBJID playerID, uint32_t val1,
|
||||
uint32_t gameID = sac != nullptr ? sac->GetActivityID() : self->GetLOT();
|
||||
// Save the new score to the leaderboard and show the leaderboard to the player
|
||||
auto leaderboardType = LeaderboardManager::GetLeaderboardType(gameID);
|
||||
Game::logger->Log("ActivityManager", "leaderboard type %i %i", leaderboardType, gameID);
|
||||
Game::logger->Log("ActivityManager", "leaderboard type %i %i args %i %i %i", leaderboardType, gameID, val1, val2, val3);
|
||||
LeaderboardManager::Instance().SaveScore(playerID, gameID, leaderboardType, 3, val1, val2, val3);
|
||||
|
||||
// Makes the leaderboard show up for the player
|
||||
|
@@ -546,13 +546,13 @@ void SGCannon::StopGame(Entity* self, bool cancel) {
|
||||
|
||||
// The player won, store all the score and send rewards
|
||||
if (!cancel) {
|
||||
auto percentage = 0;
|
||||
int32_t percentage = 50;
|
||||
auto misses = self->GetVar<uint32_t>(MissesVariable);
|
||||
auto fired = self->GetVar<uint32_t>(ShotsFiredVariable);
|
||||
|
||||
if (fired > 0) {
|
||||
percentage = misses / fired;
|
||||
}
|
||||
// if (fired > 0) {
|
||||
// percentage = misses / fired;
|
||||
// }
|
||||
|
||||
auto* missionComponent = player->GetComponent<MissionComponent>();
|
||||
|
||||
|
Reference in New Issue
Block a user