Core/Misc: don't allow players to use/activate/loot non-allowed gameobjects while under the effect of a damage immunity aura

Port From (https://github.com/TrinityCore/TrinityCore/commit/9d865f7536ae6feda6fba77785e4548f95ca5d03)
This commit is contained in:
hondacrx
2021-12-16 12:56:20 -05:00
parent 40f6c9a9fd
commit 736892998f
6 changed files with 57 additions and 2 deletions
@@ -1448,6 +1448,9 @@ namespace Game.Entities
Player playerUser = user.ToPlayer();
if (playerUser != null)
{
if (m_goInfo.GetNoDamageImmune() != 0 && playerUser.HasUnitFlag(UnitFlags.Immune))
return;
if (!m_goInfo.IsUsableMounted())
playerUser.RemoveAurasByType(AuraType.Mounted);