mirror of
https://github.com/nacabaro/vbhelper.git
synced 2026-06-05 13:52:54 +00:00
Updated to use Long instead of Int on playerID.
This commit is contained in:
parent
9365bc0215
commit
a9c354ad8a
@ -9,5 +9,5 @@ interface PVPService {
|
|||||||
// This method returns a Call object with a generic
|
// This method returns a Call object with a generic
|
||||||
// type of DataModel, which represents
|
// type of DataModel, which represents
|
||||||
// the data model for the response.
|
// 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>
|
||||||
}
|
}
|
||||||
@ -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 {
|
try {
|
||||||
// Create an authenticated Retrofit instance
|
// Create an authenticated Retrofit instance
|
||||||
|
|||||||
@ -1097,7 +1097,7 @@ fun MiddleBattleView(
|
|||||||
RetrofitHelper().getPVPWinner(
|
RetrofitHelper().getPVPWinner(
|
||||||
ctx,
|
ctx,
|
||||||
1,
|
1,
|
||||||
playerUserId?.toInt() ?: 2,
|
playerUserId ?: 2L,
|
||||||
activeCharacter?.name ?: "Player",
|
activeCharacter?.name ?: "Player",
|
||||||
playerStage,
|
playerStage,
|
||||||
opponentStage,
|
opponentStage,
|
||||||
@ -2268,7 +2268,7 @@ fun BattlesScreen() {
|
|||||||
else -> 0
|
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
|
// Update player character HP from API response
|
||||||
activeCharacter = activeCharacter?.copy(
|
activeCharacter = activeCharacter?.copy(
|
||||||
baseHp = apiResult.playerHP,
|
baseHp = apiResult.playerHP,
|
||||||
@ -2349,7 +2349,7 @@ fun BattlesScreen() {
|
|||||||
RetrofitHelper().getPVPWinner(
|
RetrofitHelper().getPVPWinner(
|
||||||
context,
|
context,
|
||||||
1,
|
1,
|
||||||
userId?.toInt() ?: 2,
|
userId ?: 2L,
|
||||||
activeCharacter?.name ?: "Player",
|
activeCharacter?.name ?: "Player",
|
||||||
playerStage,
|
playerStage,
|
||||||
opponentStage,
|
opponentStage,
|
||||||
@ -2363,7 +2363,7 @@ fun BattlesScreen() {
|
|||||||
RetrofitHelper().getPVPWinner(
|
RetrofitHelper().getPVPWinner(
|
||||||
context,
|
context,
|
||||||
2,
|
2,
|
||||||
userId?.toInt() ?: 2,
|
userId ?: 2L,
|
||||||
activeCharacter?.name ?: "Player",
|
activeCharacter?.name ?: "Player",
|
||||||
playerStage,
|
playerStage,
|
||||||
opponentStage,
|
opponentStage,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user