mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-24 06:06:23 +00:00
fix(Core/Battlegrounds) Rewrite RandomBG and enabling bg/arenas weights (#2516)
This commit is contained in:
@@ -2119,7 +2119,7 @@ void Spell::EffectOpenLock(SpellEffIndex effIndex)
|
||||
// in battleground check
|
||||
if (Battleground* bg = player->GetBattleground())
|
||||
{
|
||||
if (bg->GetBgTypeID() == BATTLEGROUND_EY)
|
||||
if (bg->GetBgTypeID(true) == BATTLEGROUND_EY)
|
||||
bg->EventPlayerClickedOnFlag(player, gameObjTarget);
|
||||
return;
|
||||
}
|
||||
@@ -3868,7 +3868,7 @@ void Spell::EffectScriptEffect(SpellEffIndex effIndex)
|
||||
case 54640:
|
||||
{
|
||||
if (Player* player = unitTarget->ToPlayer())
|
||||
if (player->GetBattleground() && player->GetBattleground()->GetBgTypeID() == BATTLEGROUND_SA)
|
||||
if (player->GetBattleground() && player->GetBattleground()->GetBgTypeID(true) == BATTLEGROUND_SA)
|
||||
{
|
||||
if (GameObject* dportal = player->FindNearestGameObject(192819, 10.0f))
|
||||
{
|
||||
|
||||
@@ -1131,7 +1131,7 @@ bool SpellArea::IsFitToRequirements(Player const* player, uint32 newZone, uint32
|
||||
return false;
|
||||
|
||||
Battleground* bg = player->GetBattleground();
|
||||
if (!bg || bg->GetBgTypeID() != BATTLEGROUND_IC)
|
||||
if (!bg || bg->GetBgTypeID(true) != BATTLEGROUND_IC)
|
||||
return false;
|
||||
|
||||
uint8 nodeType = spellId == 68719 ? NODE_TYPE_REFINERY : NODE_TYPE_QUARRY;
|
||||
|
||||
Reference in New Issue
Block a user