Fix corrupt item cache crashes, bot whispers, trade crashes

This commit is contained in:
郑佩茹
2022-03-22 11:04:21 -06:00
parent b952636f0d
commit a7f412b428
21 changed files with 91 additions and 78 deletions

View File

@@ -2,7 +2,7 @@
* Copyright (C) 2016+ AzerothCore <www.azerothcore.org>, released under GNU GPL v2 license, you may redistribute it and/or modify it under version 2 of the License, or (at your option), any later version.
*/
#include "BattlegroundJoinAction.h"
#include "BattleGroundJoinAction.h"
#include "ArenaTeam.h"
#include "ArenaTeamMgr.h"
#include "BattlegroundMgr.h"
@@ -939,7 +939,7 @@ bool BGStatusAction::Execute(Event event)
{
if (ginfo.IsInvitedToBGInstanceGUID && !bot->InBattleground())
{
Battleground* bg = sBattlegroundMgr->GetBattleground(ginfo.IsInvitedToBGInstanceGUID);
Battleground* bg = sBattlegroundMgr->GetBattleground(ginfo.IsInvitedToBGInstanceGUID, _bgTypeId);
if (bg)
{
if (isArena)
@@ -1038,7 +1038,7 @@ bool BGStatusAction::Execute(Event event)
if (ginfo.IsInvitedToBGInstanceGUID)
{
Battleground* bg = sBattlegroundMgr->GetBattleground(ginfo.IsInvitedToBGInstanceGUID);
Battleground* bg = sBattlegroundMgr->GetBattleground(ginfo.IsInvitedToBGInstanceGUID, _bgTypeId);
if (!bg)
{
LOG_ERROR("playerbots", "Bot {} {}:{} <{}>: Missing QueueInfo for {} {}",