aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJeremy <Golrag@users.noreply.github.com>2024-10-21 00:31:27 +0200
committerModoX <moardox@gmail.com>2024-10-21 00:31:27 +0200
commitbef005e34617462fc166260f5002cf79b161db59 (patch)
treee22303bc068ba70e0cfe568565d1fcacc588c593 /src
parent0535a61cb7c9da97f05e5867ce181d91e3dd92eb (diff)
Core/GameObject: Cast Pickup spell of GAMEOBJECT_TYPE_FLAGSTAND
* and do interact condition checks
Diffstat (limited to 'src')
-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 3b7724ee26f..a95b5989fac 100644
--- a/src/server/game/Entities/GameObject/GameObject.cpp
+++ b/src/server/game/Entities/GameObject/GameObject.cpp
@@ -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;
}