mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-14 01:29:07 +00:00
fix(Core/Battlegrounds) Rewrite RandomBG and enabling bg/arenas weights (#2516)
This commit is contained in:
@@ -1120,7 +1120,7 @@ bool GameObject::ActivateToQuest(Player* target) const
|
||||
//look for battlegroundAV for some objects which are only activated after mine gots captured by own team
|
||||
if (GetEntry() == BG_AV_OBJECTID_MINE_N || GetEntry() == BG_AV_OBJECTID_MINE_S)
|
||||
if (Battleground* bg = target->GetBattleground())
|
||||
if (bg->GetBgTypeID() == BATTLEGROUND_AV && !bg->ToBattlegroundAV()->PlayerCanDoMineQuest(GetEntry(), target->GetTeamId()))
|
||||
if (bg->GetBgTypeID(true) == BATTLEGROUND_AV && !bg->ToBattlegroundAV()->PlayerCanDoMineQuest(GetEntry(), target->GetTeamId()))
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
@@ -1784,11 +1784,11 @@ void GameObject::Use(Unit* user)
|
||||
{
|
||||
case 179785: // Silverwing Flag
|
||||
case 179786: // Warsong Flag
|
||||
if (bg->GetBgTypeID() == BATTLEGROUND_WS)
|
||||
if (bg->GetBgTypeID(true) == BATTLEGROUND_WS)
|
||||
bg->EventPlayerClickedOnFlag(player, this);
|
||||
break;
|
||||
case 184142: // Netherstorm Flag
|
||||
if (bg->GetBgTypeID() == BATTLEGROUND_EY)
|
||||
if (bg->GetBgTypeID(true) == BATTLEGROUND_EY)
|
||||
bg->EventPlayerClickedOnFlag(player, this);
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user