Skip to content

Commit

Permalink
Fixed uprading rune events across the app
Browse files Browse the repository at this point in the history
  • Loading branch information
Xzandro committed Jul 3, 2023
1 parent bd73972 commit 683c2ec
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 10 deletions.
9 changes: 2 additions & 7 deletions app/plugins/live-sync.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ module.exports = {
case 'SellRune':
this.logSellRune(proxy, req, resp);
break;
case 'UpgradeRune':
case 'upgradeRune_v2':
this.logUpgradeRune(proxy, req, resp);
break;
case 'EquipRune':
Expand Down Expand Up @@ -166,12 +166,7 @@ module.exports = {
},

logUpgradeRune(proxy, req, resp) {
const originalLevel = req.upgrade_curr;
const newLevel = resp.rune.upgrade_curr;

if (newLevel > originalLevel) {
this.saveAction(proxy, req.wizard_id, resp.tvalue, 'upgrade_rune', { rune: resp.rune });
}
this.saveAction(proxy, req.wizard_id, resp.tvalue, 'upgrade_rune', { rune: resp.rune });
},

logSellRune(proxy, req, resp) {
Expand Down
5 changes: 2 additions & 3 deletions app/plugins/rune-drop-efficiency.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,10 @@ module.exports = {
}
}
break;
case 'UpgradeRune': {
const originalLevel = req.upgrade_curr;
case 'upgradeRune_v2': {
const newLevel = resp.rune.upgrade_curr;

if (newLevel > originalLevel && newLevel % 3 === 0 && newLevel <= 12) {
if (newLevel % 3 === 0 && newLevel <= 12) {
runesInfo.push(this.logRuneDrop(resp.rune));
}
break;
Expand Down

0 comments on commit 683c2ec

Please sign in to comment.