-
-
Notifications
You must be signed in to change notification settings - Fork 183
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Wrong appid when requesting goo value for sale items #107
Comments
https://www.reddit.com/r/Steam/comments/a9exyu/steam_economy_enhancer_cant_convert_cozy/ecvtqop --- a 2019-01-07 16:27:43.422575399 +0100
+++ b 2019-01-07 16:29:00.762276644 +0100
@@ -1213,16 +1213,22 @@
var digits = getNumberOfDigits(totalNumberOfQueuedItems);
var padLeft = padLeftZero('' + totalNumberOfProcessedQueueItems, digits) + ' / ' + totalNumberOfQueuedItems;
- if (err != ERROR_SUCCESS) {
- logConsole('Failed to get gems value for ' + itemName);
- logDOM(padLeft + ' - ' + itemName + ' not turned into gems due to missing gems value.');
+ // https://www.reddit.com/r/Steam/comments/a9exyu/steam_economy_enhancer_cant_convert_cozy/ecvtqop
+ // Fix for Winter Sale 2018
+ if (!itemName.includes(":cozy") && !itemName.includes("Cozy Cottage")) {
+ if (err != ERROR_SUCCESS) {
+ logConsole('Failed to get gems value for ' + itemName);
+ logDOM(padLeft + ' - ' + itemName + ' not turned into gems due to missing gems value.');
- $('#' + item.appid + '_' + item.contextid + '_' + itemId).css('background', COLOR_ERROR);
- return callback(false);
+ $('#' + item.appid + '_' + item.contextid + '_' + itemId).css('background', COLOR_ERROR);
+ return callback(false);
+ }
+
+ item.goo_value_expected = parseInt(goo.goo_value);
+ } else {
+ item.goo_value_expected = 100;
}
- item.goo_value_expected = parseInt(goo.goo_value);
-
market.grindIntoGoo(item,
function(err, result) {
if (err != ERROR_SUCCESS) { https://github.com/Nuklon/Steam-Economy-Enhancer/blob/master/code.user.js#L1216-L1224 |
I rewrite "SteamMarket.prototype.getGooValue" part using "/auction/ajaxgetgoovalueforitemtype/" instead of current "/my/ajaxgetgoovalue/". SteamMarket.prototype.getGooValue = function(item, callback) {
try {
for (var i = 0; i < item.owner_actions.length; i++) {
var action = item.owner_actions[i];
if ( !action.link || !action.name ) {
continue;
}
if (action.link.match(/^javascript:GetGooValue/)) {
var item_data = action.link.split(',');
var appid = item_data[2].trim();
var item_type = item_data[3].trim();
var border_color = item_data[4].trim();
$.ajax({
type: "GET",
url: window.location.protocol+'//steamcommunity.com/auction/ajaxgetgoovalueforitemtype/',
data: {
appid: appid,
item_type: item_type,
border_color: border_color
},
success: function(data) {
callback(ERROR_SUCCESS, data);
},
error: function(data) {
return callback(ERROR_FAILED, data);
},
crossDomain: true,
xhrFields: {
withCredentials: true
},
dataType: 'json'
});
}
}
} catch (e) {
return callback(ERROR_FAILED);
}
//http://steamcommunity.com/auction/ajaxgetgoovalueforitemtype/?appid=582980&item_type=18&border_color=0
// OR
//http://steamcommunity.com/my/ajaxgetgoovalue/?sessionid=xyz&appid=535690&assetid=4830605461&contextid=6
//sessionid=xyz
//appid = 535690
//assetid = 4830605461
//contextid = 6
} |
Merged
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
For example items like
Cozy Cottage - The Witcher 3
Data looks like this:
The script requests appid 292030 but Steam code uses 991980 id by parsing it from
GetGooValue
string above. Because the script uses wrong appid, these items do not get turned into goo with messageCozy Cottage - The Witcher 3 not turned into gems due to missing gems value.
The text was updated successfully, but these errors were encountered: