Skip to content

Commit

Permalink
feat(matchmake-extension): Support custom search criteria
Browse files Browse the repository at this point in the history
Add the ability to cleanup the search criteria on
`BrowseMatchmakeSession`.
  • Loading branch information
DaniElectra committed Nov 5, 2024
1 parent 9696be3 commit 9a67d7e
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions matchmake-extension/browse_matchmake_session.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,14 @@ func (commonProtocol *CommonProtocol) browseMatchmakeSession(err error, packet n

searchCriterias := []*match_making_types.MatchmakeSessionSearchCriteria{searchCriteria}

lstSearchCriteria := types.NewList[*match_making_types.MatchmakeSessionSearchCriteria]()
lstSearchCriteria.Type = match_making_types.NewMatchmakeSessionSearchCriteria()
lstSearchCriteria.SetFromData(searchCriterias)

if commonProtocol.CleanupMatchmakeSessionSearchCriterias != nil {
commonProtocol.CleanupMatchmakeSessionSearchCriterias(lstSearchCriteria)
}

sessions, nexError := database.FindMatchmakeSessionBySearchCriteria(commonProtocol.manager, connection, searchCriterias, resultRange, nil)
if nexError != nil {
commonProtocol.manager.Mutex.RUnlock()
Expand Down

0 comments on commit 9a67d7e

Please sign in to comment.