1
0
mirror of synced 2024-11-12 01:50:47 +01:00

Multiple DB fixes

This commit is contained in:
0auBSQ 2024-06-21 23:41:17 +09:00
parent a3b39ebe7f
commit ca8f8ddb1a
3 changed files with 13 additions and 11 deletions

View File

@ -314,10 +314,10 @@ namespace TJAPlayer3
// 1st step: Init best play record class
{
currentPlay.ChartUniqueId = choosenSong.uniqueId.data.id.Replace(@"'", @"''");
currentPlay.ChartGenre = choosenSong.strジャンル.Replace(@"'", @"''");
currentPlay.Charter = choosenSong.strNotesDesigner[choosenDifficulty].Replace(@"'", @"''");
currentPlay.Artist = choosenSong.strサブタイトル.Replace(@"'", @"''"); // There is no direct Artist tag on the .tja format, so we directly use the subtitle as a guess
currentPlay.ChartUniqueId = choosenSong.uniqueId.data.id;
currentPlay.ChartGenre = choosenSong.strジャンル;
currentPlay.Charter = choosenSong.strNotesDesigner[choosenDifficulty];
currentPlay.Artist = choosenSong.strサブタイトル; // There is no direct Artist tag on the .tja format, so we directly use the subtitle as a guess
currentPlay.PlayMods = ModIcons.tModsToPlayModsFlags(player);
currentPlay.ChartDifficulty = choosenDifficulty;
currentPlay.ChartLevel = choosenSong.arスコア[choosenDifficulty]..nレベル[choosenDifficulty];
@ -447,10 +447,10 @@ namespace TJAPlayer3
cmd.CommandText = $@"
INSERT INTO best_plays(ChartUniqueId,ChartGenre,Charter,Artist,PlayMods,ChartDifficulty,ChartLevel,ClearStatus,ScoreRank,HighScore,SaveId,TowerBestFloor,DanExam1,DanExam2,DanExam3,DanExam4,DanExam5,DanExam6,DanExam7,PlayCount,HighScoreGoodCount,HighScoreOkCount,HighScoreBadCount,HighScoreMaxCombo,HighScoreRollCount,HighScoreADLibCount,HighScoreBoomCount)
VALUES(
'{currentPlay.ChartUniqueId}',
'{currentPlay.ChartGenre}',
'{currentPlay.Charter}',
'{currentPlay.Artist}',
'{currentPlay.ChartUniqueId.Replace(@"'", @"''")}',
'{currentPlay.ChartGenre.Replace(@"'", @"''")}',
'{currentPlay.Charter.Replace(@"'", @"''")}',
'{currentPlay.Artist.Replace(@"'", @"''")}',
{currentPlay.PlayMods},
{currentPlay.ChartDifficulty},
{currentPlay.ChartLevel},

View File

@ -308,7 +308,7 @@ namespace TJAPlayer3
if (_aimedStatus == (int)EClearStatus.NONE) _satifsiedCount = chartStats.SongGenrePlays.TryGetValue(_genreName, out var value) ? value : 0;
else if (_aimedStatus <= (int)EClearStatus.CLEAR) _satifsiedCount = chartStats.SongGenreClears.TryGetValue(_genreName, out var value) ? value : 0;
else if (_aimedStatus == (int)EClearStatus.FC) _satifsiedCount = chartStats.SongGenreFCs.TryGetValue(_genreName, out var value) ? value : 0;
else return _satifsiedCount = chartStats.SongGenrePerfects.TryGetValue(_genreName, out var value) ? value : 0;
else _satifsiedCount = chartStats.SongGenrePerfects.TryGetValue(_genreName, out var value) ? value : 0;
if (_satifsiedCount >= _songCount) _count++;
}

View File

@ -577,7 +577,8 @@ namespace TJAPlayer3
// ADLIB bonuses : 1 coin per ADLIB
for (int i = 0; i < TJAPlayer3.ConfigIni.nPlayerCount; i++)
{
this.nEarnedMedalsCount[i] += Math.Min(10, TJAPlayer3.stage演奏ドラム画面.CChartScore[i].nADLIB);
// Too broken on some charts, ADLibs should get either no bonus or just extra stats
//this.nEarnedMedalsCount[i] += Math.Min(10, TJAPlayer3.stage演奏ドラム画面.CChartScore[i].nADLIB);
if (TJAPlayer3.ConfigIni.bAutoPlay[i])
this.nEarnedMedalsCount[i] = 0;
@ -591,7 +592,8 @@ namespace TJAPlayer3
_sf.tRegisterAIBattleModePlay(bClear[0]);
}
_sf.tEarnCoins(this.nEarnedMedalsCount[i]);
if (this.nEarnedMedalsCount[i] > 0)
_sf.tEarnCoins(this.nEarnedMedalsCount[i]);
if (!TJAPlayer3.ConfigIni.bAutoPlay[i]
&& !(TJAPlayer3.ConfigIni.bAIBattleMode && i == 1))