Merge branch 'azerothcore:master' into Playerbot

This commit is contained in:
ZhengPeiRu21
2022-04-07 08:55:50 -06:00
committed by GitHub
143 changed files with 665 additions and 546 deletions

View File

@@ -1077,7 +1077,7 @@ void Battleground::StartBattleground()
void Battleground::AddPlayer(Player* player)
{
// remove afk from player
if (player->HasFlag(PLAYER_FLAGS, PLAYER_FLAGS_AFK))
if (player->HasPlayerFlag(PLAYER_FLAGS_AFK))
player->ToggleAFK();
sScriptMgr->OnBattlegroundBeforeAddPlayer(this, player);

View File

@@ -293,7 +293,7 @@ void BattlegroundIC::StartingEventOpenDoors()
DoorOpen(BG_IC_GO_DOODAD_VR_PORTCULLIS01_2);
for (uint8 i = 0; i < MAX_FORTRESS_TELEPORTERS_SPAWNS; ++i)
GetBGObject(BG_IC_Teleporters[i].type)->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE);
GetBGObject(BG_IC_Teleporters[i].type)->RemoveGameObjectFlag(GO_FLAG_NOT_SELECTABLE);
for (uint8 i = 0; i < MAX_FORTRESS_TELEPORTER_EFFECTS_SPAWNS; ++i)
GetBGObject(BG_IC_TeleporterEffects[i].type)->SetGoState(GO_STATE_ACTIVE);

View File

@@ -125,7 +125,7 @@ void BattlegroundRV::PostUpdateImpl(uint32 diff)
uint32 objects[2] = { BG_RV_OBJECT_ELEVATOR_1, BG_RV_OBJECT_ELEVATOR_2 };
for (uint8 i = 0; i < 2; ++i)
if (GameObject* go = GetBGObject(objects[i]))
go->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_TRANSPORT);
go->RemoveGameObjectFlag(GO_FLAG_TRANSPORT);
}
break;
}

View File

@@ -853,9 +853,9 @@ void BattlegroundSA::UpdateObjectInteractionFlags(uint32 objectId)
if (GameObject* go = GetBGObject(objectId))
{
if (CanInteractWithObject(objectId))
go->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE | GO_FLAG_INTERACT_COND | GO_FLAG_IN_USE);
go->RemoveGameObjectFlag(GO_FLAG_NOT_SELECTABLE | GO_FLAG_INTERACT_COND | GO_FLAG_IN_USE);
else
go->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE);
go->SetGameObjectFlag(GO_FLAG_NOT_SELECTABLE);
}
}