mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-02-16 16:56:07 +00:00
feat(Core/Battleground): Added new config variables to battleground b… (#6432)
- Closes #5098.
This commit is contained in:
@@ -1818,7 +1818,9 @@ void Battleground::HandleTriggerBuff(GameObject* gameObject)
|
||||
uint32 index = 0;
|
||||
for (; index < BgObjects.size() && BgObjects[index] != gameObject->GetGUID(); ++index);
|
||||
if (BgObjects[index] != gameObject->GetGUID())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (m_BuffChange)
|
||||
{
|
||||
@@ -1835,7 +1837,26 @@ void Battleground::HandleTriggerBuff(GameObject* gameObject)
|
||||
}
|
||||
}
|
||||
|
||||
SpawnBGObject(index, BUFF_RESPAWN_TIME);
|
||||
uint32 respawnTime = SPEED_BUFF_RESPAWN_TIME;
|
||||
if (Map* map = FindBgMap())
|
||||
{
|
||||
if (GameObject* obj = map->GetGameObject(BgObjects[index]))
|
||||
{
|
||||
switch (obj->GetEntry())
|
||||
{
|
||||
case BG_OBJECTID_REGENBUFF_ENTRY:
|
||||
respawnTime = RESTORATION_BUFF_RESPAWN_TIME;
|
||||
break;
|
||||
case BG_OBJECTID_BERSERKERBUFF_ENTRY:
|
||||
respawnTime = BERSERKING_BUFF_RESPAWN_TIME;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
SpawnBGObject(index, respawnTime);
|
||||
}
|
||||
|
||||
void Battleground::HandleKillPlayer(Player* victim, Player* killer)
|
||||
|
||||
Reference in New Issue
Block a user