更新仓库锁 和 HOOK
This commit is contained in:
@@ -121,32 +121,17 @@ Gm_InputFunc_Handle["test"] <- function(SUser, CmdString) {
|
||||
|
||||
Timer.SetTimeOut(function() {
|
||||
|
||||
// Haker.LoadHook("0x0850D39C", ["pointer", "int", "bool"],
|
||||
// function(args) {
|
||||
// return null;
|
||||
// },
|
||||
// function(args) {
|
||||
|
||||
// Cb_SelectDungeon_Check_Error_Leave_Func.Check_TicketByMaomi <- function(args) {
|
||||
|
||||
// // local Config = sq_ReadJsonFile("/dp_s/OfficialConfig" + "/" + "门票进入副本配置_Maomi.json");
|
||||
// local SUser = User(args[1]);
|
||||
// local msg_base = args[2];
|
||||
// local dgn_id = NativePointer(msg_base).add(13).readU16(); // 获取副本ID
|
||||
// local dgn_diff = NativePointer(msg_base).add(15).readU8(); // 获取副本难度
|
||||
// local PartyObj = SUser.GetParty();
|
||||
// print(SUser.GetCharacName());
|
||||
// // return false;
|
||||
// return null;
|
||||
// });
|
||||
|
||||
// if (dgn_id == 40) {
|
||||
// Timer.SetTimeOut(function() {
|
||||
// print(12313);
|
||||
|
||||
// local Gm = GameManager();
|
||||
// local PartyObj = Gm.GetParty();
|
||||
// PartyObj.Create(SUser);
|
||||
// Sq_CallFunc(S_Ptr("0x859D718"), "int", ["pointer", "pointer"], PartyObj.C_Object, SUser.C_Object);
|
||||
// Sq_CallFunc(S_Ptr("0x85A0954"), "int", ["pointer", "pointer", "int", "int"], PartyObj.C_Object, S_Ptr("2"), 0, 0);
|
||||
// // // SUser.
|
||||
// }, 10);
|
||||
|
||||
// return 1;
|
||||
// }
|
||||
|
||||
// return null;
|
||||
// }
|
||||
|
||||
}, 1)
|
||||
@@ -1,71 +0,0 @@
|
||||
/*
|
||||
文件名:仓库锁.nut
|
||||
路径:MyProject/仓库锁.nut
|
||||
创建日期:2025-12-20 02:19
|
||||
文件用途:
|
||||
*/
|
||||
class WarehouseLockC {
|
||||
|
||||
MysqlObject = null;
|
||||
|
||||
|
||||
constructor() {
|
||||
MysqlObject = Mysql(Str_Ptr("127.0.0.1"), 3306, Str_Ptr("taiwan_cain"), Str_Ptr("game"), Str_Ptr("uu5!^%jg"));
|
||||
MysqlObject.Exec_Sql(format("SET NAMES %s", "latin1"));
|
||||
|
||||
|
||||
MysqlObject.Select("CREATE TABLE `zyk`.`warehouselock` ( `uid` int NOT NULL, `passwd` varchar(255) NULL, PRIMARY KEY (`uid`));", []);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
ClientSocketPackFuncMap.rawset(21008009, function(SUser, Jso) {
|
||||
local Uid = SUser.GetUID();
|
||||
//查询uid是否存在于数据库中
|
||||
local querySql = "SELECT passwd FROM zyk.warehouselock WHERE uid = " + Uid;
|
||||
local result = MysqlObject.Select(querySql, [""]);
|
||||
|
||||
//说明有密码
|
||||
if (result && result.len() > 0) {
|
||||
SUser.SendJso({
|
||||
op = 21008010
|
||||
});
|
||||
}
|
||||
}.bindenv(this));
|
||||
|
||||
|
||||
ClientSocketPackFuncMap.rawset(21008001, function(SUser, Jso) {
|
||||
local Uid = SUser.GetUID();
|
||||
//查询uid是否存在于数据库中
|
||||
local querySql = "SELECT passwd FROM zyk.warehouselock WHERE uid = " + Uid;
|
||||
local result = MysqlObject.Select(querySql, ["string"]);
|
||||
|
||||
local passwd = Jso.passwd;
|
||||
//说明有密码
|
||||
if (result && result.len() > 0) {
|
||||
local sqlpasswd = result[0][0];
|
||||
if (passwd == sqlpasswd) {
|
||||
SUser.SendJso({
|
||||
op = 21008002
|
||||
});
|
||||
SUser.SendNotiBox(" 验证成功 账号金库限制成功解除", 1);
|
||||
}
|
||||
else{
|
||||
SUser.SendNotiBox(" 验证失败 请重新登录游戏以重试", 1);
|
||||
}
|
||||
}
|
||||
}.bindenv(this));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
Timer.SetTimeOut(function() {
|
||||
|
||||
getroottable()._WarehouseLock_ <- WarehouseLockC();
|
||||
|
||||
print("双端插件·仓库锁 - 已加载");
|
||||
}, 1);
|
||||
Reference in New Issue
Block a user