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)
This commit is contained in:
hondacrx
2021-12-27 17:11:40 -05:00
parent 5e193139a2
commit 4463c4a3d5
+4
View File
@@ -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;
}