Updated to use Long instead of Int on playerID.

This commit is contained in:
lightheel 2026-01-19 22:21:05 -05:00
parent 9365bc0215
commit a9c354ad8a
3 changed files with 6 additions and 6 deletions

View File

@ -9,5 +9,5 @@ interface PVPService {
// This method returns a Call object with a generic
// type of DataModel, which represents
// the data model for the response.
fun getwinner(@Query("apiStage") apiStage: Int, @Query("playerID") playerID: Int, @Query("playerDigi") playerDigi: String, @Query("playerStage") playerStage: Int, @Query("critBar") critBar: Int, @Query("opponentDigi") opponentDigi: String, @Query("opponentStage") opponentStage: Int): Call<PVPDataModel>
fun getwinner(@Query("apiStage") apiStage: Int, @Query("playerID") playerID: Long, @Query("playerDigi") playerDigi: String, @Query("playerStage") playerStage: Int, @Query("critBar") critBar: Int, @Query("opponentDigi") opponentDigi: String, @Query("opponentStage") opponentStage: Int): Call<PVPDataModel>
}

View File

@ -255,7 +255,7 @@ class RetrofitHelper {
}
*/
fun getPVPWinner(context: Context, apiStage: Int, playerID: Int, playerDigi: String, playerStage: Int, critBar: Int, opponentDigi: String, opponentStage: Int, callback: (PVPDataModel) -> Unit) {
fun getPVPWinner(context: Context, apiStage: Int, playerID: Long, playerDigi: String, playerStage: Int, critBar: Int, opponentDigi: String, opponentStage: Int, callback: (PVPDataModel) -> Unit) {
try {
// Create an authenticated Retrofit instance

View File

@ -1097,7 +1097,7 @@ fun MiddleBattleView(
RetrofitHelper().getPVPWinner(
ctx,
1,
playerUserId?.toInt() ?: 2,
playerUserId ?: 2L,
activeCharacter?.name ?: "Player",
playerStage,
opponentStage,
@ -2268,7 +2268,7 @@ fun BattlesScreen() {
else -> 0
}
RetrofitHelper().getPVPWinner(context, 0, userId?.toInt() ?: 2, cardId, apiStage, 0, opponent.charaId, apiStage) { apiResult ->
RetrofitHelper().getPVPWinner(context, 0, userId ?: 2L, cardId, apiStage, 0, opponent.charaId, apiStage) { apiResult ->
// Update player character HP from API response
activeCharacter = activeCharacter?.copy(
baseHp = apiResult.playerHP,
@ -2349,7 +2349,7 @@ fun BattlesScreen() {
RetrofitHelper().getPVPWinner(
context,
1,
userId?.toInt() ?: 2,
userId ?: 2L,
activeCharacter?.name ?: "Player",
playerStage,
opponentStage,
@ -2363,7 +2363,7 @@ fun BattlesScreen() {
RetrofitHelper().getPVPWinner(
context,
2,
userId?.toInt() ?: 2,
userId ?: 2L,
activeCharacter?.name ?: "Player",
playerStage,
opponentStage,