From 4463c4a3d592dbfab7a36aba9508324c3e048f25 Mon Sep 17 00:00:00 2001 From: hondacrx Date: Mon, 27 Dec 2021 17:11:40 -0500 Subject: [PATCH] Core/Player: prevent trade system from getting stuck in an invalid state when the LevelReq.Trade config is used. Port From (https://github.com/TrinityCore/TrinityCore/commit/1b7a1c51aed401d71d22ef4043ca0579e35f5c92) --- Source/Game/Handlers/TradeHandler.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Source/Game/Handlers/TradeHandler.cs b/Source/Game/Handlers/TradeHandler.cs index 34792f55a..e957b2e0c 100644 --- a/Source/Game/Handlers/TradeHandler.cs +++ b/Source/Game/Handlers/TradeHandler.cs @@ -595,6 +595,8 @@ namespace Game if (GetPlayer().GetLevel() < WorldConfig.GetIntValue(WorldCfg.TradeLevelReq)) { SendNotification(Global.ObjectMgr.GetCypherString(CypherStrings.TradeReq), WorldConfig.GetIntValue(WorldCfg.TradeLevelReq)); + info.Status = TradeStatus.Failed; + SendTradeStatus(info); return; } @@ -670,6 +672,8 @@ namespace Game if (pOther.GetLevel() < WorldConfig.GetIntValue(WorldCfg.TradeLevelReq)) { SendNotification(Global.ObjectMgr.GetCypherString(CypherStrings.TradeOtherReq), WorldConfig.GetIntValue(WorldCfg.TradeLevelReq)); + info.Status = TradeStatus.Failed; + SendTradeStatus(info); return; }