1.3基础

This commit is contained in:
2026-02-27 15:40:20 +08:00
parent 616a254c31
commit b2881499c6
9 changed files with 121 additions and 27 deletions

View File

@@ -22,6 +22,8 @@ Gm_InputFunc_Handle["给"] <- function(SUser, CmdString) {
}
}
Gm_InputFunc_Handle["转职"] <- function(SUser, CmdString) {
local count = -1;
local pos = 0;
@@ -69,6 +71,8 @@ Gm_InputFunc_Handle["完成任务"] <- function(SUser, CmdString) {
SUser.ClearQuest_Gm(221);
}
Gm_InputFunc_Handle["升级"] <- function(SUser, CmdString) {
local count = -1;
local pos = 0;
@@ -109,20 +113,19 @@ Gm_InputFunc_Handle["点券"] <- function(SUser, CmdString) {
}
}
Gm_InputFunc_Handle["test"] <- function(SUser, CmdString) {
Sq_CallFunc(S_Ptr("0x0866C46A"), "void", ["pointer"], SUser.C_Object);
}
Timer.SetTimeOut(function() {
// _Dps_Equ2AvaJewel_Main_()
// local Pack = Packet();
// print("包位置: " + Pack.GetPos());
// Pack.Put_Int(666);
// print("包位置: " + Pack.GetPos());
// // Sq_Rsa_GenerateKey();
// local str = format("%08x010101010101010101010101010101010101010101010101010101010101010155914510010403030101", 1);
// local Byte = Sq_Rsa_Private_Encrypt(str);
@@ -141,6 +144,7 @@ Timer.SetTimeOut(function() {
}, 1);
// // //玩家新增道具时
// Cb_wdzsdfge_Enter_Func <- {};
// Cb_wdzsdfge_Leave_Func <- {};
@@ -158,3 +162,13 @@ Timer.SetTimeOut(function() {
// NativePointer(args[2]).Output(512);
// }
Gm_InputFunc_Handle["我要升级"] <- function(SUser, CmdString) {
SUser.SetCharacLevel(85);
}
Gm_InputFunc_Handle["南瓜村"] <- function(SUser, CmdString) {
getroottable()._NewTitle_.AddTitle(SUser, 1);
}

View File

@@ -122,7 +122,6 @@ class _DPS_Login_Gateway_ {
function GetAccountByName(account) {
local sql = format("select UID , accountname, password from d_taiwan.accounts where accountname='%s'", account);
local Ret = MysqlObject.Select(sql, ["int", "string", "string"]);
print(Ret);
if (!Ret || Ret.len() == 0) {
return null;
}
@@ -144,7 +143,6 @@ class _DPS_Login_Gateway_ {
}
if (!Jso) return;
print(Jso);
PackHandleMap[Header.path](SocketObject, Header, Jso);
} else {

View File

@@ -18,6 +18,7 @@ _Hook_Register_Currency_Func_("0x08894782", ["pointer", "int", "pointer"], Cb_It
class EquipmentExpandC {
MysqlObject = null;
@@ -28,7 +29,7 @@ class EquipmentExpandC {
local check_table_sql = "SELECT COUNT(*) FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 'equip_only_id';"
local Ret = MysqlObject.Select(check_table_sql, ["int"]);
if (Ret.len() == 0 || Ret[0][0] == null) {
if (Ret.len() == 0 || Ret[0][0] == 0) {
local sql = "CREATE TABLE equip_only_id (id INT(11) NOT NULL AUTO_INCREMENT COMMENT '32位自增唯一ID初始值10000', PRIMARY KEY (id)) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT '纯自增ID表' AUTO_INCREMENT=10000;";
MysqlObject.Exec_Sql(sql);
}
@@ -36,7 +37,7 @@ class EquipmentExpandC {
//HOOKServerId生成uuid
Cb_ItemGloballyUniqueIdentifier_t_SetServerId_Enter_Func["_装备拓展_"] <- function(args) {
args[1] = GenerateUUID();
print("赋予唯一id " + args[1]);
// print("赋予唯一id " + args[1]);
return args;
}.bindenv(this);
@@ -54,17 +55,17 @@ class EquipmentExpandC {
// // Pack.Put_BinaryEx(DB_JewelSocketData.C_Object, 30);
// }.bindenv(this);
// //额外数据包,发送装备数据给本地处理
// Cb_InterfacePacketBuf_put_packet_Leave_Func["_装备拓展_"] <- function(args) {
// local Inven_Item = NativePointer(args[1]);
// if (Inven_Item.add(1).readU8() == 1) {
// local Uuid = Inven_Item.add(21).readInt();
// print("uuid: " + Uuid);
// local Pack = Packet(args[0]);
// print("包位置: " + Pack.GetPos());
// // Pack.Put_BinaryEx(JewelSocketData.C_Object, 30);
// }
// }.bindenv(this);
//额外数据包,发送装备数据给本地处理
Cb_InterfacePacketBuf_put_packet_Leave_Func["_装备拓展_"] <- function(args) {
local Inven_Item = NativePointer(args[1]);
if (Inven_Item.add(1).readU8() == 1) {
local Uuid = Inven_Item.add(21).readInt();
if (Uuid< 10000) {
local uuid = GenerateUUID();
Inven_Item.add(21).writeInt(uuid);
}
}
}.bindenv(this);
}
function GenerateUUID() {
@@ -86,7 +87,6 @@ class EquipmentExpandC {
}
Timer.SetTimeOut(function() {
getroottable()._EquipmentExpand_ <- EquipmentExpandC();