Guest User

select all gifts majsoul

a guest
Sep 2nd, 2020
71
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. var waitForLoad = setInterval(function() {
  2. if (uiscript && uiscript.UI_Bag_PageGift && uiscript.UI_Bag.Inst) {
  3. uiscript.UI_Bag_PageGift.prototype.clear_choose = (function () {
  4.     var cacheF = uiscript.UI_Bag_PageGift.prototype.clear_choose;
  5.     return function () {
  6.         var selected = 0;
  7.         for (key in this.choose_count)
  8.             selected += this.choose_count[key]
  9.         if (selected)
  10.             return cacheF.apply(this, arguments);
  11.         for (var e = 0; e < this.items.length; e++) {
  12.             var o = cfg.item_definition.item.get(this.items[e].item_id)
  13.             if (o.can_sell && o.sell_reward_count < 6) {
  14.                 var x = 0,
  15.                 i = this,
  16.                 s = i.items[e]
  17.                 i.choose_count.hasOwnProperty(s.item_id.toString()) ? (x = i.choose_count[s.item_id],
  18.                         i.choose_count[s.item_id] = s.count) : (x = 0,
  19.                         i.choose_count[s.item_id] = s.count),
  20.                     i.choose_count[s.item_id] > s.count && (i.choose_count[s.item_id] = s.count),
  21.                     i.stardust_detail += (i.choose_count[s.item_id] - x) * o.sell_reward_count,
  22.                     i.refresh_stardust()
  23.                 this.scrollview.wantToRefreshAll()
  24.             }
  25.         }
  26.     };
  27. })();
  28. uiscript.UI_Bag_PageGift.prototype.refresh_stardust = (function () {
  29.     var cacheF = uiscript.UI_Bag_PageGift.prototype.refresh_stardust;
  30.     return function () {
  31.         cacheF.apply(this, arguments);
  32.         this.btn_clear_choose.visible = !0
  33.     };
  34. })();
  35. uiscript.UI_Bag.Inst.page_gift.container_sell.getChildByName("btn_clear").clickHandler = new Laya.Handler(uiscript.UI_Bag.Inst.page_gift, uiscript.UI_Bag.Inst.page_gift.clear_choose)
  36. clearInterval(waitForLoad);
  37. }}, 1000);
RAW Paste Data