Core/Misc: don't allow players to use/activate/loot non-allowed gameobjects while under the effect of a damage immunity aura (#23319)
* Core/Misc: don't allow players to use/activate/loot non-allowed gameobjects while under the effect of a damage immunity aura. * Forgot to change this in last-second rename. * Apply suggested changes, thanks Shauren! # Conflicts: # src/server/game/Entities/GameObject/GameObject.cpp # src/server/game/Entities/Unit/UnitDefines.h # src/server/game/Entities/Unit/enuminfo_UnitDefines.cpp # src/server/scripts/Outland/CoilfangReservoir/TheSlavePens/boss_ahune.cpp
This commit is contained in:
1 parent
1fd66b4621
commit
d2b27bc43c
8 files changed
+45
-4
No files matched your search
@@ -1600,6 +1600,10 @@ void Spell::EffectOpenLock(SpellEffIndex effIndex)
|
||||
if (gameObjTarget)
|
||||
{
|
||||
GameObjectTemplate const* goInfo = gameObjTarget->GetGOInfo();
|
||||
|
||||
if (goInfo->CannotBeUsedUnderImmunity() && m_caster->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE))
|
||||
return;
|
||||
|
||||
// Arathi Basin banner opening. /// @todo Verify correctness of this check
|
||||
if ((goInfo->type == GAMEOBJECT_TYPE_BUTTON && goInfo->button.noDamageImmune) ||
|
||||
(goInfo->type == GAMEOBJECT_TYPE_GOOBER && goInfo->goober.losOK))
|
||||
|
||||
Reference in new issue
Block a user