Merge branch 'master' into Playerbot

This commit is contained in:
Yunfan Li
2024-10-04 21:57:35 +08:00
90 changed files with 381 additions and 169 deletions

View File

@@ -46,10 +46,8 @@
#include "SpellMgr.h"
#include "SpellScript.h"
#include "TemporarySummon.h"
#include "Totem.h"
#include "Unit.h"
#include "UpdateData.h"
#include "UpdateMask.h"
#include "Util.h"
#include "VMapFactory.h"
#include "Vehicle.h"
@@ -3160,8 +3158,9 @@ SpellMissInfo Spell::DoSpellHitOnUnit(Unit* unit, uint32 effectMask, bool scaleA
if (m_spellAura)
{
// Prevent aura application if target is immuned
if (m_targets.GetUnitTarget() && m_targets.GetUnitTarget()->IsImmunedToDamageOrSchool(m_spellAura->GetSpellInfo()))
// Prevent aura application if target is banished and immuned
if (m_targets.GetUnitTarget() && m_targets.GetUnitTarget()->IsImmunedToDamageOrSchool(m_spellAura->GetSpellInfo())
&& m_targets.GetUnitTarget()->HasUnitState(UNIT_STATE_ISOLATED))
{
m_spellAura->Remove();
return SPELL_MISS_IMMUNE;