更换国内服务器
This commit is contained in:
@@ -234,20 +234,20 @@ class EquimentUseJewel {
|
||||
}
|
||||
|
||||
|
||||
HackReturnAddSocketToAvatarFalg = null;
|
||||
|
||||
|
||||
function HackReturnAddSocketToAvatar(Code) {
|
||||
//标记flag
|
||||
HackReturnAddSocketToAvatarFalg = Code;
|
||||
|
||||
Cb_PacketBuf_get_short_Leave_Func.EquimentUseJewel <- function(args) {
|
||||
Cb_PacketBuf_get_short_Leave_Func.rawdelete("EquimentUseJewel");
|
||||
return 0;
|
||||
}.bindenv(this);
|
||||
function HackAddSocketToAvatarLogic(Flag) {
|
||||
if (Flag) {
|
||||
Sq_WriteByteArr(S_Ptr("821A449"), [0x90,0x90]);
|
||||
Sq_WriteByteArr(S_Ptr("0x821A44B"), array(36,0x90));
|
||||
} else {
|
||||
Sq_WriteByteArr(S_Ptr("821A449"), [0x74,0x2B]);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
function FixFunction() {
|
||||
//称号回包
|
||||
Cb_CTitleBook_putItemData_Leave_Func.EquimentUseJewel <- function(args) {
|
||||
@@ -270,7 +270,9 @@ class EquimentUseJewel {
|
||||
//装备开孔
|
||||
Cb_AddSocketToAvatar_Enter_Func.EquimentUseJewel <- function(args) {
|
||||
local SUser = User(args[1]);
|
||||
local Pack = Packet(args[2]);
|
||||
local PackCopyBuffer = Memory.alloc(10001);
|
||||
Memory.copy(PackCopyBuffer, NativePointer(args[2]), 1000);
|
||||
local Pack = Packet(PackCopyBuffer.C_Object);
|
||||
local equ_slot = Pack.GetShort();
|
||||
local equitem_id = Pack.GetInt();
|
||||
local sta_slot = Pack.GetShort();
|
||||
@@ -281,13 +283,15 @@ class EquimentUseJewel {
|
||||
equ_slot = equ_slot - 57;
|
||||
local C_PacketBuf = api_PacketBuf_get_buf(args[2]) //获取原始封包数据
|
||||
C_PacketBuf.add(0).writeShort(equ_slot) //修改掉装备位置信息 时装类镶嵌从57开始。
|
||||
|
||||
//执行原逻辑
|
||||
return null;
|
||||
}
|
||||
//如果已开启镶嵌槽则不执行
|
||||
local equ_id = NativePointer(inven_item.C_Object).add(25).readU32();
|
||||
if (api_exitjeweldata(equ_id)) {
|
||||
HackReturnAddSocketToAvatar(0x13);
|
||||
CUser_SendCmdErrorPacket(SUser, 209, 19);
|
||||
HackAddSocketToAvatarLogic(true);
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -296,11 +300,13 @@ class EquimentUseJewel {
|
||||
|
||||
if (ItemType == 10) {
|
||||
SUser.SendNotiBox("装备为武器类型,不支持打孔!", 1)
|
||||
HackReturnAddSocketToAvatar(0x0);
|
||||
CUser_SendCmdErrorPacket(SUser, 209, 0);
|
||||
HackAddSocketToAvatarLogic(true);
|
||||
return null;
|
||||
} else if (ItemType == 11) {
|
||||
SUser.SendNotiBox("装备为称号类型,不支持打孔!", 1)
|
||||
HackReturnAddSocketToAvatar(0x0);
|
||||
CUser_SendCmdErrorPacket(SUser, 209, 0);
|
||||
HackAddSocketToAvatarLogic(true);
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -321,19 +327,12 @@ class EquimentUseJewel {
|
||||
Pack.Finalize(true);
|
||||
SUser.Send(Pack);
|
||||
Pack.Delete();
|
||||
HackReturnAddSocketToAvatar(0x0);
|
||||
HackAddSocketToAvatarLogic(true);
|
||||
return null;
|
||||
}.bindenv(this);
|
||||
|
||||
Cb_AddSocketToAvatar_Leave_Func.EquimentUseJewel <- function(args) {
|
||||
//跳的错误返回0 正常调用的话不处理返回值
|
||||
if (HackReturnAddSocketToAvatarFalg != null) {
|
||||
local SUser = User(args[1]);
|
||||
// SUser.SendItemSpace(0);
|
||||
CUser_SendCmdErrorPacket(SUser, 209, HackReturnAddSocketToAvatarFalg);
|
||||
HackReturnAddSocketToAvatarFalg = null;
|
||||
return 0;
|
||||
}
|
||||
HackAddSocketToAvatarLogic(false);
|
||||
return null;
|
||||
}.bindenv(this);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user