mirror of
https://github.com/Detanup01/gbe_fork.git
synced 2025-01-14 03:13:57 +08:00
properly implement Steam_Remote_Storage::UpdateUserPublishedItemVote()
This commit is contained in:
parent
b63140ca63
commit
afb848e427
@ -1030,12 +1030,14 @@ SteamAPICall_t Steam_Remote_Storage::UpdateUserPublishedItemVote( PublishedFileI
|
|||||||
RemoteStorageUpdateUserPublishedItemVoteResult_t data{};
|
RemoteStorageUpdateUserPublishedItemVoteResult_t data{};
|
||||||
data.m_nPublishedFileId = unPublishedFileId;
|
data.m_nPublishedFileId = unPublishedFileId;
|
||||||
if (settings->isModInstalled(unPublishedFileId)) {
|
if (settings->isModInstalled(unPublishedFileId)) {
|
||||||
|
data.m_eResult = EResult::k_EResultOK;
|
||||||
auto mod = settings->getMod(unPublishedFileId);
|
auto mod = settings->getMod(unPublishedFileId);
|
||||||
if (mod.steamIDOwner == settings->get_local_steam_id().ConvertToUint64()) {
|
if (bVoteUp) {
|
||||||
data.m_eResult = EResult::k_EResultOK;
|
++mod.votesUp;
|
||||||
} else { // not published by this user
|
} else {
|
||||||
data.m_eResult = EResult::k_EResultFail; // TODO is this correct?
|
++mod.votesDown;
|
||||||
}
|
}
|
||||||
|
settings->addModDetails(unPublishedFileId, mod);
|
||||||
} else { // mod not installed
|
} else { // mod not installed
|
||||||
data.m_eResult = EResult::k_EResultFail; // TODO is this correct?
|
data.m_eResult = EResult::k_EResultFail; // TODO is this correct?
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user