mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-16 07:30:42 +01:00
Core/GameObject: Cast Pickup spell of GAMEOBJECT_TYPE_FLAGSTAND
* and do interact condition checks
This commit is contained in:
@@ -3161,9 +3161,16 @@ void GameObject::Use(Unit* user)
|
||||
if (player->GetVehicle())
|
||||
return;
|
||||
|
||||
if (HasFlag(GO_FLAG_IN_USE))
|
||||
return;
|
||||
|
||||
if (!MeetsInteractCondition(player))
|
||||
return;
|
||||
|
||||
player->RemoveAurasByType(SPELL_AURA_MOD_STEALTH);
|
||||
player->RemoveAurasByType(SPELL_AURA_MOD_INVISIBILITY);
|
||||
return; //we don;t need to delete flag ... it is despawned!
|
||||
spellId = GetGOInfo()->flagStand.pickupSpell;
|
||||
spellCaster = nullptr;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user