diff --git a/_DPS_/_BuiltProject/毁梦定制战力系统/毁梦定制战力系统.nut b/_DPS_/_BuiltProject/毁梦定制战力系统/毁梦定制战力系统.nut index 3e8feba..8b09ef6 100644 --- a/_DPS_/_BuiltProject/毁梦定制战力系统/毁梦定制战力系统.nut +++ b/_DPS_/_BuiltProject/毁梦定制战力系统/毁梦定制战力系统.nut @@ -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() { diff --git a/_DPS_/_Core/New_Hook.nut b/_DPS_/_Core/New_Hook.nut index e637d08..4d39399 100644 --- a/_DPS_/_Core/New_Hook.nut +++ b/_DPS_/_Core/New_Hook.nut @@ -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