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:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user