更新拍卖行竞拍hook 更新毁梦播报

This commit is contained in:
lenheart 2025-12-26 14:50:22 +08:00
parent 7e1b3f6211
commit 446bca1015
2 changed files with 54 additions and 0 deletions

View File

@ -159,7 +159,56 @@ function _Dps_JYYJBB2_Main_() {
}
Cb_Inter_AuctionResultBidding_Leave_Func["交易播报2"] <- function(args) {
local username = User(args[1]).GetCharacName();
local id = NativePointer(args[2]).add(14).readInt();
local CheckSql = "SELECT item_id,unit_price,owner_id FROM taiwan_cain_auction_gold.auction_history_" + getYearMonth() + " where auction_id = " + id + ";";
//从池子拿连接
local SqlObj = MysqlPool.GetInstance().GetConnect();
local Ret = SqlObj.Select(CheckSql, ["int", "int", "int"]);
if (Ret == null || Ret.len() == 0) {
MysqlPool.GetInstance().PutConnect(SqlObj);
return;
}
local itemId = Ret[0][0];
local unitPrice = Ret[0][1];
local maijiacid = Ret[0][2];
if (maijiacid == User(args[1]).GetCID()) {
MysqlPool.GetInstance().PutConnect(SqlObj);
return;
}
local CheckSql2 = "SELECT price FROM taiwan_cain_auction_gold.auction_history_buyer_" + getYearMonth() + " ORDER BY occ_time DESC LIMIT 1;";
local Ret2 = SqlObj.Select(CheckSql2, ["int"]);
local price = Ret2[0][0];
local num = price / unitPrice;
local CheckSql3 = "SELECT charac_name FROM taiwan_cain.charac_info where charac_no = " + maijiacid;
local Ret3 = SqlObj.Select(CheckSql3, ["string"]);
local mjname = Ret3[0][0];
MysqlPool.GetInstance().PutConnect(SqlObj);
World.SendNotiPacketMessage(format("玩家[%s]在拍卖行用[%d]金币从[%s]手里购得[%s]物品[%d]个", username, price, mjname, PvfItem.GetNameById(itemId), num), 14);
}
Cb_User_Vend_Item_Leave_Func["交易播报2"] <- function(args) {
Timer.SetTimeOut(function() {

View File

@ -671,6 +671,11 @@ Cb_Cargo_IsOperatorable_Enter_Func <- {};
Cb_Cargo_IsOperatorable_Leave_Func <- {};
_Hook_Register_Currency_Func_("0x0850D39C", ["pointer", "int", "bool"], Cb_Cargo_IsOperatorable_Enter_Func, Cb_Cargo_IsOperatorable_Leave_Func);
//拍卖行竞拍
Cb_Inter_AuctionResultBidding_Enter_Func <- {};
Cb_Inter_AuctionResultBidding_Leave_Func <- {};
_Hook_Register_Currency_Func_("0x84D6CA4", ["pointer", "pointer", "pointer", "int"], Cb_Inter_AuctionResultBidding_Enter_Func, Cb_Inter_AuctionResultBidding_Leave_Func);
function _Hook_Register_Currency_DelayHook_() {
//五国时的热点函数
//获取Item Rarity