[Feat] Респект и уважуха (#476)
* db * wd comment * manager & commands * system & round end results * raise ban event * client manager & cached values * role pick tweak * tweak last commit * more fixes * weights fix * Fix for short rounds * tweak in cached dictionary * reva pick system * fix last commit * cult role pick * nukeops role picking * fix cache in async & show command * ooc msg show value * move pick method to manager & traitor pick fix
This commit is contained in:
@@ -281,6 +281,31 @@ namespace Content.Server.Database
|
||||
Task MarkMessageAsSeen(int id);
|
||||
|
||||
#endregion
|
||||
|
||||
#region Player Reputation (WD edit)
|
||||
|
||||
/// <summary>
|
||||
/// Set player's reputation to the certain value.
|
||||
/// </summary>
|
||||
/// <param name="player">Guid of the player to set the value.</param>
|
||||
/// <param name="value">Value to set.</param>
|
||||
Task SetPlayerReputation(Guid player, float value);
|
||||
|
||||
/// <summary>
|
||||
/// Modify player's reputation by adding value (currentValue + value).
|
||||
/// </summary>
|
||||
/// <param name="player">Guid of the player to modify the value.</param>
|
||||
/// <param name="value">Value to add.</param>
|
||||
Task ModifyPlayerReputation(Guid player, float value);
|
||||
|
||||
/// <summary>
|
||||
/// Gets value of player reputation.
|
||||
/// </summary>
|
||||
/// <param name="player">Guid of the player to get the value.</param>
|
||||
/// <returns>Value of player's reputation.</returns>
|
||||
Task<float> GetPlayerReputation(Guid player);
|
||||
|
||||
#endregion
|
||||
}
|
||||
|
||||
public sealed class ServerDbManager : IServerDbManager
|
||||
@@ -502,6 +527,28 @@ namespace Content.Server.Database
|
||||
|
||||
#endregion
|
||||
|
||||
#region Player Reputation (WD edit)
|
||||
|
||||
public Task SetPlayerReputation(Guid player, float value)
|
||||
{
|
||||
DbWriteOpsMetric.Inc();
|
||||
return RunDbCommand(() => _db.SetPlayerReputation(player, value));
|
||||
}
|
||||
|
||||
public Task ModifyPlayerReputation(Guid player, float value)
|
||||
{
|
||||
DbWriteOpsMetric.Inc();
|
||||
return RunDbCommand(() => _db.ModifyPlayerReputation(player, value));
|
||||
}
|
||||
|
||||
public Task<float> GetPlayerReputation(Guid player)
|
||||
{
|
||||
DbWriteOpsMetric.Inc();
|
||||
return RunDbCommand(() => _db.GetPlayerReputation(player));
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
public Task UpdatePlayerRecordAsync(
|
||||
NetUserId userId,
|
||||
string userName,
|
||||
|
||||
Reference in New Issue
Block a user