Fixed skin variant
Signed-off-by: Trial97 <alexandru.tripon97@gmail.com>
This commit is contained in:
parent
263dc5af67
commit
44cdf3f697
@ -347,7 +347,7 @@ bool parseMinecraftProfileMojang(QByteArray& data, MinecraftProfile& output)
|
|||||||
Skin skinOut;
|
Skin skinOut;
|
||||||
// fill in default skin info ourselves, as this endpoint doesn't provide it
|
// fill in default skin info ourselves, as this endpoint doesn't provide it
|
||||||
bool steve = isDefaultModelSteve(output.id);
|
bool steve = isDefaultModelSteve(output.id);
|
||||||
skinOut.variant = steve ? "classic" : "slim";
|
skinOut.variant = steve ? "CLASSIC" : "SLIM";
|
||||||
skinOut.url = steve ? SKIN_URL_STEVE : SKIN_URL_ALEX;
|
skinOut.url = steve ? SKIN_URL_STEVE : SKIN_URL_ALEX;
|
||||||
// sadly we can't figure this out, but I don't think it really matters...
|
// sadly we can't figure this out, but I don't think it really matters...
|
||||||
skinOut.id = "00000000-0000-0000-0000-000000000000";
|
skinOut.id = "00000000-0000-0000-0000-000000000000";
|
||||||
|
@ -106,7 +106,7 @@ bool SkinList::update()
|
|||||||
auto path = m_dir.absoluteFilePath(name);
|
auto path = m_dir.absoluteFilePath(name);
|
||||||
if (skinTexture.loadFromData(skin.data, "PNG") && skinTexture.save(path)) {
|
if (skinTexture.loadFromData(skin.data, "PNG") && skinTexture.save(path)) {
|
||||||
SkinModel s(path);
|
SkinModel s(path);
|
||||||
s.setModel(skin.variant == "slim" ? SkinModel::SLIM : SkinModel::CLASSIC);
|
s.setModel(skin.variant == "SLIM" ? SkinModel::SLIM : SkinModel::CLASSIC);
|
||||||
s.setCapeId(m_acct->accountData()->minecraftProfile.currentCape);
|
s.setCapeId(m_acct->accountData()->minecraftProfile.currentCape);
|
||||||
s.setURL(skin.url);
|
s.setURL(skin.url);
|
||||||
newSkins << s;
|
newSkins << s;
|
||||||
@ -114,7 +114,7 @@ bool SkinList::update()
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
nskin->setCapeId(m_acct->accountData()->minecraftProfile.currentCape);
|
nskin->setCapeId(m_acct->accountData()->minecraftProfile.currentCape);
|
||||||
nskin->setModel(skin.variant == "slim" ? SkinModel::SLIM : SkinModel::CLASSIC);
|
nskin->setModel(skin.variant == "SLIM" ? SkinModel::SLIM : SkinModel::CLASSIC);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -460,7 +460,7 @@ void SkinManageDialog::on_userBtn_clicked()
|
|||||||
dlg.execWithTask(job.get());
|
dlg.execWithTask(job.get());
|
||||||
|
|
||||||
SkinModel s(path);
|
SkinModel s(path);
|
||||||
s.setModel(mcProfile.skin.variant == "slim" ? SkinModel::SLIM : SkinModel::CLASSIC);
|
s.setModel(mcProfile.skin.variant == "SLIM" ? SkinModel::SLIM : SkinModel::CLASSIC);
|
||||||
s.setURL(mcProfile.skin.url);
|
s.setURL(mcProfile.skin.url);
|
||||||
if (m_capes.contains(mcProfile.currentCape)) {
|
if (m_capes.contains(mcProfile.currentCape)) {
|
||||||
s.setCapeId(mcProfile.currentCape);
|
s.setCapeId(mcProfile.currentCape);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user