111
This commit is contained in:
@@ -65,6 +65,40 @@ class Packet extends Base_C_Object {
|
||||
Sq_Packet_Send(SUser.C_Object, this.C_Object);
|
||||
}
|
||||
|
||||
|
||||
|
||||
function GetByte() {
|
||||
local data = Memory.alloc(1);
|
||||
if (Sq_CallFunc(S_Ptr("0x858CF22"), "int", ["pointer", "pointer"], this.C_Object, data.C_Object)) {
|
||||
return data.readS8();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
function GetShort() {
|
||||
local data = Memory.alloc(2);
|
||||
if (Sq_CallFunc(S_Ptr("0x858CFC0"), "int", ["pointer", "pointer"], this.C_Object, data.C_Object)) {
|
||||
return data.readS16();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
function GetInt() {
|
||||
local data = Memory.alloc(4);
|
||||
if (Sq_CallFunc(S_Ptr("0x858D27E"), "int", ["pointer", "pointer"], this.C_Object, data.C_Object)) {
|
||||
return data.readS32();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
function GetBinary(len) {
|
||||
local data = Memory.alloc(len);
|
||||
if (Sq_CallFunc(S_Ptr("0x858D3B2"), "int", ["pointer", "pointer"], this.C_Object, data.C_Object)) {
|
||||
return data;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
function Delete() {
|
||||
Sq_CallFunc(S_Ptr("0x858DE80"), "void", ["pointer"], this.C_Object);
|
||||
Sq_Delete_Point(this.C_Object);
|
||||
|
||||
Reference in New Issue
Block a user