Core/BG:
- Force removal of stealth and invisible auras when using gameobjects with type GAMEOBJECT_TYPE_FLAGSTAND and GAMEOBJECT_TYPE_FLAGDROP - Do not allow players to use unfriendly battleground objects (prevents flag cap with Nitro Boosts active for example)
This commit is contained in:
@@ -1522,14 +1522,18 @@ void GameObject::Use(Unit* user)
|
||||
|
||||
Player* player = user->ToPlayer();
|
||||
|
||||
if (player->CanUseBattlegroundObject())
|
||||
if (player->CanUseBattlegroundObject(this))
|
||||
{
|
||||
// in battleground check
|
||||
Battleground* bg = player->GetBattleground();
|
||||
if (!bg)
|
||||
return;
|
||||
|
||||
if (player->GetVehicle())
|
||||
return;
|
||||
|
||||
player->RemoveAurasByType(SPELL_AURA_MOD_STEALTH);
|
||||
player->RemoveAurasByType(SPELL_AURA_MOD_INVISIBILITY);
|
||||
// BG flag click
|
||||
// AB:
|
||||
// 15001
|
||||
@@ -1562,14 +1566,18 @@ void GameObject::Use(Unit* user)
|
||||
|
||||
Player* player = user->ToPlayer();
|
||||
|
||||
if (player->CanUseBattlegroundObject())
|
||||
if (player->CanUseBattlegroundObject(this))
|
||||
{
|
||||
// in battleground check
|
||||
Battleground* bg = player->GetBattleground();
|
||||
if (!bg)
|
||||
return;
|
||||
|
||||
if (player->GetVehicle())
|
||||
return;
|
||||
|
||||
player->RemoveAurasByType(SPELL_AURA_MOD_STEALTH);
|
||||
player->RemoveAurasByType(SPELL_AURA_MOD_INVISIBILITY);
|
||||
// BG flag dropped
|
||||
// WS:
|
||||
// 179785 - Silverwing Flag
|
||||
|
||||
Reference in New Issue
Block a user