//修复金币异常
//CParty::UseAncientDungeonItems
var CParty_UseAncientDungeonItems_ptr = ptr(0x859EAC2);
var CParty_UseAncientDungeonItems = new NativeFunction(CParty_UseAncientDungeonItems_ptr, 'int', ['pointer', 'pointer', 'pointer', 'pointer'], {"abi":"sysv"});
Interceptor.replace(CParty_UseAncientDungeonItems_ptr, new NativeCallback(function (party, dungeon, inven_item, a4) {
//当前进入的地下城id
var dungeon_index = CDungeon_get_index(dungeon);
//根据地下城id判断是否为绝望之塔
if((dungeon_index >= 11008) && (dungeon_index <= 11107))
{
//绝望之塔 不再扣除金币
return 1;
}
//其他副本执行原始扣除道具逻辑
return CParty_UseAncientDungeonItems(party, dungeon, inven_item, a4);
}, 'int', ['pointer', 'pointer', 'pointer', 'pointer']));
}
© 版权声明
THE END
暂无评论内容