mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-24 10:56:38 +01:00
Core/GameObject: Cast Pickup spell of GAMEOBJECT_TYPE_FLAGSTAND
* and do interact condition checks
(cherry picked from commit bef005e346)
This commit is contained in:
@@ -3158,9 +3158,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