Core/Arena: Correctly update the stats of the members of each team when the week ends and the arena points are distributed.
Port From (https://github.com/TrinityCore/TrinityCore/commit/0728d194d9d8fa6c91e6c7dfbc9e06c02963d7fe)
This commit is contained in:
@@ -672,7 +672,7 @@ namespace Game.Arenas
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SaveToDB()
|
public void SaveToDB(bool forceMemberSave = false)
|
||||||
{
|
{
|
||||||
// Save team and member stats to db
|
// Save team and member stats to db
|
||||||
// Called after a match has ended or when calculating arena_points
|
// Called after a match has ended or when calculating arena_points
|
||||||
@@ -692,7 +692,7 @@ namespace Game.Arenas
|
|||||||
foreach (var member in Members)
|
foreach (var member in Members)
|
||||||
{
|
{
|
||||||
// Save the effort and go
|
// Save the effort and go
|
||||||
if (member.WeekGames == 0)
|
if (member.WeekGames == 0 && !forceMemberSave)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
stmt = CharacterDatabase.GetPreparedStatement(CharStatements.UPD_ARENA_TEAM_MEMBER);
|
stmt = CharacterDatabase.GetPreparedStatement(CharStatements.UPD_ARENA_TEAM_MEMBER);
|
||||||
|
|||||||
Reference in New Issue
Block a user