Skip to content

Commit 559efd9

Browse files
committed
Use SaveManager to give courses
1 parent b5adb94 commit 559efd9

1 file changed

Lines changed: 15 additions & 9 deletions

File tree

SWR_AP_Client/SWR.cpp

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -478,16 +478,22 @@ namespace SWRGame
478478

479479
void GiveCourseUnlock(int circuit)
480480
{
481-
int curUnlock = swrSaveData->trackUnlocks[circuit];
482-
int curFlag = 0;
483-
for (int i = 0; i < 7; i++)
481+
switch (circuit)
484482
{
485-
curFlag = 1 << i;
486-
if ((curUnlock & curFlag) == 0)
487-
{
488-
swrSaveData->trackUnlocks[circuit] |= curFlag;
489-
return;
490-
}
483+
case AMATEUR_CIRCUIT:
484+
saveManager.GiveAmateurCourse();
485+
break;
486+
case SEMIPRO_CIRCUIT:
487+
saveManager.GiveSemiproCourse();
488+
break;
489+
case GALACTIC_CIRCUIT:
490+
saveManager.GiveGalacticCourse();
491+
break;
492+
case INVITATIONAL_CIRCUIT:
493+
saveManager.GiveInvitationalCourse();
494+
break;
495+
default:
496+
break;
491497
}
492498
}
493499

0 commit comments

Comments
 (0)