Added enum for coin sources

Added an enum for coin sources as to avoid leaving a random number in the code.
This commit is contained in:
EmosewaMC
2021-12-22 00:01:55 -08:00
parent c575294587
commit 97f8e9e9fc
9 changed files with 40 additions and 15 deletions

View File

@@ -1326,7 +1326,7 @@ void SlashCommandHandler::HandleChatCommand(const std::u16string& command, Entit
}
auto* ch = entity->GetCharacter();
ch->SetCoins(ch->GetCoins() + money, 14);
ch->SetCoins(ch->GetCoins() + money, COIN_SOURCE_MODERATION);
}
if ((chatCommand == "setcurrency") && args.size() == 1 && entity->GetGMLevel() >= GAME_MASTER_LEVEL_DEVELOPER) {
@@ -1339,7 +1339,7 @@ void SlashCommandHandler::HandleChatCommand(const std::u16string& command, Entit
}
auto* ch = entity->GetCharacter();
ch->SetCoins(money, 14);
ch->SetCoins(money, COIN_SOURCE_MODERATION);
}
// Allow for this on even while not a GM, as it sometimes toggles incorrrectly.