|
|
RT,frida 代码
//获取道具附加信息
// 整数,表示道具的品级或数量 - 如果是装备,则返回品级;如果是其他类型道具,则返回数量。
var Inven_Item_get_add_info = new NativeFunction(ptr(0x80F783A), 'int', ['pointer'], {"abi": "sysv"});
// 设置道具附加信息
// 整数,表示要设置的品级或数量 如果是装备,则设置品级;如果是其他类型道具,则设置数量。
var Inven_Item_set_add_info = new NativeFunction(ptr(0x80CB884), 'int', ['pointer', 'int'], {"abi": "sysv"});
// SEND nexon_packet::stLogin login:3 AccLen:8 Acc:18000009 CharLen:6 Char:1990644916 Addr:29927616 canTry_:0 UserIdx:65538 m_id:18000009[enter _ModEquipableItemAttr::]
function _ModEquipableItemAttr() {
Interceptor.attach(ptr(0x8200B08), {
onEnter: function (args) {
this.user = args[1];
this.pack = ptr(args[2]);
var a = ptr(this.pack.add(20).readPointer());
this.itemSold = a.add(13).add(6).readShort();
this.equSold = a.add(13).add(0).readShort();
console.log('[enter _ModEquipableItemAttr::] itemSold ' + this.itemSold + ' equSold ' + this.equSold);
},
onLeave: function (retval) {
console.log('[leave _ModEquipableItemAttr::] ');
//获取角色背包
var inven = CUserCharacInfo_getCurCharacInvenW(this.user);
if (inven != null) {
console.log('[leave _ModEquipableItemAttr::] inven is not empty');
// 获取物品栏的道具
var ItemObj = CInventory_GetInvenRef(inven, INVENTORY_TYPE_ITEM, this.itemSold);
// 获取物品栏的装备
var equObj = CInventory_GetInvenRef(inven, INVENTORY_TYPE_ITEM, this.equSold);
// console.log('[leave _ModEquipableItemAttr::] item.id ' + Inven_Item_getKey(ItemObj));
// 897:解放的装备品级调整箱 15:装备品级调整箱
if (Inven_Item_getKey(ItemObj) == 897) {
// 设置装备平级最上级
Inven_Item_set_add_info(equObj, 999999998)
CUser_SendUpdateItemList(this.user, 1, 0, this.equSold);
}
}
}
});
}
效果
|
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有账号?立即注册
×
|