Fixes
This commit is contained in:
@@ -48,9 +48,9 @@ $birdColor = $savedata['settings']['colors']['icon'] ?? [255,255,255];
|
||||
$overlayColor = $savedata['settings']['colors']['overlay'] ?? [255,255,255];
|
||||
|
||||
if ($loginType === "0") {
|
||||
echo encrypt("1" . ":" . $token . ":" . $row['username'] . ":" . $id . ":" . $row2['legacy_high_score'] . ":" . ($savedata['bird']['icon'] ?? 1) . ":" . ($savedata['bird']['overlay'] ?? 0) . ":0:0:0:0:0:" . ":" . $birdColor[0] . ":" . $birdColor[1] . ":" . $birdColor[2] . ":" . $overlayColor[0] . ":" . $overlayColor[1] . ":" . $overlayColor[2]);
|
||||
echo encrypt("1:" . $token . ":" . $row['username'] . ":" . $id . ":" . $row2['legacy_high_score'] . ":" . ($savedata['bird']['icon'] ?? 1) . ":" . ($savedata['bird']['overlay'] ?? 0) . ":0:0:0:0:0::" . $birdColor[0] . ":" . $birdColor[1] . ":" . $birdColor[2] . ":" . $overlayColor[0] . ":" . $overlayColor[1] . ":" . $overlayColor[2]);
|
||||
} elseif ($loginType === "1") {
|
||||
echo encrypt("1" . ":" . $token . ":" . $row['username'] . ":" . $id);
|
||||
echo encrypt("1:" . $token . ":" . $row['username'] . ":" . $id);
|
||||
}
|
||||
$conn0->close();
|
||||
$conn1->close();
|
||||
@@ -5,17 +5,18 @@ $username = $post['userName'] ?? '';
|
||||
$highScore = (int)$post['highScore'] ?? 0;
|
||||
$icon = (int)$post['icon'] ?? 1;
|
||||
$overlay = (int)$post['overlay'] ?? 0;
|
||||
$birdR = (int)$post['birdR'] ?? 255;
|
||||
$birdG = (int)$post['birdG'] ?? 255;
|
||||
$birdB = (int)$post['birdB'] ?? 255;
|
||||
if (getClientVersion() == "1.5.1" || getClientVersion() == "1.5.2") {
|
||||
$birdR = (int)$post['birdR'] ?? 255;
|
||||
$birdG = (int)$post['birdG'] ?? 255;
|
||||
$birdB = (int)$post['birdB'] ?? 255;
|
||||
$birdColor = [$birdR, $birdG, $birdB];
|
||||
}
|
||||
if (getClientVersion() == "1.5.2") {
|
||||
$overlayR = (int)$post['overlayR'] ?? 255;
|
||||
$overlayG = (int)$post['overlayG'] ?? 255;
|
||||
$overlayB = (int)$post['overlayB'] ?? 255;
|
||||
$overlayColor = [$overlayR, $overlayG, $overlayB];
|
||||
}
|
||||
$birdColor = [$birdR, $birdG, $birdB];
|
||||
$overlayColor = [$overlayR, $overlayG, $overlayB];
|
||||
|
||||
$conn0 = newConnection(0);
|
||||
$conn1 = newConnection(1);
|
||||
|
||||
@@ -52,11 +53,11 @@ $row2 = $result2->fetch_assoc();
|
||||
$savedata = json_decode($row2['save_data'], true);
|
||||
$savedata['bird']['icon'] = $icon;
|
||||
$savedata['bird']['overlay'] = $overlay;
|
||||
$savedata['settings']['colors']['icon'] = $birdColor;
|
||||
if (getClientVersion() == "1.5.1" || getClientVersion() == "1.5.2") $savedata['settings']['colors']['icon'] = $birdColor;
|
||||
if (getClientVersion() == "1.5.2") $savedata['settings']['colors']['overlay'] = $overlayColor;
|
||||
$savedata = json_encode($savedata);
|
||||
$stmt = $conn1->prepare("UPDATE userdata SET legacy_high_score = ?, save_data = ? WHERE id = ?");
|
||||
$stmt->bind_param("isis",
|
||||
$stmt->bind_param("isi",
|
||||
$highScore,
|
||||
$savedata,
|
||||
$id
|
||||
|
||||
Reference in New Issue
Block a user