2025-03-09更新记录
- 自定义展示Name2
- 自定义展示物品品级(S2插件GradeInfo品级)
- 自定义展示物品图标(需要开启Name2)
- 客户端角色等级上限(0725插件实现不完美、需要在frida中设置服务端等级上限,参考frida-project SetMaxLevel)
- 关闭回购商店(0627/0725)
- 引入frida-gum.h
- 修改全局变量
引入frida-gum.h(与其他项目平级):
添加:$(SolutionDir)frida-gum


源码:
// 0725 Name2、图标、品级
void ItemInfoWin(int ex_Name2, int ex_Icon, int ex_Grade) {
GumInterceptor* v = gum_interceptor_obtain();
if (ex_Grade) {
gum_interceptor_replace_fast(v, (gpointer)0x7B4F80, (gpointer)hookGetEquimGradeColor_7B4F80, (gpointer*)&getEquimGradeColor_7B4F80);
gum_interceptor_replace_fast(v, (gpointer)0xF44A30, (gpointer)hookDrawWeightInfoText_F44A30, (gpointer*)&drawWeightInfoText_F44A30);
WriteJmpCode((void*)0x007888DB, hookGradeDecrypt);
WriteJmpCode((void*)0x011F2B9A, hookColor1);
}
if (ex_Icon) {
WriteJmpCode((void*)0x00F40006, drawIconV2);
}
if (ex_Name2) {
*(BYTE*)0x011D25AE = 0xFF;
*(WORD*)0x011D25AF = 0xCA89;
std::vector<RelocatHookInfo>* hook = new std::vector<RelocatHookInfo>(32);
auto b = hook->begin();
int MaxLine = MaxItemInfoLine;
hook->resize(2);
b = hook->begin();
b++->setValue(H_BYTE, 0x00F6B6F8, MaxItemInfoLine);
b++->setValue(H_DWORD, 0x00F6B6FF, (int)&MaxLine);
cdeclCall my_F6B610 = (cdeclCall)tools_relocation_hook(0xF6B610, 0xF6B72F, hook);
hook->resize(2);
b = hook->begin();
b++->setValue(H_DWORD, 0x00F6B5CA, MaxItemInfoLineValue); b++->setValue(H_BYTE, 0x00F6B5D2, MaxItemInfoLineValueP);
cdeclCall1 my_F6B4C0 = (cdeclCall1)tools_relocation_hook(0xF6B4C0, 0xF6B601, hook);
hook->resize(8);
b = hook->begin();
b++->setValue(H_BYTE, 0x00F6B783, 3);
b++->setValue(H_BYTE, 0x00F6B787, 3);
b++->setValue(H_DWORD, 0x00F6B7BC, 0);
b++->setValue(H_BYTE, 0x00F6B7EA, 0);
b++->setValue(H_BYTE, 0x00F6B81E, 0);
b++->setValue(H_BYTE, 0x00F6B7FC, 0);
b++->setValue(H_CALL, 0x00F6B797, (int)my_F6B610);
b++->setValue(H_CALL, 0x00F6B779, (int)my_F6B4C0);
cdeclCall my_F6B730 = (cdeclCall)tools_relocation_hook(0xF6B730, 0xF6BB13, hook);
hook->resize(3);
b = hook->begin();
b++->setValue(H_DWORD, 0x00F6CC69, MaxItemInfoLineValue); b++->setValue(H_BYTE, 0x00F6CC71, MaxItemInfoLineValueP);
b++->setValue(H_BYTE, 0x00F6CB1B, 3);
cdeclCall1 my_F6CAF0 = (cdeclCall1)tools_relocation_hook(0xF6CAF0, 0xF6CCC2, hook);
hook->resize(1);
b = hook->begin();
b++->setValue(H_BYTE, 0x00F6D615, MaxItemInfoLine - 3);
cdeclCall1 my_F6D2A0 = (cdeclCall1)tools_relocation_hook(0xF6D2A0, 0x00F6D807, hook);
hook->resize(1);
b = hook->begin();
b++->setValue(H_BYTE, 0x00F6D132, MaxItemInfoLine - 3);
cdeclCall my_F6CDE0 = (cdeclCall)tools_relocation_hook(0xF6CDE0, 0x00F6D296, hook);
hook->resize(5);
b = hook->begin();
b++->setValue(H_CALL, 0x00F6DCE7, (int)my_F6B730);
b++->setValue(H_CALL, 0x00F6DC3C, (int)my_F6CAF0);
b++->setValue(H_CALL, 0x00F6DC42, (int)my_F6B4C0);
b++->setValue(H_CALL, 0x00F6DCD6, (int)my_F6D2A0);
b++->setValue(H_CALL, 0x00F6DCA6, (int)my_F6CDE0);
cdeclCall my_F6DBF0 = (cdeclCall)tools_relocation_hook(0xF6DBF0, 0xF6DD49, hook);
hook->resize(1);
b = hook->begin();
b++->setValue(H_CALL, 0x00F6EA45, (int)my_F6DBF0);
my_F6E9A0 = (cdeclCall)tools_relocation_hook(0xF6E9A0, 0xF6EA9D, hook);
gum_interceptor_replace_fast(v, (gpointer)0xF6E9A0, (gpointer)hook_F6E9A0, NULL);
hook->resize(9);
b = hook->begin();
b++->setValue(H_DWORD, 0x00F5E6F3, MaxItemInfoLineValue); b++->setValue(H_BYTE, 0x00F5E6FB, MaxItemInfoLineValueP);
b++->setValue(H_BYTE, 0x00F5E722, MaxItemInfoLine);
b++->setValue(H_DWORD, 0x00F5E934, MaxItemInfoLineValue); b++->setValue(H_BYTE, 0x00F5E958, MaxItemInfoLineValueP);
b++->setValue(H_BYTE, 0x00F5E95C, MaxItemInfoLine);
b++->setValue(H_JUMP, 0x00F5E3B7, (int)drawName2);
b++->setValue(H_WORD, 0x00F5E6DA, 0xB890);
b++->setValue(H_WORD, 0x00F5E6DC, (int)hookDrawHeaderText);
thisCall2Args2 drawItemInfoWinHeader_F5E200 = (thisCall2Args2)tools_relocation_hook(0xF5E200, 0xF5EDC1, hook);
hook->resize(3);
b = hook->begin();
b++->setValue(H_DWORD, 0x00F60310, MaxItemInfoLineValue); b++->setValue(H_BYTE, 0x00F60318, MaxItemInfoLineValueP);
b++->setValue(H_CALL, 0x00F60205, (int)drawItemInfoWinHeader_F5E200);
thisCall1Args2 myDrawItemInfoWin_F601F0 = (thisCall1Args2)tools_relocation_hook(0x00F601F0, 0x00F6032E, hook);
b = hook->begin();
b++->setValue(H_DWORD, 0x00F601C2, MaxItemInfoLineValue); b++->setValue(H_BYTE, 0x00F601CA, MaxItemInfoLineValueP);
b++->setValue(H_CALL, 0x00F5FF1E, (int)drawItemInfoWinHeader_F5E200);
thisCall1Args2 myDrawEquimInfoWin_F5FEE0 = (thisCall1Args2)tools_relocation_hook(0xF5FEE0, 0x00F601E2, hook);
hook->resize(3);
b = hook->begin();
b++->setValue(H_BYTE, 0x00F603F0, MaxItemInfoLine);
b++->setValue(H_CALL, 0x00F60397, (int)myDrawItemInfoWin_F601F0);
b++->setValue(H_CALL, 0x00F6037D, (int)myDrawEquimInfoWin_F5FEE0);
myShowInfoWin_F60330 = (thisCall1Args2)tools_relocation_hook(0xF60330, 0xF60495, hook);
gum_interceptor_replace_fast(v, (gpointer)0xF60330, (gpointer)hookShowInfoWin_F60330, NULL);
hook->resize(1);
b = hook->begin();
b++->setValue(H_BYTE, 0x00F45DBB, MaxItemInfoLine);
my_F45CA0 = (thisCall1Args2)tools_relocation_hook(0xF45CA0, 0xF45F40, hook);
gum_interceptor_replace_fast(v, (gpointer)0xF45CA0, (gpointer)hook_F45CA0, NULL);
b = hook->begin();
b++->setValue(H_BYTE, 0x00F6B36B, MaxItemInfoLine);
my_F6B330 = (cdeclCall6)tools_relocation_hook(0xF6B330, 0xF6B445, hook);
gum_interceptor_replace_fast(v, (gpointer)0xF6B330, (gpointer)hookSub_F6B330, NULL);
delete hook;
}