Core/GameObject: Cast Pickup spell of GAMEOBJECT_TYPE_FLAGSTAND

* and do interact condition checks

(cherry picked from commit bef005e346)
This commit is contained in:
Jeremy
2024-10-21 00:31:27 +02:00
committed by Ovahlord
parent 27399ce1e5
commit 9be40b4be6

View File

@@ -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;
}