Core/GameObject: Cast Pickup spell of GAMEOBJECT_TYPE_FLAGSTAND

* and do interact condition checks
This commit is contained in:
Jeremy
2024-10-21 00:31:27 +02:00
committed by ModoX
parent 0535a61cb7
commit bef005e346

View File

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