Harem Heroes++ modified by 1121

Adding things here and there in Harem Heroes game.

< Harem Heroes++ modified by 1121 피드백으로 돌아가기

질문/댓글

§
게시: 2019-10-21

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.

답글 게시

답글을 게시하려면 로그인하세요.