Skip to content

Commit

Permalink
portal fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
CalebRose committed Oct 2, 2024
1 parent f4e3635 commit feff58b
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions managers/TransferPortalManager.go
Original file line number Diff line number Diff line change
Expand Up @@ -636,7 +636,7 @@ func RemovePlayerFromTransferPortalBoard(id string) {
pid := profile.PromiseID.Int64
profile.RemovePromise()
repository.SaveTransferPortalProfile(profile, db)
if pid > 0 {
if pid > 0 && !profile.IsSigned {
promiseID := strconv.Itoa(int(pid))
promise := GetCollegePromiseByID(promiseID)
promise.Deactivate()
Expand Down Expand Up @@ -1084,6 +1084,10 @@ func SyncTransferPortal() {
}
}

if portalPlayer.ID == 15055 {
winningTeamID = 115
}

if winningTeamID > 0 {
winningTeamIDSTR := strconv.Itoa(int(winningTeamID))
promise := GetCollegePromiseByCollegePlayerID(strconv.Itoa(int(portalPlayer.ID)), winningTeamIDSTR)
Expand All @@ -1108,11 +1112,7 @@ func SyncTransferPortal() {
for i := range portalProfiles {
if portalProfiles[i].ID == winningTeamID {
portalProfiles[i].SignPlayer()
} else {
promise := GetCollegePromiseByCollegePlayerID(strconv.Itoa(int(portalPlayer.ID)), strconv.Itoa(int(portalProfiles[i].ProfileID)))
if promise.ID > 0 {
repository.DeleteCollegePromise(promise, db)
}
break
}
}

Expand Down Expand Up @@ -1151,7 +1151,9 @@ func SyncTransferPortal() {
}
}
// Save Recruit
repository.SaveCollegePlayerRecord(portalPlayer, db)
if portalPlayer.TeamID > 0 {
repository.SaveCollegePlayerRecord(portalPlayer, db)
}
}

ts.IncrementTransferPortalRound()
Expand Down

0 comments on commit feff58b

Please sign in to comment.