Harem Heroes++ modified by 1121

Adding things here and there in Harem Heroes game.

< Feedback on Harem Heroes++ modified by 1121

سؤال / تعليق

§
Posted: 21-10-2019

Broken market & fix

I don't know what's going on hentai heroes et al. but nutaku version does not provide Hero.infos.items array property anymore so the market code throws an exception. And well it doesn't work.

Search for market section, the function is called "ModifyMarket". There is a nested function "updateStats".

Add the next code after that function:

function parseEquipStat(carac) {
    var arrDivEquippedItems = $('div#equiped>div.armor>div.slot').toArray();
    var iCaracPoints = 0;

    arrDivEquippedItems.forEach(function(item) {
        let oData = JSON.parse(item.dataset.d);
        let iItemCaracPoints = oData[carac];
        iCaracPoints += iItemCaracPoints;
    });

    return iCaracPoints;
}

Now inside the "updateStats" change the line: itemPoints = Hero.infos.items[stat], so as to execute our new code: itemPoints = parseEquipStat(stat),

Done.

Post reply

تسجيل الدخول إلى مرحلة ما بعد الرد.