Fixes
This commit is contained in:
@@ -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