aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy <Golrag@users.noreply.github.com>2024-10-21 00:31:27 +0200
committerOvahlord <dreadkiller@gmx.de>2024-10-21 22:03:27 +0200
commit9be40b4be60358e602d5efbbee60bf0a6f97f0aa (patch)
treebb1855cf66c89a50543e0b0c9a6f64b182ae880b
parent27399ce1e509fce0f7d6d159b036351a0ca53223 (diff)
Core/GameObject: Cast Pickup spell of GAMEOBJECT_TYPE_FLAGSTAND
* and do interact condition checks (cherry picked from commit bef005e34617462fc166260f5002cf79b161db59)
-rw-r--r--src/server/game/Entities/GameObject/GameObject.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/server/game/Entities/GameObject/GameObject.cpp b/src/server/game/Entities/GameObject/GameObject.cpp
index 622542f991b..55536686232 100644
--- a/src/server/game/Entities/GameObject/GameObject.cpp
+++ b/src/server/game/Entities/GameObject/GameObject.cpp
@@ -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;
}