- 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:
kaelima
2012-10-17 16:56:35 +02:00
parent 27f091806a
commit ca276292dc
4 changed files with 19 additions and 7 deletions
@@ -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