Core/Units: treat CREATURE_FLAG_EXTRA_NO_COMBAT as a pseudo passive react state. Units with that flag will no longer enter combat with potential targets unless they are being engaged by their opponent or explicitely commanded to do so
* apply no combat flag on every creature and their difficulty entries that have been flagged in creaturedifficulty.db2
This commit is contained in:
1 parent
b36233b8f6
commit
a2fa0c2ffa
4 files changed
+15
-6
No files matched your search
@@ -2713,7 +2713,7 @@ void Spell::DoAllEffectOnTarget(TargetInfo* target)
|
||||
if (missInfo != SPELL_MISS_EVADE && spellHitTarget && !m_caster->IsFriendlyTo(unit) && (!m_spellInfo->IsPositive() || m_spellInfo->HasEffect(SPELL_EFFECT_DISPEL)))
|
||||
{
|
||||
if (Unit* unitCaster = m_caster->ToUnit())
|
||||
unitCaster->AtTargetAttacked(unit, m_spellInfo->HasInitialAggro());
|
||||
unitCaster->AtTargetAttacked(unit, m_spellInfo->HasInitialAggro() && !unitCaster->IsIgnoringCombat());
|
||||
|
||||
if (!unit->IsStandState())
|
||||
unit->SetStandState(UNIT_STAND_STATE_STAND);
|
||||
@@ -7691,7 +7691,11 @@ void Spell::DoAllEffectOnLaunchTarget(TargetInfo& targetInfo, float* multiplier)
|
||||
return;
|
||||
|
||||
// This will only cause combat - the target will engage once the projectile hits (in DoAllEffectOnTarget)
|
||||
if (m_originalCaster && targetInfo.missCondition != SPELL_MISS_EVADE && !m_originalCaster->IsFriendlyTo(unit) && (!m_spellInfo->IsPositive() || m_spellInfo->HasEffect(SPELL_EFFECT_DISPEL)) && (m_spellInfo->HasInitialAggro() || unit->IsEngaged()))
|
||||
if (m_originalCaster && targetInfo.missCondition != SPELL_MISS_EVADE
|
||||
&& !m_originalCaster->IsFriendlyTo(unit)
|
||||
&& (!m_spellInfo->IsPositive() || m_spellInfo->HasEffect(SPELL_EFFECT_DISPEL))
|
||||
&& (m_spellInfo->HasInitialAggro() || unit->IsEngaged())
|
||||
&& !m_originalCaster->IsIgnoringCombat())
|
||||
m_originalCaster->SetInCombatWith(unit);
|
||||
|
||||
for (uint32 i = 0; i < MAX_SPELL_EFFECTS; ++i)
|
||||
|
||||
Reference in new issue
Block a user